Helper functions for CoAP client. More...
Go to the source code of this file.
Detailed Description
Helper functions for CoAP client.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file coap_client_misc.h.
Function Documentation
◆ coapClientChangeRequestState()
error_t coapClientChangeRequestState | ( | CoapClientRequest * | request, |
CoapRequestState | newState | ||
) |
Update CoAP request state.
- Parameters
-
[in] request CoAP request handle [in] newState New state to switch to
- Returns
- Error code
Definition at line 342 of file coap_client_misc.c.
◆ coapClientGenerateMessageId()
void coapClientGenerateMessageId | ( | CoapClientContext * | context, |
CoapMessageHeader * | header | ||
) |
Generate a new message identifier.
- Parameters
-
[in] context Pointer to the CoAP client context [in] header Pointer to the CoAP message header
Definition at line 768 of file coap_client_misc.c.
◆ coapClientGenerateToken()
void coapClientGenerateToken | ( | CoapClientContext * | context, |
CoapMessageHeader * | header | ||
) |
Generate a new token.
- Parameters
-
[in] context Pointer to the CoAP client context [in] header Pointer to the CoAP message header
Definition at line 786 of file coap_client_misc.c.
◆ coapClientMatchResponse()
error_t coapClientMatchResponse | ( | const CoapClientRequest * | request, |
const CoapMessage * | response | ||
) |
Check whether a response matches the specified request.
- Parameters
-
[in] request CoAP request handle [in] response Pointer to the response message
- Returns
- Error code
Definition at line 432 of file coap_client_misc.c.
◆ coapClientProcessEvents()
error_t coapClientProcessEvents | ( | CoapClientContext * | context, |
systime_t | timeout | ||
) |
Process CoAP client events.
- Parameters
-
[in] context Pointer to the CoAP client context [in] timeout Maximum time to wait before returning
- Returns
- Error code
Definition at line 56 of file coap_client_misc.c.
◆ coapClientProcessRequestEvents()
error_t coapClientProcessRequestEvents | ( | CoapClientRequest * | request | ) |
Process request-specific events.
- Parameters
-
[in] request CoAP request handle
- Returns
- Error code
Definition at line 198 of file coap_client_misc.c.
◆ coapClientProcessResponse()
error_t coapClientProcessResponse | ( | CoapClientRequest * | request, |
const CoapMessage * | response | ||
) |
Process CoAP response.
- Parameters
-
[in] request CoAP request handle [in] response Pointer to the response message
- Returns
- Error code
Definition at line 570 of file coap_client_misc.c.
◆ coapClientRejectResponse()
error_t coapClientRejectResponse | ( | CoapClientContext * | context, |
const CoapMessage * | response | ||
) |
Reject a CoAP response.
- Parameters
-
[in] context Pointer to the CoAP client context [in] response Pointer to the response message to be rejected
- Returns
- Error code
Definition at line 658 of file coap_client_misc.c.
◆ coapClientSendAck()
error_t coapClientSendAck | ( | CoapClientContext * | context, |
uint16_t | mid | ||
) |
Send Acknowledgment message.
- Parameters
-
[in] context Pointer to the CoAP client context [in] mid Message ID
- Returns
- Error code
Definition at line 703 of file coap_client_misc.c.
◆ coapClientSendReset()
error_t coapClientSendReset | ( | CoapClientContext * | context, |
uint16_t | mid | ||
) |
Send Reset message.
- Parameters
-
[in] context Pointer to the CoAP client context [in] mid Message ID
- Returns
- Error code
Definition at line 736 of file coap_client_misc.c.