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.
Diff: Device/ExplicitAddress.cpp
- Revision:
- 6:5f31ddc17239
- Parent:
- 0:837e6c48e90d
--- a/Device/ExplicitAddress.cpp Thu Nov 05 23:03:42 2015 +0000 +++ b/Device/ExplicitAddress.cpp Sat Nov 14 16:42:36 2015 +0000 @@ -3,7 +3,7 @@ ExplicitAddress::ExplicitAddress() { } -ExplicitAddress::ExplicitAddress (const char * address, const char * explicitAddress ) +ExplicitAddress::ExplicitAddress (const unsigned char * address, const unsigned char * explicitAddress ) : Address(address) { memcpy(explicitValue, explicitAddress, 6); @@ -20,48 +20,48 @@ explicitValue[5] = ProfileID; } -char * ExplicitAddress::getExplicitValue() +unsigned char * ExplicitAddress::getExplicitValue() { return explicitValue; } -int ExplicitAddress::getSourceEndpoint() +unsigned char ExplicitAddress::getSourceEndpoint() { return explicitValue[0]; } -void ExplicitAddress::setSourceEndpoint(int SourceEndpoint) +void ExplicitAddress::setSourceEndpoint(unsigned char SourceEndpoint) { explicitValue[0] = SourceEndpoint; } -int ExplicitAddress::getDestinationEndpoint() +unsigned char ExplicitAddress::getDestinationEndpoint() { return explicitValue[1]; } -void ExplicitAddress::setDestinationEndpoint(int DestinationEndpoint) +void ExplicitAddress::setDestinationEndpoint(unsigned char DestinationEndpoint) { explicitValue[1] = DestinationEndpoint; } -int ExplicitAddress::getClusterID() +unsigned int ExplicitAddress::getClusterID() { return (explicitValue[2] << 8) | explicitValue[3]; } -void ExplicitAddress::setClusterID(int ClusterID) +void ExplicitAddress::setClusterID(unsigned int ClusterID) { explicitValue[2] = ClusterID >> 8; explicitValue[3] = ClusterID; } -int ExplicitAddress::getProfileID() +unsigned int ExplicitAddress::getProfileID() { return (explicitValue[4] << 8) | explicitValue[5]; } -void ExplicitAddress::setProfileID(int ProfileID) +void ExplicitAddress::setProfileID(unsigned int ProfileID) { explicitValue[4] = ProfileID >> 8; explicitValue[5] = ProfileID;