Hi Hari and welcome,
I’m not sure to understand your first question. If you are talking about the “Name” attribute (LWM2M TS §5.1), wakaama does not support it (yet). Otherwise Resources
in LWM2M Objects are identified by a 16-bit unisigned integer.
When a Resource value changes, you need to call
lwm2m_resource_value_changed(lwm2m_context_t
* contextP, lwm2m_uri_t * uriP);
with the URI of the resource, its instance or its object. The core will then send notifications to any server monitoring this resource.
If you look at the test client code, when the battery level is updated or when the user enter the command-line command “change”, the function handle_value_changed() is called.
This function calls lwm2m_value_changed() at line 180.
Regards,
David Navarro
From: wakaama-dev-bounces@xxxxxxxxxxx [mailto:wakaama-dev-bounces@xxxxxxxxxxx]
On Behalf Of Hari
Sent: Monday, 4 May, 2015 12:03
To: wakaama-dev@xxxxxxxxxxx
Subject: [wakaama-dev] Small help required in wakama test client
It is wonderful to see wakama developed. I have been following it right from the days when it was called 'liblwm2m'. I have been trying to port it to embedded
devices like the Arduino , Open Picus and others.
Great to see the wakama project up and running with observable properties too. I am in a process of creating a custom object with some static and dynamic resources and have a few questions
on. Please help me with those. here are the problems that i am facing :
-
I have created a custom test object. But however I am not able to label the resource name like in the case of the OMA specified objects. How do i give a name for my resource ?
-
Also if i make a resource observable then its value should change. So let me take a case of getting the current time. If i make it observable , then there should be a function that is autmatically getting
the current time and putting it in the resource and hence i will be able to see the time changed. As of now , only the battery level changed and that too in the client , it s called. Is there any provision to make a function call once we make a resource observable
?
Please let me know about these two
Thanks and regards
Hari Raghav
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
|