Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ISL29011 libxDot-dev-mbed5-deprecated
Fork of peer-to-peer_rxtx by
Diff: RadioEvent.h
- Revision:
- 62:5a4266922385
- Parent:
- 61:ebe1838a9301
--- a/RadioEvent.h Sat Mar 10 14:05:32 2018 +0000
+++ b/RadioEvent.h Thu Jun 07 23:48:49 2018 +0000
@@ -10,18 +10,29 @@
RadioEvent() {}
virtual ~RadioEvent() {}
+
+ std::string buffer;
virtual void MacEvent(LoRaMacEventFlags* flags, LoRaMacEventInfo* info) {
if (flags->Bits.Rx) {
- logDebug("Rx %d bytes", info->RxBufferSize);
if (info->RxBufferSize > 0) {
// print RX data as string and hexadecimal
std::string rx((const char*)info->RxBuffer, info->RxBufferSize);
printf("Rx data: %s [%s]\r\n", rx.c_str(), mts::Text::bin2hexString(info->RxBuffer, info->RxBufferSize).c_str());
+ buffer += rx;
}
}
}
+
+ string print(){
+ std::string pepe;
+ pepe = buffer;
+ buffer = "";
+ return(pepe);
+ }
+
+
};
#endif
