User Guide

Standard NetLinx API (SNAPI) R 1.8.0
218
Relay Device Functions (Cont.)
Name Component Channel Level Command Constant Notes
processPassbackEvent(byte[]) IModuleComponentListener When passback is on, each string received
form the device is sent to the NetLinx pro-
gram as a string. Use a DATA_EVENT
event with a STRING handler to caputre
the data from the device.
getRelayChannelCount() IRelayDeviceComponent ?RELAYCHANNEL-
COUNT
Query for the number of channels on a
relay device, responds with RELAYCHAN-
NELCOUNT
getRelayChannelState(rly-chan) IRelayDeviceComponent ?RELAYCHANNEL-
STATE-<rly-chan>
Query for the relay channel state, where
<rly-chan> is the integer channel number,
responds with RELAYCHANNELCOUNT
setRelayChannelState(rly-chan, rly-state) IRelayDeviceComponent RELAYCHANNEL-
STATE-<rly-chan>,<rly-
state>
Sets the relay channel state, where <rly-
chan> is the integer channel number and
<rly-state> is ON or OFF
processRelayChannelCountEvent(count) IRelayDeviceComponentListener RELAYCHANNEL-
COUNT-<count>
Response to ?RELAYCHANNELCOUNT,
where <count> is an integer value
processRelayChannelStateEvent(rly-state) IRelayDeviceComponentListener RELAYCHANNEL-
STATE-<rly-chan>,<rly-
state>
Response to ?RELAYCHANNELSTATE,
where <rly-chan> is the integer channel
number and <rly-state> is ON or OFF