Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SmartRestTemplate.h Source File

SmartRestTemplate.h

00001 #ifndef SMARTRESTTEMPLATE_H
00002 #define SMARTRESTTEMPLATE_H
00003 
00004 #include "DataGenerator.h"
00005 
00006 #define SMARTREST_TEMPLATE_FIXED_SIZE 64
00007 
00008 /**
00009  * A data generator implementation holding an array of template lines
00010  * to send via .bootstrap().
00011  */
00012 class SmartRestTemplate : public DataGenerator
00013 {
00014 public:
00015     SmartRestTemplate();
00016     bool add(const char*);
00017     
00018     virtual size_t writeTo(AbstractDataSink&) const;
00019     virtual size_t writtenLength() const;
00020     virtual DataGenerator* copy() const;
00021 
00022 private:
00023     const char *_buffer[SMARTREST_TEMPLATE_FIXED_SIZE];
00024     size_t _len;
00025 };
00026 
00027 #endif