XBee and XBee-PRO ZigBee RF modules provide cost-effective wireless connectivity to electronic devices. They are interoperable with other ZigBee PRO feature set devices, including devices from other vendors.

Dependencies:   BufferedArray

Dependents:   MBEDminiproject

Embed: (wiki syntax)

« Back to documentation index

IOSamples Class Reference

IOSamples Class Reference

A collection of digital and analog samples reported by XBee module. More...

#include <IOSamples.h>

Public Member Functions

map< Pin *, unsigned int > * getAnalogs ()
 Get all the avaliable analog values.
unsigned int getAnalog (Pin *pin)
 Get analog value from one pin.
map< Pin *, unsigned char > * getDigitals ()
 Get all the avaliable digital values.
unsigned char getDigital (Pin *pin)
 Get digital value from one pin.
unsigned int getSupplyVoltage ()
 Get supply voltage, S2 only.
void setSupplyVoltage (unsigned int voltage)
 Set supply voltage, S2 only.
void clear ()
 Cleat all the sample values.

Detailed Description

A collection of digital and analog samples reported by XBee module.

Definition at line 11 of file IOSamples.h.


Member Function Documentation

void clear (  )

Cleat all the sample values.

Definition at line 37 of file IOSamples.cpp.

unsigned int getAnalog ( Pin *  pin )

Get analog value from one pin.

Parameters:
PinXBee S1 or S2 pin object.
Returns:
0xFFFF means sample not avaliable.

Definition at line 8 of file IOSamples.cpp.

map< Pin *, unsigned int > * getAnalogs (  )

Get all the avaliable analog values.

Returns:
map<Pin,int>

Definition at line 3 of file IOSamples.cpp.

unsigned char getDigital ( Pin *  pin )

Get digital value from one pin.

Parameters:
PinXBee S1 or S2 pin object.
Returns:
LOW = 0, HIGH = 1, UNMONITORED = 2,

Definition at line 20 of file IOSamples.cpp.

map< Pin *, unsigned char > * getDigitals (  )

Get all the avaliable digital values.

Returns:
map<Pin,unsigned char>: LOW = 0, HIGH = 1, UNMONITORED = 2,

Definition at line 15 of file IOSamples.cpp.

unsigned int getSupplyVoltage (  )

Get supply voltage, S2 only.

Returns:
voltage

Definition at line 27 of file IOSamples.cpp.

void setSupplyVoltage ( unsigned int  voltage )

Set supply voltage, S2 only.

Parameters:
voltage

Definition at line 32 of file IOSamples.cpp.