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

M2MInterfaceFactory Class Reference

M2MInterfaceFactory Class Reference

M2MInterfaceFactory. More...

#include <m2minterfacefactory.h>

Static Public Member Functions

static M2MInterfacecreate_interface (M2MInterfaceObserver &observer, const String &endpoint_name, const String &endpoint_type="", const int32_t life_time=-1, const uint16_t listen_port=5683, const String &domain="", M2MInterface::BindingMode mode=M2MInterface::NOT_SET, M2MInterface::NetworkStack stack=M2MInterface::LwIP_IPv4, const String &context_address="")
 Creates an interface object for the mbed Client Inteface.
static M2MSecuritycreate_security (M2MSecurity::ServerType server_type)
 Creates a security object for the mbed Client Inteface.
static M2MServercreate_server ()
 Creates a server object for the mbed Client Inteface.
static M2MDevicecreate_device ()
 Creates a device object for the mbed Client Inteface.
static M2MFirmwarecreate_firmware ()
 Creates a firmware object for the mbed Client Inteface.
static M2MObjectcreate_object (const String &name)
 Creates a generic object for the mbed Client Inteface.

Detailed Description

M2MInterfaceFactory.

This is a factory class that provides an interface for creating an mbed Client Interface object for an application to utilize the LWM2M features provided by the client.

Definition at line 36 of file m2minterfacefactory.h.


Member Function Documentation

M2MDevice * create_device (  ) [static]

Creates a device object for the mbed Client Inteface.

With this, the client can manage the device resources used for client operations such as Client Registration, Device Management and Information Reporting.

Parameters:
name,Nameof the device object.
Returns:
M2MDevice, Object to manage other client operations.

Definition at line 88 of file m2minterfacefactory.cpp.

M2MFirmware * create_firmware (  ) [static]

Creates a firmware object for the mbed Client Inteface.

With this, the client can manage the firmware resources used for the client operations such as Client Registration, Device Management and Information Reporting.

Returns:
M2MFirmware, Object to manage other client operations.

Definition at line 95 of file m2minterfacefactory.cpp.

M2MInterface * create_interface ( M2MInterfaceObserver observer,
const String &  endpoint_name,
const String &  endpoint_type = "",
const int32_t  life_time = -1,
const uint16_t  listen_port = 5683,
const String &  domain = "",
M2MInterface::BindingMode  mode = M2MInterface::NOT_SET,
M2MInterface::NetworkStack  stack = M2MInterface::LwIP_IPv4,
const String &  context_address = "" 
) [static]

Creates an interface object for the mbed Client Inteface.

With this, the client can handle client operations like Bootstrapping, Client Registration, Device Management and Information Reporting.

Parameters:
endpoint_name,Endpointname of the mbed client.
endpoint_type,Endpointtype of the mbed client, default is empty.
life_time,Lifetimeof the endpoint in seconds, if -1 it is optional.
listen_port,Listeningport for the endpoint, default is 5683.
domain,Domainof the endpoint, default is empty.
mode,BindingMode of the endpoint, default is NOT_SET.
stack,Selectthe underlying network stack to be used for the connection, default is LwIP_IPv4.
context_address,Contextaddress for M2M-HTTP, not used currently.
Returns:
M2MInterfaceImpl , Object to manage other client operations.

Definition at line 26 of file m2minterfacefactory.cpp.

M2MObject * create_object ( const String &  name ) [static]

Creates a generic object for the mbed Client Inteface.

With this, the client can manage its own customized resources used for registering Device Management and Information Reporting for those resources.

Parameters:
name,Nameof the object.
id,UniqueID for the object. It should be other than the reserved LWM2M object IDs.
Returns:
M2MObject, Object to manage other mbed Client operations.

Definition at line 102 of file m2minterfacefactory.cpp.

M2MSecurity * create_security ( M2MSecurity::ServerType  server_type ) [static]

Creates a security object for the mbed Client Inteface.

With this, the client can manage Bootstrapping and Client Registration.

Parameters:
ServerType,Typeof the Security Object, bootstrap or LWM2M server.
Returns:
M2MSecurity, Object to manage other client operations.

Definition at line 74 of file m2minterfacefactory.cpp.

M2MServer * create_server (  ) [static]

Creates a server object for the mbed Client Inteface.

With this, the client can manage the server resources used for client operations such as Client Registration, server lifetime etc.

Returns:
M2MServer, Object to manage server client operations.

Definition at line 81 of file m2minterfacefactory.cpp.