Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

Committer:
Cumulocity
Date:
Tue Jul 15 12:44:34 2014 +0000
Revision:
41:804f6a0bda26
refactoring of mbed agent

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Cumulocity 41:804f6a0bda26 1 #ifndef SMARTRESTTEMPLATE_H
Cumulocity 41:804f6a0bda26 2 #define SMARTRESTTEMPLATE_H
Cumulocity 41:804f6a0bda26 3
Cumulocity 41:804f6a0bda26 4 #include "DataGenerator.h"
Cumulocity 41:804f6a0bda26 5
Cumulocity 41:804f6a0bda26 6 #define SMARTREST_TEMPLATE_FIXED_SIZE 64
Cumulocity 41:804f6a0bda26 7
Cumulocity 41:804f6a0bda26 8 /**
Cumulocity 41:804f6a0bda26 9 * A data generator implementation holding an array of template lines
Cumulocity 41:804f6a0bda26 10 * to send via .bootstrap().
Cumulocity 41:804f6a0bda26 11 */
Cumulocity 41:804f6a0bda26 12 class SmartRestTemplate : public DataGenerator
Cumulocity 41:804f6a0bda26 13 {
Cumulocity 41:804f6a0bda26 14 public:
Cumulocity 41:804f6a0bda26 15 SmartRestTemplate();
Cumulocity 41:804f6a0bda26 16 bool add(const char*);
Cumulocity 41:804f6a0bda26 17
Cumulocity 41:804f6a0bda26 18 size_t writeTo(AbstractDataSink&) const;
Cumulocity 41:804f6a0bda26 19 size_t writtenLength() const;
Cumulocity 41:804f6a0bda26 20 DataGenerator* copy() const;
Cumulocity 41:804f6a0bda26 21
Cumulocity 41:804f6a0bda26 22 private:
Cumulocity 41:804f6a0bda26 23 const char *_buffer[SMARTREST_TEMPLATE_FIXED_SIZE];
Cumulocity 41:804f6a0bda26 24 size_t _len;
Cumulocity 41:804f6a0bda26 25 };
Cumulocity 41:804f6a0bda26 26
Cumulocity 41:804f6a0bda26 27 #endif