XBee API operation library for mbed

Committer:
yangcq88517
Date:
Wed Mar 30 19:58:48 2016 +0000
Revision:
8:4da2ac03e35e
put every thing together and documentation bug fix

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yangcq88517 8:4da2ac03e35e 1 #ifndef UK_AC_HERTS_SMARTLAB_XBEE_ExplicitAddress
yangcq88517 8:4da2ac03e35e 2 #define UK_AC_HERTS_SMARTLAB_XBEE_ExplicitAddress
yangcq88517 8:4da2ac03e35e 3
yangcq88517 8:4da2ac03e35e 4 #include "Address.h"
yangcq88517 8:4da2ac03e35e 5
yangcq88517 8:4da2ac03e35e 6 /// ZigBeee address class for S2 hardware
yangcq88517 8:4da2ac03e35e 7 class ExplicitAddress : public Address
yangcq88517 8:4da2ac03e35e 8 {
yangcq88517 8:4da2ac03e35e 9 private:
yangcq88517 8:4da2ac03e35e 10 /// total 6 bytes : 1 byte of SourceEndpoint + 1 byte of DestinationEndpoint + 2 bytes of ClusterID + 2 bytes of ProfileID
yangcq88517 8:4da2ac03e35e 11 unsigned char explicitValue[6];
yangcq88517 8:4da2ac03e35e 12
yangcq88517 8:4da2ac03e35e 13 public:
yangcq88517 8:4da2ac03e35e 14 /**
yangcq88517 8:4da2ac03e35e 15 * Create a XBee explicit address, with all the value with defatul 0x00
yangcq88517 8:4da2ac03e35e 16 */
yangcq88517 8:4da2ac03e35e 17 ExplicitAddress();
yangcq88517 8:4da2ac03e35e 18
yangcq88517 8:4da2ac03e35e 19 /**
yangcq88517 8:4da2ac03e35e 20 * Create explicit address from existing byte aray value.
yangcq88517 8:4da2ac03e35e 21 * @param addressValue 10 bytes (8 bytes of IEEE address + 2 bytes of network address)
yangcq88517 8:4da2ac03e35e 22 * @param explicitValue 6 bytes : 1 byte of SourceEndpoint + 1 byte of DestinationEndpoint + 2 bytes of ClusterID + 2 bytes of ProfileID
yangcq88517 8:4da2ac03e35e 23 */
yangcq88517 8:4da2ac03e35e 24 ExplicitAddress (const unsigned char * addressValue, const unsigned char * explicitValue );
yangcq88517 8:4da2ac03e35e 25
yangcq88517 8:4da2ac03e35e 26 /**
yangcq88517 8:4da2ac03e35e 27 * Create address from existing value.
yangcq88517 8:4da2ac03e35e 28 * @param serialNumberHigh
yangcq88517 8:4da2ac03e35e 29 * @param serialNumberLow
yangcq88517 8:4da2ac03e35e 30 * @param networkAddress
yangcq88517 8:4da2ac03e35e 31 * @param sourceEndpoint
yangcq88517 8:4da2ac03e35e 32 * @param destinationEndpoint
yangcq88517 8:4da2ac03e35e 33 * @param clusterID
yangcq88517 8:4da2ac03e35e 34 * @param profileID
yangcq88517 8:4da2ac03e35e 35 */
yangcq88517 8:4da2ac03e35e 36 ExplicitAddress(long serialNumberHigh, long serialNumberLow, int networkAddress, int sourceEndpoint, int destinationEndpoint, int clusterID, int profileID);
yangcq88517 8:4da2ac03e35e 37
yangcq88517 8:4da2ac03e35e 38 /**
yangcq88517 8:4da2ac03e35e 39 * total 6 bytes/
yangcq88517 8:4da2ac03e35e 40 * 1 byte of SourceEndpoint + 1 byte of DestinationEndpoint + 2 bytes of ClusterID + 2 bytes of ProfileID
yangcq88517 8:4da2ac03e35e 41 */
yangcq88517 8:4da2ac03e35e 42 unsigned char * getExplicitValue();
yangcq88517 8:4da2ac03e35e 43
yangcq88517 8:4da2ac03e35e 44 unsigned char getSourceEndpoint();
yangcq88517 8:4da2ac03e35e 45
yangcq88517 8:4da2ac03e35e 46 void setSourceEndpoint(unsigned char SourceEndpoint);
yangcq88517 8:4da2ac03e35e 47
yangcq88517 8:4da2ac03e35e 48 unsigned char getDestinationEndpoint();
yangcq88517 8:4da2ac03e35e 49
yangcq88517 8:4da2ac03e35e 50 void setDestinationEndpoint(unsigned char DestinationEndpoint);
yangcq88517 8:4da2ac03e35e 51
yangcq88517 8:4da2ac03e35e 52 unsigned int getClusterID();
yangcq88517 8:4da2ac03e35e 53
yangcq88517 8:4da2ac03e35e 54 void setClusterID(unsigned int ClusterID);
yangcq88517 8:4da2ac03e35e 55
yangcq88517 8:4da2ac03e35e 56 unsigned int getProfileID();
yangcq88517 8:4da2ac03e35e 57
yangcq88517 8:4da2ac03e35e 58 void setProfileID(unsigned int ProfileID);
yangcq88517 8:4da2ac03e35e 59 };
yangcq88517 8:4da2ac03e35e 60
yangcq88517 8:4da2ac03e35e 61 #endif