Hi all,
sometimes I’m faced a situation, in which I would like to call some lwm2m functions from a lwm2m_object_t callback.
e.g. when executing “/1/0/8” (LWM2M Server / Registration update trigger) or when a different LWM2M Server writes
values, which may be observed by a other LWM2M Server.
But calling lwm2m functions (e.g. “lwm2m_resource_value_changed”) would require a “lwm2m_context_t”, which is
not reachable via “lwm2m_object_t” and making it available via a “global variable” is not something, I would prefer.
I’m also not sure, if such a call of lwm2m functions from a callback is a good idea (reentrant?).
Currently I used the return values and move the “effective code” to the core (e.g. as it was for “lwm2m_resource_value_changed”).
So, any ideas, which design for such functionality would be best?
Mit freundlichen Grüßen / Best regards
Achim Kraus
Bosch Software Innovations GmbH
Communications (INST/ESY4)
Stuttgarter Straße 130
71332 Waiblingen
GERMANY
www.bosch-si.de
www.blog.bosch-si.com
achim.kraus@xxxxxxxxxxxx
Registered office: Berlin, Register court: Amtsgericht Charlottenburg, HRB 148411 B
Executives: Dr.-Ing. Rainer Kallenbach; Michael Hahn