Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wakaama-dev] Small help required in wakama test client

Hi David ,
  Thanks for the warm welcome and the quick reply. Really appreciate it. :) Now let me briefly explain what I am trying to do.

 My server is a slightly modified Leshan java server . For the client I am using waakama. I have a added a test resource based on the template of object_device.c. So tell what i meant by the first question is that , when the other resources which are defined according to LWM2M specs , they are shown with the name in place of Resource 1 , Resource 2 etc.. The test objects  /1024 have instances and resources. Here the resource does not have a name and just shows Resource 1. So i was thinking how could one change this name.

The battery level change is being done normally. But for instance u have to observe a particular resource and in that case how will u dynamically do it ?

PS: Sorry for the rookie type questions. I am learning.

Thanks in advance !

On Mon, May 4, 2015 at 7:28 PM, Navarro, David <david.navarro@xxxxxxxxx> wrote:

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

 

Dear All ,

  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.


_______________________________________________
wakaama-dev mailing list
wakaama-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/wakaama-dev


Back to the top