Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wakaama-dev] object instances management

Hi Simon,

It is true that information may change underneath and wakaaama core may use obsolete data.
I think adding the lwm2m_instanceList_callback_t is a good solution. But the "moving object" should ensure that data are still valid for at least the next read or write callback call.
The two other callbacks you mention are not required as this is already implemented in the core. I try to minimize the burden on object developers.

Let me experiment with this.

Regards,
David Navarro

-----Original Message-----
From: wakaama-dev-bounces@xxxxxxxxxxx [mailto:wakaama-dev-bounces@xxxxxxxxxxx] On Behalf Of Simon Bernard
Sent: Thursday, 28 August, 2014 12:06
To: Wakaama developer discussions
Subject: [wakaama-dev] object instances management

Hi,
  I have some remarks about the object instances management.
  Wakaama need to know the list of instances Id of an object, this information is stored in lwm2m_object_t as a linked list.
  This is a problem for my Lua binding because objects and instances are stored in a lua table. So each time I add or remove an instance, I need to modify the C linked list. This mean Lua table should know C lua_object.c.
   Maybe we could replace the field :

lwm2m_list_t *           instanceList;

   by :

lwm2m_instanceList_callback_t    instanceListFunc;
typedef lwm2m_list_t * (*lwm2m_instanceList_callback_t) (lwm2m_object_t
* objectP);

and optionally :

lwm2m_instanceListSize_callback_t    instanceListSizeFunc;
typedef int    (*lwm2m_instanceListSize_callback_t) (lwm2m_object_t * 
objectP);

lwm2m_isInstanceExist_callback_t    isInstanceExistFunc;
typedef bool (*lwm2m_isInstanceExist_callback_t)   (lwm2m_object_t * 
objectP, uint16_t    instanceId);


In this case, my code could be more dynamic because each time wakaama need to know something about instances I can read it directly in lua table instead of maintaining the C linked list.

Simon
_______________________________________________
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
---------------------------------------------------------------------
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.



Back to the top