Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: nsdl_lib
Dependents: mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet mbed_nsp_endpoint_nxp
nsdl_support.h
00001 // Support functions for the NSDL library 00002 00003 #ifndef NSDL_SUPPORT_H 00004 #define NSDL_SUPPORT_H 00005 00006 #include "Logger.h" 00007 00008 #ifndef CELLULAR_NETWORK 00009 #include "EthernetInterface.h" 00010 #endif 00011 00012 #include "mbed.h" 00013 #include <stdint.h> 00014 #include "sn_nsdl.h" 00015 #include "sn_coap_header.h" 00016 #include "sn_coap_protocol.h" 00017 #include "sn_nsdl_lib.h" 00018 00019 typedef uint8_t (*sn_grs_dyn_res_callback_t)(sn_coap_hdr_s *, sn_nsdl_addr_s *, sn_proto_info_s *); 00020 typedef void (*sn_update_observation_t)(sn_coap_hdr_s *,sn_coap_hdr_s *); 00021 00022 extern "C" void *nsdl_alloc(uint16_t size); 00023 extern "C" void nsdl_free(void* ptr_to_free); 00024 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, uint16_t if_len, uint8_t *if_ptr, uint8_t is_observable, uint8_t is_registered, uint8_t *rsc, uint16_t rsc_len); 00025 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, uint16_t if_len, uint8_t *if_ptr, uint8_t is_observable, uint8_t is_registered, sn_grs_dyn_res_callback_t callback_ptr, int access_right); 00026 sn_nsdl_ep_parameters_s* nsdl_init_register_endpoint(sn_nsdl_ep_parameters_s *endpoint_structure, uint8_t* name, uint8_t* ypename_ptr, uint8_t *lifetime_ptr); 00027 void nsdl_clean_register_endpoint(sn_nsdl_ep_parameters_s **endpoint_structure); 00028 void nsdl_init(); 00029 void nsdl_event_loop(); 00030 00031 extern uint8_t _ep_type[]; 00032 extern uint8_t _lifetime_ptr[]; 00033 extern char _endpoint_name[PERSONALITY_NAME_LEN+1]; 00034 00035 #ifdef CELLULAR_NETWORK 00036 #ifdef NETWORK_MUTEX 00037 #include "rtos.h" 00038 #endif 00039 #include "UDPSocket.h" 00040 #include "Endpoint.h" 00041 #endif 00042 00043 extern Endpoint nsp; 00044 extern UDPSocket server; 00045 00046 #ifndef CELLULAR_NETWORK 00047 #include "EthernetInterface.h" 00048 extern EthernetInterface ethernet; 00049 #endif 00050 extern Logger *m_logger; 00051 00052 #endif // NSDL_SUPPORT_H
Generated on Tue Jul 12 2022 21:44:18 by
1.7.2