XBee API operation library for mbed
Embed:
(wiki syntax)
Show/hide line numbers
ExplicitAddress.h
00001 #ifndef UK_AC_HERTS_SMARTLAB_XBEE_ExplicitAddress 00002 #define UK_AC_HERTS_SMARTLAB_XBEE_ExplicitAddress 00003 00004 #include "Address.h" 00005 00006 /// ZigBeee address class for S2 hardware 00007 class ExplicitAddress : public Address 00008 { 00009 private: 00010 /// total 6 bytes : 1 byte of SourceEndpoint + 1 byte of DestinationEndpoint + 2 bytes of ClusterID + 2 bytes of ProfileID 00011 unsigned char explicitValue[6]; 00012 00013 public: 00014 /** 00015 * Create a XBee explicit address, with all the value with defatul 0x00 00016 */ 00017 ExplicitAddress(); 00018 00019 /** 00020 * Create explicit address from existing byte aray value. 00021 * @param addressValue 10 bytes (8 bytes of IEEE address + 2 bytes of network address) 00022 * @param explicitValue 6 bytes : 1 byte of SourceEndpoint + 1 byte of DestinationEndpoint + 2 bytes of ClusterID + 2 bytes of ProfileID 00023 */ 00024 ExplicitAddress (const unsigned char * addressValue, const unsigned char * explicitValue ); 00025 00026 /** 00027 * Create address from existing value. 00028 * @param serialNumberHigh 00029 * @param serialNumberLow 00030 * @param networkAddress 00031 * @param sourceEndpoint 00032 * @param destinationEndpoint 00033 * @param clusterID 00034 * @param profileID 00035 */ 00036 ExplicitAddress(long serialNumberHigh, long serialNumberLow, int networkAddress, int sourceEndpoint, int destinationEndpoint, int clusterID, int profileID); 00037 00038 /** 00039 * total 6 bytes/ 00040 * 1 byte of SourceEndpoint + 1 byte of DestinationEndpoint + 2 bytes of ClusterID + 2 bytes of ProfileID 00041 */ 00042 unsigned char * getExplicitValue(); 00043 00044 unsigned char getSourceEndpoint(); 00045 00046 void setSourceEndpoint(unsigned char SourceEndpoint); 00047 00048 unsigned char getDestinationEndpoint(); 00049 00050 void setDestinationEndpoint(unsigned char DestinationEndpoint); 00051 00052 unsigned int getClusterID(); 00053 00054 void setClusterID(unsigned int ClusterID); 00055 00056 unsigned int getProfileID(); 00057 00058 void setProfileID(unsigned int ProfileID); 00059 }; 00060 00061 #endif
Generated on Tue Jul 12 2022 11:17:04 by 1.7.2