mbed Connector Endpoint interface. This interface permits a mbed endpoint to easily setup MDS resources and emit those resources to an MDS server.

Dependents:   IoT_LED_demo ServoTest uWater_Project hackathon ... more

Revision:
31:bacc63106754
Parent:
30:113c2a1d8db2
--- a/api/ResourceObserver.h	Tue Apr 07 21:30:03 2015 +0000
+++ b/api/ResourceObserver.h	Wed Apr 08 15:49:56 2015 +0000
@@ -31,8 +31,9 @@
         /**
         Default Constructor
         @param resource input the resource to observe
+        @param sleep_time input the amount of time to sleep between observations
         */
-        ResourceObserver(DynamicResource *resource);
+        ResourceObserver(DynamicResource *resource,int sleep_time);
         
         /**
         Copy Constructor
@@ -48,9 +49,30 @@
         begin the observation (ABSTRACT)
         */
         virtual void beginObservation() = 0;
+        
+        /**
+        stop the observation (ABSTRACT)
+        */
+        virtual void stopObservation() = 0;
     
+        /** 
+        we are observing?
+        */
+        bool isObserving();
+        
+        /**
+        get our sleep time
+        */
+        int getSleepTime();
+        
     protected:
+        DynamicResource *getResource();
+        void             setObserving(bool observing);
+        
+    private:
         DynamicResource *m_resource;
+        bool             m_is_observing;
+        int              m_sleep_time;
 };
 
 #endif // __RESOURCE_OBSERVER_H__
\ No newline at end of file