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.
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
util/SmartRestTemplate.h
- Committer:
- xinlei
- Date:
- 2015-03-20
- Revision:
- 91:48069375dffa
- Parent:
- 55:a0f7295ed6b6
File content as of revision 91:48069375dffa:
#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*);
virtual size_t writeTo(AbstractDataSink&) const;
virtual size_t writtenLength() const;
virtual DataGenerator* copy() const;
private:
const char *_buffer[SMARTREST_TEMPLATE_FIXED_SIZE];
size_t _len;
};
#endif
