Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

Committer:
vwochnik
Date:
Thu Oct 30 13:38:20 2014 +0000
Revision:
65:a62dbef2f924
Parent:
64:31a640c32399
Child:
66:31c754c36ed7
operation support

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"
vwochnik 55:a0f7295ed6b6 7 #include "RtosSmartRest.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 47:89ae46d5c466 15 #include "AnalogMeasurement.h"
Cumulocity 47:89ae46d5c466 16 #include "LocationUpdate.h"
vwochnik 57:4af5f1bec3a6 17 #include "OperationSupport.h"
Cumulocity 41:804f6a0bda26 18
Cumulocity 41:804f6a0bda26 19 #define MBED_AGENT_HOST "developer.cumulocity.com"
Cumulocity 41:804f6a0bda26 20 #define MBED_AGENT_PORT 80
vwochnik 65:a62dbef2f924 21 #define MBED_AGENT_DEVICE_IDENTIFIER "com_cumulocity_MbedAgent_1.4.1"
Cumulocity 41:804f6a0bda26 22 #define MBED_AGENT_INTERVAL 60.0
Cumulocity 41:804f6a0bda26 23
Cumulocity 41:804f6a0bda26 24 class MbedAgent
Cumulocity 41:804f6a0bda26 25 {
Cumulocity 41:804f6a0bda26 26 public:
Cumulocity 42:104746744af8 27 MbedAgent(DeviceIO&, MDMSerial&, DeviceInfo&);
Cumulocity 41:804f6a0bda26 28
Cumulocity 41:804f6a0bda26 29 bool init();
Cumulocity 41:804f6a0bda26 30 bool run();
Cumulocity 41:804f6a0bda26 31
Cumulocity 41:804f6a0bda26 32 protected:
Cumulocity 41:804f6a0bda26 33 void loop();
Cumulocity 41:804f6a0bda26 34
Cumulocity 41:804f6a0bda26 35 private:
Cumulocity 42:104746744af8 36 DeviceIO& _io;
Cumulocity 41:804f6a0bda26 37 MDMSerial& _mdm;
Cumulocity 41:804f6a0bda26 38 DeviceInfo& _deviceInfo;
vwochnik 55:a0f7295ed6b6 39 RtosSmartRest _client;
Cumulocity 41:804f6a0bda26 40 SmartRestTemplate _tpl;
Cumulocity 41:804f6a0bda26 41 DeviceBootstrap _bootstrap;
Cumulocity 41:804f6a0bda26 42 DeviceIntegration _integration;
Cumulocity 41:804f6a0bda26 43 SignalQualityMeasurement _signalQualityMeasurement;
Cumulocity 41:804f6a0bda26 44 TemperatureMeasurement _temperatureMeasurement;
Cumulocity 41:804f6a0bda26 45 AccelerationMeasurement _accelerationMeasurement;
Cumulocity 47:89ae46d5c466 46 AnalogMeasurement _analogMeasurement;
Cumulocity 47:89ae46d5c466 47 LocationUpdate _locationUpdate;
vwochnik 57:4af5f1bec3a6 48 OperationSupport _operationSupport;
Cumulocity 41:804f6a0bda26 49 long _deviceId;
Cumulocity 41:804f6a0bda26 50 };
Cumulocity 41:804f6a0bda26 51
Cumulocity 41:804f6a0bda26 52 #endif