Mistake on this page? Email us
lwm2m_registry_handler.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 - 2018 ARM Limited. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  * Licensed under the Apache License, Version 2.0 (the License); you may
5  * not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef LWM2M_REGISTRY_HANDLER_H
18 #define LWM2M_REGISTRY_HANDLER_H
19 
20 #include "ns_list.h"
21 #include "ns_types.h"
22 #include "sn_coap_header.h"
23 #include "sn_coap_protocol.h"
24 #include "sn_coap_protocol_internal.h"
25 #include "lwm2m_registry.h"
26 #include "lwm2m_endpoint.h"
27 
28 #include <stdint.h>
29 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
45 void handle_coap_request(endpoint_t *endpoint,
46  sn_coap_hdr_s *received_coap_header,
47  sn_nsdl_addr_s *address);
48 
55 bool handle_coap_response(endpoint_t *endpoint, sn_coap_hdr_s *received_coap_header);
56 
67 void send_final_response(const registry_path_t *path,
68  endpoint_t *endpoint,
69  const uint8_t *token,
70  const uint8_t token_length,
71  const sn_coap_msg_code_e msg_code,
72  const bool notify_result);
73 
77 void send_execute_response(const registry_path_t *path,
78  endpoint_t *endpoint,
79  const uint8_t *token,
80  const uint8_t token_length,
81  const sn_coap_msg_code_e msg_code);
82 
88 void response_message_send(endpoint_t *endpoint);
89 
90 #ifdef MBED_CLOUD_CLIENT_DISABLE_REGISTRY
91 
98 bool send_callback_data(const registry_path_t *path,
99  const sn_coap_hdr_s *received_coap_header,
100  const uint8_t type);
101 #endif
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 #endif // LWM2M_REGISTRY_HANDLER_H
bool handle_coap_response(endpoint_t *endpoint, sn_coap_hdr_s *received_coap_header)
Handle Constrained Application Protocol (CoAP) response from the server.
bool send_callback_data(const registry_path_t *path, const sn_coap_hdr_s *received_coap_header, const uint8_t type)
Queue a callback to be called.
Describes the path of an item in the LwM2M Object registry.
Definition: lwm2m_types.h:160
void send_final_response(const registry_path_t *path, endpoint_t *endpoint, const uint8_t *token, const uint8_t token_length, const sn_coap_msg_code_e msg_code, const bool notify_result)
Send a response to a execute request.
void handle_coap_request(endpoint_t *endpoint, sn_coap_hdr_s *received_coap_header, sn_nsdl_addr_s *address)
Handle Constrained Application Protocol (CoAP) request from the server.
void response_message_send(endpoint_t *endpoint)
Event queue calls this function when a time slot is available for sending.
void send_execute_response(const registry_path_t *path, endpoint_t *endpoint, const uint8_t *token, const uint8_t token_length, const sn_coap_msg_code_e msg_code)