Official reference client implementation for Cumulocity SmartREST on u-blox C027.

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Vincent Wochnik

Revision:
101:dbcd3bc51758
Parent:
99:e369fc75c000
Child:
137:a52821cdb108
--- a/util/AbstractReporter.h	Thu May 07 13:56:19 2015 +0000
+++ b/util/AbstractReporter.h	Fri May 08 12:19:57 2015 +0000
@@ -1,11 +1,28 @@
 #ifndef ABSTRACTREPORTER_H
 #define ABSTRACTREPORTER_H
+#include <stddef.h>
 
 class AbstractReporter
 {
 public:
-        virtual ~AbstractReporter() = 0;
-        virtual size_t read(const char*) = 0;
+        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.
+         */
+        virtual size_t read(char* buf, size_t maxLen,
+                            char* status, size_t num) = 0;
 };
 
 #endif /* ABSTRACTREPORTER_H */
\ No newline at end of file