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

Revision:
6:5f31ddc17239
Parent:
4:a0f1fba6c2fb
--- a/Type/IOSamples.h	Thu Nov 05 23:03:42 2015 +0000
+++ b/Type/IOSamples.h	Sat Nov 14 16:42:36 2015 +0000
@@ -11,11 +11,11 @@
 class IOSamples
 {
 private :
-    int SUPPLY_VOLTAGE;
+    unsigned int SUPPLY_VOLTAGE;
 
-    map<Pin *, int> analog;
+    map<Pin *, unsigned int> analog;
 
-    map<Pin *, int> digital;
+    map<Pin *, unsigned char> digital;
 
 public:
     /**
@@ -23,25 +23,25 @@
     *
     * @returns map<Pin,int>
     */
-    map<Pin *, int> * getAnalogs();
+    map<Pin *, unsigned int> * getAnalogs();
 
     /**
     * Get analog value from one pin.
     *
     * @param Pin XBee S1 or S2 pin object.
-    * @returns -1 means sample not avaliable.
+    * @returns 0xFFFF means sample not avaliable.
     */
-    int getAnalog(Pin * pin);
+    unsigned int getAnalog(Pin * pin);
 
     /**
     * Get all the avaliable digital values.
     *
-    * @returns map<Pin,int>:
+    * @returns map<Pin,unsigned char>:
     *        LOW = 0,
     *        HIGH = 1,
     *        UNMONITORED = 2,
     */
-    map<Pin *, int> * getDigitals();
+    map<Pin *, unsigned char> * getDigitals();
 
     /**
     * Get digital value from one pin.
@@ -52,21 +52,21 @@
     *      HIGH = 1,
     *      UNMONITORED = 2,
     */
-    int getDigital(Pin * pin);
+    unsigned char getDigital(Pin * pin);
 
     /**
     * Get supply voltage, S2 only.
     *
     * @returns voltage
     */
-    int getSupplyVoltage();
+    unsigned int getSupplyVoltage();
 
     /**
     * Set supply voltage, S2 only.
     *
     * @param voltage
     */
-    void setSupplyVoltage(int voltage);
+    void setSupplyVoltage(unsigned int voltage);
 
     /**
     * Cleat all the sample values.