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: Request/RemoteATCommandRequest.cpp
- Revision:
- 6:5f31ddc17239
- Parent:
- 0:837e6c48e90d
--- a/Request/RemoteATCommandRequest.cpp Thu Nov 05 23:03:42 2015 +0000 +++ b/Request/RemoteATCommandRequest.cpp Sat Nov 14 16:42:36 2015 +0000 @@ -1,11 +1,12 @@ #include "RemoteATCommandRequest.h" -RemoteATCommandRequest::RemoteATCommandRequest(char frameID, Address * remoteAddress, const char * command, OptionsBase * transmitOptions, const char * parameter, int parameterOffset, int parameterLength) +RemoteATCommandRequest::RemoteATCommandRequest(unsigned char frameID, Address * remoteAddress, const char * command, OptionsBase * transmitOptions, const unsigned char * parameter, int parameterOffset, int parameterLength) : TxBase(13 + (parameter == NULL ? 0 : parameterLength), APIFrame::Remote_Command_Request, frameID) { sets(remoteAddress->getAddressValue(), 0, 10); set(transmitOptions->getValue()); - sets(command, 0, 2); + set(command[0]); + set(command[1]); if (parameter != NULL) sets(parameter, parameterOffset, parameterLength); @@ -25,10 +26,11 @@ void RemoteATCommandRequest::setCommand(const char * command) { - sets(13, command, 0, 2); + set(13, command[0]); + set(14, command[1]); } -void RemoteATCommandRequest::setParameter(const char * parameter, int offset, int length) +void RemoteATCommandRequest::setParameter(const unsigned char * parameter, int offset, int length) { setPosition(15); sets(parameter, offset, length);