This is the Doxygen-generated API documentation for Device Management Client Lite. See the Files section for documentation about a specific API. See also Device Management documentation.
Client Lite high-level APIs allow developers to create client side applications that connect to Device Management, with LwM2M features as described in the Lightweight Machine to Machine Technical Specification.
These APIs enable you to:
The API (C code) allows quick application development and portability.
Client Lite runs on top of event loop, originating from project called Nanostack. This event handler is sometimes referred as ns_hal
and sometimes as eventOS
, so any functions prefixed with those, are part of the same eventing system. See nanostack-eventloop for its API description.
To use the Client Lite, we must first create an event handler, by calling following function:
The handler_func_ptr
is our callback function, and the return value of the call is our event handler's identifier. First parameter to our callback is event structure, that usually contain just some 8-bit type number to notify which event happened, but might carry other data as well. When creating the event handler, the event loop issues a call to the given function with type set to match init_event_type
.
Now that the even loop is initialized, we may initialise the Client Lite and give our callbacks ID for it that we received from the event loop.
When the client is running, all the actions happen through events that are coming to our callback. The event handler that we gave for the client, might look like this:
Final step for the application is then to start the even loop, which usually is just:
Please refer to Device Management Client Lite Developer Guide for in depth tutorials how to use the client. Also, see any of the given example applications for full OS specific applications. Code snippets in this page are simplified and uncomplete.