mbed client lightswitch demo

Dependencies:   mbed Socket lwip-eth lwip-sys lwip

Fork of mbed-client-classic-example-lwip by Austin Blackstone

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.

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_object,Securityobject 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_object,Securityobject 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_list,Objectsthat contain information about the client attempting to register to the LWM2M server.

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:
callback,Functionpointer 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_object,Securityobject 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_object,Securityobject from which the device object needs to update registration. If there is only one LWM2M server registered this parameter can be NULL.
lifetime,Lifetimefor the endpoint client in seconds. If the same value has to be passed then put the default value as 0.

Implemented in M2MInterfaceImpl.