![]() |
m2mb API docs
25.30.003
m2mb API sets documentation
|
Header file for m2mb_lwm2m APIs. More...
Go to the source code of this file.
Typedefs | |
| typedef HANDLE | M2MB_LWM2M_HANDLE |
| typedef struct M2MB_LWM2M_FOTA_STATUS_REQ_TAG | M2MB_LWM2M_FOTA_STATUS_REQ_T |
| typedef struct M2MB_LWM2M_FOTA_STATE_TAG | M2MB_LWM2M_FOTA_STATE_T |
| typedef struct M2MB_LWM2M_FOTA_STATE_RES_TAG | M2MB_LWM2M_FOTA_STATE_RES_T |
| typedef struct M2MB_LWM2M_GET_LIST_NUM_RES_TAG | M2MB_LWM2M_GET_LIST_NUM_RES_T |
| typedef struct M2MB_LWM2M_LIST_ELEMENT_RES_TAG | M2MB_LWM2M_LIST_ELEMENT_RES_T |
| typedef struct M2MB_LWM2M_LIST_RES_TAG | M2MB_LWM2M_LIST_RES_T |
| typedef void(* | m2mb_lwm2m_ind_callback) (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_EVENT_E event, UINT16 resp_size, void *resp_struct, void *userdata) |
| typedef struct M2MB_LWM2M_GET_REG_NUM_RES_TAG | M2MB_LWM2M_GET_REG_NUM_RES_T |
| typedef struct M2MB_LWM2M_REG_ELEMENT_RES_TAG | M2MB_LWM2M_REG_ELEMENT_RES_T |
| typedef struct M2MB_LWM2M_REG_PARAM_TAG | M2MB_LWM2M_REG_PARAM_T |
| typedef struct M2MB_LWM2M_REG_RES_TAG | M2MB_LWM2M_REG_RES_T |
| typedef struct M2MB_LWM2M_CFG_PARAM_TAG | M2MB_LWM2M_CFG_PARAM_T |
| typedef struct M2MB_LWM2M_CFG_RES_TAG | M2MB_LWM2M_CFG_RES_T |
| typedef struct M2MB_LWM2M_OBJSET_PARAM_TAG | M2MB_LWM2M_OBJSET_PARAM_T |
| typedef struct M2MB_LWM2M_OBJSET_RES_TAG | M2MB_LWM2M_OBJSET_RES_T |
| typedef struct M2MB_LWM2M_OBJGET_PARAM_TAG | M2MB_LWM2M_OBJGET_PARAM_T |
| typedef struct M2MB_LWM2M_OBJGET_RES_TAG | M2MB_LWM2M_OBJGET_RES_T |
Enumerations | |
| enum | M2MB_LWM2M_URI_LENGTH_E { M2MB_LWM2M_URI_0_FIELDS = 0, M2MB_LWM2M_URI_1_FIELDS, M2MB_LWM2M_URI_2_FIELDS, M2MB_LWM2M_URI_3_FIELDS, M2MB_LWM2M_URI_4_FIELDS, M2MB_LWM2M_URI_MAX_NUM } |
| enum | M2MB_LWM2M_EN_MODE_E { M2MB_LWM2M_MODE_NO_ACK, M2MB_LWM2M_MODE_ACK, M2MB_LWM2M_MODE_MAX_NUM } |
| enum | M2MB_LWM2M_ACK_ACTION_E { M2MB_LWM2M_ACTION_ACK = 1, M2MB_LWM2M_ACTION_DEFER, M2MB_LWM2M_ACTION_MAX_NUM } |
| enum | M2MB_LWM2MENA_CMD_TYPE_E { M2MB_LWM2MENA_CMD_TYPE_SET = 0, M2MB_LWM2MENA_CMD_TYPE_READ, M2MB_LWM2MENA_CMD_TYPE_MAX_NUM } |
| enum | M2MB_LWM2M_EVENT_E { M2MB_LWM2M_ENABLE_RES = 0, M2MB_LWM2M_DISABLE_RES, M2MB_LWM2M_ACK_RES, M2MB_LWM2M_READ_RES, M2MB_LWM2M_WRITE_RES, M2MB_LWM2M_EXEC_RES, M2MB_LWM2M_SET_RES, M2MB_LWM2M_GET_RES, M2MB_LWM2M_GET_STAT_RES, M2MB_LWM2M_STS_RES, M2MB_LWM2M_MON_RES, M2MB_LWM2M_NEW_INST_RES, M2MB_LWM2M_NFYACK_STATUS_RES, M2MB_LWM2M_NFYACK_URI_RES, M2MB_LWM2M_NFYACK_LIST_RES, M2MB_LWM2M_GET_TYPE_RES, M2MB_LWM2M_CIPHER_CFG_RES, M2MB_LWM2M_FOTA_CFG_RES, M2MB_LWM2M_CIPHER_CFG_READ_RES, M2MB_LWM2M_FOTA_CFG_READ_RES, M2MB_LWM2M_FOTA_ACK_RES, M2MB_LWM2M_FOTA_STATE_RES, M2MB_LWM2M_INJKEYS_RES, M2MB_LWM2M_ODIS_RES, M2MB_LWM2M_EXIST_RES, M2MB_LWM2M_GET_LIST_NUM_RES, M2MB_LWM2M_LIST_RES, M2MB_LWM2M_CUST_RES, M2MB_LWM2M_GET_REG_NUM_RES, M2MB_LWM2M_REG_RES, M2MB_LWM2M_UPD_REG_IND = 30, M2MB_LWM2M_SMS_PUSH_IND, M2MB_LWM2M_NOTIFY_IND, M2MB_LWM2M_NOTIFY_MON_IND, M2MB_LWM2M_CONN_REQ_IND = 60, M2MB_LWM2M_SESSION_END_IND, M2MB_LWM2M_SESSION_INFO_IND, M2MB_LWM2M_SRV_INFO_IND, M2MB_LWM2M_MON_INFO_IND, M2MB_LWM2M_NFYACK_INFO_IND, M2MB_LWM2M_OBJSET_RES = 90, M2MB_LWM2M_OBJGET_RES, M2MB_LWM2M_CFG_RES, M2MB_LWM2M_EVENT_MAX_NUM } |
| enum | M2MB_LWM2M_CONNREQ_CAUSE_E { M2MB_LWM2M_CONNREQ_CAUSE_BOOTSTRAP, M2MB_LWM2M_CONNREQ_CAUSE_REGISTRATION, M2MB_LWM2M_CONNREQ_CAUSE_REREG, M2MB_LWM2M_CONNREQ_CAUSE_UPDATE, M2MB_LWM2M_CONNREQ_CAUSE_SMS, M2MB_LWM2M_CONNREQ_CAUSE_NOTIFY, M2MB_LWM2M_CONNREQ_CAUSE_DEREGISTRATION, M2MB_LWM2M_CONNREQ_CAUSE_MAX_NUM } |
| enum | M2MB_LWM2M_RESULT_E { M2MB_LWM2M_RES_SUCCESS = 0, M2MB_LWM2M_RES_FAIL, M2MB_LWM2M_RES_FAIL_NO_ACTION, M2MB_LWM2M_RES_FAIL_UNSUPPORTED, M2MB_LWM2M_RES_FAIL_NOT_ALLOWED, M2MB_LWM2M_RES_FAIL_BAD_ARGS, M2MB_LWM2M_RES_FAIL_BAD_URI, M2MB_LWM2M_RES_FAIL_AGENT_UNAVAILABLE, M2MB_LWM2M_RES_NETWORK_ERROR = 50, M2MB_LWM2M_RES_HOST_UNREACH, M2MB_LWM2M_RES_SOCKET_ERROR, M2MB_LWM2M_RES_DTLS_ERROR, M2MB_LWM2M_RES_PROT_SUCCESS = 200, M2MB_LWM2M_RES_PROT_NOT_FOUND, M2MB_LWM2M_RES_PROT_NOT_ALLOWED, M2MB_LWM2M_RES_PROT_UNSUPPORTED, M2MB_LWM2M_RES_PROT_INTERNAL, M2MB_LWM2M_RES_PROT_UNKNOWN } |
| enum | M2MB_LWM2M_IF_STATE_E { M2MB_LWM2M_IF_STATE_NONE, M2MB_LWM2M_IF_STATE_DISABLED, M2MB_LWM2M_IF_STATE_ACK_WAIT, M2MB_LWM2M_IF_STATE_ACTIVE, M2MB_LWM2M_IF_STATE_IDLE, M2MB_LWM2M_IF_STATE_DEREG_WAIT, M2MB_LWM2M_IF_STATE_DEREGISTERING, M2MB_LWM2M_IF_STATE_MAX } |
| enum | M2MB_LWM2M_CL_STATE_E { M2MB_LWM2M_CL_STATE_DISABLED, M2MB_LWM2M_CL_STATE_DEREGISTERED = M2MB_LWM2M_CL_STATE_DISABLED, M2MB_LWM2M_CL_STATE_BOOTSTRAPPING, M2MB_LWM2M_CL_STATE_BOOTSTRAPPED, M2MB_LWM2M_CL_STATE_REGISTERING, M2MB_LWM2M_CL_STATE_REGISTERED, M2MB_LWM2M_CL_STATE_DEREGISTERING, M2MB_LWM2M_CL_STATE_SUSPENDED, M2MB_LWM2M_CL_STATE_MAX } |
| enum | M2MB_LWM2M_SET_DATA_TYPE_E { M2MB_LWM2M_SET_DATA_TYPE_INTEGER, M2MB_LWM2M_SET_DATA_TYPE_FLOAT, M2MB_LWM2M_SET_DATA_TYPE_STRING, M2MB_LWM2M_SET_DATA_TYPE_HEX_BINARY, M2MB_LWM2M_SET_DATA_TYPE_MAX } |
| enum | M2MB_LWM2M_INFO_ID_E { M2MB_LWM2M_INFO_FOTA_REBOOT, M2MB_LWM2M_INFO_DEVICE_REBOOT, M2MB_LWM2M_INFO_RESOURCE_EXECUTE, M2MB_LWM2M_INFO_FORCE_EXIT, M2MB_LWM2M_INFO_CLIENT_DISABLED, M2MB_LWM2M_INFO_REG_FAILURE, M2MB_LWM2M_INFO_ID_MAX } |
| general client event info More... | |
| enum | M2MB_LWM2M_MON_ACTION_E { M2MB_LWM2M_MON_DISABLE = 0, M2MB_LWM2M_MON_ENABLE, M2MB_LWM2M_MON_MAX_NUM } |
| enum | M2MB_LWM2M_MON_MODE_E { M2MB_LWM2M_MON_MODE_SET_CMD = 0, M2MB_LWM2M_MON_MODE_READ_CMD, M2MB_LWM2M_MON_MODE_MAX_NUM } |
| enum | M2MB_LWM2M_CIPHER_MODE_E { M2MB_LWM2M_CIPHER_MODE_DEFAULT = 0, M2MB_LWM2M_CIPHER_MODE_ECDH = 1, M2MB_LWM2M_CIPHER_MODE_MAX_NUM } |
| enum | M2MB_LWM2M_FOTA_MODE_E { M2MB_LWM2M_FOTA_MODE_DEFAULT = 0, M2MB_LWM2M_FOTA_MODE_ACK_DWL = 1, M2MB_LWM2M_FOTA_MODE_ACK_UPD = 2, M2MB_LWM2M_FOTA_MODE_ACK_ALL = 3, M2MB_LWM2M_FOTA_MODE_REJECT = 4, M2MB_LWM2M_FOTA_MODE_MAX_NUM } |
| the ciphers supported by the m2mb lwm2m More... | |
| enum | M2MB_LWM2M_FOTA_TOUT_ACTION_E { M2MB_LWM2M_FOTA_TOUT_ACTION_RESET_SM = 0, M2MB_LWM2M_FOTA_TOUT_ACTION_ACK = 1, M2MB_LWM2M_FOTA_TOUT_ACTION_MAX_NUM } |
| the fota timeout actions supported by the m2mb lwm2m More... | |
| enum | M2MB_LWM2M_FOTA_ACK_E { M2MB_LWM2M_FOTA_ACK_ALL = 1, M2MB_LWM2M_FOTA_ACK_MAX_NUM } |
| enum | M2MB_LWM2M_NFY_STATE_E { M2MB_LWM2M_NFY_STATE_MISSING = 0, M2MB_LWM2M_NFY_STATE_ACK_RECEIVED, M2MB_LWM2M_NFY_STATE_MAX_NUM } |
| enum | M2MB_LWM2M_KEY_ACTION_E { M2MB_LWM2M_KEY_CREATE, M2MB_LWM2M_KEY_DELETE_EP_NAME, M2MB_LWM2M_KEY_DELETE_ID_AND_SECRET, M2MB_LWM2M_KEY_DELETE_ALL, M2MB_LWM2M_KEY_MAX_ACTION } |
| enum | ODIS_PARAMETERS_E { ODIS_HOST_DEVICE_ID = 0, ODIS_HOST_DEVICE_MANUFACTURER = 1, ODIS_HOST_DEVICE_MODEL = 2, ODIS_HOST_DEVICE_SW_VERSION = 3, ODIS_HOST_INSTANCE_ID = 4, ODIS_HOST_PARAM_MAX_NUMBER = 5 } |
| the parameters set for +ODIS command More... | |
| enum | M2MB_LWM2M_CUST_PARAM_ID_E { M2MB_LWM2M_CUST_PARAM_ID_CARRIER = 0, M2MB_LWM2M_CUST_PARAM_ID_DLT = 1, M2MB_LWM2M_CUST_PARAM_ID_MAX } |
| the admitted parameters enum for #LWM2MCUST command More... | |
| enum | CUST_PARAMETERS_E { CUST_PARAMETERS_COMMAND_ID = 0, CUST_PARAMETERS_DATA = 1, CUST_PARAM_MAX_NUMBER } |
| the parameters set for #LWM2MCUST command More... | |
| enum | REG_PARAMETERS_E { REG_PARAMETERS_AGENT_ID = 0, REG_PARAMETERS_SERVER_ID = 1, REG_PARAMETERS_ACTION_ID = 2, REG_PARAM_MAX_NUMBER } |
| the parameters set for #LWM2MREG command More... | |
| enum | M2MB_LWM2M_REG_ACTION_E { M2MB_LWM2M_REG_ACTION_FORCE_DEREG = 0, M2MB_LWM2M_REG_ACTION_FORCE_REG = 1, M2MB_LWM2M_REG_ACTION_UPDATE_REG = 2, M2MB_LWM2M_REG_ACTION_GET_SRV_INFO = 3, M2MB_LWM2M_REG_ACTION_MAX_NUM } |
| the actions set More... | |
| enum | M2MB_LWM2M_REG_STATUS_E { M2MB_LWM2M_REG_STATUS_DEREGISTERED = 0, M2MB_LWM2M_REG_STATUS_SUSPENDED = 1, M2MB_LWM2M_REG_STATUS_REGISTERED = 2, M2MB_LWM2M_REG_STATUS_MAX_NUM } |
| the server operation requests set More... | |
| enum | M2MB_LWM2M_REG_ERROR_CODE_E { M2MB_LWM2M_REG_SUCCESS = 0, M2MB_LWM2M_REG_ALREADY_REGISTERED = 1, M2MB_LWM2M_REG_ALREADY_DEREGISTERED = 2, M2MB_LWM2M_REG_SERVER_NOT_FOUND = 3, M2MB_LWM2M_REG_CLIENT_DISABLED = 4, M2MB_LWM2M_REG_MAX_NUM } |
| enum | M2MB_LWM2M_DATA_TYPE_E { M2MB_LWM2M_DATA_TYPE_INVALID = 0, M2MB_LWM2M_DATA_TYPE_NONE, M2MB_LWM2M_DATA_TYPE_STRING, M2MB_LWM2M_DATA_TYPE_INTEGER, M2MB_LWM2M_DATA_TYPE_FLOAT, M2MB_LWM2M_DATA_TYPE_BOOLEAN, M2MB_LWM2M_DATA_TYPE_OPAQUE, M2MB_LWM2M_DATA_TYPE_TIME, M2MB_LWM2M_DATA_TYPE_OBJECTLINK, M2MB_LWM2M_DATA_TYPE_STRINGARRAY, M2MB_LWM2M_DATA_TYPE_INTEGERARRAY, M2MB_LWM2M_DATA_TYPE_FLOATARRAY, M2MB_LWM2M_DATA_TYPE_BOOLEANARRAY, M2MB_LWM2M_DATA_TYPE_OPAQUEARRAY, M2MB_LWM2M_DATA_TYPE_TIMEARRAY, M2MB_LWM2M_DATA_TYPE_OBJECTLINKARRAY, M2MB_LWM2M_DATA_TYPE_LAST, M2MB_LWM2M_DATA_TYPE_FIRSTARRAYTYPE = M2MB_LWM2M_DATA_TYPE_STRINGARRAY, M2MB_LWM2M_DATA_TYPE_LASTARRAYTYPE = M2MB_LWM2M_DATA_TYPE_OBJECTLINKARRAY } |
| enum | LWM2M_FOTA_INTERNAL_STATUS_E { LWM2M_FOTA_INTERNAL_STATUS_IDLE, LWM2M_FOTA_INTERNAL_STATUS_RESERVED_1, LWM2M_FOTA_INTERNAL_STATUS_WAIT_DWL_ACK, LWM2M_FOTA_INTERNAL_STATUS_DOWNLOADING, LWM2M_FOTA_INTERNAL_STATUS_DOWNLOADED, LWM2M_FOTA_INTERNAL_STATUS_RESERVED_2, LWM2M_FOTA_INTERNAL_STATUS_WAIT_UPD_ACK, LWM2M_FOTA_INTERNAL_STATUS_UPDATING, LWM2M_FOTA_INTERNAL_STATUS_REJECT, LWM2M_FOTA_INTERNAL_STATUS_FAILED, LWM2M_FOTA_INTERNAL_STATUS_MAX_NUMBER } |
| enum | LWM2M_FW_OBJ_STATE_E { LWM2M_FW_OBJ_STATE_IDLE, LWM2M_FW_OBJ_STATE_DOWNLOADING, LWM2M_FW_OBJ_STATE_DOWNLOADED, LWM2M_FW_OBJ_STATE_UPDATING, LWM2M_FW_OBJ_STATE_MAX_NUMBER } |
| enum | M2MB_LWM2M_CFG_ACTIONID_E { M2MB_LWM2M_CFG_ACTIONID_SET = 0, M2MB_LWM2M_CFG_ACTIONID_GET = 1, M2MB_LWM2M_CFG_ACTIONID_MAX_NUM } |
| the list of actions accepted by m2mb_lwm2m_cfg api More... | |
| enum | M2MB_LWM2M_CFG_PARAMID_E { M2MB_LWM2M_CFG_PARAMID_STOUT = 0, M2MB_LWM2M_CFG_PARAMID_IPV4_ONLY = 1, M2MB_LWM2M_CFG_PARAMID_COAP_ACK = 2, M2MB_LWM2M_CFG_PARAMID_COAP_RETRANS = 3, M2MB_LWM2M_CFG_PARAMID_MAX_NUM } |
| the paramId set More... | |
Functions | |
| M2MB_RESULT_E | m2mb_lwm2m_init (M2MB_LWM2M_HANDLE *h, m2mb_lwm2m_ind_callback cb, void *cb_user_param) |
| m2mb_lwm2m_init initializes, for current client, the capability to interact with LwM2M agent. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_deinit (M2MB_LWM2M_HANDLE h) |
| m2mb_lwm2m_deinit deinitializes LwM2M service for current client. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_enable (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_ENABLE_REQ_T *en_params) |
| m2mb_lwm2m_enable starts LwM2M client registration More... | |
| M2MB_RESULT_E | m2mb_lwm2m_disable (M2MB_LWM2M_HANDLE h) |
| m2mb_lwm2m_disable triggers LwM2M client deregistration. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_ack (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_ACK_REQ_T *ack) |
| m2mb_lwm2m_ack informs LwM2M client about network availability More... | |
| M2MB_RESULT_E | m2mb_lwm2m_read (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_OBJ_URI_T *uri, void *outbuf, UINT16 outbuflen) |
| m2mb_lwm2m_read reads the LwM2M resource at the given URI More... | |
| M2MB_RESULT_E | m2mb_lwm2m_write (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_OBJ_URI_T *uri, void *inbuf, UINT16 inbuflen) |
| m2mb_lwm2m_write writes the LwM2M resource at the given URI More... | |
| M2MB_RESULT_E | m2mb_lwm2m_exec (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_OBJ_URI_T *uri) |
| m2mb_lwm2m_exec executes the LwM2M resource at the given URI More... | |
| M2MB_RESULT_E | m2mb_lwm2m_set (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_OBJ_URI_T *uri, void *inbuf, UINT16 inbuflen) |
| m2mb_lwm2m_set sets the value of a LwM2M resource at module side More... | |
| M2MB_RESULT_E | m2mb_lwm2m_get (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_OBJ_URI_T *uri, void *outbuf, UINT16 outbuflen) |
| m2mb_lwm2m_get reads the value of a LwM2M resource at module side More... | |
| M2MB_RESULT_E | m2mb_lwm2m_get_stat (M2MB_LWM2M_HANDLE h) |
| m2mb_lwm2m_get_stat reads the current status of the LwM2M client More... | |
| M2MB_RESULT_E | m2mb_lwm2m_sts (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_STS_URI_T *reqStsStructure) |
| m2mb_lwm2m_sts sets the next server address More... | |
| M2MB_RESULT_E | m2mb_lwm2m_mon (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_OBJ_URI_T *uri, M2MB_LWM2M_MON_REQ_T *mon_params) |
| m2mb_lwm2m_mon sets the monitoring status an LwM2M resource at module side More... | |
| M2MB_RESULT_E | m2mb_lwm2m_newinst (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_OBJ_URI_T *uri, M2MB_LWM2M_NEW_INST_REQ_T *new_inst_params) |
| m2mb_lwm2m_newinst creates a specified instance for a specified object More... | |
| M2MB_RESULT_E | m2mb_lwm2m_nfy_ack_status (M2MB_LWM2M_HANDLE h, BOOLEAN set, BOOLEAN enable) |
| m2mb_lwm2m_nfy_ack_status sets or gets the flag to enable or disable Notify Ack reporting More... | |
| M2MB_RESULT_E | m2mb_lwm2m_nfy_ack_uri (M2MB_LWM2M_HANDLE h, BOOLEAN add, M2MB_LWM2M_OBJ_URI_T *uri) |
| m2mb_lwm2m_nfy_ack_uri adds or removes a resource URI to the list for Notify Ack reporting More... | |
| M2MB_RESULT_E | m2mb_lwm2m_nfy_ack_list (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_OBJ_URI_T *uriList, UINT8 listElementsNumber) |
| m2mb_lwm2m_nfy_ack_list retrieves the list for Notify Ack reporting More... | |
| M2MB_RESULT_E | m2mb_lwm2m_agent_config (M2MB_LWM2M_HANDLE h, UINT16 agentID) |
| m2mb_lwm2m_agent_config propagates the specified client for a specific operation (such as read, write or execute resource) More... | |
| M2MB_RESULT_E | m2mb_lwm2m_get_resource_type (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_OBJ_URI_T *uri, UINT16 *resType) |
| m2mb_lwm2m_get_resource_type propagates the resource type for a required resource. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_cipher_cfg (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_CIPHER_CFG_REQ_T *cfg_params) |
| m2mb_lwm2m_cipher_cfg sets and stores the cipher configuration. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_cipher_cfg_read (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_CIPHER_CFG_ITEM_T *cipherCfgData, UINT8 maxItemsNumber) |
| m2mb_lwm2m_cipher_cfg_read reads the cipher configuration for all the active clients. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_fota_cfg (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_FOTA_CFG_REQ_T *cfg_params) |
| m2mb_lwm2m_fota_cfg sets and stores the fota mode. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_fota_cfg_read (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_FOTA_CFG_ITEM_T *fotaCfgData, UINT8 maxItemsNumber) |
| m2mb_lwm2m_fota_cfg_read reads the fota mode for all the active clients. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_fota_ack (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_FOTA_ACK_REQ_T *ack_params) |
| m2mb_lwm2m_fota_ack sends the ack for the required operation. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_fota_status (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_FOTA_STATE_T *fotaStateData) |
| m2mb_lwm2m_fota_status returns the fota data for the spcified LwM2M client. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_injkeys (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_KEY_ACTION_E action, M2MB_LWM2M_KEYS_T *keys) |
| m2mb_lwm2m_injkeys allows to inject or delete Endpoint Name and Keys for a given agent. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_odis_reset (M2MB_LWM2M_HANDLE h) |
| m2mb_lwm2m_odis_reset is in charge of resetting the handler data fields reserved for odis. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_odis_config (M2MB_LWM2M_HANDLE h, ODIS_PARAMETERS_E odis_item, CHAR *odis_data) |
| m2mb_lwm2m_odis_config is in charge of filling the selected otis item with the given data. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_odis (M2MB_LWM2M_HANDLE h) |
| m2mb_lwm2m_odis allows the user to store the odis data set into nv memory. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_odis_set (M2MB_LWM2M_HANDLE h, UINT8 odis_instance) |
| m2mb_lwm2m_odis_set allows the user to store the odis data set into the given instance in nv memory. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_exist (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_OBJ_URI_T *uri) |
| m2mb_lwm2m_exist returns the existence or not for a given uri/agent More... | |
| M2MB_RESULT_E | m2mb_lwm2m_get_list_entries (M2MB_LWM2M_HANDLE h) |
| m2mb_lwm2m_get_list_entries returns the overall number of elements, expressed in M2MB_LWM2M_LIST_ELEMENT_RES_T units, necessary to specify all the objects/instances currently defined for a client. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_list (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_LIST_ELEMENT_RES_T *listPointer, UINT16 listSize) |
| m2mb_lwm2m_list returns all the objects/instances defined for a client More... | |
| M2MB_RESULT_E | m2mb_lwm2m_cust (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_CUST_PARAM_T *custReq) |
| m2mb_lwm2m_cust stores the customization data. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_cfg (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_CFG_PARAM_T *cfgReq) |
| m2mb_lwm2m_cfg sets or retrieves the lwm2m configuration value related to a given parameter More... | |
| M2MB_RESULT_E | m2mb_lwm2m_get_reg_entries (M2MB_LWM2M_HANDLE h) |
| m2mb_lwm2m_get_reg_entries returns the overall number of elements, expressed in M2MB_LWM2M_REG_ELEMENT_RES_T units, needed to specify all the information currently stored for the server data, when calling the m2mb_lwm2m_reg with M2MB_LWM2M_REG_ACTION_GET_SRV_INFO action. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_reg (M2MB_LWM2M_HANDLE h, M2MB_LWM2M_REG_PARAM_T *regReq, M2MB_LWM2M_REG_ELEMENT_RES_T *listPointer, UINT16 listSize) |
| m2mb_lwm2m_reg manages the user connection request for the specified server. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_objset (M2MB_LWM2M_HANDLE h, const M2MB_LWM2M_OBJSET_PARAM_T *objSetReq) |
| m2mb_lwm2m_objset updates one or more resources of a Lwm2m object instance. More... | |
| M2MB_RESULT_E | m2mb_lwm2m_objget (M2MB_LWM2M_HANDLE h, const M2MB_LWM2M_OBJGET_PARAM_T *objGetReq, CHAR *objGetRespString, UINT16 objGetRespSize) |
| m2mb_lwm2m_objget reads a Lwm2m object/object instance/resource. More... | |
Header file for m2mb_lwm2m APIs.
m2m/m2m_common/m2mb_inc/m2mb_lwm2m.h
m2mb_lwm2m APIs provide actions and events for LWM2M management.
| typedef struct M2MB_LWM2M_REG_RES_TAG M2MB_LWM2M_REG_RES_T |
LWM2M CFG
| enum CUST_PARAMETERS_E |
| enum LWM2M_FW_OBJ_STATE_E |
the paramId set
the admitted parameters enum for #LWM2MCUST command
| enum M2MB_LWM2M_EVENT_E |
the ciphers supported by the m2mb lwm2m
the fota modes supported by the m2mb lwm2m
the fota timeout actions supported by the m2mb lwm2m
| enum M2MB_LWM2M_INFO_ID_E |
general client event info
the actions set
| enum M2MB_LWM2M_RESULT_E |
| enum ODIS_PARAMETERS_E |
the parameters set for +ODIS command
| enum REG_PARAMETERS_E |
| M2MB_RESULT_E m2mb_lwm2m_ack | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_ACK_REQ_T * | ack | ||
| ) |
m2mb_lwm2m_ack informs LwM2M client about network availability
m2mb_lwm2m_ack allows the user to acknowledge client's request for network availability. It has to be issued in case of client enabled in "M2MB_LWM2M_MODE_ACK" mode. An ACK will be required after enable, disable, sms_push, notify and upd_reg events.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | ack_params | pointer to a structure containing the parameters required for the acknowledge. In particular it contains a boolean that authorizes/denies the transaction. |
m2mb_lwm2m_ack( h, ack_params );
| M2MB_RESULT_E m2mb_lwm2m_agent_config | ( | M2MB_LWM2M_HANDLE | h, |
| UINT16 | agentID | ||
| ) |
m2mb_lwm2m_agent_config propagates the specified client for a specific operation (such as read, write or execute resource)
m2mb_lwm2m_agent_config is used to inform the LwM2M state machine to refer the required operation (which can be a #LWM2MW, #LWM2MR, #LWM2ME or #LWM2MSTS) to the agent specified by the AT command. It should be used before invoking the m2mb function. No callback is called.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | agentID | a structure defining the URI specified by the user (only object ID and object instance ID are managed). |
m2mb_lwm2m_agent_config( h, agentID );
| M2MB_RESULT_E m2mb_lwm2m_cfg | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_CFG_PARAM_T * | cfgReq | ||
| ) |
m2mb_lwm2m_cfg sets or retrieves the lwm2m configuration value related to a given parameter
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | cfgReq | the cfg required data, expressed in the M2MB_LWM2M_CFG_PARAM_T type. |
m2mb_lwm2m_cfg( h, cfgReq );
| M2MB_RESULT_E m2mb_lwm2m_cipher_cfg | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_CIPHER_CFG_REQ_T * | cfg_params | ||
| ) |
m2mb_lwm2m_cipher_cfg sets and stores the cipher configuration.
m2mb_lwm2m_cipher_cfg allows the user to set the cipher during runtime. The function is non-blocking. This means that the function returns immediately, but the response information is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_CIPHER_CFG_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_CIPHER_CFG_RES_T type.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | cfg_params | a structure containing the cipher to be used specified by the user. |
m2mb_lwm2m_cipher_cfg( h, cfg_params );
| M2MB_RESULT_E m2mb_lwm2m_cipher_cfg_read | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_CIPHER_CFG_ITEM_T * | cipherCfgData, | ||
| UINT8 | maxItemsNumber | ||
| ) |
m2mb_lwm2m_cipher_cfg_read reads the cipher configuration for all the active clients.
m2mb_lwm2m_cipher_cfg_read allows the user to read the cipher setting configured for all the active clients. The function is non-blocking. This means that the function returns immediately, but the response data is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_CIPHER_CFG_READ_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_CIPHER_CFG_READ_RES_T type.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | cipherCfgData | pointer to a M2MB_LWM2M_CIPHER_CFG_ITEM_T structure array that will be filled with the cipher setting info related to the active clients. |
| [in] | maxItemsNumber | the maximum M2MB_LWM2M_CIPHER_CFG_ITEM_T elements number that will be filled with the fota mode info. |
m2mb_lwm2m_cipher_cfg_read( h, cipherCfgData, maxItemsNumber );
| M2MB_RESULT_E m2mb_lwm2m_cust | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_CUST_PARAM_T * | custReq | ||
| ) |
m2mb_lwm2m_cust stores the customization data.
m2mb_lwm2m_cust is intended to store the customization data. The function is not blocking. In case of success, nothing is returned; instead, the callback defined in m2mb_lwm2m_init is configured to receive the required data through the M2MB_LWM2M_CUST_RES event. In this case the resp_struct must be cast to the M2MB_LWM2M_CUST_RES_T type. In case of fatal error (example: client not ready), the function returns with a failure code and no callback is issued. In case of successful operation, the chosen customization will be applied after the next power-cycle.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | custReq | the cust required data, expressed in the M2MB_LWM2M_CUST_PARAM_T type. |
m2mb_lwm2m_cust( h, custReq );
| M2MB_RESULT_E m2mb_lwm2m_deinit | ( | M2MB_LWM2M_HANDLE | h | ) |
m2mb_lwm2m_deinit deinitializes LwM2M service for current client.
m2mb_lwm2m_deinit deinitializes LwM2M service for current client freeing the handle passed as first parameter. Calling the m2mb_sms_deinit is useful after using the LwM2M service in order to free memory space.
| [in] | h | the handle to the LwM2M service, that will be deinitialized by the function. |
m2mb_lwm2m_deinit( &h );
| M2MB_RESULT_E m2mb_lwm2m_disable | ( | M2MB_LWM2M_HANDLE | h | ) |
m2mb_lwm2m_disable triggers LwM2M client deregistration.
m2mb_lwm2m_disable starts the procedure for LwM2M client deregistration. It is non-blocking, so it returns immediately with an error code. If it returns successfully the deregistration result is provided through the callback defined by the user. If the client was enabled in M2MB_LWM2M_MODE_ACK mode, a call to m2mb_lwm2m_ack() is be required in order to assure network availability. The actual result of the API is returned through the callback with M2MB_LWM2M_DISABLE_RES event.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
m2mb_lwm2m_disable( h );
| M2MB_RESULT_E m2mb_lwm2m_enable | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_ENABLE_REQ_T * | en_params | ||
| ) |
m2mb_lwm2m_enable starts LwM2M client registration
m2mb_lwm2m_enable starts the procedure for LwM2M client registration. It is non-blocking, so it returns immediately with an error code. It may fail if some basic conditions are not satisfied (PDP context not activated). If it returns successfully the registration result is provided through the callback defined by the user. If called in M2MB_LWM2M_MODE_ACK mode, a call to m2mb_lwm2m_ack() is be required in order to assure network availability. The actual result of the API is returned through the callback with M2MB_LWM2M_ENABLE_RES event.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | en_params | a structure defining some mandatory parameters, such as apnclass. |
m2mb_lwm2m_enable( h, params );
| M2MB_RESULT_E m2mb_lwm2m_exec | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_OBJ_URI_T * | uri | ||
| ) |
m2mb_lwm2m_exec executes the LwM2M resource at the given URI
m2mb_lwm2m_exec executes the LwM2M resource at the URI specified by parameter 'uri', performing an operation equivalent to an execution from server side. The function returns immediately, and the result of the required operation is sent along with the callback defined in m2mb_lwm2m_init. In case of fatal error (example: client not ready), the function fails immediately and no callback is issued.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | uri | a structure defining the URI of the resource to be executed. If the resource is not executable, an error is raised by the callback. |
m2mb_lwm2m_execute( h, uri, );
| M2MB_RESULT_E m2mb_lwm2m_exist | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_OBJ_URI_T * | uri | ||
| ) |
m2mb_lwm2m_exist returns the existence or not for a given uri/agent
m2mb_lwm2m_exist returns the LwM2M resource at the uri specified by parameter 'uri', performing an operation equivalent to a read from server side. The function returns immediately, and the result of the required operation is sent along with the callback defined in m2mb_lwm2m_init. According to this, the exist result is made available in the memory area defined by the m2mb's user after a little delay. In case of fatal error (example: client not ready), the function fails immediately and no callback is issued. In case of successful operation, the given uri data (if inserted) and the boolean reporting whether the uri/agent is existent or not are copied in the buffer passed by the user. In case the user is interested in an agent existence query, the uri should be passed and it should be filled with uri.uriLen = M2MB_LWM2M_URI_0_FIELDS. m2mb_lwm2m_agent_config should always be called before the m2mb_lwm2m_exist.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | uri | a structure defining the uri of the resource to be investigated. |
m2mb_lwm2m_exist( h, uri );
| M2MB_RESULT_E m2mb_lwm2m_fota_ack | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_FOTA_ACK_REQ_T * | ack_params | ||
| ) |
m2mb_lwm2m_fota_ack sends the ack for the required operation.
m2mb_lwm2m_fota_ack allows the user to acknoledge (and authorize) the current fota operation (i.e.: download or delta application). The function is non-blocking. This means that the function returns immediately, but the response information is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_FOTA_ACK_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_FOTA_ACK_RES_T type.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | ack_params | a structure containing the ack information specified by the user. |
m2mb_lwm2m_fota_ack( h, ack_params );
| M2MB_RESULT_E m2mb_lwm2m_fota_cfg | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_FOTA_CFG_REQ_T * | cfg_params | ||
| ) |
m2mb_lwm2m_fota_cfg sets and stores the fota mode.
m2mb_lwm2m_fota_cfg allows the user to set the proper fota modality by requiring an 'ack' to proceed with the delta download or to proceed with the delta application, or to confirm both download and update. The function is non-blocking. This means that the function returns immediately, but the response information is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_FOTA_CFG_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_FOTA_CFG_RES_T type.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | cfg_params | a structure containing the fota mode info specified by the user. |
m2mb_lwm2m_fota_cfg( h, cfg_params );
| M2MB_RESULT_E m2mb_lwm2m_fota_cfg_read | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_FOTA_CFG_ITEM_T * | fotaCfgData, | ||
| UINT8 | maxItemsNumber | ||
| ) |
m2mb_lwm2m_fota_cfg_read reads the fota mode for all the active clients.
m2mb_lwm2m_fota_cfg_read allows the user to read the fota mode configured for all the active clients. The function is non-blocking. This means that the function returns immediately, but the response data is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_FOTA_CFG_READ_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_FOTA_CFG_READ_RES_T type.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | fotaCfgData | pointer to a M2MB_LWM2M_FOTA_CFG_ITEM_T structure array that will be filled with the fota mode info related to the active clients. |
| [in] | maxItemsNumber | the maximum M2MB_LWM2M_FOTA_CFG_ITEM_T elements number that will be filled with the fota mode info. |
m2mb_lwm2m_fota_cfg_read( h, fotaCfgData, maxItemsNumber );
| M2MB_RESULT_E m2mb_lwm2m_fota_status | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_FOTA_STATE_T * | fotaStateData | ||
| ) |
m2mb_lwm2m_fota_status returns the fota data for the spcified LwM2M client.
m2mb_lwm2m_fota_status allows the user to acquire the client data related to the FOTA operations, in terms of current status and data exposed to the LwM2M server; moreover, in case of acknowledged FOTA configuration (i.e.: see m2mb_lwm2m_fota_cfg API), the data will contain also a valid 'ACK' time expiring, in case the client is waiting for an 'ACK'. The function is non-blocking. This means that the function returns immediately, but the response information is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_FOTA_STATE_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_FOTA_STATE_RES_T type.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | fotaStateData | pointer to a structure containing the internal FOTA management data. |
m2mb_lwm2m_fota_status( h, fotaStateData );
| M2MB_RESULT_E m2mb_lwm2m_get | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_OBJ_URI_T * | uri, | ||
| void * | outbuf, | ||
| UINT16 | outbuflen | ||
| ) |
m2mb_lwm2m_get reads the value of a LwM2M resource at module side
m2mb_lwm2m_get allows the user to read, at module side, the value of a resource, at the URI specified by parameter 'uri', which is defined as write-only by LwM2M protocol. It also allows the read-back of the value set with m2mb_lwm2m_set() API. The function returns immediately, and the result of the required operation is sent along with the callback defined in m2mb_lwm2m_init. In case of fatal error (example: client not ready), the function fails immediately and no callback is issued. In case of successful get, data is copied within the buffer passed by the user.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | uri | a structure defining the URI of the resource to be get. Only a defined set of whitelisted URIs can be accepted by this function. If the resource is not included in this set an error is raised by the callback. The list of whitelisted URIs is: <TODO: add list of whitelisted URIs> |
| [in] | outbuf | an user defined buffer to which the data will be copied. |
| [in] | outbuflen | the size of the user defined buffer to which the data will be copied. |
m2mb_lwm2m_get( h, uri, buf, len );
| M2MB_RESULT_E m2mb_lwm2m_get_list_entries | ( | M2MB_LWM2M_HANDLE | h | ) |
m2mb_lwm2m_get_list_entries returns the overall number of elements, expressed in M2MB_LWM2M_LIST_ELEMENT_RES_T units, necessary to specify all the objects/instances currently defined for a client.
m2mb_lwm2m_get_list_entry should be used to calculate the right dimension of the array needed for the m2mb_lwm2m_list. Using this function, the user is able to retrieve the number of the M2MB_LWM2M_LIST_ELEMENT_RES_T entries necessary to describe all the objects/instances pairs defined for a given client context; with it, the user is able to allocate the proper memory size. Since a single object could have more instances associated, every object instance is counted separately. Thus, m2mb_lwm2m_get_list_entries returns the overall entries (of M2MB_LWM2M_LIST_ELEMENT_RES_T type) that contain a valid object/object instance pair currently supported by the client. The function is not blocking. In case of success, nothing is returned; instead, the callback is configured to receive the required data through the M2MB_LWM2M_GET_LIST_NUM_RES event. In this case the resp_struct must be cast to the M2MB_LWM2M_GET_LIST_NUM_RES_T type. In case of fatal error (example: client not ready), the function returns a failure code and no callback event is issued. m2mb_lwm2m_agent_config should always be called before the m2mb_lwm2m_get_list_entries.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
m2mb_lwm2m_get_list_entries( h );
| M2MB_RESULT_E m2mb_lwm2m_get_reg_entries | ( | M2MB_LWM2M_HANDLE | h | ) |
m2mb_lwm2m_get_reg_entries returns the overall number of elements, expressed in M2MB_LWM2M_REG_ELEMENT_RES_T units, needed to specify all the information currently stored for the server data, when calling the m2mb_lwm2m_reg with M2MB_LWM2M_REG_ACTION_GET_SRV_INFO action.
m2mb_lwm2m_get_reg_entries should be used to calculate the right dimension of the array needed for the m2mb_lwm2m_reg. Using this function, the user is able to retrieve the number of the M2MB_LWM2M_REG_ELEMENT_RES_T entries needed to describe all the data stored for either a single server or the entire set of them a given client context; with it, the user is able to allocate the proper memory size.
The function is not blocking. In case of success, nothing is returned; instead, the callback is configured to receive the required data through the M2MB_LWM2M_GET_REG_NUM_RES event. In this case the resp_struct must be cast to the M2MB_LWM2M_GET_REG_NUM_RES_T type. In case of errors (example: client not ready), the function returns a failure code and no callback event is issued. m2mb_lwm2m_agent_config should always be called before the m2mb_lwm2m_get_reg_entries.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
m2mb_lwm2m_get_reg_entries( h );
| M2MB_RESULT_E m2mb_lwm2m_get_resource_type | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_OBJ_URI_T * | uri, | ||
| UINT16 * | resType | ||
| ) |
m2mb_lwm2m_get_resource_type propagates the resource type for a required resource.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | uri | a structure defining the URI specified by the user. |
| [in] | outbuf | an user defined buffer in which the response will be stored. The buffer is returned in the callback event. |
m2mb_lwm2m_get_resource_type( h, uri, resType );
| M2MB_RESULT_E m2mb_lwm2m_get_stat | ( | M2MB_LWM2M_HANDLE | h | ) |
m2mb_lwm2m_get_stat reads the current status of the LwM2M client
m2mb_lwm2m_get_stat reads the current status of the LwM2M client, allowing the user to know what action is currently performed and to retrieve piece of informations such as the remaining time before the following registration update.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. The function returns immediately, and the user defined callback is issued whenever the status information is ready. |
m2mb_lwm2m_get_stat( h );
| M2MB_RESULT_E m2mb_lwm2m_init | ( | M2MB_LWM2M_HANDLE * | h, |
| m2mb_lwm2m_ind_callback | cb, | ||
| void * | cb_user_param | ||
| ) |
m2mb_lwm2m_init initializes, for current client, the capability to interact with LwM2M agent.
m2mb_lwm2m_init initializes the LwM2M handle for current client, returning the handle that must be passed as first parameter for all interactions with LwM2M agent. Calling the m2mb_lwm2m_init is mandatory before using any other LwM2M API.
WARNING: do not place blocking action within callback, since it is issued by the agent's task!!!
| [in] | *h | the handle to the LwM2M service, that will be initialized by the function. |
| [in] | cb | the callback that will be called if an event or an error happens. |
| [in] | *cb_user_param | a pointer to generic user data that will be returned as it is in the callback. |
m2mb_lwm2m_init( &h, myCallback, myUserdata );
| M2MB_RESULT_E m2mb_lwm2m_injkeys | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_KEY_ACTION_E | action, | ||
| M2MB_LWM2M_KEYS_T * | keys | ||
| ) |
m2mb_lwm2m_injkeys allows to inject or delete Endpoint Name and Keys for a given agent.
m2mb_lwm2m_injkeys allows to inject or delete Endpoint Name and Keys for a given agent. The new credentials will take effect at the next module reboot. The function is asynchronous. This means that the function returns immediately, but the response information is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_INJKEYS_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_RES_T type.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | action | the action to execute. |
| [in] | keys | pointer to the M2MB_LWM2M_KEYS_T struct allocated by the caller containing the EP name and Keys to inject (empty when deleting). |
m2mb_lwm2m_injkeys( h, action, keys );
| M2MB_RESULT_E m2mb_lwm2m_list | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_LIST_ELEMENT_RES_T * | listPointer, | ||
| UINT16 | listSize | ||
| ) |
m2mb_lwm2m_list returns all the objects/instances defined for a client
m2mb_lwm2m_list returns the list of objects and object instances currently supported by the client, expressed in M2MB_LWM2M_LIST_ELEMENT_RES_T items. The function is not blocking. In case of success, nothing is returned; instead, the callback defined in m2mb_lwm2m_init is configured to receive the required data through the M2MB_LWM2M_LIST_RES event. In this case the resp_struct must be cast to the M2MB_LWM2M_LIST_RES_T type. In case of fatal error (example: client not ready), the function returns with a failure core and no callback is issued. In case of successful operation, all the objects and object instances pairs are returned as consecutive elements of M2MB_LWM2M_LIST_ELEMENT_RES_T type, and the written entries is also returned on the M2MB_LWM2M_LIST_RES_T data structure. In case of successful operation but with an insufficient list size, the returned list is truncated to the last entry possibly contained in the given size's array, and the M2MB_LWM2M_LIST_RES_T parameter
| isTruncated | is set to TRUE. m2mb_lwm2m_agent_config should always be called before the m2mb_lwm2m_list. | |
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [out] | listPointer | the pointer to the memory region that will be filled with the objects/instances, expressed in elements of M2MB_LWM2M_LIST_ELEMENT_RES_T type. |
| [in] | listSize | the size of the memory area pointed by |
| listPointer,expressed | in M2MB_LWM2M_LIST_ELEMENT_RES_T elements. |
m2mb_lwm2m_list( h, listPointer, listSize );
| M2MB_RESULT_E m2mb_lwm2m_mon | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_OBJ_URI_T * | uri, | ||
| M2MB_LWM2M_MON_REQ_T * | mon_params | ||
| ) |
m2mb_lwm2m_mon sets the monitoring status an LwM2M resource at module side
m2mb_lwm2m_mon allows the user to enable or disable the monitoring of resource changes. The changes can occur both from AT command side (#LWM2MW or #LWM2MSET) or from a server request. The function is asynchronous. This means that the function returns immediately, but the response information is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_MON_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_MON_RES_T type. The user is allowed to enable the object monitoring and it will be advised of each resource change in this object with an URC. The object to be monitored should be specified by parameter inserting it in the parameter 'uri', although only the object identifier field in 'uri' is currently taken into account.
Once the monitoring is activated, each resource change will generate an event that should be managed in the same callback. This event is the M2MB_LWM2M_MON_INFO_IND; in this case, it is reported the uri of the resource that has changed; resp_struct must be cast to the M2MB_LWM2M_MON_INFO_IND_T type.
Please notice that, in case of full monitoring list retrieve, the list is returned as a M2MB_LWM2M_OBJ_URI_T array of MAX_MONITOR_LIST_COUNT elements; only the ObjectID field will contain data; please notice that object '0' (Security) is not monitorable, so its value in this list indicates an empty item.
In case of fatal error (example: not enough heap memory for internal use), the function fails immediately and no callback is issued.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | uri | a structure defining the URI of the resource to be monitored. Only the object identifier is currently used, although with further developments it could be extended the monitoring to single object instances and single resource identifiers (and consequently the URCs will be restricted to a minor set of data). Nevertheless, the full URI originating the resource change is reported in the URC. |
| [in] | mon_params | a structure that contains the enable/disable action request, and the operation mode to be performed (set a new object to be monitored, or read the full list of objects under monitoring. |
m2mb_lwm2m_mon( h, uri, mon );
| M2MB_RESULT_E m2mb_lwm2m_newinst | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_OBJ_URI_T * | uri, | ||
| M2MB_LWM2M_NEW_INST_REQ_T * | new_inst_params | ||
| ) |
m2mb_lwm2m_newinst creates a specified instance for a specified object
m2mb_lwm2m_newinst allows the user to create an instance for a specified object, filling all its resources with their proper default values (0 for numeric types, "" for strings) according to the resource types. The function is asynchronous. This means that the function returns immediately, but the response information is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_NEW_INST_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_NEW_INST_RES_T type. The user can create a new object instance only when the LwM2M client is up and running.
In case of fatal error (example: not enough heap memory for internal use), the function fails immediately and no callback is issued.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | uri | a structure defining the URI specified by the user (only object ID and object instance ID are managed). |
| [in] | new_inst_params | a structure that contains the agent specified by the user. Currently only Telit agent is fully supported. The parameter is a M2MB_LWM2M_NEW_INST_REQ_T handler. |
m2mb_lwm2m_newinst( h, uri, new_inst_params );
| M2MB_RESULT_E m2mb_lwm2m_nfy_ack_list | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_OBJ_URI_T * | uriList, | ||
| UINT8 | listElementsNumber | ||
| ) |
m2mb_lwm2m_nfy_ack_list retrieves the list for Notify Ack reporting
m2mb_lwm2m_nfy_ack_list allows the user to retrieve the list for Notify Ack reporting.
The function is not blocking. This means that the function returns immediately, but the response information is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_NFYACK_LIST_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_NFYACK_LIST_RES_T type.
Once the Notify Ack reporting is enabled, each change of a resource (whose URI has been previously added in the list by using the m2mb_lwm2m_nfy_ack_uri) will generate an event (M2MB_LWM2M_NFYACK_INFO_IND) that should be managed in the same callback. The M2MB_LWM2M_NFYACK_INFO_IND event reports the URI of the resource that has changed; resp_struct must be cast to the M2MB_LWM2M_NFYACK_INFO_IND_T type.
In case of fatal error (example: not enough heap memory for internal use), the function fails immediately and no callback is issued.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | uriList | a pointer to the preallocated array of M2MB_LWM2M_OBJ_URI_T elements to be filled with the list elements. |
| [in] | listElementsNumber | the number of M2MB_LWM2M_OBJ_URI_T elements the uriList has been allocated of. |
m2mb_lwm2m_nfy_ack_list( h, uriList, listElementsNumber );
| M2MB_RESULT_E m2mb_lwm2m_nfy_ack_status | ( | M2MB_LWM2M_HANDLE | h, |
| BOOLEAN | set, | ||
| BOOLEAN | enable | ||
| ) |
m2mb_lwm2m_nfy_ack_status sets or gets the flag to enable or disable Notify Ack reporting
m2mb_lwm2m_nfy_ack_status allows the user to enable or disable the reporting of Acknowledgments sent by a server that receives a Notify message for a resource under observation. The function is not blocking. This means that the function returns immediately, but the response information is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_NFYACK_STATUS_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_NFYACK_STATUS_RES_T type.
Once the Notify Ack reporting is enabled, each change of a resource (whose URI has been previously added in the list by using the m2mb_lwm2m_nfy_ack_uri) will generate an event (M2MB_LWM2M_NFYACK_INFO_IND) that should be managed in the same callback. The M2MB_LWM2M_NFYACK_INFO_IND event reports the URI of the resource that has changed; resp_struct must be cast to the M2MB_LWM2M_NFYACK_INFO_IND_T type.
In case of fatal error (example: not enough heap memory for internal use), the function fails immediately and no callback is issued.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | set | whether a set (if TRUE) or get (if FALSE) request has to be performed. |
| [in] | enable | BOOLEAN variable that enables (if TRUE) or disables (if FALSE) the Notify Ack reporting when set is TRUE. |
m2mb_lwm2m_nfy_ack_status( h, set, enable );
| M2MB_RESULT_E m2mb_lwm2m_nfy_ack_uri | ( | M2MB_LWM2M_HANDLE | h, |
| BOOLEAN | add, | ||
| M2MB_LWM2M_OBJ_URI_T * | uri | ||
| ) |
m2mb_lwm2m_nfy_ack_uri adds or removes a resource URI to the list for Notify Ack reporting
m2mb_lwm2m_nfy_ack_uri allows the user to add or remove a resource URI to the list for Notify Ack reporting; if that resource is under observation and its URI is in this list, the Notify Ack will be reported. The function is not blocking. This means that the function returns immediately, but the response information is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_NFYACK_URI_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_NFYACK_URI_RES_T type.
Once the Notify Ack reporting is enabled, each change of a resource (whose URI has been previously added in the list by using the m2mb_lwm2m_nfy_ack_uri) will generate an event (M2MB_LWM2M_NFYACK_INFO_IND) that should be managed in the same callback. The M2MB_LWM2M_NFYACK_INFO_IND event reports the URI of the resource that has changed; resp_struct must be cast to the M2MB_LWM2M_NFYACK_INFO_IND_T type.
In case of fatal error (example: not enough heap memory for internal use), the function fails immediately and no callback is issued.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | add | whether an add (if TRUE) or remove (if FALSE) request has to be performed. |
| [in] | uri | a pointer to the preallocated structure that defines the URI of the item to add (or remove). |
m2mb_lwm2m_nfy_ack_uri( h, add, uri );
| M2MB_RESULT_E m2mb_lwm2m_objget | ( | M2MB_LWM2M_HANDLE | h, |
| const M2MB_LWM2M_OBJGET_PARAM_T * | objGetReq, | ||
| CHAR * | objGetRespString, | ||
| UINT16 | objGetRespSize | ||
| ) |
m2mb_lwm2m_objget reads a Lwm2m object/object instance/resource.
m2mb_lwm2m_objset performs a read operation on a specified Lwm2m object, object instance or resource (as in CoAP GET method). The data is presented using a json string in accordance with the format defined in Lwm2m specification, see section 6.4.4 of OMA Lwm2m specification ver. 1.0.2 (Data Formats for Transferring Resource Information - JSON). The function is not blocking. In case of success, nothing is returned; instead, the callback defined in m2mb_lwm2m_init is configured to receive the required data through the M2MB_LWM2M_OBJGET_RES event. In this case the resp_struct must be cast to the M2MB_LWM2M_OBJGET_RES_T type. In case of errors (example: client not ready), the function returns with a failure code and no callback is issued. m2mb_lwm2m_agent_config should always be called before the m2mb_lwm2m_objget.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | objGetReq | the pointer to the data useful to manage the m2mb_lwm2m_objget. |
| [out] | objGetRespString | pointer to a preallocated buffer that will contain the operation response |
| [in] | objGetRespSize | size of the objGetRespString buffer |
m2mb_lwm2m_objget( h, objSetReq );
| M2MB_RESULT_E m2mb_lwm2m_objset | ( | M2MB_LWM2M_HANDLE | h, |
| const M2MB_LWM2M_OBJSET_PARAM_T * | objSetReq | ||
| ) |
m2mb_lwm2m_objset updates one or more resources of a Lwm2m object instance.
m2mb_lwm2m_objset performs a write operation on a specified Lwm2m object instance, updating the object instance as in the partial update or (CoAP POST method). The data is provided by the caller using a json string in accordance with the format defined in Lwm2m specification, see section 6.4.4 of OMA Lwm2m specification ver. 1.0.2 (Data Formats for Transferring Resource Information - JSON). The function is not blocking. In case of success, nothing is returned; instead, the callback defined in m2mb_lwm2m_init is configured to receive the required data through the M2MB_LWM2M_OBJSET_RES event. In this case the resp_struct must be cast to the M2MB_LWM2M_OBJSET_RES_T type. In case of errors (example: client not ready), the function returns with a failure code and no callback is issued. m2mb_lwm2m_agent_config should always be called before the m2mb_lwm2m_objset.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | objSetReq | the pointer to the data useful to manage the m2mb_lwm2m_objset. |
m2mb_lwm2m_objset( h, objSetReq );
| M2MB_RESULT_E m2mb_lwm2m_odis | ( | M2MB_LWM2M_HANDLE | h | ) |
m2mb_lwm2m_odis allows the user to store the odis data set into nv memory.
m2mb_lwm2m_odis allows the user to store the odis data set into nv memory by using the AT&T LwM2M client. The odis data managed by this function is written in the instance '0'.
The function is not blocking. This means that the function returns immediately, but the response information is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_ODIS_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_ODIS_RES_T type.
| [in] | h | the LwM2M service handler, previously initialized by the m2mb_lwm2m_init function. |
m2mb_lwm2m_odis( h );
| M2MB_RESULT_E m2mb_lwm2m_odis_config | ( | M2MB_LWM2M_HANDLE | h, |
| ODIS_PARAMETERS_E | odis_item, | ||
| CHAR * | odis_data | ||
| ) |
m2mb_lwm2m_odis_config is in charge of filling the selected otis item with the given data.
m2mb_lwm2m_odis_config should be called once for each odis parameter.
| [in] | h | the LwM2M service handler, previously initialized by the m2mb_lwm2m_init function. |
| [in] | odis_item | the item to be saved, expressed with the ODIS_PARAMETERS_E type. |
| [in] | odis_data | the data to be saved in the temporary odis_item memory buffer, expressed as a terminated string. |
m2mb_lwm2m_odis_config( h, odis_item, odis_data );
| M2MB_RESULT_E m2mb_lwm2m_odis_reset | ( | M2MB_LWM2M_HANDLE | h | ) |
m2mb_lwm2m_odis_reset is in charge of resetting the handler data fields reserved for odis.
handler data fields reserved for odis should be reset after their use in odis storing or before any successive odis configuration. Resetting the handler data filled will result in freeing its dedicated amount of allocated memory.
| [in] | h | the LwM2M service handler, previously initialized by the m2mb_lwm2m_init function. |
m2mb_lwm2m_odis_reset( h );
| M2MB_RESULT_E m2mb_lwm2m_odis_set | ( | M2MB_LWM2M_HANDLE | h, |
| UINT8 | odis_instance | ||
| ) |
m2mb_lwm2m_odis_set allows the user to store the odis data set into the given instance in nv memory.
m2mb_lwm2m_odis_set allows the user to store the odis data set into nv memory by using the AT&T LwM2M client.
The function is not blocking. This means that the function returns immediately, but the response information is received in the callback previously set by the m2mb_lwm2m_init function. The event received in the callback is M2MB_LWM2M_ODIS_RES. In this case the resp_struct must be cast to the M2MB_LWM2M_ODIS_RES_T type.
| [in] | h | the LwM2M service handler, previously initialized by the m2mb_lwm2m_init function. |
| [in] | odis_instance | the given Odis instance. |
m2mb_lwm2m_odis_set( h, odis_instance );
| M2MB_RESULT_E m2mb_lwm2m_read | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_OBJ_URI_T * | uri, | ||
| void * | outbuf, | ||
| UINT16 | outbuflen | ||
| ) |
m2mb_lwm2m_read reads the LwM2M resource at the given URI
m2mb_lwm2m_read reads the LwM2M resource at the URI specified by parameter 'uri', performing an operation equivalent to a read from server side. The function returns immediately, and the result of the required operation is sent along with the callback defined in m2mb_lwm2m_init. According to this, the read result is made available in the memory area defined by the m2mb's user after a little delay. In case of fatal error (example: client not ready), the function fails immediately and no callback is issued. In case of successful read, data is copied in the buffer passed by the user.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | uri | a structure defining the URI of the resource to be read. If the resource is not readable, an error is raised by the callback. |
| [in] | outbuf | an user defined buffer in which the response will be stored. |
| [in] | outbuflen | the size of the user defined buffer in which the response will be stored. |
m2mb_lwm2m_read( h, uri, buf, len );
| M2MB_RESULT_E m2mb_lwm2m_reg | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_REG_PARAM_T * | regReq, | ||
| M2MB_LWM2M_REG_ELEMENT_RES_T * | listPointer, | ||
| UINT16 | listSize | ||
| ) |
m2mb_lwm2m_reg manages the user connection request for the specified server.
m2mb_lwm2m_reg manages the given action for the specified server; if the actionId is M2MB_LWM2M_REG_ACTION_GET_SRV_INFO and the serverId pointer is set to NULL, the function retrieves the info for all the servers associated to the queried agent. If the serverId is specified by the user, it retrieves only the info for that server. The result of the action M2MB_LWM2M_REG_ACTION_GET_SRV_INFO is expressed in an array of M2MB_LWM2M_REG_ELEMENT_RES_T items. All the other actions need the serverId to be specified. The function is not blocking. In case of success, nothing is returned; instead, the callback defined in m2mb_lwm2m_init is configured to receive the required data through the M2MB_LWM2M_REG_RES event. In this case the resp_struct must be cast to the M2MB_LWM2M_REG_RES_T type. In case of errors (example: client not ready), the function returns with a failure code and no callback is issued. In case of successful operation, if the specified the action is M2MB_LWM2M_REG_ACTION_GET_SRV_INFO, all the servers data is returned as consecutive elements of M2MB_LWM2M_REG_ELEMENT_RES_T type, and the written entries is also returned on the M2MB_LWM2M_REG_RES_T data structure. m2mb_lwm2m_agent_config should always be called before the m2mb_lwm2m_reg.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | regReq | the pointer to the data useful to manage the m2mb_lwm2m_reg. |
| [out] | listPointer | in case the required action is M2MB_LWM2M_REG_ACTION_GET_SRV_INFO, it is the pointer to the memory region that will be filled with the M2MB_LWM2M_REG_ELEMENT_RES_T elements, expressed in elements of M2MB_LWM2M_REG_ELEMENT_RES_T type. In case of different actions, it can be set to NULL. |
| [in] | listSize | in case the required action is M2MB_LWM2M_REG_ACTION_GET_SRV_INFO, it is the size of the memory area pointed by |
| listPointer,expressed | in M2MB_LWM2M_REG_ELEMENT_RES_T elements. In case of different actions, it can be set to 0. |
m2mb_lwm2m_reg( h, regRequest, listPointer, listSize );
| M2MB_RESULT_E m2mb_lwm2m_set | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_OBJ_URI_T * | uri, | ||
| void * | inbuf, | ||
| UINT16 | inbuflen | ||
| ) |
m2mb_lwm2m_set sets the value of a LwM2M resource at module side
m2mb_lwm2m_set allows the user to drive, at module side, the value of a resource, at the URI specified by parameter 'uri', which is defined as read-only by LwM2M protocol. This value will be shown to any following read from server side or through m2mb_lwm2m_read(). The function returns immediately, and the result of the required operation is sent along with the callback defined in m2mb_lwm2m_init. In case of fatal error (example: client not ready), the function fails immediately and no callback is issued. In case of successful set, data is copied from the buffer passed by the user. Values set through this API can be read back by means of m2mb_lwm2m_get() API.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | uri | a structure defining the URI of the resource to be written. Only a defined set of whitelisted URIs can be accepted by this function. If the resource is not included in this set (meaning that the resource value, even if read only, is automatically obtained by the agent and cannot be driven by the user), an error is raised by the callback. The list of whitelisted URIs is: <TODO: add list of whitelisted URIs> |
| [in] | inbuf | an user defined buffer from which the data will be copied. |
| [in] | inbuflen | the size of the user defined buffer from which the data will be copied. |
m2mb_lwm2m_set( h, uri, buf, len );
| M2MB_RESULT_E m2mb_lwm2m_sts | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_STS_URI_T * | reqStsStructure | ||
| ) |
m2mb_lwm2m_sts sets the next server address
m2mb_lwm2m_sts allows either setting the next server address loaded by the LwM2M client or restoring a previously server chosen. The server address will be used at the next module reboot. This function should be used only for certification purposes, where the certification tests server differs from the ordinary one. m2mb_lwm2m_agent_config should always be called before the m2mb_lwm2m_sts.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. The function returns immediately, and the user defined callback is issued whenever the status information is ready. |
| [in] | reqStsStructure | pointer to the LwM2M structure that contains the information needed for #LWM2MSTS command managing |
| M2MB_RESULT_E m2mb_lwm2m_write | ( | M2MB_LWM2M_HANDLE | h, |
| M2MB_LWM2M_OBJ_URI_T * | uri, | ||
| void * | inbuf, | ||
| UINT16 | inbuflen | ||
| ) |
m2mb_lwm2m_write writes the LwM2M resource at the given URI
m2mb_lwm2m_write writes the LwM2M resource at the URI specified by parameter 'uri', performing an operation equivalent to a write from server side. The function returns immediately, and the result of the required operation is sent along with the callback defined in m2mb_lwm2m_init. In case of fatal error (example: client not ready), the function fails immediately and no callback is issued. In case of successful write, data is copied from the buffer passed by the user.
| [in] | h | the handle to the LwM2M service, previously initialized by the m2mb_lwm2m_init function. |
| [in] | uri | a structure defining the URI of the resource to be written. If the resource is not writable, an error is raised by the callback. |
| [in] | inbuf | an user defined buffer from which the data will be copied. |
| [in] | inbuflen | the size of the user defined buffer from which the data will be copied. |
m2mb_lwm2m_write( h, uri, buf, len );