![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
MbedAgent.h@76:b07effe83fb8, 2015-02-25 (annotated)
- Committer:
- xinlei
- Date:
- Wed Feb 25 10:06:11 2015 +0000
- Revision:
- 76:b07effe83fb8
- Parent:
- 69:237c01eb36c2
- Child:
- 77:f6717e4eccc4
watchdog: added watchdog;
Who changed what in which revision?
User | Revision | Line number | New 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 | 76:b07effe83fb8 | 23 | #define MBED_AGENT_HOST "management.m2m-devicecloud.com" |
xinlei | 76:b07effe83fb8 | 24 | // #define MBED_AGENT_HOST "developer.cumulocity.com" |
Cumulocity | 41:804f6a0bda26 | 25 | #define MBED_AGENT_PORT 80 |
vwochnik | 69:237c01eb36c2 | 26 | #define MBED_AGENT_DEVICE_IDENTIFIER "com_cumulocity_MbedAgent_1.5.1" |
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; |
vwochnik | 68:0dc778a16d0d | 50 | ConfigurationSynchronization _configurationSynchronization; |
Cumulocity | 41:804f6a0bda26 | 51 | SignalQualityMeasurement _signalQualityMeasurement; |
Cumulocity | 41:804f6a0bda26 | 52 | TemperatureMeasurement _temperatureMeasurement; |
Cumulocity | 41:804f6a0bda26 | 53 | AccelerationMeasurement _accelerationMeasurement; |
Cumulocity | 47:89ae46d5c466 | 54 | AnalogMeasurement _analogMeasurement; |
Cumulocity | 47:89ae46d5c466 | 55 | LocationUpdate _locationUpdate; |
vwochnik | 57:4af5f1bec3a6 | 56 | OperationSupport _operationSupport; |
Cumulocity | 41:804f6a0bda26 | 57 | long _deviceId; |
Cumulocity | 41:804f6a0bda26 | 58 | }; |
Cumulocity | 41:804f6a0bda26 | 59 | |
Cumulocity | 41:804f6a0bda26 | 60 | #endif |