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

Type/IOSamples.h

Committer:
yangcq88517
Date:
2015-10-22
Revision:
0:837e6c48e90d
Child:
2:700dc65ca3b1

File content as of revision 0:837e6c48e90d:

#ifndef UK_AC_HERTS_SMARTLAB_XBEE_IOSamples
#define UK_AC_HERTS_SMARTLAB_XBEE_IOSamples

#include "Pin.h"
#include <map>

using namespace std;

class IOSamples
{
private :
    int SUPPLY_VOLTAGE;
    
    map<Pin, int> analog;
    
    map<Pin, int> digital;

public:    
    map<Pin, int> * getAnalogs();
    
    /**
    *        -1 means not avaliable
    */
    int getAnalog(Pin * pin);
    
    map<Pin, int> * getDigitals();
    
    /**
    *        LOW = 0,
    *        HIGH = 1,
    *        UNMONITORED = 2,
    */
    int getDigital(Pin * pin);

    int getSupplyVoltage();
    
    void setSupplyVoltage(int voltage);
};

#endif