Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

Committer:
xinlei
Date:
Mon Aug 08 11:05:57 2016 +0000
Revision:
138:f8ab852e83e7
Parent:
136:a52821cdb108
Etisalat and Teleena APN.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
xinlei 98:e369fc75c000 1 #ifndef ABSTRACTREPORTER_H
xinlei 98:e369fc75c000 2 #define ABSTRACTREPORTER_H
xinlei 100:dbcd3bc51758 3 #include <stddef.h>
xinlei 98:e369fc75c000 4
xinlei 98:e369fc75c000 5 class AbstractReporter
xinlei 98:e369fc75c000 6 {
xinlei 98:e369fc75c000 7 public:
xinlei 100:dbcd3bc51758 8 virtual ~AbstractReporter() {}
xinlei 100:dbcd3bc51758 9 virtual bool init() = 0;
xinlei 100:dbcd3bc51758 10
xinlei 100:dbcd3bc51758 11 /* A string representation of the actual report.
xinlei 100:dbcd3bc51758 12 \return identifying name of the class.
xinlei 100:dbcd3bc51758 13 */
xinlei 100:dbcd3bc51758 14 virtual const char* name() const = 0;
xinlei 100:dbcd3bc51758 15
xinlei 100:dbcd3bc51758 16 /* Dump a SmartRest report to buf.
xinlei 100:dbcd3bc51758 17 \param buf buffer for the report.
xinlei 100:dbcd3bc51758 18 \param maxLen maximum length of buf.
xinlei 100:dbcd3bc51758 19 \param status a short summary of the report.
xinlei 100:dbcd3bc51758 20 Pass NULL if the status is not interested.
xinlei 100:dbcd3bc51758 21 \param num maximum length of status.
xinlei 136:a52821cdb108 22 \return number of characters written to buf, 0 means no report, -1 means error
xinlei 100:dbcd3bc51758 23 */
xinlei 136:a52821cdb108 24 virtual int read(char* buf, size_t maxLen,
xinlei 100:dbcd3bc51758 25 char* status, size_t num) = 0;
xinlei 98:e369fc75c000 26 };
xinlei 98:e369fc75c000 27
xinlei 98:e369fc75c000 28 #endif /* ABSTRACTREPORTER_H */