sandbox / mbed-client

Fork of mbed-client by Christopher Haster

Embed: (wiki syntax)

« Back to documentation index

M2MInterface Class Reference

M2MInterface Class Reference

M2MInterface. More...

#include <m2minterface.h>

Inherited by M2MInterfaceImpl.

Public Types

enum  Error
 

Enum defining different kinds of errors that can occur during various client operations.

More...
enum  BindingMode
 

Enum defining different kinds of binding modes handled for client operations.

More...
enum  NetworkStack
 

Enum defining different kinds of network stacks that can be used by the mbed Client.

More...

Public Member Functions

virtual void bootstrap (M2MSecurity *security_object)=0
 Initiates bootstrapping of the client with the provided Bootstrap Server information.
virtual void cancel_bootstrap ()=0
 Cancels the ongoing bootstrapping operation of the client.
virtual void register_object (M2MSecurity *security_object, const M2MObjectList &object_list)=0
 Initiates the registration of the provided Security object to the corresponding LWM2M server.
virtual void update_registration (M2MSecurity *security_object, const uint32_t lifetime=0)=0
 Updates or refreshes the client's registration on the LWM2M server.
virtual void unregister_object (M2MSecurity *security_object=NULL)=0
 Unregisters the registered object from the LWM2M server.
virtual void set_queue_sleep_handler (callback_handler handler)=0
 Sets the function that will be called for indicating that the client is going to sleep when the Binding mode is selected with Queue mode.
virtual void set_platform_network_handler (void *handler=NULL)=0
 Sets the network interface handler that is used by client to connect to a network over IP.

Detailed Description

M2MInterface.

This class provides an interface for handling all the mbed Client Interface operations defined in the OMA LWM2M specifications. This includes Bootstrapping, Client Registration, Device Management & Service Enablement and Information Reporting.

Definition at line 40 of file m2minterface.h.


Member Enumeration Documentation

Enum defining different kinds of binding modes handled for client operations.

Definition at line 66 of file m2minterface.h.

enum Error

Enum defining different kinds of errors that can occur during various client operations.

Definition at line 48 of file m2minterface.h.

Enum defining different kinds of network stacks that can be used by the mbed Client.

Definition at line 81 of file m2minterface.h.


Member Function Documentation

virtual void bootstrap ( M2MSecurity security_object ) [pure virtual]

Initiates bootstrapping of the client with the provided Bootstrap Server information.

NOTE: This API is not supported for developers!!

Parameters:
security_objectThe security object that contains information required for successful bootstrapping of the client.

Implemented in M2MInterfaceImpl.

virtual void cancel_bootstrap (  ) [pure virtual]

Cancels the ongoing bootstrapping operation of the client.

If the client has already successfully bootstrapped this function deletes the existing bootstrap information from the client. NOTE: This API is not supported for developers!!

Implemented in M2MInterfaceImpl.

virtual void register_object ( M2MSecurity security_object,
const M2MObjectList &  object_list 
) [pure virtual]

Initiates the registration of the provided Security object to the corresponding LWM2M server.

Parameters:
security_objectThe security object that contains information required for registering to the LWM2M server. If the client wants to register to multiple LWM2M servers it must call this function once for each of the LWM2M server objects separately.
object_listObjects that contain information about the client attempting to register to the LWM2M server.

Implemented in M2MInterfaceImpl.

virtual void set_platform_network_handler ( void *  handler = NULL ) [pure virtual]

Sets the network interface handler that is used by client to connect to a network over IP.

Parameters:
handlerA network interface handler that is used by client to connect. This API is optional but provides a mechanism for different platforms to manage usage of underlying network interface by client.

Implemented in M2MInterfaceImpl.

virtual void set_queue_sleep_handler ( callback_handler  handler ) [pure virtual]

Sets the function that will be called for indicating that the client is going to sleep when the Binding mode is selected with Queue mode.

Parameters:
callbackA function pointer that will be called when the client goes to sleep.

Implemented in M2MInterfaceImpl.

virtual void unregister_object ( M2MSecurity security_object = NULL ) [pure virtual]

Unregisters the registered object from the LWM2M server.

Parameters:
security_objectThe security object from which the device object needs to be unregistered. If there is only one LWM2M server registered this parameter can be NULL.

Implemented in M2MInterfaceImpl.

virtual void update_registration ( M2MSecurity security_object,
const uint32_t  lifetime = 0 
) [pure virtual]

Updates or refreshes the client's registration on the LWM2M server.

Parameters:
security_objectThe security object from which the device object needs to update registration. If there is only one LWM2M server registered this parameter can be NULL.
lifetimeThe lifetime of the endpoint client in seconds. If the same value has to be passed then put the default value as 0.

Implemented in M2MInterfaceImpl.