Interfacing with Standard NetLinx API (SNAPI)
Standard NetLinx API (SNAPI) R 1.7.0
4
Programming
Channels
Input function channels are used for response type functions. For instance, channel 1 notifies your program of a button push in the KeypadComponent. When your
program receives a PUSH, the button is pushed. When your program receives a RELEASE, the button is released. You should use BUTTON_EVENT's to capture
the changes of an Input function channel:
BUTTON_EVENT[dvDevice, KEYPAD_BTN]
{
PUSH: // Button was pushed
{
}
RELEASE: // Button was released
{
}
}
Momentary function channels are used to activate functions when the channels change from an OFF state to an ON state. For instance, channel 9 or the constant
POWER cycles the state of the power on the device when it turns on. No change occurs when the channels change from an ON state to an OFF state. You should
activate Momentary function channels using the PULSE, TO or MIN_TO keywords:
PULSE[dvDevice,POWER]// Cycle the state of power
TO[dvDevice,POWER]// Cycle the state of power
MIN_TO[dvDevice,POWER]// Cycle the state of power
Discrete function channels are used to activate functions when the channel changes from an OFF state to an ON state and from an ON to an OFF state. For
instance, channel 255 or the constant POWER_ON sets the state of the power on the device when it turns on and off. You should activate discrete function channels
using the ON and OFF keywords, or any syntax that changes the state of the channel such as a feedback assignment:
ON[dvDevice,POWER_ON] // Turn the power on
OFF[dvDevice,POWER_ON] // Turn the power off
[dvDevice,POWER_ON] = ![dvDevice,POWER_ON] // Cycle the state of power
Feedback channels do not active function and should only be used for feedback. These channels can be used in CHANNEL_EVENTs or feedback assignment
statements to read the status of the channel:
bCommunicationActive = [dvDevce,DEVICE_COMMUNICATING]
CHANNEL_EVENT[dvDevice,DEVICE_COMMUNICATING]
{
ON:
ON[bCommunicationActive]
OFF:
OFF[bCommunicationActive]
}
Summary of Contents for CAFE DUET
Page 16: ...Standard NetLinx API SNAPI R 1 8 0 12 ...
Page 28: ...Standard NetLinx API SNAPI R 1 8 0 24 ...
Page 34: ...Standard NetLinx API SNAPI R 1 8 0 30 ...
Page 40: ...Standard NetLinx API SNAPI R 1 8 0 36 ...
Page 46: ...Standard NetLinx API SNAPI R 1 8 0 42 ...
Page 52: ...Standard NetLinx API SNAPI R 1 8 0 48 ...
Page 58: ...Standard NetLinx API SNAPI R 1 8 0 54 ...
Page 142: ...Standard NetLinx API SNAPI R 1 8 0 138 ...
Page 148: ...Standard NetLinx API SNAPI R 1 8 0 144 ...
Page 156: ...Standard NetLinx API SNAPI R 1 8 0 152 ...
Page 172: ...Standard NetLinx API SNAPI R 1 8 0 168 ...
Page 184: ...Standard NetLinx API SNAPI R 1 8 0 180 ...
Page 192: ...Standard NetLinx API SNAPI R 1 8 0 188 ...
Page 206: ...Standard NetLinx API SNAPI R 1 8 0 202 ...
Page 226: ...Standard NetLinx API SNAPI R 1 8 0 222 ...
Page 240: ...Standard NetLinx API SNAPI R 1 8 0 236 ...
Page 244: ...Standard NetLinx API SNAPI R 1 8 0 240 ...
Page 252: ...Standard NetLinx API SNAPI R 1 8 0 248 ...
Page 268: ...Standard NetLinx API SNAPI R 1 8 0 264 ...
Page 302: ...Standard NetLinx API SNAPI R 1 8 0 298 ...
Page 328: ...Standard NetLinx API SNAPI R 1 8 0 324 ...
Page 343: ...Standard NetLinx API SNAPI Devices 339 Standard NetLinx API SNAPI R 1 7 0 ...