M2MInterface. This class provides an interface for handling all mbed Client interface operations defined in the OMA LWM2M specifications. This includes Bootstrapping, Client Registration, Device Management & Service Enablement and Information Reporting.
More...
#include <stdint.h>
#include "mbed-client/m2mvector.h"
#include "mbed-client/m2mconfig.h"
#include "mbed-client/functionpointer.h"
#include "sn_coap_protocol.h"
#include "nsdl-c/sn_nsdl_lib.h"
Go to the source code of this file.
|
typedef Vector< M2MObject * > | M2MObjectList |
|
typedef Vector< M2MBase * > | M2MBaseList |
|
typedef FP | callback_handler |
|
typedef enum request_error_e | request_error_t |
|
typedef request_error_e | get_data_req_error_e |
|
typedef request_error_t | get_data_req_error_t |
|
typedef void(* | request_data_cb) (const uint8_t *buffer, size_t buffer_size, size_t total_size, bool last_block, void *context) |
| A callback function to receive data from GET request. Transfer is completed once total size equals to received size. Caller needs to take care of counting how many bytes it has received. More...
|
|
typedef request_data_cb | get_data_cb |
|
typedef void(* | request_error_cb) (request_error_t error_code, void *context) |
| A callback function to receive errors from GET transfer. More...
|
|
typedef request_error_cb | get_data_error_cb |
|
|
enum | request_error_e { FAILED_TO_SEND_MSG = 0,
FAILED_TO_ALLOCATE_MEMORY = 1,
ERROR_NOT_REGISTERED = 2
} |
|
M2MInterface. This class provides an interface for handling all mbed Client interface operations defined in the OMA LWM2M specifications. This includes Bootstrapping, Client Registration, Device Management & Service Enablement and Information Reporting.
typedef void(* request_data_cb) (const uint8_t *buffer, size_t buffer_size, size_t total_size, bool last_block, void *context) |
A callback function to receive data from GET request. Transfer is completed once total size equals to received size. Caller needs to take care of counting how many bytes it has received.
- Parameters
-
buffer | Buffer containing the payload. |
buffer_size | Size of the payload. |
total_size | Total size of the package. This information is available only in first package. Caller must store this information to detect when the download has completed. |
last_block | True when this is the last block received, false if more blocks will come. |
context | Application context |
typedef void(* request_error_cb) (request_error_t error_code, void *context) |
A callback function to receive errors from GET transfer.
- Parameters
-
error_code | |
context | Application context |