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:
4:a0f1fba6c2fb
Parent:
2:700dc65ca3b1
Child:
6:5f31ddc17239
--- a/Type/IOSamples.h	Mon Oct 26 18:04:12 2015 +0000
+++ b/Type/IOSamples.h	Fri Oct 30 00:38:40 2015 +0000
@@ -5,37 +5,72 @@
 #include <map>
 
 using namespace std;
-
+/**
+* A collection of digital and analog samples reported by XBee module.
+*/
 class IOSamples
 {
 private :
     int SUPPLY_VOLTAGE;
-    
+
     map<Pin *, int> analog;
-    
+
     map<Pin *, int> digital;
 
-public:    
+public:
+    /**
+    * Get all the avaliable analog values.
+    *
+    * @returns map<Pin,int>
+    */
     map<Pin *, int> * getAnalogs();
-    
+
     /**
-    *        -1 means not avaliable
+    * Get analog value from one pin.
+    *
+    * @param Pin XBee S1 or S2 pin object.
+    * @returns -1 means sample not avaliable.
     */
     int getAnalog(Pin * pin);
-    
-    map<Pin *, int> * getDigitals();
-    
+
     /**
+    * Get all the avaliable digital values.
+    *
+    * @returns map<Pin,int>:
     *        LOW = 0,
     *        HIGH = 1,
     *        UNMONITORED = 2,
     */
+    map<Pin *, int> * getDigitals();
+
+    /**
+    * Get digital value from one pin.
+    *
+    * @param Pin XBee S1 or S2 pin object.
+    * @returns
+    *      LOW = 0,
+    *      HIGH = 1,
+    *      UNMONITORED = 2,
+    */
     int getDigital(Pin * pin);
 
+    /**
+    * Get supply voltage, S2 only.
+    *
+    * @returns voltage
+    */
     int getSupplyVoltage();
-    
+
+    /**
+    * Set supply voltage, S2 only.
+    *
+    * @param voltage
+    */
     void setSupplyVoltage(int voltage);
-    
+
+    /**
+    * Cleat all the sample values.
+    */
     void clear();
 };