beautypg.com

3 using the set function on a calendar, Using the set function on a calendar -12 – Echelon i.LON SmartServer 2.0 User Manual

Page 162

background image

i.LON SmartServer 2.0 Programmer’s Reference

10-12

DW_WILDCARD
DW_WILDCARD
DW_WILDCARD

2008-05-31
DW_WILDCARD
DW_WILDCARD
DW_WILDCARD

DM_FOURTH_SUN
MN_NUL

Now consider a case where you need to create an exception to apply to every fourth Sunday of every
month, for the next 10 years. You could do so by setting the to DW_NUL, the
to DW_WILDCARD and the to DW_NUL. You would also
set the property to DM_FOURTH_SUN, and the property to
MN_NUL.


2008-04-01

DW_NUL

DW_WILDCARD
DW_NUL

2018-04-01

DW_NUL

DW_WILDCARD
DW_NUL

DM_FOURTH_SUN
MN_NUL

10.3.3

Using the Set Function on a Calendar

You can use the Set function to create new Calendars, or to overwrite the configuration of existing
Calendars. The Calendars to be created or written to are signified by a list of elements in the
input you supply to the function. The properties you must define within each

>

element are the

same, whether you are creating a new Calendar or modifying an existing Calendar. The previous
section, Using the Get Function on a Calendar, describes these properties.

Note: If you specify a Calendar with the element, the Set function deletes the specified
Calendar before the specified parameters are set. If the element is not specified, a new
Calendar is created.

The first invocation of the Set function will generate the #8000010128000000[4].UFPTcalendar.xml
file in the root/config/network///iLONApp || directory of the
SmartServer, if the file does not already exist.

When modifying an existing Calendar, any optional properties omitted from the input will be erased.
Old values will not be preserved, so you should fill in every property when writing to a Calendar, even
if you are not changing all of the values.

When creating or modifying a Calendar with this function, you may want to use output from the Get
function as the basis for your input. You would then only need to modify the values of each property
to match the new configuration you want, as opposed to re-creating an entire string like the one shown
below, to generate your input.

The following example creates a Calendar with one exception that recurs every weekday day of every
month, year after year.

Request