From 533542314de33015c89f3fe06ea5047e28357288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Sat, 3 Jun 2017 06:39:41 +0200 Subject: [PATCH] netopt: Add NETOPT_LAST_ED_LEVEL --- 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 505240f4a0..16d2a6975f 100644 --- a/sys/include/net/netopt.h +++ b/sys/include/net/netopt.h @@ -260,6 +260,15 @@ typedef enum { */ NETOPT_L2FILTER_RM, + /** + * @brief Energy level during the last performed CCA or RX frame + * + * Get the last ED level available as an int8_t. The source of the + * measurement is unspecified and may come from the latest CCA + * measurement (CCA mode 1), or from the last received frame. + */ + NETOPT_LAST_ED_LEVEL, + /* add more options if needed */ /** diff --git a/sys/net/crosslayer/netopt/netopt.c b/sys/net/crosslayer/netopt/netopt.c index 77f1ab57ac..63d89f0279 100644 --- a/sys/net/crosslayer/netopt/netopt.c +++ b/sys/net/crosslayer/netopt/netopt.c @@ -60,6 +60,7 @@ static const char *_netopt_strmap[] = { [NETOPT_RF_TESTMODE] = "NETOPT_RF_TESTMODE", [NETOPT_L2FILTER] = "NETOPT_L2FILTER", [NETOPT_L2FILTER_RM] = "NETOPT_L2FILTER_RM", + [NETOPT_LAST_ED_LEVEL] = "NETOPT_LAST_ED_LEVEL", [NETOPT_NUMOF] = "NETOPT_NUMOF", };