XBee API operation library for mbed
Diff: SmartLabXBeeCore/Indicator/ModemStatusIndicator.cpp
- Revision:
- 8:4da2ac03e35e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SmartLabXBeeCore/Indicator/ModemStatusIndicator.cpp Wed Mar 30 19:58:48 2016 +0000 @@ -0,0 +1,21 @@ +#include "ModemStatusIndicator.h" + +ModemStatusIndicator::ModemStatusIndicator(APIFrame * frame) + : RxBase(frame) +{ } + +int ModemStatusIndicator::getModemStatus() +{ + return data[1]; +} + +bool ModemStatusIndicator::convert(APIFrame * frame) +{ + if (frame == NULL) + return false; + + if (frame->getFrameType() != APIFrame::Modem_Status) + return false; + + return APIFrame::convert(frame); +} \ No newline at end of file