![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
sra-romi
Dependencies: BufferedSerial Matrix
Diff: MessageBuilder.h
- Revision:
- 1:dc87724abce8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MessageBuilder.h Thu Apr 11 09:51:28 2019 +0000 @@ -0,0 +1,29 @@ +#ifndef MESSAGEBUILDER_H_ +#define MESSAGEBUILDER_H_ + +#include "mbed.h" + +class MessageBuilder +{ +private: + static const char max_len = 32; + char *_pointer; + +public: + char message[max_len]; + + MessageBuilder(); + virtual ~MessageBuilder(); + char add(const void* data, size_t len); + char add(char data); + char add(float data); + char add(int data); + char add(unsigned int data); + void reset(); + unsigned char available(); + unsigned char length(); +}; + +#endif /* MESSAGEBUILDER_H_ */ + +