Version FC
Dependencies: DmTftLibrary eeprom SX1280Lib filesystem mbed
Fork of MSNV2-Terminal_V1-5 by
Diff: ClearMessagePart.hpp
- Revision:
- 24:92c30dabfda4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ClearMessagePart.hpp Tue Sep 11 21:45:52 2018 +0000 @@ -0,0 +1,40 @@ +#ifndef __CLEARMESSAGEPART_HPP__ +#define __CLEARMESSAGEPART_HPP__ + +#include <string> + +#include "Context.h" + +#ifdef TEST_ENVIRONMENT +#include <cstdint> +#else +#include <stdint.h> +#endif + + +namespace misnet { + class ClearMessagePart; +} + + +class misnet::ClearMessagePart { + public: + // Addressing mode + enum ADDRESSING_MODE { + SMART_TOOL = 0, + GENERIC = 1, + IOT = 2, + BROADCAST = 3 + }; + + ClearMessagePart(uint16_t addressingMode) : _buffer(addressingMode << 14) { + } + + // Returns a string that represents the data to be sent to gateway + std::string serialize(); + + protected: + uint16_t _buffer; // Buffer holding the memory representation of the clear message part +}; + +#endif // __CLEARMESSAGEPART_HPP__