Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

util/AbstractReporter.h

Committer:
xinlei
Date:
2016-08-08
Revision:
138:f8ab852e83e7
Parent:
136:a52821cdb108

File content as of revision 138:f8ab852e83e7:

#ifndef ABSTRACTREPORTER_H
#define ABSTRACTREPORTER_H
#include <stddef.h>

class AbstractReporter
{
public:
        virtual ~AbstractReporter() {}
        virtual bool init() = 0;

        /* A string representation of the actual report.
           \return identifying name of the class.
         */
        virtual const char* name() const = 0;

        /* Dump a SmartRest report to buf.
           \param buf  buffer for the report.
           \param maxLen  maximum length of buf.
           \param status  a short summary of the report.
                          Pass NULL if the status is not interested.
           \param num  maximum length of status.
           \return  number of characters written to buf, 0 means no report, -1 means error
         */
        virtual int read(char* buf, size_t maxLen,
                            char* status, size_t num) = 0;
};

#endif /* ABSTRACTREPORTER_H */