demo project

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

Revision:
7:6723f6887d00
Child:
8:d98e2dec0f40
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Alert.h	Tue Dec 29 23:31:28 2015 +0000
@@ -0,0 +1,41 @@
+/* 
+Copyright (c) 2015 Jonathan Pickett & Microsoft. Some appropriate open source license.
+*/
+
+#ifndef __ALERT_H__
+
+#include "mbed.h"
+#include "SafeCircBuf.h"
+
+#define AlertBufSize  20
+#define AlertMsgMaxLen  200
+#define AlertTypeMaxLen  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 SetPositionAlert(int severity, time_t created, int partIx, float diff);
+    
+    int Sev;
+    
+    char AlertType[AlertTypeMaxLen];
+    
+    char Msg[AlertMsgMaxLen];
+    
+    time_t Created;
+};
+
+extern SafeCircBuf<Alert, AlertBufSize, uint32_t> AlertBuf;
+
+#endif