User Tools

Site Tools


resource_observe

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
resource_observe [2017/12/18 06:48]
Taehyoung Shim [Resource Observation] adding Not Found code 4.04
resource_observe [2017/12/18 08:42]
Taehyoung Shim [Sample Application] QueryParamsMqp() "us" -> "use"
Line 15: Line 15:
 {{:​observe.png?​800|}} {{:​observe.png?​800|}}
  
-  - The client application calls resource.observe(...) to retrieve a representation from the resources.+  - The client application calls OCResource.observe(...) to retrieve a representation from the resources.
   - The call is marshalled to the stack which is either running in-process or out-of-process (daemon).   - The call is marshalled to the stack which is either running in-process or out-of-process (daemon).
   - The C API is called to dispatch the request. The call may look like this: <​code>​ OCDoResource(OC_REST_GET | OC_REST_OBSERVE,​ "//​192.168.1.11/​light/​1,​ 0, 0, OC_CONFIRMABLE,​ callback);</​code>​   - The C API is called to dispatch the request. The call may look like this: <​code>​ OCDoResource(OC_REST_GET | OC_REST_OBSERVE,​ "//​192.168.1.11/​light/​1,​ 0, 0, OC_CONFIRMABLE,​ callback);</​code>​
Line 74: Line 74:
 </​code>​ </​code>​
  
-The client specifies how it wants to observe via OBSERVE_TYPE_TO_USE. QueryParamsMap() ​us the map which can have the query parameter name and value. observeHandler is the callback that handles the observation result. qos is specifies the communication quality, e.g. specifying the notification to be confirmable or non-confirmable.+The client specifies how it wants to observe via OBSERVE_TYPE_TO_USE. QueryParamsMap() ​use the map which can have the query parameter name and value. observeHandler is the callback that handles the observation result. qos is specifies the communication quality, e.g. specifying the notification to be confirmable or non-confirmable.
  
 An example of observehandler can look like the following: An example of observehandler can look like the following:
resource_observe.txt ยท Last modified: 2017/12/18 08:42 by Taehyoung Shim