User Guide

63
Standard NetLinx API (SNAPI) R 1.8.0
IO Device
Component
Name: IO Device
Interface: IIODeviceComponent
IIODeviceComponent
Component Functions:
Name: Channel: Level: Command: Constant: Notes:
getIOChannelCount() ?IOCHANNELCOUNT Query for the number of channels on an IO device, responds with IOCHANNELCOUNT
getIOChannelDirec-
tion(io-chan)
?IOCHANNELDIRECTION-<io-
chan>
Query for direction of the I/O channel, where <io-chan> is the integer channel number,
responds with IOCHANNELDIRECTION
getIOChannelInput-
Sense(io-chan)
?IOCHANNELINPUTSENSE-<io-
chan>
Query for input sense of the I/O channel, where <io-chan> is the integer channel num-
ber, responds with IOCHANNELINPUTSENSE
getIOChannelState(io-
chan)
?IOCHANNELSTATE-<io-chan> Query for state of the I/O channel, where <io-chan> is the integer channel number,
responds with IOCHANNELSTATE
setIOChannelDirec-
tion(io-chan, io-dir)
IOCHANNELDIRECTION-<io-
chan>,<io-dir>
Sets the I/O channel direction, where <io-chan> is the integer channel number and <io-
dir> is INPUT or OUTPUT
setIOChannelInput-
Sense(io-chan,io-sense)
IOCHANNELINPUTSENSE-<io-
chan>,<io-sense>
Sets the I/O channel input sense, where <io-chan> is the integer channel number and
<io-sense> is HIGH or LOW
setIOChannelState(io-
chan, io-state)
IOCHANNELSTATE-<io-chan>,<io-
state>
Sets the I/O channel state, where <io-chan> is the integer channel number and <io-
state> is ON or OFF
Listener
Name: IO Device Listener
Interface: IIODeviceComponentListener
IIODeviceComponentListener
Listener Functions:
Name: Channel: Level: Command: Constant: Notes:
processIOChannel-
CountEvent
IOCHANNELCOUNT-<count> Response to ?IOCHANNELCOUNT, where <count> is an integer value
processIOChannelDirec-
tionEvent
IOCHANNELDIRECTION-<io-
chan>,<io-dir>
Response to ?IOCHANNELDIRECTION, where <io-chan> is the integer channel num-
ber and <io-dir> is INPUT or OUTPUT
processIOChannelInput-
SenseEvent
IOCHANNELINPUTSENSE-<io-
chan>,<io-sense>
Response to ?IOCHANNELINPUTSENSE, where <io-chan> is the integer channel
number and <io-sense> is HIGH or LOW
processIOChannel-
StateEvent
IOCHANNELSTATE-<io-chan>,<io-
state>
Response to ?IOCHANNELSTATE, where <io-chan> is the integer channel number
and <io-state> is ON or OFF