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.
Fork of mbed-os-example-mbed5-blinky by
baidu_ca_nsdl_adapter.h
00001 // Copyright 2017 Baidu Inc. All Rights Reserved. 00002 // Author: Su Hao (suhao@baidu.com) 00003 // 00004 // Description: Adapter between nsdl and Baidu CA CoAP. 00005 00006 #ifndef BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_NSDL_ADAPTER_H 00007 #define BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_NSDL_ADAPTER_H 00008 00009 #include "ns_types.h" 00010 #include "sn_nsdl.h" 00011 #include "sn_coap_header.h" 00012 #include "baidu_ca_internal.h" 00013 00014 /* 00015 * Set the nsdl address from ca 00016 * 00017 * @Param target, in, the target will be evaluated 00018 * @Param source, the CA address 00019 */ 00020 BCA_INT void bca_nsdl_address_set(sn_nsdl_addr_s* target, 00021 const bca_addr_t* source); 00022 00023 /* 00024 * Set the nsdl CoAP header from ca 00025 * 00026 * @Param target, in, the target will be evaluated 00027 * @Param opt, in, the CoAP options 00028 * @Param source, the CA message header 00029 */ 00030 BCA_INT void bca_nsdl_header_set(sn_coap_hdr_s* target, 00031 sn_coap_options_list_s* opt, 00032 const bca_msg_t* source); 00033 00034 /* 00035 * Set the CoAP address from nsdl 00036 * 00037 * @Param target, in, the target will be evaluated 00038 * @Param source, the nsdl address 00039 */ 00040 BCA_INT void bca_coap_address_set(bca_addr_t* target, 00041 const sn_nsdl_addr_s* source); 00042 00043 /* 00044 * Set the CoAP header from nsdl 00045 * 00046 * @Param target, in, the target will be evaluated 00047 * @Param source, the nsdl message header 00048 */ 00049 BCA_INT void bca_coap_header_set(bca_msg_t* target, 00050 const sn_coap_hdr_s* source); 00051 00052 #endif // BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_NSDL_ADAPTER_H
Generated on Tue Jul 12 2022 16:28:52 by
1.7.2
