AMX I!-SCHEDULE Instruction Manual page 10

Integration!solutions
Table of Contents

Advertisement

Using i!-Schedule
event has a Parameters page and Parameter Text associated with it. When the user edits a given user
and the event has a Parameter Page associated with it, a button labeled "Parameters" appears on the
editing page. If the user presses it, i!-Schedule generates a
the touch panel. Optionally, if the Parameter Text option is set, the button displays this text instead
of the default "Parameters".
Now, this is where your programming comes into play. The user has now been flipped to the
Parameter Page where they expect to event parameters. You must implement the code to allow the
user to enter the parameters. For our example, we would implement some
that allow the user to select from 1 of 5 VCR's and select a channel number.
Once you have gathered all the information needed to select what and where to record, you need to
tell the i!-Schedule module to store the parameters for you. For VCR numbers and Channel
numbers, it would be appropriate to use our value parameters to store this information. Use the
Value Parameter number 1 to store the VCR number and Value Parameter number 2 to store the
channel number. In practice, your page will 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 could send the new parameters values to
i!-Schedule as the user selects them, but there would be no way to "undo" them should they decide
to cancel. With that in mind, we would update i!-Schedule with the new parameters value on an OK
button handler like this:
BUTTON_EVENT[Tp,11]
{
PUSH:
{
}
}
Now, you do not need to remember which VCR number or Channel number was selected for this
event, i!-Schedule does that for you. To complete our code, we need to retrieve the parameters from
i!-Schedule when the event is triggered. i!-Schedule posts the string parameters, strings and value
parameters as levels prior to firing the event. When button event 14 is fired by
i!-Schedule, the VCR number and Channel number will be waiting on levels 1 and 2 to use. Add
this code:
DEFINE_VARIABLE
Volatile Integer nVCRNumberParam
Volatile Integer nChannelNumberParam
DEFINE_START
Create_Level vdvSchEvents,1,nVCRNumberParam
Create_Level vdvSchEvents,2,nChannelNumberParam
BUTTON_EVENT[dcVCRRecordEvents]
{
PUSH:
{
Continued
6
(* VCR Number *)
SEND_COMMAND vdvSchEvents,"'SET VPARAM-14,1,',ITOA(nVCRNumberFromUser)"
(* Channel Number *)
SEND_COMMAND vdvSchEvents,"'SET VPARAM-14,2,',ITOA(nChannelNumberFromUser)"
Switch (nVCRNumberParam)
{
Case 1:
dvVCRDev = dvVCR1
PAGE-<Parameter Page>
(* OK *)
command to
handlers
BUTTON_EVENT
(* VCR Recording *)
i!-Schedule

Advertisement

Table of Contents
loading

Table of Contents