coap_client_misc.c
error_t coapClientProcessRequestEvents(CoapClientRequest *request)
Process request-specific events.
Definition: coap_client_misc.c:198
error_t coapGetUintOption(const CoapMessage *message, uint16_t optionNum, uint_t optionIndex, uint32_t *optionValue)
Get the value of the specified uint option.
Definition: coap_option.c:651
uint32_t netGetRandRange(uint32_t min, uint32_t max)
Generate a random value in the specified range.
Definition: net.c:413
error_t coapClientSendDatagram(CoapClientContext *context, const void *data, size_t length)
Send a datagram.
Definition: coap_client_transport.c:239
error_t coapClientSendReset(CoapClientContext *context, uint16_t mid)
Send Reset message.
Definition: coap_client_misc.c:736
error_t coapClientChangeRequestState(CoapClientRequest *request, CoapRequestState newState)
Update CoAP request state.
Definition: coap_client_misc.c:342
bool_t coapCompareToken(const CoapMessageHeader *header1, const CoapMessageHeader *header2)
Token comparison.
Definition: coap_message.c:547
error_t coapClientWaitForDatagram(CoapClientContext *context, systime_t timeout)
Wait for incoming datagrams.
Definition: coap_client_transport.c:308
error_t coapClientReceiveDatagram(CoapClientContext *context, void *data, size_t size, size_t *received)
Receive a datagram.
Definition: coap_client_transport.c:273
CoAP client.
error_t coapClientProcessEvents(CoapClientContext *context, systime_t timeout)
Process CoAP client events.
Definition: coap_client_misc.c:56
error_t coapClientProcessNotification(CoapClientRequest *request, const CoapMessage *response)
Process notification response.
Definition: coap_client_observe.c:53
void coapClientGenerateToken(CoapClientContext *context, CoapMessageHeader *header)
Generate a new token.
Definition: coap_client_misc.c:786
Helper functions for CoAP client.
error_t coapClientMatchResponse(const CoapClientRequest *request, const CoapMessage *response)
Check whether a response matches the specified request.
Definition: coap_client_misc.c:432
void coapClientGenerateMessageId(CoapClientContext *context, CoapMessageHeader *header)
Generate a new message identifier.
Definition: coap_client_misc.c:768
error_t coapClientSendAck(CoapClientContext *context, uint16_t mid)
Send Acknowledgment message.
Definition: coap_client_misc.c:703
Data logging functions for debugging purpose (CoAP)
void osAcquireMutex(OsMutex *mutex)
Acquire ownership of the specified mutex object.
Definition: os_port_chibios.c:396
void osReleaseMutex(OsMutex *mutex)
Release ownership of the specified mutex object.
Definition: os_port_chibios.c:408
CoAP observe.
error_t coapParseMessage(const CoapMessage *message)
Parse CoAP message.
Definition: coap_message.c:51
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
Definition: os_port_chibios.c:202
Transport protocol abstraction layer.
error_t coapClientProcessResponse(CoapClientRequest *request, const CoapMessage *response)
Process CoAP response.
Definition: coap_client_misc.c:570
TCP/IP stack core.
Definitions common to CoAP client and server.
error_t coapClientRejectResponse(CoapClientContext *context, const CoapMessage *response)
Reject a CoAP response.
Definition: coap_client_misc.c:658
Debugging facilities.
error_t coapDumpMessage(const void *message, size_t length)
Dump CoAP message for debugging purpose.
Definition: coap_debug.c:122