coap_message_conf_t

nRF5 SDK v15.0.0

Structure to hold a CoAP message configuration. More...

#include <coap_api.h>

Detailed Description

Structure to hold a CoAP message configuration.

The structure is used when calling the coap_message_new API function. All data supplied will be copied to the created message.

Field Documentation

coap_msg_code_t coap_message_conf_t::code

Message code (definitions found in coap_msg_code_t).

uint16_t coap_message_conf_t::id

Message ID. If 0 is given, the library will replace this number with an autogenerated value.

coap_port_t coap_message_conf_t::port

Transport layer variable to associate the message with an underlying Transport Layer socket descriptor.

coap_response_callback_t coap_message_conf_t::response_callback

Callback function to be called when a response matching the token is identified.

uint8_t coap_message_conf_t::token[8]

Message token. token_len must be set to indicate how many of the bytes should be used in the token.

uint8_t coap_message_conf_t::token_len

Token size in bytes.

coap_msg_type_t coap_message_conf_t::type

Message type: COAP_TYPE_CON, COAP_TYPE_NON, COAP_TYPE_ACK, or COAP_TYPE_RST.

  • components/iot/coap/coap_api.h