XBee API operation library for mbed
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:
-
Pin XBee 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:
-
Pin XBee 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 | ( | ) |
void setSupplyVoltage | ( | unsigned int | voltage ) |
Generated on Tue Jul 12 2022 11:17:05 by 1.7.2