Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MAX44000 PWM_Tone_Library nexpaq_mdk
Fork of LED_Demo by
M2MInterface Class Reference
#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 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 is called for indicating that the client is going to sleep when the Binding mode is selected with Queue mode. | |
| virtual void | set_random_number_callback (random_number_cb callback)=0 |
| Sets the function callback that is called by mbed-client to fetch a random number from an application to ensure strong entropy. | |
| virtual void | set_entropy_callback (entropy_cb callback)=0 |
| Sets the function callback that is called by mbed-client to provide an entropy source from an application to ensure strong entropy. | |
| 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
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 BindingMode |
Enum defining different kinds of binding modes handled for client operations.
Definition at line 68 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 NetworkStack |
Enum defining different kinds of network stacks that can be used by mbed Client.
Definition at line 83 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 The 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_object The 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_list Objects that contain information about the client attempting to register to the LWM2M server.
Implemented in M2MInterfaceImpl.
| virtual void set_entropy_callback | ( | entropy_cb | callback ) | [pure virtual] |
Sets the function callback that is called by mbed-client to provide an entropy source from an application to ensure strong entropy.
- Parameters:
-
entropy_callback A function pointer that is called by mbed-client while performing a secure handshake. Function signature, if using mbed-client-mbedtls, should be int (*mbedtls_entropy_f_source_ptr)(void *data, unsigned char *output, size_t len, size_t *olen);
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:
-
handler A 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 is called for indicating that the client is going to sleep when the Binding mode is selected with Queue mode.
- Parameters:
-
callback A function pointer that is called when the client goes to sleep.
Implemented in M2MInterfaceImpl.
| virtual void set_random_number_callback | ( | random_number_cb | callback ) | [pure virtual] |
Sets the function callback that is called by mbed-client to fetch a random number from an application to ensure strong entropy.
- Parameters:
-
random_callback A function pointer that is called by mbed-client while performing a secure handshake. The function signature should be uint32_t (*random_number_callback)(void);
Implemented in M2MInterfaceImpl.
| virtual void unregister_object | ( | M2MSecurity * | security_object = NULL ) |
[pure virtual] |
Unregisters the registered object from the LWM2M server.
- Parameters:
-
security_object The 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_object The security object from which the device object needs to update the registration. If there is only one LWM2M server registered, this parameter can be NULL. lifetime The lifetime of the endpoint client in seconds. If the same value has to be passed, set the default value to 0.
Implemented in M2MInterfaceImpl.
Generated on Tue Jul 12 2022 12:29:07 by
1.7.2
