Interfacing with Standard NetLinx API (SNAPI)
Channels
In SNAPI, there are four kinds of channels: Input Function Channels, Momentary Function Channels, Discrete Function Channels and Feedback Channels.
Input function channels are used for response type functions, such as when a device wants to inform your program of an interesting event, similar to a button push
on a touch panel. For instance, channel 1 is the input function channel for processButtonStateEvent (). When the module has information about the push or release
of a button, the module will send a PUSH or RELEASE.
Momentary function channels are used for momentary type functions and do not provide discrete feedback. For instance, channel 9 is the momentary function
channel for cyclePower(). When pulsed, the channel cycles the state of power on the device and only provides momentary feedback, i.e. the channel is on only
while this function is activated.
Discrete function channels are used for discrete type functions and usually provide discrete feedback. For instance, channel 255 is the discrete function channel for
setPower(); When turned on, this channel sets the state of the power on the device to on. When turned off, this channel sets the state of the power on the device to
off. This channel provides discrete feedback as well; this channel is on if and only if the state of the power on the device is on. In most cases, the channel is listed
as a Discrete function channel next to the function the channel controls and as a Feedback channel next to the feedback function that controls this channel.
Feedback channels provide discrete feedback only. For instance, channel 251 is the feedback channel of Communication Active. This channel is on if and only if
the module is able to communicate to the device.
Levels
Levels in SNAPI are used for both function and feedback. In some cases, a level is only used for feedback, such as temperature, while some levels are used for
function and feedback, such a volume. In most cases, level ranges are from 0-255. All exceptions to this rule are noted, and are only used when the level range is
not bounded by a minimum and a maximum, such as temperature.
Standard NetLinx API (SNAPI) R 1.8.0
2
Need help?
Do you have a question about the CAFE DUET STANDARD NETLINX API (SNAPI) COMPONENTS AND LISTENERS and is the answer not in the manual?
Questions and answers