observe fixes
Dependencies: nanoservice_client_1_12_X Nanostack_lib
Fork of mbedEndpointNetwork_6LowPAN by
nsdl_support.h
00001 // Support functions for the NSDL library 00002 00003 #ifndef NSDL_SUPPORT_H 00004 #define NSDL_SUPPORT_H 00005 00006 #include "mbed.h" 00007 #include <stdint.h> 00008 00009 #include "sn_nsdl.h" 00010 #include "sn_coap_header.h" 00011 #include "sn_coap_protocol.h" 00012 #include "sn_nsdl_lib.h" 00013 00014 #include "mbedConnectorInterface.h" 00015 00016 // ************************* MDS CONFIGURATION ********************************* 00017 00018 extern uint8_t NSP_address_bytes[NSP_IP_ADDRESS_LENGTH]; // which MDS instance we want to bind to... 00019 extern uint8_t endpoint_name[NODE_NAME_LENGTH]; // our NODE name 00020 extern uint8_t domain_name[NSP_DOMAIN_LENGTH]; // our MDS domain name 00021 extern uint8_t ep_type[NSP_ENDPOINT_TYPE_LENGTH]; // our NODE type 00022 extern uint8_t lifetime_ptr[NSP_LIFE_TIME_LENGTH]; // MDS lifetime 00023 00024 // ************************* MDS CONFIGURATION ********************************* 00025 00026 00027 // callback template for PUT/GET 00028 typedef uint8_t (*sn_grs_dyn_res_callback_t)(sn_coap_hdr_s *, sn_nsdl_addr_s *, sn_proto_info_s *); 00029 00030 // external methods 00031 extern "C" void *nsdl_alloc(uint16_t size); 00032 extern "C" void nsdl_free(void* ptr_to_free); 00033 extern void nsdl_create_static_resource(sn_nsdl_resource_info_s *resource_structure, uint16_t pt_len, uint8_t *pt, uint16_t rpp_len, uint8_t *rpp_ptr, uint8_t *rsc, uint16_t rsc_len); 00034 extern void nsdl_create_dynamic_resource(sn_nsdl_resource_info_s *resource_structure, uint16_t pt_len, uint8_t *pt, uint16_t rpp_len, uint8_t *rpp_ptr, uint8_t is_observable, sn_grs_dyn_res_callback_t callback_ptr, int access_right); 00035 extern sn_nsdl_ep_parameters_s* nsdl_init_register_endpoint(sn_nsdl_ep_parameters_s *endpoint_structure, uint8_t *domain, uint8_t* name, uint8_t* ypename_ptr, uint8_t *lifetime_ptr); 00036 extern void nsdl_clean_register_endpoint(sn_nsdl_ep_parameters_s **endpoint_structure); 00037 extern void nsdl_init(); 00038 extern void nsdl_event_loop(); 00039 extern void nsdl_run(); 00040 extern void nsdl_reg_update(); 00041 void NSP_registration(); 00042 extern "C" void nsdl_set_nsp_address(void); 00043 extern void utils_configure_endpoint(void); 00044 extern "C" bool nsdl_endpoint_is_registered(void); 00045 00046 #endif // NSDL_SUPPORT_H
Generated on Fri Jul 15 2022 08:02:55 by 1.7.2