use TCP to connect to mbed connector

Fork of mbedConnectorInterfaceWithDM by Doug Anson

Revision:
29:be035befb437
Parent:
27:b8aaf7dc7023
Child:
30:db367366b1f5
--- a/mbed-connector-interface/DeviceManager.h	Tue Jun 14 04:22:23 2016 +0000
+++ b/mbed-connector-interface/DeviceManager.h	Tue Jun 14 05:54:20 2016 +0000
@@ -35,7 +35,7 @@
 #define NUM_DEVICE_RESOURCES                9
 
 // LWM2M Firmware Resources supported
-#define NUM_FIRMWARE_RESOURCES              5
+#define NUM_FIRMWARE_RESOURCES              7
 
 // LWM2M DeRegistration Object ID
 #define LWM2M_DREGISTER_OBJ_ID              "86"
@@ -50,12 +50,13 @@
     public:
         // Optional Firmware Resource (indices)
         typedef enum {
-            PackageUri = 0,
-            PackageName = 1,
-            PackageVersion = 2, 
-            State = 3,
-            UpdateResult = 4,
-            Update = 5
+            PackageName = 0,
+            PackageVersion = 1, 
+            Update = 2,
+            Package = 3,
+            PackageURI = 4,
+            State = 5,
+            UpdateResult = 6
         } FirmwareResources;
         
         // Optional Device Resource (indices)
@@ -134,6 +135,9 @@
         // Get the Firmware Object
         M2MFirmware *getFirmwareObject();
         
+        // Process updated values
+        void process(M2MBase *base, M2MBase::BaseType type);
+        
     private:
         Logger                              *m_logger;
         void                                *m_endpoint;
@@ -166,6 +170,27 @@
         
         // Bind our mbed Cloud Resource
         void bindMBEDCloudResources();
+        
+        // Get the Device Reboot Resource from the Device Object
+        M2MResource *getDeviceRebootResource();
+        
+        // Get the Firmware Update Resource from the Firmware Object
+        M2MResource *getFirmwareUpdateResource();
+        
+        // Get the Firmware Package Resource from the Firmware Object
+        M2MResource *getFirmwarePackageResource();
+        
+        // Get the Firmware Package URI Resource from the Firmware Object
+        M2MResource *getFirmwarePackageURIResource();
+        
+        // Get the Firmware State Resource from the Firmware Object
+        M2MResource *getFirmwareStateResource();
+        
+        // Get the Firmware UpdateResult Resource from the Firmware Object
+        M2MResource *getFirmwareUpdateResultResource();
+        
+        // Get a specific resource from a given resource object
+        M2MResource *getResourceFromObject(M2MObject *obj,int instanceID,int resID);
 };
 
 #endif // __DEVICE_MANAGER_H__
\ No newline at end of file