libcoap 4.3.1
|
API for updating transmission parameters for CoAP rate control. More...
Macros | |
#define | COAP_DEFAULT_ACK_TIMEOUT ((coap_fixed_point_t){2,0}) |
Number of seconds when to expect an ACK or a response to an outstanding CON message. More... | |
#define | COAP_DEFAULT_ACK_RANDOM_FACTOR ((coap_fixed_point_t){1,500}) |
A factor that is used to randomize the wait time before a message is retransmitted to prevent synchronization effects. More... | |
#define | COAP_DEFAULT_MAX_RETRANSMIT (4U) |
Number of message retransmissions before message sending is stopped. More... | |
#define | COAP_DEFAULT_NSTART (1U) |
The number of simultaneous outstanding interactions that a client maintains to a given server. More... | |
#define | COAP_DEFAULT_DEFAULT_LEISURE ((coap_fixed_point_t){5,0}) |
The number of seconds to use as bounds for multicast traffic RFC 7252, Section 4.8 Default value of DEFAULT_LEISURE is 5.0. More... | |
#define | COAP_DEFAULT_PROBING_RATE (1U) |
The number of bytes/second allowed when there is no response RFC 7252, Section 4.8 Default value of PROBING_RATE is 1. More... | |
#define | COAP_DEFAULT_MAX_LATENCY (100U) |
The MAX_LATENCY definition. More... | |
Functions | |
void | coap_session_set_ack_timeout (coap_session_t *session, coap_fixed_point_t value) |
Set the CoAP initial ack response timeout before the next re-transmit. More... | |
coap_fixed_point_t | coap_session_get_ack_timeout (const coap_session_t *session) |
Get the CoAP initial ack response timeout before the next re-transmit. More... | |
void | coap_session_set_ack_random_factor (coap_session_t *session, coap_fixed_point_t value) |
Set the CoAP ack randomize factor. More... | |
coap_fixed_point_t | coap_session_get_ack_random_factor (const coap_session_t *session) |
Get the CoAP ack randomize factor. More... | |
void | coap_session_set_max_retransmit (coap_session_t *session, uint16_t value) |
Set the CoAP maximum retransmit count before failure. More... | |
uint16_t | coap_session_get_max_retransmit (const coap_session_t *session) |
Get the CoAP maximum retransmit before failure. More... | |
void | coap_session_set_nstart (coap_session_t *session, uint16_t value) |
Set the CoAP maximum concurrent transmission count of Confirmable messages RFC7252 NSTART. More... | |
uint16_t | coap_session_get_nstart (const coap_session_t *session) |
Get the CoAP maximum concurrent transmission count of Confirmable messages RFC7252 NSTART. More... | |
void | coap_session_set_default_leisure (coap_session_t *session, coap_fixed_point_t value) |
Set the CoAP default leisure time (for multicast) RFC7252 DEFAULT_LEISURE. More... | |
coap_fixed_point_t | coap_session_get_default_leisure (const coap_session_t *session) |
Get the CoAP default leisure time RFC7252 DEFAULT_LEISURE. More... | |
void | coap_session_set_probing_rate (coap_session_t *session, uint32_t value) |
Set the CoAP probing rate when there is no response RFC7252 PROBING_RATE. More... | |
uint32_t | coap_session_get_probing_rate (const coap_session_t *session) |
Get the CoAP probing rate when there is no response RFC7252 PROBING_RATE. More... | |
API for updating transmission parameters for CoAP rate control.
The transmission parameters for CoAP rate control ("Congestion Control" in stream-oriented protocols) are defined in https://tools.ietf.org/html/rfc7252#section-4.8
#define COAP_DEFAULT_ACK_RANDOM_FACTOR ((coap_fixed_point_t){1,500}) |
A factor that is used to randomize the wait time before a message is retransmitted to prevent synchronization effects.
RFC 7252, Section 4.8 Default value of ACK_RANDOM_FACTOR is 1.5
Configurable using coap_session_set_ack_random_factor()
Definition at line 424 of file coap_session.h.
#define COAP_DEFAULT_ACK_TIMEOUT ((coap_fixed_point_t){2,0}) |
Number of seconds when to expect an ACK or a response to an outstanding CON message.
RFC 7252, Section 4.8 Default value of ACK_TIMEOUT is 2
Configurable using coap_session_set_ack_timeout()
Definition at line 415 of file coap_session.h.
#define COAP_DEFAULT_DEFAULT_LEISURE ((coap_fixed_point_t){5,0}) |
The number of seconds to use as bounds for multicast traffic RFC 7252, Section 4.8 Default value of DEFAULT_LEISURE is 5.0.
Configurable using coap_session_set_default_leisure()
Definition at line 449 of file coap_session.h.
#define COAP_DEFAULT_MAX_LATENCY (100U) |
The MAX_LATENCY definition.
RFC 7252, Section 4.8.2 MAX_LATENCY is 100.
Definition at line 463 of file coap_session.h.
#define COAP_DEFAULT_MAX_RETRANSMIT (4U) |
Number of message retransmissions before message sending is stopped.
RFC 7252, Section 4.8 Default value of MAX_RETRANSMIT is 4
Configurable using coap_session_set_max_retransmit()
Definition at line 432 of file coap_session.h.
#define COAP_DEFAULT_NSTART (1U) |
The number of simultaneous outstanding interactions that a client maintains to a given server.
RFC 7252, Section 4.8 Default value of NSTART is 1
Configurable using coap_session_set_nstart()
Definition at line 441 of file coap_session.h.
#define COAP_DEFAULT_PROBING_RATE (1U) |
The number of bytes/second allowed when there is no response RFC 7252, Section 4.8 Default value of PROBING_RATE is 1.
Configurable using coap_session_set_probing_rate()
Definition at line 457 of file coap_session.h.
coap_fixed_point_t coap_session_get_ack_random_factor | ( | const coap_session_t * | session | ) |
Get the CoAP ack randomize factor.
A factor that is used to randomize the wait time before a message is retransmitted to prevent synchronization effects. RFC7252 ACK_RANDOM_FACTOR
session | The CoAP session. |
Definition at line 101 of file coap_session.c.
coap_fixed_point_t coap_session_get_ack_timeout | ( | const coap_session_t * | session | ) |
Get the CoAP initial ack response timeout before the next re-transmit.
Number of seconds when to expect an ACK or a response to an outstanding CON message. RFC7252 ACK_TIMEOUT
session | The CoAP session. |
Definition at line 96 of file coap_session.c.
coap_fixed_point_t coap_session_get_default_leisure | ( | const coap_session_t * | session | ) |
Get the CoAP default leisure time RFC7252 DEFAULT_LEISURE.
session | The CoAP session. |
Definition at line 116 of file coap_session.c.
uint16_t coap_session_get_max_retransmit | ( | const coap_session_t * | session | ) |
Get the CoAP maximum retransmit before failure.
Number of message retransmissions before message sending is stopped RFC7252 MAX_RETRANSMIT
session | The CoAP session. |
Definition at line 106 of file coap_session.c.
uint16_t coap_session_get_nstart | ( | const coap_session_t * | session | ) |
Get the CoAP maximum concurrent transmission count of Confirmable messages RFC7252 NSTART.
session | The CoAP session. |
Definition at line 111 of file coap_session.c.
uint32_t coap_session_get_probing_rate | ( | const coap_session_t * | session | ) |
Get the CoAP probing rate when there is no response RFC7252 PROBING_RATE.
session | The CoAP session. |
Definition at line 121 of file coap_session.c.
void coap_session_set_ack_random_factor | ( | coap_session_t * | session, |
coap_fixed_point_t | value | ||
) |
Set the CoAP ack randomize factor.
A factor that is used to randomize the wait time before a message is retransmitted to prevent synchronization effects. RFC7252 ACK_RANDOM_FACTOR
session | The CoAP session. |
value | The value to set to. The default is 1.5 and should not normally get changed. |
Definition at line 47 of file coap_session.c.
void coap_session_set_ack_timeout | ( | coap_session_t * | session, |
coap_fixed_point_t | value | ||
) |
Set the CoAP initial ack response timeout before the next re-transmit.
Number of seconds when to expect an ACK or a response to an outstanding CON message. RFC7252 ACK_TIMEOUT
session | The CoAP session. |
value | The value to set to. The default is 2.0 and should not normally get changed. |
Definition at line 37 of file coap_session.c.
void coap_session_set_default_leisure | ( | coap_session_t * | session, |
coap_fixed_point_t | value | ||
) |
Set the CoAP default leisure time (for multicast) RFC7252 DEFAULT_LEISURE.
session | The CoAP session. |
value | The value to set to. The default is 5.0 and should not normally get changed. |
Definition at line 76 of file coap_session.c.
void coap_session_set_max_retransmit | ( | coap_session_t * | session, |
uint16_t | value | ||
) |
Set the CoAP maximum retransmit count before failure.
Number of message retransmissions before message sending is stopped RFC7252 MAX_RETRANSMIT
session | The CoAP session. |
value | The value to set to. The default is 4 and should not normally get changed. |
Definition at line 58 of file coap_session.c.
void coap_session_set_nstart | ( | coap_session_t * | session, |
uint16_t | value | ||
) |
Set the CoAP maximum concurrent transmission count of Confirmable messages RFC7252 NSTART.
session | The CoAP session. |
value | The value to set to. The default is 1 and should not normally get changed. |
Definition at line 67 of file coap_session.c.
void coap_session_set_probing_rate | ( | coap_session_t * | session, |
uint32_t | value | ||
) |
Set the CoAP probing rate when there is no response RFC7252 PROBING_RATE.
session | The CoAP session. |
value | The value to set to. The default is 1 and should not normally get changed. |
Definition at line 87 of file coap_session.c.