From c33eb2b2778420e7a7a81e9c07d86eae7a271722 Mon Sep 17 00:00:00 2001 From: Koen Zandberg Date: Thu, 3 Aug 2017 00:03:20 +0200 Subject: [PATCH] netopt: add NETOPT_TX_RETRIES_NEEDED --- sys/include/net/netopt.h | 9 +++++++++ sys/net/crosslayer/netopt/netopt.c | 1 + 2 files changed, 10 insertions(+) diff --git a/sys/include/net/netopt.h b/sys/include/net/netopt.h index 810051762b..6fba559496 100644 --- a/sys/include/net/netopt.h +++ b/sys/include/net/netopt.h @@ -340,6 +340,15 @@ typedef enum { */ NETOPT_IQ_INVERT, + /** + * @brief Get retry amount from missing ACKs of the last transmission + * + * This retrieves the number of retries needed for the last transmissions. + * Only retransmissions due to missing ACK packets are considered. + * Retries due to CCA failures are not counted. + */ + NETOPT_TX_RETRIES_NEEDED, + /* add more options if needed */ /** diff --git a/sys/net/crosslayer/netopt/netopt.c b/sys/net/crosslayer/netopt/netopt.c index b4842a5895..59fea27ea3 100644 --- a/sys/net/crosslayer/netopt/netopt.c +++ b/sys/net/crosslayer/netopt/netopt.c @@ -74,6 +74,7 @@ static const char *_netopt_strmap[] = { [NETOPT_CHANNEL_HOP_PERIOD] = "NETOPT_CHANNEL_HOP_PERIOD", [NETOPT_FIXED_HEADER] = "NETOPT_FIXED_HEADER", [NETOPT_IQ_INVERT] = "NETOPT_IQ_INVERT", + [NETOPT_TX_RETRIES_NEEDED] = "NETOPT_TX_RETRIES_NEEDED", [NETOPT_NUMOF] = "NETOPT_NUMOF", };