Public Types | |
enum | Error { ErrorNone = 0, AlreadyExists, BootstrapFailed, InvalidParameters, NotRegistered, Timeout, NetworkError, ResponseParseFailed, UnknownError, MemoryFail, NotAllowed, SecureConnectionFailed, DnsResolvingFailed, UnregistrationFailed, ESTEnrollmentFailed, FailedToStoreCredentials, FailedToReadCredentials } |
An enum defining different kinds of errors that can occur during various client operations. | |
enum | BindingMode { NOT_SET = 0, UDP = 0x01, UDP_QUEUE = 0x03, SMS = 0x04, SMS_QUEUE =0x06, UDP_SMS_QUEUE = 0x07, TCP = 0x09, TCP_QUEUE = 0x0b } |
An enum defining different kinds of binding modes handled for client operations. | |
enum | NetworkStack { Uninitialized = 0, LwIP_IPv4, LwIP_IPv6, Reserved, Nanostack_IPv6, ATWINC_IPv4, Unknown } |
An enum defining different kinds of network stacks that can be used by mbed Client. | |
Public Member Functions | |
virtual void | bootstrap (M2MSecurity *security_object)=0 |
Initiates bootstrapping of the client with the provided Bootstrap Server information. NOTE: This API is not supported for developers!! More... | |
virtual void | cancel_bootstrap ()=0 |
Cancels an 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!! | |
virtual void | finish_bootstrap ()=0 |
Finishes bootstrap in cases where client will be the one to finish it. | |
virtual void | register_object (M2MSecurity *security_object, const M2MBaseList &list)=0 |
Initiates the registration of a provided security object to the corresponding LWM2M server. More... | |
virtual void | register_object (M2MSecurity *security_object, const M2MObjectList &object_list)=0 |
Initiates the registration of a provided security object to the corresponding LWM2M server. More... | |
virtual bool | remove_object (M2MBase *base)=0 |
Removes an object from M2MInterface. Does not call delete on the object though. More... | |
virtual void | update_registration (M2MSecurity *security_object, const uint32_t lifetime=0)=0 |
Updates or refreshes the client's registration on the LWM2M server. More... | |
virtual void | update_registration (M2MSecurity *security_object, const M2MBaseList &list, const uint32_t lifetime=0)=0 |
Updates or refreshes the client's registration on the LWM2M server. Use this function to publish new objects to LWM2M server. More... | |
virtual void | update_registration (M2MSecurity *security_object, const M2MObjectList &object_list, const uint32_t lifetime=0)=0 |
Updates or refreshes the client's registration on the LWM2M server. Use this function to publish new objects to LWM2M server. More... | |
virtual void | unregister_object (M2MSecurity *security_object=NULL)=0 |
Unregisters the registered object from the LWM2M server. More... | |
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. More... | |
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. More... | |
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. More... | |
virtual void | set_platform_network_handler (void *handler=NULL)=0 |
Sets the network interface handler that is used by mbed Client to connect to a network over IP. More... | |
virtual void | update_endpoint (const String &name)=0 |
Updates the endpoint name. More... | |
virtual void | update_domain (const String &domain)=0 |
Updates the domain name. More... | |
virtual const String | internal_endpoint_name () const =0 |
Return internal endpoint name. More... | |
virtual const char * | error_description () const =0 |
Return error description for the latest error code. More... | |
virtual void | get_data_request (DownloadType type, const char *uri, const size_t offset, const bool async, get_data_cb, get_data_error_cb, void *context)=0 |
Sends the CoAP GET request to the server. Download type. Uri path to the data. Data offset. In async mode application must call this API again with the updated offset. If set to false then client will automatically download the whole package. Callback which is triggered once there is data available. Callback which is trigged in case of any error. | |
virtual void | post_data_request (const char *uri, const bool async, const uint16_t payload_len, uint8_t *payload_ptr, get_data_cb data_cb, get_data_error_cb error_cb, void *context)=0 |
Sends the CoAP POST request to the server. Uri path to the data. In async mode application must call this API again with the updated offset. If set to false then client will automatically download the whole package. Length of payload. , Pointer to payload buffer. Callback which is triggered once there is data available. Callback which is trigged in case of any error. | |
virtual bool | set_uri_query_parameters (const char *uri_query_params)=0 |
Set custom uri query paramaters used in LWM2M registration. Uri query params. Parameters must be in key-value format: "a=100&b=200". Maximum length can be up to 64 bytes. More... | |
virtual void | pause ()=0 |
Pauses client's timed functionality and closes network connection to the Cloud. After successful call the operation is continued by calling resume(). More... | |
virtual void | resume (void *iface, const M2MBaseList &object_list)=0 |
Resumes client's timed functionality and network connection to the Cloud. Updates registration. Can be only called after a successful call to pause(). More... | |
|
pure virtual |
Initiates bootstrapping of the client with the provided Bootstrap Server information. NOTE: This API is not supported for developers!!
security_object | A security object that contains information required for successful bootstrapping of the client. |
|
pure virtual |
Return error description for the latest error code.
|
pure virtual |
Return internal endpoint name.
|
pure virtual |
Pauses client's timed functionality and closes network connection to the Cloud. After successful call the operation is continued by calling resume().
|
pure virtual |
Initiates the registration of a provided security object to the corresponding LWM2M server.
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. |
|
pure virtual |
Initiates the registration of a provided security object to the corresponding LWM2M server.
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. |
|
pure virtual |
Removes an object from M2MInterface. Does not call delete on the object though.
|
pure virtual |
Resumes client's timed functionality and network connection to the Cloud. Updates registration. Can be only called after a successful call to pause().
iface | A handler to the network interface. |
object_list | Objects that contain information about the resources to register to the LWM2M server. |
|
pure virtual |
Sets the function callback that is called by mbed Client to provide an entropy source from an application to ensure strong entropy.
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); |
|
pure virtual |
Sets the network interface handler that is used by mbed Client to connect to a network over IP.
handler | A network interface handler that is used by mbed Client to connect. This API is optional but it provides a mechanism for different platforms to manage the usage of underlying network interface by the client. |
|
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.
callback | A function pointer that is called when the client goes to sleep. |
|
pure virtual |
Sets the function callback that is called by mbed Client to fetch a random number from an application to ensure strong entropy.
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); |
|
pure virtual |
Set custom uri query paramaters used in LWM2M registration. Uri query params. Parameters must be in key-value format: "a=100&b=200". Maximum length can be up to 64 bytes.
|
pure virtual |
Unregisters the registered object from the LWM2M server.
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. |
|
pure virtual |
Updates the domain name.
domain | New domain name |
|
pure virtual |
Updates the endpoint name.
name | New endpoint name |
|
pure virtual |
Updates or refreshes the client's registration on the LWM2M server.
security_object | A 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. |
|
pure virtual |
Updates or refreshes the client's registration on the LWM2M server. Use this function to publish new objects to LWM2M server.
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. |
object_list | Objects that contain information about the client attempting to register to the LWM2M server. |
lifetime | The lifetime of the endpoint client in seconds. If the same value has to be passed, set the default value to 0. |
|
pure virtual |
Updates or refreshes the client's registration on the LWM2M server. Use this function to publish new objects to LWM2M server.
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. |
object_list | Objects that contain information about the client attempting to register to the LWM2M server. |
lifetime | The lifetime of the endpoint client in seconds. If the same value has to be passed, set the default value to 0. |