com.rapplogic.xbee.api.wpan
Class IoSample

java.lang.Object
  extended by com.rapplogic.xbee.api.wpan.IoSample

public class IoSample
extends java.lang.Object

Series 1 XBee. Represents an I/O Sample, sent from a remote radio. Each I/O packet (RxResponseIoSample) may contain one for more IoSample instances.

This class is accessed from the getSamples() method of RxResponseIoSample, which returns an array of IoSample objects.

Provides access to XBee's 8 Digital (0-7) and 6 Analog (0-5) IO pins

Author:
andrew

Constructor Summary
IoSample(RxResponseIoSample parent)
           
 
Method Summary
 java.lang.Integer getAnalog(int pin)
          Returns the 10-bit analog value of the specified pin.
 java.lang.Integer getAnalog0()
           
 java.lang.Integer getAnalog1()
          Returns the 10-bit analog value of pin 19 (D1), when this pin configured for Analog Input (D1=2) Returns null if pin 19 is not configured for Analog input.
 java.lang.Integer getAnalog2()
          Returns the 10-bit analog value of pin 18 (D2), when this pin configured for Analog Input (D2=2) Returns null if pin 18 is not configured for Analog input.
 java.lang.Integer getAnalog3()
          Returns the 10-bit analog value of pin 17 (D3), when this pin configured for Analog Input (D3=2) Returns null if pin 17 is not configured for Analog input.
 java.lang.Integer getAnalog4()
          Returns the 10-bit analog value of pin 11 (D4), when this pin configured for Analog Input (D4=2) Returns null if pin 11 is not configured for Analog input.
 java.lang.Integer getAnalog5()
          Returns the 10-bit analog value of pin 15 (D5), when this pin configured for Analog Input (D5=2) Returns null if pin 15 is not configured for Analog input.
 java.lang.Integer getDioLsb()
           
 java.lang.Integer getDioMsb()
           
 java.lang.Boolean isD0On()
          Returns the digital value of pin 20 (D0) when this pin is configured for Digital input (D0=3) Returns null if pin 20 is not configured for Digital input
 java.lang.Boolean isD1On()
          Returns the digital value of pin 19 (D1) when this pin is configured for Digital input (D1=3) Returns null if pin 19 is not configured for Digital input
 java.lang.Boolean isD2On()
          Returns the digital value of pin 18 (D2) when this pin is configured for Digital input (D2=3) Returns null if pin 18 is not configured for Digital input
 java.lang.Boolean isD3On()
          Returns the digital value of pin 17 (D3) when this pin is configured for Digital input (D3=3) Returns null if pin 17 is not configured for Digital input
 java.lang.Boolean isD4On()
          Returns the digital value of pin 11 (D4) when this pin is configured for Digital input (D4=3) Returns null if pin 11 is not configured for Digital input
 java.lang.Boolean isD5On()
          Returns the digital value of pin 15 (D5) when this pin is configured for Digital input (D5=3) Returns null if pin 15 is not configured for Digital input
 java.lang.Boolean isD6On()
          Returns the digital value of pin 16 (D6) when this pin is configured for Digital input (D6=3) Returns null if pin 16 is not configured for Digital input
 java.lang.Boolean isD7On()
          Returns the digital value of pin 12 (D7) when this pin is configured for Digital input (D7=3) Returns null if pin 12 is not configured for Digital input
 java.lang.Boolean isD8On()
          Returns the digital value of pin 9 (D8) when this pin is configured for Digital input (D8=3) Returns null if pin 9 is not configured for Digital input
 java.lang.Boolean isDigitalOn(int pin)
          Returns the digital value of the specified pin.
 void setAnalog0(java.lang.Integer analog0)
           
 void setAnalog1(java.lang.Integer analog1)
           
 void setAnalog2(java.lang.Integer analog2)
           
 void setAnalog3(java.lang.Integer analog3)
           
 void setAnalog4(java.lang.Integer analog4)
           
 void setAnalog5(java.lang.Integer analog5)
           
 void setDioLsb(java.lang.Integer dioLsb)
           
 void setDioMsb(java.lang.Integer dioMsb)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IoSample

