Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

Committer:
Cumulocity
Date:
Tue Jul 15 12:44:34 2014 +0000
Revision:
41:804f6a0bda26
Child:
42:104746744af8
refactoring of mbed agent

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Cumulocity 41:804f6a0bda26 1 #ifndef MBEDAGENT_H
Cumulocity 41:804f6a0bda26 2 #define MBEDAGENT_H
Cumulocity 41:804f6a0bda26 3
Cumulocity 41:804f6a0bda26 4 #include <stddef.h>
Cumulocity 41:804f6a0bda26 5 #include "MDM.h"
Cumulocity 41:804f6a0bda26 6 #include "DeviceIO.h"
Cumulocity 41:804f6a0bda26 7 #include "MbedSmartRest.h"
Cumulocity 41:804f6a0bda26 8 #include "SmartRestTemplate.h"
Cumulocity 41:804f6a0bda26 9 #include "DeviceInfo.h"
Cumulocity 41:804f6a0bda26 10 #include "DeviceBootstrap.h"
Cumulocity 41:804f6a0bda26 11 #include "DeviceIntegration.h"
Cumulocity 41:804f6a0bda26 12 #include "SignalQualityMeasurement.h"
Cumulocity 41:804f6a0bda26 13 #include "TemperatureMeasurement.h"
Cumulocity 41:804f6a0bda26 14 #include "AccelerationMeasurement.h"
Cumulocity 41:804f6a0bda26 15
Cumulocity 41:804f6a0bda26 16 #define MBED_AGENT_HOST "developer.cumulocity.com"
Cumulocity 41:804f6a0bda26 17 #define MBED_AGENT_PORT 80
Cumulocity 41:804f6a0bda26 18 #define MBED_AGENT_DEVICE_IDENTIFIER "com_cumulocity_MbedAgent_1.0.0"
Cumulocity 41:804f6a0bda26 19 #define MBED_AGENT_INTERVAL 60.0
Cumulocity 41:804f6a0bda26 20
Cumulocity 41:804f6a0bda26 21 class MbedAgent
Cumulocity 41:804f6a0bda26 22 {
Cumulocity 41:804f6a0bda26 23 public:
Cumulocity 41:804f6a0bda26 24 MbedAgent(MDMSerial&, DeviceInfo&);
Cumulocity 41:804f6a0bda26 25
Cumulocity 41:804f6a0bda26 26 bool init();
Cumulocity 41:804f6a0bda26 27 bool run();
Cumulocity 41:804f6a0bda26 28
Cumulocity 41:804f6a0bda26 29 protected:
Cumulocity 41:804f6a0bda26 30 void loop();
Cumulocity 41:804f6a0bda26 31
Cumulocity 41:804f6a0bda26 32 private:
Cumulocity 41:804f6a0bda26 33 DeviceIO _io;
Cumulocity 41:804f6a0bda26 34 MDMSerial& _mdm;
Cumulocity 41:804f6a0bda26 35 DeviceInfo& _deviceInfo;
Cumulocity 41:804f6a0bda26 36 MbedSmartRest _client;
Cumulocity 41:804f6a0bda26 37 SmartRestTemplate _tpl;
Cumulocity 41:804f6a0bda26 38 DeviceBootstrap _bootstrap;
Cumulocity 41:804f6a0bda26 39 DeviceIntegration _integration;
Cumulocity 41:804f6a0bda26 40 SignalQualityMeasurement _signalQualityMeasurement;
Cumulocity 41:804f6a0bda26 41 TemperatureMeasurement _temperatureMeasurement;
Cumulocity 41:804f6a0bda26 42 AccelerationMeasurement _accelerationMeasurement;
Cumulocity 41:804f6a0bda26 43 long _deviceId;
Cumulocity 41:804f6a0bda26 44 };
Cumulocity 41:804f6a0bda26 45
Cumulocity 41:804f6a0bda26 46 #endif