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

Committer:
yangcq88517
Date:
Sat Nov 14 16:42:36 2015 +0000
Revision:
6:5f31ddc17239
Parent:
4:a0f1fba6c2fb
change to unsigned char array

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yangcq88517 0:837e6c48e90d 1 #include "RemoteCommandOptions.h"
yangcq88517 0:837e6c48e90d 2
yangcq88517 0:837e6c48e90d 3
yangcq88517 0:837e6c48e90d 4 RemoteCommandOptions::RemoteCommandOptions()
yangcq88517 0:837e6c48e90d 5 : TransmitOptions()
yangcq88517 0:837e6c48e90d 6 { }
yangcq88517 0:837e6c48e90d 7
yangcq88517 6:5f31ddc17239 8 RemoteCommandOptions::RemoteCommandOptions(unsigned char option)
yangcq88517 0:837e6c48e90d 9 : TransmitOptions(option)
yangcq88517 0:837e6c48e90d 10 { }
yangcq88517 0:837e6c48e90d 11
yangcq88517 0:837e6c48e90d 12 RemoteCommandOptions::RemoteCommandOptions(bool disable_retries_and_route_repair, bool apply_changes, bool enable_APS_encryption, bool use_extended_transmission_timeout)
yangcq88517 0:837e6c48e90d 13 : TransmitOptions(disable_retries_and_route_repair, enable_APS_encryption, use_extended_transmission_timeout)
yangcq88517 0:837e6c48e90d 14 {
yangcq88517 0:837e6c48e90d 15 if (apply_changes)
yangcq88517 0:837e6c48e90d 16 value |= 0x02;
yangcq88517 0:837e6c48e90d 17 }
yangcq88517 0:837e6c48e90d 18
yangcq88517 4:a0f1fba6c2fb 19 RemoteCommandOptions * RemoteCommandOptions::ApplyChanges = new RemoteCommandOptions (0x02);
yangcq88517 0:837e6c48e90d 20
yangcq88517 0:837e6c48e90d 21 void RemoteCommandOptions::setApplyChanges(bool status)
yangcq88517 0:837e6c48e90d 22 {
yangcq88517 0:837e6c48e90d 23 if (status)
yangcq88517 0:837e6c48e90d 24 value |= 0x02;
yangcq88517 0:837e6c48e90d 25 else
yangcq88517 0:837e6c48e90d 26 value &= 0xFD;
yangcq88517 0:837e6c48e90d 27 }
yangcq88517 0:837e6c48e90d 28
yangcq88517 0:837e6c48e90d 29 bool RemoteCommandOptions::getApplyChanges()
yangcq88517 0:837e6c48e90d 30 {
yangcq88517 0:837e6c48e90d 31 if (value & 0x02 == 0x02)
yangcq88517 0:837e6c48e90d 32 return true;
yangcq88517 0:837e6c48e90d 33 else return false;
yangcq88517 0:837e6c48e90d 34 }