Skip to content

Struct SYN_CoapRequest

ClassList > SYN_CoapRequest

CoAP client request context. More...

  • #include <syn_coap.h>

Public Attributes

Type Name
SYN_Backoff backoff
const SYN_CoapMsg * req_msg
size_t req_option_count
const SYN_CoapOption * req_options
uint8_t resp_buf
size_t resp_len
SYN_CoapMsg resp_msg
size_t resp_option_count
SYN_CoapOption resp_options
SYN_SockAddr server_addr
SYN_Socket sock
uint32_t start_ms
SYN_Status status
uint8_t tx_buf
size_t tx_len

Detailed Description

Populate the input fields, then register as a scheduler task using syn_coap_request_task. On completion, check status and read the response from resp_msg.

Public Attributes Documentation

variable backoff

SYN_Backoff SYN_CoapRequest::backoff;

Retransmit backoff state


variable req_msg

const SYN_CoapMsg* SYN_CoapRequest::req_msg;

Request message to send


variable req_option_count

size_t SYN_CoapRequest::req_option_count;

Number of request options


variable req_options

const SYN_CoapOption* SYN_CoapRequest::req_options;

Request options array


variable resp_buf

uint8_t SYN_CoapRequest::resp_buf[256];

Raw response packet buffer


variable resp_len

size_t SYN_CoapRequest::resp_len;

Raw response length in bytes


variable resp_msg

SYN_CoapMsg SYN_CoapRequest::resp_msg;

Parsed response message


variable resp_option_count

size_t SYN_CoapRequest::resp_option_count;

Number of parsed response options


variable resp_options

SYN_CoapOption SYN_CoapRequest::resp_options[8];

Parsed response options


variable server_addr

SYN_SockAddr SYN_CoapRequest::server_addr;

Destination UDP address


variable sock

SYN_Socket SYN_CoapRequest::sock;

UDP socket handle


variable start_ms

uint32_t SYN_CoapRequest::start_ms;

Tick at start of current send attempt


variable status

SYN_Status SYN_CoapRequest::status;

Final result (SYN_OK / SYN_TIMEOUT / SYN_ERROR)


variable tx_buf

uint8_t SYN_CoapRequest::tx_buf[256];

Serialized request (persists across retries)


variable tx_len

size_t SYN_CoapRequest::tx_len;

Length of serialized request



The documentation for this class was generated from the following file src/syntropic/net/syn_coap.h