User Guide

139
Standard NetLinx API (SNAPI) R 1.8.0
IO Device
IIODeviceComponent
IIODeviceComponentListener
IModuleComponent
IModuleComponentListener
Name: IO Device
Interface: IIODevice
IO Device Functions
Name Component Channel Level Command Constant Notes
getIOChannelCount() IIODeviceComponent ?IOCHANNELCOUNT Query for the number of channels on an IO
device, responds with IOCHANNEL-
COUNT
getIOChannelDirection(io-chan) IIODeviceComponent ?IOCHANNELDIREC-
TION-<io-chan>
Query for direction of the I/O channel,
where <io-chan> is the integer channel
number, responds with IOCHANNEL-
DIRECTION
getIOChannelInputSense(io-chan) IIODeviceComponent ?IOCHANNELINPUT-
SENSE-<io-chan>
Query for input sense of the I/O channel,
where <io-chan> is the integer channel
number, responds with IOCHANNELIN-
PUTSENSE
getIOChannelState(io-chan) IIODeviceComponent ?IOCHANNELSTATE-
<io-chan>
Query for state of the I/O channel, where
<io-chan> is the integer channel number,
responds with IOCHANNELSTATE
setIOChannelDirection(io-chan, io-dir) IIODeviceComponent IOCHANNELDIREC-
TION-<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
setIOChannelInputSense(io-chan,io-sense) IIODeviceComponent IOCHANNELINPUT-
SENSE-<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) IIODeviceComponent 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
processIOChannelCountEvent(count) IIODeviceComponentListener IOCHANNELCOUNT-
<count>
Response to ?IOCHANNELCOUNT, where
<count> is an integer value
processIOChannelDirectionEvent(io-dir) IIODeviceComponentListener IOCHANNELDIREC-
TION-<io-chan>,<io-
dir>
Response to ?IOCHANNELDIRECTION,
where <io-chan> is the integer channel
number and <io-dir> is INPUT or OUTPUT
processIOChannelInputSenseEvent(io-
sense)
IIODeviceComponentListener IOCHANNELINPUT-
SENSE-<io-chan>,<io-
sense>
Response to ?IOCHANNELINPUT-
SENSE, where <io-chan> is the integer
channel number and <io-sense> is HIGH or
LOW
processIOChannelStateEvent(io-state) IIODeviceComponentListener IOCHANNELSTATE-
<io-chan>,<io-state>
Response to ?IOCHANNELSTATE, where
<io-chan> is the integer channel number
and <io-state> is ON or OFF