System information

Table Of Contents
i.LON SmartServer 2.0 Programmer’s Reference
21-37
mon_to_fri.UCPTsaturday = 0
mon_to_fri.UCPTsunday = 0
dayBasedSchedule_weekdays.Weekdays = mon_to_fri
'create daily schedule for Saturdays
Dim dayBasedSchedule_Sat As New iLON_SmartServer.UFPTscheduler_CfgDayBased()
dayBasedSchedule_Sat.UCPTindex = 1
dayBasedSchedule_Sat.UCPTindexSpecified = True
dayBasedSchedule_Sat.UCPTdescription = "Saturday"
dayBasedSchedule_Sat.UCPTpriority = 255
'create events for Saturday schedule
dayBasedSchedule_Sat.[Event] = New iLON_SmartServer.UFPTscheduler_CfgEvent(1) {}
dayBasedSchedule_Sat.[Event](0) = New iLON_SmartServer.UFPTscheduler_CfgEvent()
dayBasedSchedule_Sat.[Event](1) = New iLON_SmartServer.UFPTscheduler_CfgEvent()
'---create ON event----
Dim onEvent_Sat As New iLON_SmartServer.UFPTscheduler_CfgEvent()
onEvent_Sat.UCPTindex = 0
onEvent_Sat.UCPTindexSpecified = True
onEvent_Sat.UCPTtime = New DateTime(2009, 6, 8, 10, 0, 0)
onEvent_Sat.UCPTvalue = New iLON_SmartServer.E_LonString(0) {}
onEvent_Sat.UCPTvalue(0) = New iLON_SmartServer.E_LonString()
onEvent_Sat.UCPTvalue(0).Value = "ON"
onEvent_Sat.UCPTvalue(0).LonFormat = "UCPTvalueDef"
dayBasedSchedule_Sat.[Event](0) = onEvent_Sat
'---create OFF event---
Dim offEvent_Sat As New iLON_SmartServer.UFPTscheduler_CfgEvent()
offEvent_Sat.UCPTindex = 1
offEvent_Sat.UCPTindexSpecified = True
offEvent_Sat.UCPTtime = New DateTime(2009, 6, 8, 19, 0, 0)
offEvent_Sat.UCPTvalue = New iLON_SmartServer.E_LonString(0) {}
offEvent_Sat.UCPTvalue(0) = New iLON_SmartServer.E_LonString()
offEvent_Sat.UCPTvalue(0).Value = "OFF"
offEvent_Sat.UCPTvalue(0).LonFormat = "UCPTvalueDef"
dayBasedSchedule_Sat.[Event](1) = offEvent_Sat
'set Saturday as only day in this daily schedule
Dim sat As New iLON_SmartServer.UFPTscheduler_CfgDayBasedWeekdays()
sat.UCPTsaturday = 1
sat.UCPTsunday = 0
sat.UCPTmonday = 0
sat.UCPTtuesday = 0
sat.UCPTwednesday = 0
sat.UCPTthursday = 0
sat.UCPTfriday = 0
dayBasedSchedule_Sat.Weekdays = sat
'create daily schedule for Sundays
Dim dayBasedSchedule_Sun As New iLON_SmartServer.UFPTscheduler_CfgDayBased()
dayBasedSchedule_Sun.UCPTindex = 2
dayBasedSchedule_Sun.UCPTindexSpecified = True
dayBasedSchedule_Sun.UCPTdescription = "Sunday"
dayBasedSchedule_Sun.UCPTpriority = 255
'create events for Sunday Schedule
dayBasedSchedule_Sun.[Event] = New
iLON_SmartServer.UFPTscheduler_CfgEvent(1) {}
dayBasedSchedule_Sun.[Event](0) = New iLON_SmartServer.UFPTscheduler_CfgEvent()
dayBasedSchedule_Sun.[Event](1) = New iLON_SmartServer.UFPTscheduler_CfgEvent()