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.
sn_coap_protocol.h File Reference
CoAP C-library User protocol interface header file. More...
Go to the source code of this file.
Functions | |
| int8_t | sn_coap_protocol_init (void *(*used_malloc_func_ptr)(uint16_t), void(*used_free_func_ptr)(void *), uint8_t(*used_tx_callback_ptr)(sn_nsdl_capab_e, uint8_t *, uint16_t, sn_nsdl_addr_s *)) |
| This function sets the memory allocation and deallocation functions and used TX callback function pointer the library will use, and must be called first. | |
| int8_t | sn_coap_protocol_destroy (void) |
| Frees all allocated memory in libCoap protocol part. | |
| int16_t | sn_coap_protocol_build (sn_nsdl_addr_s *dst_addr_ptr, uint8_t *dst_packet_data_ptr, sn_coap_hdr_s *src_coap_msg_ptr) |
| Use to build an outgoing message buffer from a CoAP header structure. | |
| sn_coap_hdr_s * | sn_coap_protocol_parse (sn_nsdl_addr_s *src_addr_ptr, uint16_t packet_data_len, uint8_t *packet_data_ptr) |
| Use to parse an incoming message buffer to a CoAP header structure. | |
| int8_t | sn_coap_protocol_exec (uint32_t current_time) |
| Called periodically to allow the protocol to update retransmission timers and destroy unneeded data. | |
| int8_t | sn_coap_protocol_set_block_size (uint16_t block_size) |
| If block transfer is enabled, this function changes the block size. | |
| int8_t | sn_coap_protocol_set_duplicate_buffer_size (uint8_t message_count) |
| If dublicate message detection is enabled, this function changes buffer size. | |
| int8_t | sn_coap_protocol_set_retransmission_parameters (uint8_t resending_count, uint8_t resending_interval) |
| If re-transmissions are enabled, this function changes resending count and interval. | |
| int8_t | sn_coap_protocol_set_retransmission_buffer (uint8_t buffer_size_messages, uint16_t buffer_size_bytes) |
| If re-transmissions are enabled, this function changes resending buffer size. | |
| int8_t | sn_coap_register (sn_coap_hdr_s *coap_hdr_ptr, registration_info_t *endpoint_info_ptr) |
| Create an NSP registration message. | |
| int8_t | sn_coap_register_update (sn_coap_hdr_s *coap_hdr_ptr, uint8_t *location, uint8_t length) |
| Create an NSP update message. | |
| int8_t | sn_coap_deregister (sn_coap_hdr_s *coap_hdr_ptr, uint8_t *location, uint8_t length) |
| Create an NSP de-registration message. | |
Detailed Description
CoAP C-library User protocol interface header file.
Created on: Jun 30, 2011 Author: tero
Definition in file sn_coap_protocol.h.
Function Documentation
| int8_t sn_coap_deregister | ( | sn_coap_hdr_s * | coap_hdr_ptr, |
| uint8_t * | location, | ||
| uint8_t | length | ||
| ) |
Create an NSP de-registration message.
| int16_t sn_coap_protocol_build | ( | sn_nsdl_addr_s * | dst_addr_ptr, |
| uint8_t * | dst_packet_data_ptr, | ||
| sn_coap_hdr_s * | src_coap_msg_ptr | ||
| ) |
Use to build an outgoing message buffer from a CoAP header structure.
| int8_t sn_coap_protocol_destroy | ( | void | ) |
Frees all allocated memory in libCoap protocol part.
| int8_t sn_coap_protocol_exec | ( | uint32_t | current_time ) |
Called periodically to allow the protocol to update retransmission timers and destroy unneeded data.
| int8_t sn_coap_protocol_init | ( | void *(*)(uint16_t) | used_malloc_func_ptr, |
| void(*)(void *) | used_free_func_ptr, | ||
| uint8_t(*)(sn_nsdl_capab_e, uint8_t *, uint16_t, sn_nsdl_addr_s *) | used_tx_callback_ptr | ||
| ) |
This function sets the memory allocation and deallocation functions and used TX callback function pointer the library will use, and must be called first.
| sn_coap_hdr_s* sn_coap_protocol_parse | ( | sn_nsdl_addr_s * | src_addr_ptr, |
| uint16_t | packet_data_len, | ||
| uint8_t * | packet_data_ptr | ||
| ) |
Use to parse an incoming message buffer to a CoAP header structure.
| int8_t sn_coap_protocol_set_block_size | ( | uint16_t | block_size ) |
If block transfer is enabled, this function changes the block size.
| int8_t sn_coap_protocol_set_duplicate_buffer_size | ( | uint8_t | message_count ) |
If dublicate message detection is enabled, this function changes buffer size.
| int8_t sn_coap_protocol_set_retransmission_buffer | ( | uint8_t | buffer_size_messages, |
| uint16_t | buffer_size_bytes | ||
| ) |
If re-transmissions are enabled, this function changes resending buffer size.
| int8_t sn_coap_protocol_set_retransmission_parameters | ( | uint8_t | resending_count, |
| uint8_t | resending_interval | ||
| ) |
If re-transmissions are enabled, this function changes resending count and interval.
| int8_t sn_coap_register | ( | sn_coap_hdr_s * | coap_hdr_ptr, |
| registration_info_t * | endpoint_info_ptr | ||
| ) |
Create an NSP registration message.
| int8_t sn_coap_register_update | ( | sn_coap_hdr_s * | coap_hdr_ptr, |
| uint8_t * | location, | ||
| uint8_t | length | ||
| ) |
Create an NSP update message.
Generated on Thu Jul 14 2022 12:36:08 by
1.7.2