demo project
Dependencies: AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL
Utils/Alert.h
- Committer:
- henryrawas
- Date:
- 2016-01-23
- Revision:
- 18:224289104fc0
- Parent:
- Alert.h@ 13:ffeff9b5e513
- Child:
- 19:2f0ec9ac1238
File content as of revision 18:224289104fc0:
/* Copyright (c) 2015 Jonathan Pickett & Microsoft. Some appropriate open source license. */ #ifndef __ALERT_H__ #include "mbed.h" #include "SafeCircBuf.h" #define AlertBufSize 8 #define AlertMsgMaxLen 120 #define AlertTypeMaxLen 16 #define MeasureNameMaxLen 16 class Alert { public: Alert() {}; void SetAlert(time_t created, char* msg, char* atype); void SetPositionAlert(time_t created, int partIx, float diff); void SetLoadAlert(time_t created, int partIx, float val); void SetHardwareAlert(time_t created, int partIx, int code); void SetTemperatureAlert(time_t created, int partIx, float temp); 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; }; extern SafeCircBuf<Alert, AlertBufSize, uint32_t> AlertBuf; #endif