設定一個notification的callback就是指定一個URL, 讓mbed device server可以送PUT給web server(能處理HTTP PUT request, 且必須是public IP)
URL最多只能指定一個。
Notification 的事情,包含了註冊,取消註冊,註冊到期,非同步的通知送達或者是資源改變。
資源改變的通報,必須要先向mDS subscribe 該項資源才行。
此資源必須是observable , 所以必須在裝置裡先設定好才可以
Setting Observable Mode
To set the Object to be an observing resource:
virtual void set_observable(bool observable);
By default, all the created objects are non-observable. You can set them to be observable or not observable using this API.
_object->set_observable(true);
The object can be observed from server.
_object->set_observable(false);
The object cannot be observed from server.
設定一個notification的callback就是指定一個URL, 讓mbed device server可以送PUT給web server(能處理HTTP PUT request, 且必須是public IP)
URL最多只能指定一個。
Notification 的事情,包含了註冊,取消註冊,註冊到期,非同步的通知送達或者是資源改變。
資源改變的通報,必須要先向mDS subscribe 該項資源才行。
此資源必須是observable , 所以必須在裝置裡先設定好才可以
Setting Observable Mode
To set the Object to be an observing resource:
virtual void set_observable(bool observable);
By default, all the created objects are non-observable. You can set them to be observable or not observable using this API.
_object->set_observable(true); The object can be observed from server.
_object->set_observable(false); The object cannot be observed from server.