141#define UNICOAP_MESSAGING_FLAGS_DEFAULT (0)
434 unicoap_callback_t callback,
unicoap_request_flags_t
Flags for enabling advanced features in client exchanges.
int unicoap_client_send_request_body(unicoap_message_t *request, unicoap_endpoint_t *endpoint, unicoap_callback_t callback, unicoap_request_parameters_t *parameters, unicoap_request_flags_t flags)
Sends entire request body, may be split into parts and then sent.
int unicoap_server_send_response_body(unicoap_packet_t *packet, const unicoap_resource_t *resource)
Sends entire response body, may be split into parts and then sent.
unicoap_messaging_rfc7252_event_type_t
RFC 7252 event used to notify messaging layer of a change.
static unicoap_messaging_flags_t _messaging_flags_resource(unicoap_resource_flags_t resource_flags)
Retrieves the part of a resource flags bitfield relevant for the messaging driver.
int unicoap_client_send_request_part(unicoap_packet_t *packet, unicoap_client_memo_t *memo, unicoap_request_flags_t request_flags)
Sends part of request body, such as single request in a block-wise transfer.
int unicoap_messaging_send_rfc7252(unicoap_packet_t *packet, unicoap_messaging_flags_t flags, void *exchange)
Sends CoAP over UDP or DTLS packet, see unicoap_messaging_send.
unicoap_messaging_flags_t
Messaging layer result after initial treatment of an inbound message.
int unicoap_exchange_process(unicoap_packet_t *packet, unicoap_exchange_arg_t arg)
Processes message.
int unicoap_server_process_request(unicoap_packet_t *packet, const unicoap_resource_t *resource)
Informs the unicoap server a new packet has been preprocessed and can be handled.
unicoap_preprocessing_result_t unicoap_exchange_preprocess(unicoap_packet_t *packet, unicoap_messaging_flags_t *flags, unicoap_exchange_arg_t *arg, bool truncated)
Performs initial processing of a CoAP packet after it has been parsed.
static unicoap_messaging_flags_t _messaging_flags_client(unicoap_request_flags_t request_flags)
Retrieves the part of a request flags bitfield relevant for the messaging driver.
void unicoap_generate_token(uint8_t *token)
Generates new token.
int unicoap_messaging_send(unicoap_packet_t *packet, unicoap_messaging_flags_t flags, void *exchange)
Forwards packet to messaging layer and the corresponding driver for further message processing,...
unicoap_preprocessing_result_t
Result of unicoap_exchange_preprocess.
int unicoap_messaging_process_rfc7252(const uint8_t *pdu, size_t size, unicoap_messaging_rfc7252_event_type_t event, unicoap_packet_t *packet)
Internal RFC 7252 messaging inbound processor.
int unicoap_client_process_response(unicoap_packet_t *packet, unicoap_client_memo_t *memo)
Informs the unicoap client a new packet has been preprocessed and can be handled.
@ UNICOAP_MESSAGING_RFC7252_EVENT_RX
'Received' event
@ UNICOAP_MESSAGING_RFC7252_EVENT_SESSION_ESTABLISHED
'Session established' event
@ UNICOAP_MESSAGING_RFC7252_EVENT_TRUNCATED
'Truncated' event
@ UNICOAP_MESSAGING_FLAG_TRACK
Instructs the messaging layer to keep track of potential transmissions related to this packet.
@ UNICOAP_MESSAGING_FLAG_RELIABLE
Messaging flag indicating the stack wants this message to be transmitted reliably.
@ UNICOAP_PREPROCESSING_SUCCESS_RESPONSE
The given message can be processed.
@ UNICOAP_PREPROCESSING_ERROR_NOTIFICATION_UNEXPECTED
Unexpected notification, no known client exchange (observation)
@ UNICOAP_PREPROCESSING_ERROR_UNSUPPORTED
The given message cannot be processed due to being unsupported.
@ UNICOAP_PREPROCESSING_ERROR_REQUEST
The given message cannot be handled, disregarded.
@ UNICOAP_PREPROCESSING_ERROR_TRUNCATED
The given message is truncated and can thus not be handled.
@ UNICOAP_PREPROCESSING_SUCCESS_REQUEST
The given message can be processed.
@ UNICOAP_PREPROCESSING_ERROR_INVALID_CODE_CLASS
The given message's code class is not valid.
@ UNICOAP_PREPROCESSING_ERROR_RESPONSE_UNEXPECTED
The given message is unexpected and cannot be processed.
unicoap_resource_flags_t
Flags for enabling advanced features in server exchanges.
struct unicoap_resource unicoap_resource_t
CoAP resource.
A type acting as an envelope for a message and data connected, like endpoints.
Additional parameters to customize request behavior.
Argument passed to exchange-layer processing function.
unicoap_client_memo_t * client
Client memo.
const unicoap_resource_t * resource
Resource.