background image

Using i!-Schedule

4

 i!-Schedule

with a button/channel number, you must tell i!-Schedule what each channel you have programmed 

can do.

To specify the name of an event, you need to send a command to the scheduling virtual device 

describing the name of a given channel code. To specify the names of the commands in the above 

example, you would add some code like this:

DATA_EVENT[vdvSchEvents]

{

  ONLINE:

  {

    (* Setup events *)

    (* Outdoor Lights On *)

    SEND_COMMAND vdvSchEvents,"'SET NAME-1,Outdoor Lights Off '"

    (* Outdoor Lights Off *)

    SEND_COMMAND vdvSchEvents,"'SET NAME-2,Outdoor Lights Off'"

  }

}

Once i!-Scheduling receives these commands, it will show the user the two events in the main event 

list, sorted in alphabetical order, and allow the user to schedule these events. Whenever the user 

schedules the "Outdoor Lights On" event to run at a certain time and that time occurs, the 

scheduling engine will push button one and your code can turn the lights on.

Each event can be programmed to occur on a repeating or non-repeating basis running at a single 

time per day. Additionally, each event can have a start and end time. Events do not have end dates 

so they can only span a 24-hour period; however, that 24-hour period can span 2 dates by specifying 

an end time less than a start time. For instance, if a user schedules an event to start at sunset and end 

at sunrise, i!-Schedule will start the event at sunset of the scheduled day and stop the event at 

sunrise of the following day.

In addition to specifying the name of an event, you can also program the date and time when the 

event should occur. The scheduled virtual device supports a variety of commands to set and query 

the values of the names, dates and times for each event. See the 

Send_Commands

section on 

page 12 for more details.

Dynamic Events

So far, i!-Schedule has handled simple fixed events where each event provides a single function and 

can be scheduled only once for each day. Some scheduling applications require dynamic events 

where the user can add and delete events on the fly. i!-Schedule has a provision to handle this case.

Let's look at the programming side of i!-Schedule for a moment. For every event that needs to be 

scheduled, your program must contain a 

BUTTON_EVENT

 to handle the push and/or release of that 

event. To provide dynamic events, you must provide dynamic 

BUTTON_EVENTS

Let's say you want to schedule a new event using i!-Schedule while the program is running. This 

seems easy, you simply add the send command to name the new event:

SEND_COMMAND vdvSchEvents,"'SET NAME-14,My New Event'"

The name "My new Event" appears in the event list, the user schedules it to occur at 5:00 on 

Saturdays and everything is fine. Now Saturday 5:00 rolls around, and the scheduling engine 

pushes button 14 for this event to occur. Since you did not re-compile and download your program 

after the user scheduled the event, you would have had to add code for button event 14 prior to the 

user scheduling the event! So the problem is: how do you program for an unknown number of 

events that has not been scheduled? Additionally, since you did not define these events up front, 

Содержание I!-SCHEDULE

Страница 1: ...instruction manual integration Solutions i Schedule...

Страница 2: ...any accompanying hardware This limited warranty gives you specific legal rights You may have others which vary from state country to state country NO LIABILITY FOR CONSEQUENTIAL DAMAGES In no event sh...

Страница 3: ...ing Systems 1 Minimum PC Requirements 1 Installing i Schedule 2 Using i Schedule 3 Dynamic Events 4 Schedule Persistence 7 Time Protocols 8 Programming i Schedule 11 Channels 11 Levels 11 Send_Command...

Страница 4: ...ii i Schedule Table of Contents...

Страница 5: ...ace where the user can edit the scheduling of events Use this module if you want a user interface for scheduling You do not need to include the i ScheduleEngineMod if you use this module Supported Ope...

Страница 6: ...xt to proceed 4 In the i Schedule Select Components dialog select which example programs you would like to install 5 In the Select i Schedule Install Location dialog use the Browse button to navigate...

Страница 7: ...uld write code that responds to the pushes turning the lights on and then off Let s use relays for lighting control to simplify the example BUTTON_EVENT TP 1 Outdoor Lights On PUSH ON RELAY 1 BUTTON_E...