public IoSample(RxResponseIoSample parent)
Method Detail

setDioMsb

public void setDioMsb(java.lang.Integer dioMsb)

setDioLsb

public void setDioLsb(java.lang.Integer dioLsb)

getDioMsb

public java.lang.Integer getDioMsb()

getDioLsb

public java.lang.Integer getDioLsb()

getAnalog

public java.lang.Integer getAnalog(int pin)
Returns the 10-bit analog value of the specified pin. Returns null if pin is not configured for Analog input.

Returns:

getAnalog0

public java.lang.Integer getAnalog0()

setAnalog0

public void setAnalog0(java.lang.Integer analog0)

getAnalog1

public java.lang.Integer getAnalog1()
Returns the 10-bit analog value of pin 19 (D1), when this pin configured for Analog Input (D1=2) Returns null if pin 19 is not configured for Analog input.

Returns:

setAnalog1

public void setAnalog1(java.lang.Integer analog1)

getAnalog2

public java.lang.Integer getAnalog2()
Returns the 10-bit analog value of pin 18 (D2), when this pin configured for Analog Input (D2=2) Returns null if pin 18 is not configured for Analog input.

Returns:

setAnalog2

public void setAnalog2(java.lang.Integer analog2)

getAnalog3

public java.lang.Integer getAnalog3()
Returns the 10-bit analog value of pin 17 (D3), when this pin configured for Analog Input (D3=2) Returns null if pin 17 is not configured for Analog input.

Returns:

setAnalog3

public void setAnalog3(java.lang.Integer analog3)

getAnalog4

public java.lang.Integer getAnalog4()
Returns the 10-bit analog value of pin 11 (D4), when this pin configured for Analog Input (D4=2) Returns null if pin 11 is not configured for Analog input.

Returns:

setAnalog4

public void setAnalog4(java.lang.Integer analog4)

getAnalog5

public java.lang.Integer getAnalog5()
Returns the 10-bit analog value of pin 15 (D5), when this pin configured for Analog Input (D5=2) Returns null if pin 15 is not configured for Analog input.

Returns:

setAnalog5

public void setAnalog5(java.lang.Integer analog5)

isDigitalOn

public java.lang.Boolean isDigitalOn(int pin)
Returns the digital value of the specified pin. Returns null if pin is not configured for Digital input

Returns:

isD0On

public java.lang.Boolean isD0On()
Returns the digital value of pin 20 (D0) when this pin is configured for Digital input (D0=3) Returns null if pin 20 is not configured for Digital input

Returns:

isD1On

public java.lang.Boolean isD1On()
Returns the digital value of pin 19 (D1) when this pin is configured for Digital input (D1=3) Returns null if pin 19 is not configured for Digital input

Returns:

isD2On

public java.lang.Boolean isD2On()
Returns the digital value of pin 18 (D2) when this pin is configured for Digital input (D2=3) Returns null if pin 18 is not configured for Digital input

Returns:

isD3On

public java.lang.Boolean isD3On()
Returns the digital value of pin 17 (D3) when this pin is configured for Digital input (D3=3) Returns null if pin 17 is not configured for Digital input

Returns:

isD4On

public java.lang.Boolean isD4On()
Returns the digital value of pin 11 (D4) when this pin is configured for Digital input (D4=3) Returns null if pin 11 is not configured for Digital input

Returns:

isD5On

public java.lang.Boolean isD5On()
Returns the digital value of pin 15 (D5) when this pin is configured for Digital input (D5=3) Returns null if pin 15 is not configured for Digital input

Returns:

isD6On

public java.lang.Boolean isD6On()
Returns the digital value of pin 16 (D6) when this pin is configured for Digital input (D6=3) Returns null if pin 16 is not configured for Digital input

Returns:

isD7On

public java.lang.Boolean isD7On()
Returns the digital value of pin 12 (D7) when this pin is configured for Digital input (D7=3) Returns null if pin 12 is not configured for Digital input

Returns:

isD8On

public java.lang.Boolean isD8On()
Returns the digital value of pin 9 (D8) when this pin is configured for Digital input (D8=3) Returns null if pin 9 is not configured for Digital input

Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object