# otCoapTxParameters Struct Reference

# otCoapTxParameters


`#include <openthread/coap.h>`

Represents the CoAP transmission parameters.

## Summary


> [!NOTE]
> **Note:** mAckTimeout \* ((2 \*\* (mMaxRetransmit + 1)) - 1) \* (mAckRandomFactorNumerator / mAckRandomFactorDenominator) must not exceed what can be represented by a uint32_t (0xffffffff). This limitation allows OpenThread to avoid 64-bit arithmetic.

<br />

| ### Public attributes ||
|---|---|
| `https://openthread.io/reference/struct/ot-coap-tx-parameters#structot_coap_tx_parameters_1a0642e0c57033120e651ead9b34be2b07` | `uint8_t` Denominator of ACK_RANDOM_FACTOR used to calculate maximum spacing before first retransmission when ACK is not received (RFC7252 default value of ACK_RANDOM_FACTOR is 1.5; must not be decreased below 1). |
| `https://openthread.io/reference/struct/ot-coap-tx-parameters#structot_coap_tx_parameters_1a23102011a9d56a668fe6dec69025150a` | `uint8_t` Numerator of ACK_RANDOM_FACTOR used to calculate maximum spacing before first retransmission when ACK is not received (RFC7252 default value of ACK_RANDOM_FACTOR is 1.5; must not be decreased below 1). |
| `https://openthread.io/reference/struct/ot-coap-tx-parameters#structot_coap_tx_parameters_1a84c1e92150a030b7c745485102dbde0a` | `uint32_t` Minimum spacing before first retransmission when ACK is not received, in milliseconds (RFC7252 default value is 2000ms). |
| `https://openthread.io/reference/struct/ot-coap-tx-parameters#structot_coap_tx_parameters_1a45181bda28381070aae392e8322fc451` | `uint8_t` Maximum number of retransmissions for CoAP Confirmable messages (RFC7252 default value is 4). |

## Public attributes

### mAckRandomFactorDenominator

```
uint8_t otCoapTxParameters::mAckRandomFactorDenominator
```
Denominator of ACK_RANDOM_FACTOR used to calculate maximum spacing before first retransmission when ACK is not received (RFC7252 default value of ACK_RANDOM_FACTOR is 1.5; must not be decreased below 1).

### mAckRandomFactorNumerator

```
uint8_t otCoapTxParameters::mAckRandomFactorNumerator
```
Numerator of ACK_RANDOM_FACTOR used to calculate maximum spacing before first retransmission when ACK is not received (RFC7252 default value of ACK_RANDOM_FACTOR is 1.5; must not be decreased below 1).

### mAckTimeout

```
uint32_t otCoapTxParameters::mAckTimeout
```
Minimum spacing before first retransmission when ACK is not received, in milliseconds (RFC7252 default value is 2000ms).

### mMaxRetransmit

```
uint8_t otCoapTxParameters::mMaxRetransmit
```
Maximum number of retransmissions for CoAP Confirmable messages (RFC7252 default value is 4).

## Resources

OpenThread API Reference topics originate from the source code, available
on [GitHub](https://github.com/openthread/openthread/tree/main/include/openthread).
For more information, or to contribute to our documentation, refer to
[Resources](https://openthread.io/resources).