Страница 8: ...ddition to specifying the name of an event you can also program the date and time when the event should occur The scheduled virtual device supports a variety of commands to set and query the values of...

Страница 9: ...ecord RELEASE Switch nVCRNumber Case 1 dvVCRDev dvVCR1 Case 2 dvVCRDev dvVCR2 Case 3 dvVCRDev dvVCR3 Case 4 dvVCRDev dvVCR4 Case 5 dvVCRDev dvVCR5 Send_Command dvVCRDev SP 2 Stop Easy right If we have...

Страница 10: ...ll probably have an OK and Cancel button The Cancel would simply return them to the scheduling edit page while the OK button would return them to the scheduling edit page and update the parameters You...

Страница 11: ...doc user schedule directory All event information is stored in this file and recalled during power up Any event scheduled by the user is stored during a power cycle and will not be lost This file is...

Страница 12: ...ule has also been written to use a popular DayTime format which is used by the Linux implementation of DayTime and Tardis a popular time synching software Although not specified the Date and Time of t...

Страница 13: ...your Network administrator It is probable that your network already provides some form of Date and Time information and that information is probably obtained from a highly accurate source Most instal...

Страница 14: ...Using i Schedule 10 i Schedule...

Страница 15: ...annel Status 241 Sunrise occurred Push only 242 Sunset occurred Push only 243 Daylight savings status Push when active and release when not active with Channel Status 244 Time changed by time sever up...

Страница 16: ...ts the string parameter for event number If no string is supplied parameter is deleted GET SPARAM Event Number Param Number Gets the string parameters for event number If the parameter number is 0 all...

Страница 17: ...Weekly SMTWTFS or xMultiplier Monthly Day 1 31 xMultiplier Monthly First Second Third Fourth Last Sun Mon Tue Wed Thu Fri Sat xMultiplier Yearly Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Day 1...

Страница 18: ...Sch is a unique module name i Schedule Strings String Description ETIME Event Number Time String End Time String for event number DATE Event Number Date String Date String for event number PARAM Param...

Страница 19: ...ST rules So to handle the case you specify E sT Eastern time zone C sT Central time zone M sT Mountain time zone P sT Pacific time zone For description in DTS time rules you use Standard Description S...

Страница 20: ...FF Mar LastSun 03 00 00 00 00 00 X Here is the example configuration for London England which uses GMT and observes Daylight savings starting on the last Sunday in March at 1 00 AM jump ahead 1 hour a...

Страница 21: ...nvtSchEventList nvtSchEventInfo nvtSchEngineList nvtSchEngineInfo nvtSchEngineStats nvtSchEngineListSel nvtSchTimeSelect nvtSchDateSelect nvtSchDetailSelect strTmTzName strTmTzDesc dTmTzGmtOffset strT...

Страница 22: ...unrise Start time Before Sunset Start Time After Sunrise Start time After Sunset Start Time Hour Start time Minute Start Time AM PM End time None End time Fixed End time Sunrise End time Sunset End ti...

Страница 23: ...tSel An INTEGER array with the following variable text channels Number of Past Events Number of Current Events Number of Future Events nvtSchTimeSelect An INTEGER array with the following variable tex...

Страница 24: ...rules So to handle the case you specify E sT Eastern time zone C sT Central time zone M sT Mountain time zone P sT Pacific time zone For description in DTS time rules you use Standard Description S Da...

Страница 25: ...tSun 03 00 00 00 00 00 X Here is the example configuration for London England which uses GMT and observes Daylight savings starting on the last Sunday in March at 1 00 AM jump ahead 1 hour and the Las...

Страница 26: ...ve richardson TX 75082 USA 469 624 8000 800 222 0193 fax 469 624 7153 technical support 800 932 6993 033 004 2598 2 05 2005 AMX Corporation All rights reserved AMX the AMX logo the building icon the h...

Отзывы: