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.
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_ */ + +