custom for >5 resources

Fork of mbedConnectorInterface by Doug Anson

Revision:
30:113c2a1d8db2
Parent:
24:a6915e19814e
Child:
31:bacc63106754
diff -r 2f33650ca800 -r 113c2a1d8db2 api/DynamicResource.h
--- a/api/DynamicResource.h	Wed Apr 01 04:33:19 2015 +0000
+++ b/api/DynamicResource.h	Tue Apr 07 21:30:03 2015 +0000
@@ -138,19 +138,24 @@
     */
     void setDataWrapper(DataWrapper *data_wrapper) { this->m_data_wrapper = data_wrapper; }
     
+    /**
+    observe the resource
+    */
+    virtual void observe();
+    
 protected:
     int notify(uint8_t *data,int data_length);
     DataWrapper *getDataWrapper() { return this->m_data_wrapper; }
-
+    bool              m_observable;
+     
 private:
 
-    string       m_res_type;
-    uint8_t      m_res_mask;
-    bool         m_observable;
-    uint8_t      m_obs_number;
-    uint8_t     *m_obs_token_ptr;
-    uint8_t      m_obs_token_len;
-    DataWrapper *m_data_wrapper;
+    string            m_res_type;
+    uint8_t           m_res_mask;
+    uint8_t           m_obs_number;
+    uint8_t          *m_obs_token_ptr;
+    uint8_t           m_obs_token_len;
+    DataWrapper      *m_data_wrapper;
 
     // convenience method to create a string from the NSDL CoAP data buffers...
     string coapDataToString(uint8_t *coap_data_ptr,int coap_data_ptr_length);