demo project

Dependencies:   AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL

Revision:
13:ffeff9b5e513
Parent:
8:d98e2dec0f40
--- a/Alert.h	Thu Jan 07 17:31:23 2016 +0000
+++ b/Alert.h	Fri Jan 15 22:02:46 2016 +0000
@@ -7,36 +7,39 @@
 #include "mbed.h"
 #include "SafeCircBuf.h"
 
-#define AlertBufSize  20
-#define AlertMsgMaxLen  200
+#define AlertBufSize  8
+#define AlertMsgMaxLen  120
 #define AlertTypeMaxLen  16
+#define MeasureNameMaxLen  16
 
-enum AlertSeverity
-{
-    AS_Info     = 0,
-    AS_Warn     = 1,
-    AS_Error    = 2
-};
 
 class Alert
 {
 public:
     Alert() {};
     
-    void SetAlert(int severity, time_t created, char* msg, char* atype);
+    void SetAlert(time_t created, char* msg, char* atype);
     
-    void SetPositionAlert(int severity, time_t created, int partIx, float diff);
+    void SetPositionAlert(time_t created, int partIx, float diff);
+    
+    void SetLoadAlert(time_t created, int partIx, float val);
     
-    void SetHardwareAlert(int severity, time_t created, int partIx, int code);
+    void SetHardwareAlert(time_t created, int partIx, int code);
     
-    void SetTemperatureAlert(int severity, time_t created, int partIx, float temp);
+    void SetTemperatureAlert(time_t created, int partIx, float temp);
     
-    int Sev;
+    void SetVoltageAlert(time_t created, int partIx, float val);
     
     char AlertType[AlertTypeMaxLen];
     
     char Msg[AlertMsgMaxLen];
     
+    int Index;
+    
+    char MeasureName[MeasureNameMaxLen];
+    
+    float Value;
+    
     time_t Created;
 };