Mistake on this page? Email us
M2MInterfaceFactory Class Reference

#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="", const String &version=DEFAULT_M2MVERSION)
 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. More...
 
static M2MSecuritycreate_security (M2MSecurity::ServerType server_type)
 Creates a security object for the mbed Client Inteface. With this, the client can manage Bootstrapping and Client Registration. More...
 
static M2MServercreate_server ()
 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. More...
 
static M2MDevicecreate_device ()
 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. More...
 
static M2MObjectcreate_object (const String &name)
 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. More...
 
static M2MResourcecreate_resource (M2MObjectList &m2m_obj_list, const uint16_t object_id, const uint16_t object_instance_id, const uint16_t resource_id, const M2MResourceInstance::ResourceType resource_type, const M2MBase::Operation allowed, bool multiple_instance=false, bool external_blockwise_store=false)
 Creates a M2M resource and places it to the given object list. More...
 

Friends

class Test_M2MInterfaceFactory
 

Detailed Description

This is a factory class that allows you to create an M2MInterface object.

Member Function Documentation

static M2MDevice* M2MInterfaceFactory::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
nameThe name of the device object.
Returns
M2MDevice An object for managing other client operations.
static M2MInterface* M2MInterfaceFactory::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 = "",
const String &  version = DEFAULT_M2MVERSION 
)
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_nameThe endpoint name of mbed Client.
endpoint_typeThe endpoint type of mbed Client, default is empty.
life_timeThe lifetime of the endpoint in seconds, if -1 it is optional.
listen_portThe listening port for the endpoint, default is 5683.
domainThe domain of the endpoint, default is empty.
modeThe binding mode of the endpoint, default is NOT_SET.
stackThe underlying network stack to be used for the connection, default is LwIP_IPv4.
context_addressThe context address for M2M-HTTP, not used currently.
versionVersion of the LwM2M Enabler that the LwM2M Client supports.
Returns
M2MInterfaceImpl An object for managing other client operations.
static M2MObject* M2MInterfaceFactory::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
nameThe name of the object.
Returns
M2MObject An object for managing other mbed Client operations.
static M2MResource* M2MInterfaceFactory::create_resource ( M2MObjectList &  m2m_obj_list,
const uint16_t  object_id,
const uint16_t  object_instance_id,
const uint16_t  resource_id,
const M2MResourceInstance::ResourceType  resource_type,
const M2MBase::Operation  allowed,
bool  multiple_instance = false,
bool  external_blockwise_store = false 
)
static

Creates a M2M resource and places it to the given object list.

Parameters
m2m_obj_listObject list where the newly created resource is added.
object_idThe OMALwM2M object identifier.
object_instance_idThe OMALwM2M object instance identifier.
resource_idThe OMALwM2M resource identifier.
resource_typeThe OMALwM2M resource type.
allowedDefines possible REST operations to the requested resource.
multiple_instanceThe resource can have multiple instances, default is false.
external_blockwise_storeIf true CoAP blocks are passed to application through callbacks otherwise handled in mbed-client-c.
Returns
Returns pointer to the created M2MResource, or a NULL on failure.
static M2MSecurity* M2MInterfaceFactory::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
ServerTypeThe type of the Security Object, bootstrap or LWM2M server.
Returns
M2MSecurity An object for managing other client operations.
static M2MServer* M2MInterfaceFactory::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.

Returns
M2MServer An object for managing server client operations.

The documentation for this class was generated from the following file: