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 "lwm2m_registry.h"
21 #include "lwm2m_endpoint.h"
22 
23 #include "ns_list.h"
24 #include "ns_types.h"
25 #include "sn_coap_header.h"
26 #include "sn_coap_protocol.h"
27 #include "sn_coap_protocol_internal.h"
28 #include "lwm2m_registry.h"
29 #include "lwm2m_endpoint.h"
30 
31 #include <stdint.h>
32 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
48 void handle_coap_request(endpoint_t *endpoint,
49  sn_coap_hdr_s *received_coap_header,
50  sn_nsdl_addr_s *address);
51 
58 bool handle_coap_response(endpoint_t *endpoint, sn_coap_hdr_s *received_coap_header);
59 
70 void send_final_response(const registry_path_t *path,
71  endpoint_t *endpoint,
72  const uint8_t *token,
73  const uint8_t token_length,
74  const sn_coap_msg_code_e msg_code,
75  const bool notify_result);
76 
80 void send_execute_response(const registry_path_t *path,
81  endpoint_t *endpoint,
82  const uint8_t *token,
83  const uint8_t token_length,
84  const sn_coap_msg_code_e msg_code);
85 
91 void response_message_send(endpoint_t *endpoint);
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 #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.
Describes the path of an item in the LwM2M Object registry.
Definition: lwm2m_types.h:159
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)