George,
Thanks!
What I did was, I use simpleclient and simpleserver example.
I edited the simpleclient --> in do_ip_discovery, I discover the oic.r.pstat. 
Then, in discover callback function I could get the coaps endpoint and port for 
/oic/sec/psat/ resource. Inside discover callback function, I put 
oc_do_observe(...) and call the handler. Here I create new function called 
observe_pstat that oc_do_observe will call. But, in my function observe_pstat, 
when I want to get the data payload, it was null. I don't know why? Should I 
put the get handler in simpleserver for get_pstat? Is it okay to have 2 get 
handler for 1 resource? 1 for get_light and 1 for get_pstat?

In the other hand, I've read the oc_pstat.h, It has get function to get the 
pstat attribute (cm, tm, etc). But, I have no idea how to use it.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#10361): 
https://iotivity.groups.io/g/iotivity-dev/message/10361
Mute This Topic: https://groups.io/mt/69378274/21656
Group Owner: [email protected]
Unsubscribe: https://iotivity.groups.io/g/iotivity-dev/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to