com.rapplogic.xbee.api.wpan
Class RxResponseIoSample
java.lang.Object
com.rapplogic.xbee.api.XBeeResponse
com.rapplogic.xbee.api.wpan.RxBaseResponse
com.rapplogic.xbee.api.wpan.RxResponseIoSample
- All Implemented Interfaces:
- NoRequestResponse, java.io.Serializable
public class RxResponseIoSample
- extends RxBaseResponse
- implements NoRequestResponse
Series 1 XBee. Represents an I/O sample
See http://code.google.com/p/xbee-api/wiki/XBeePins for information on configuring
the XBee for digital/analog inputs.
API ID: 64-bit 0x82, 16-bit: 0x83
- Author:
- andrew
- See Also:
- Serialized Form
Methods inherited from class com.rapplogic.xbee.api.XBeeResponse |
equals, finish, getApiId, getChecksum, getLength, getPacketBytes, getProcessedPacketBytes, getRawPacketBytes, hashCode, isError, setApiId, setChecksum, setError, setLength, setRawPacketBytes |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ADC_CHANNEL1
public static final int ADC_CHANNEL1
- See Also:
- Constant Field Values
DIO_CHANNEL1
public static final int DIO_CHANNEL1
- See Also:
- Constant Field Values
RxResponseIoSample
public RxResponseIoSample()
parse
public void parse(IPacketParser parser)
throws java.io.IOException
- Description copied from class:
XBeeResponse
- All subclasses must implement to parse the packet from the input stream.
The subclass must parse all bytes in the packet starting after the API_ID, and
up to but not including the checksum. Reading either more or less bytes that expected will
result in an error.
- Specified by:
parse
in class XBeeResponse
- Throws:
java.io.IOException
getSamples
public IoSample[] getSamples()
setSamples
public void setSamples(IoSample[] samples)
isDigitalEnabled
public boolean isDigitalEnabled(int pin)
isD0Enabled
public boolean isD0Enabled()
isD1Enabled
public boolean isD1Enabled()
isD2Enabled
public boolean isD2Enabled()
isD3Enabled
public boolean isD3Enabled()
isD4Enabled
public boolean isD4Enabled()
isD5Enabled
public boolean isD5Enabled()
isD6Enabled
public boolean isD6Enabled()
isD7Enabled
public boolean isD7Enabled()
isD8Enabled
public boolean isD8Enabled()
isAnalogEnabled
public boolean isAnalogEnabled(int pin)
isA0Enabled
public boolean isA0Enabled()
isA1Enabled
public boolean isA1Enabled()
isA2Enabled
public boolean isA2Enabled()
isA3Enabled
public boolean isA3Enabled()
isA4Enabled
public boolean isA4Enabled()
isA5Enabled
public boolean isA5Enabled()
getChannelIndicator1
public int getChannelIndicator1()
setChannelIndicator1
public void setChannelIndicator1(int channelIndicator1)
getChannelIndicator2
public int getChannelIndicator2()
setChannelIndicator2
public void setChannelIndicator2(int channelIndicator2)
containsAnalog
public boolean containsAnalog()
- Return true if this packet contains at least one analog sample
containsDigital
public boolean containsDigital()
- Returns true if this packet contains at least one digital sample
- Returns:
toString
public java.lang.String toString()
- Overrides:
toString
in class RxBaseResponse