Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: util/SmartRestTemplate.h
- Revision:
- 55:a0f7295ed6b6
- Parent:
- 41:804f6a0bda26
- Child:
- 91:48069375dffa
diff -r 7dcc8898d87d -r a0f7295ed6b6 util/SmartRestTemplate.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/SmartRestTemplate.h Thu Oct 23 12:50:07 2014 +0000 @@ -0,0 +1,27 @@ +#ifndef SMARTRESTTEMPLATE_H +#define SMARTRESTTEMPLATE_H + +#include "DataGenerator.h" + +#define SMARTREST_TEMPLATE_FIXED_SIZE 64 + +/** + * A data generator implementation holding an array of template lines + * to send via .bootstrap(). + */ +class SmartRestTemplate : public DataGenerator +{ +public: + SmartRestTemplate(); + bool add(const char*); + + size_t writeTo(AbstractDataSink&) const; + size_t writtenLength() const; + DataGenerator* copy() const; + +private: + const char *_buffer[SMARTREST_TEMPLATE_FIXED_SIZE]; + size_t _len; +}; + +#endif \ No newline at end of file