NSDL C library
Dependents: NSDL_HelloWorld_WiFi UbloxModemNanoServiceClient IOT-NSDL_HelloWorld LWM2M_NanoService_Ethernet ... more
Fork of nsdl_lib by
Note that use of this software requires acceptance of the Sensinode EULA: http://mbed.org/teams/Sensinode/code/nsdl_lib/wiki/EULA
Diff: sn_coap_header.h
- Revision:
- 3:d8cb1afd7285
- Parent:
- 2:ab50a2ab6ec9
- Child:
- 6:1caf76131c9a
--- a/sn_coap_header.h Wed Oct 09 14:57:33 2013 +0000 +++ b/sn_coap_header.h Thu Oct 10 10:24:59 2013 +0000 @@ -25,7 +25,7 @@ /* * * * * * * * * * * * * * */ /** - * Enumeration for CoAP Version + * \brief Enumeration for CoAP Version */ typedef enum coap_version_ { @@ -34,18 +34,18 @@ } coap_version_e; /** - * Enumeration for CoAP Message type, used in CoAP Header + * \brief Enumeration for CoAP Message type, used in CoAP Header */ typedef enum sn_coap_msg_type_ { - COAP_MSG_TYPE_CONFIRMABLE = 0x00, /**< User uses this for Reliable Request messages */ - COAP_MSG_TYPE_NON_CONFIRMABLE = 0x10, /**< User uses this for Non-reliable Request and Response messages */ - COAP_MSG_TYPE_ACKNOWLEDGEMENT = 0x20, /**< User uses this for Response to a Confirmable Request */ - COAP_MSG_TYPE_RESET = 0x30 /**< User uses this to answer a Bad Request */ + COAP_MSG_TYPE_CONFIRMABLE = 0x00, /**< Reliable Request messages */ + COAP_MSG_TYPE_NON_CONFIRMABLE = 0x10, /**< Non-reliable Request and Response messages */ + COAP_MSG_TYPE_ACKNOWLEDGEMENT = 0x20, /**< Response to a Confirmable Request */ + COAP_MSG_TYPE_RESET = 0x30 /**< Answer a Bad Request */ } sn_coap_msg_type_e; /** - * Enumeration for CoAP Message code, used in CoAP Header + * \brief Enumeration for CoAP Message code, used in CoAP Header */ typedef enum sn_coap_msg_code_ { @@ -80,7 +80,7 @@ } sn_coap_msg_code_e; /** - * Enumeration for CoAP Option number, used in CoAP Header + * \brief Enumeration for CoAP Option number, used in CoAP Header */ typedef enum sn_coap_option_numbers_ { @@ -108,7 +108,7 @@ } sn_coap_option_numbers_e; /** - * Enumeration for CoAP Content Format codes + * \brief Enumeration for CoAP Content Format codes */ typedef enum sn_coap_content_format_ { @@ -122,7 +122,7 @@ } sn_coap_content_format_e; /** - * Enumeration for CoAP status, used in CoAP Header + * \brief Enumeration for CoAP status, used in CoAP Header */ typedef enum sn_coap_status_ { @@ -143,7 +143,7 @@ /* * * * * * * * * * * * * */ /** - * Structure for CoAP Options + * \brief Structure for CoAP Options */ typedef struct sn_coap_options_list_ { @@ -197,7 +197,7 @@ /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ /** - * Main CoAP message struct + * \brief Main CoAP message struct */ typedef struct sn_coap_hdr_ { @@ -243,42 +243,42 @@ /* * * * * * * * * * * * * * * * * * * * * * */ /** - * This function sets the memory allocation and deallocation functions the library will use, and must be called first. + * \brief Sets the memory allocation and deallocation functions the library will use, and must be called first. */ extern void sn_coap_builder_and_parser_init(void* (*used_malloc_func_ptr)(uint16_t), void (*used_free_func_ptr)(void*)); /** - * Use to parse an incoming message buffer to a CoAP header structure. + * \brief Parses an incoming message buffer to a CoAP header structure. */ extern sn_coap_hdr_s *sn_coap_parser(uint16_t packet_data_len, uint8_t *packet_data_ptr, coap_version_e *coap_version_ptr); /** - * This function releases any memory allocated by a CoAP message structure. + * \brief Releases any memory allocated by a CoAP message structure. */ extern void sn_coap_parser_release_allocated_coap_msg_mem(sn_coap_hdr_s *freed_coap_msg_ptr); /** - * Use to build an outgoing message buffer from a CoAP header structure. + * \brief Builds an outgoing message buffer from a CoAP header structure. */ extern int16_t sn_coap_builder(uint8_t *dst_packet_data_ptr, sn_coap_hdr_s *src_coap_msg_ptr); /** - * Use to calculate the needed message buffer size from a CoAP message structure. + * \brief Calculates the needed message buffer size from a CoAP message structure. */ extern uint16_t sn_coap_builder_calc_needed_packet_data_size(sn_coap_hdr_s *src_coap_msg_ptr); /** - * This function releases any memory allocated in sn_nsdl_transmit_s + * \brief Releases any memory allocated in sn_nsdl_transmit_s */ extern void sn_coap_builder_release_allocated_send_msg_mem(sn_nsdl_transmit_s *freed_send_msg_ptr); /** - * Use to automate the building of a response to an incoming request. + * \brief Automates the building of a response to an incoming request. */ extern sn_coap_hdr_s *sn_coap_build_response(sn_coap_hdr_s *coap_packet_ptr, uint8_t msg_code); /** - * CoAP packet debugging. + * \brief CoAP packet debugging. */ extern void sn_coap_packet_debug(sn_coap_hdr_s *coap_packet_ptr);