Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

Committer:
xinlei
Date:
Fri Mar 20 13:55:21 2015 +0000
Revision:
90:423177e8a401
Parent:
87:b1de34154513
Child:
92:0acd11870c6a
Code refactoring to ease coupling

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"
vwochnik 67:c360a2b2c948 10 #include "DeviceMemory.h"
Cumulocity 41:804f6a0bda26 11 #include "DeviceBootstrap.h"
Cumulocity 41:804f6a0bda26 12 #include "DeviceIntegration.h"
vwochnik 68:0dc778a16d0d 13 #include "DeviceConfiguration.h"
vwochnik 68:0dc778a16d0d 14 #include "ConfigurationProperties.h"
vwochnik 68:0dc778a16d0d 15 #include "ConfigurationSynchronization.h"
Cumulocity 41:804f6a0bda26 16 #include "SignalQualityMeasurement.h"
Cumulocity 41:804f6a0bda26 17 #include "TemperatureMeasurement.h"
Cumulocity 41:804f6a0bda26 18 #include "AccelerationMeasurement.h"
Cumulocity 47:89ae46d5c466 19 #include "AnalogMeasurement.h"
Cumulocity 47:89ae46d5c466 20 #include "LocationUpdate.h"
vwochnik 57:4af5f1bec3a6 21 #include "OperationSupport.h"
Cumulocity 41:804f6a0bda26 22
xinlei 90:423177e8a401 23 #define MBED_AGENT_HOST "management.m2m-devicecloud.com"
xinlei 90:423177e8a401 24 //#define MBED_AGENT_HOST "developer.cumulocity.com"
Cumulocity 41:804f6a0bda26 25 #define MBED_AGENT_PORT 80
xinlei 77:f6717e4eccc4 26 #define MBED_AGENT_DEVICE_IDENTIFIER "com_cumulocity_MbedAgent_1.5.2"
Cumulocity 41:804f6a0bda26 27
Cumulocity 41:804f6a0bda26 28 class MbedAgent
Cumulocity 41:804f6a0bda26 29 {
Cumulocity 41:804f6a0bda26 30 public:
vwochnik 67:c360a2b2c948 31 MbedAgent(DeviceIO&, MDMSerial&, DeviceInfo&, DeviceMemory&);
Cumulocity 41:804f6a0bda26 32
Cumulocity 41:804f6a0bda26 33 bool init();
Cumulocity 41:804f6a0bda26 34 bool run();
Cumulocity 41:804f6a0bda26 35
Cumulocity 41:804f6a0bda26 36 protected:
Cumulocity 41:804f6a0bda26 37 void loop();
Cumulocity 41:804f6a0bda26 38
Cumulocity 41:804f6a0bda26 39 private:
Cumulocity 42:104746744af8 40 DeviceIO& _io;
Cumulocity 41:804f6a0bda26 41 MDMSerial& _mdm;
Cumulocity 41:804f6a0bda26 42 DeviceInfo& _deviceInfo;
vwochnik 67:c360a2b2c948 43 DeviceMemory& _deviceMemory;
vwochnik 68:0dc778a16d0d 44 DeviceConfiguration _deviceConfiguration;
vwochnik 68:0dc778a16d0d 45 ConfigurationProperties _configurationProperties;
vwochnik 55:a0f7295ed6b6 46 RtosSmartRest _client;
Cumulocity 41:804f6a0bda26 47 SmartRestTemplate _tpl;
Cumulocity 41:804f6a0bda26 48 DeviceBootstrap _bootstrap;
Cumulocity 41:804f6a0bda26 49 DeviceIntegration _integration;
xinlei 82:ca7430f50b2b 50 DisplayInfo _displayInfo;
vwochnik 68:0dc778a16d0d 51 ConfigurationSynchronization _configurationSynchronization;
Cumulocity 41:804f6a0bda26 52 SignalQualityMeasurement _signalQualityMeasurement;
Cumulocity 41:804f6a0bda26 53 TemperatureMeasurement _temperatureMeasurement;
Cumulocity 41:804f6a0bda26 54 AccelerationMeasurement _accelerationMeasurement;
Cumulocity 47:89ae46d5c466 55 AnalogMeasurement _analogMeasurement;
Cumulocity 47:89ae46d5c466 56 LocationUpdate _locationUpdate;
vwochnik 57:4af5f1bec3a6 57 OperationSupport _operationSupport;
Cumulocity 41:804f6a0bda26 58 long _deviceId;
Cumulocity 41:804f6a0bda26 59 };
Cumulocity 41:804f6a0bda26 60
Cumulocity 41:804f6a0bda26 61 #endif