From a70b1858c4a677c98dbc5791b46a776945fcd32b Mon Sep 17 00:00:00 2001 From: Jose Alamos Date: Thu, 27 Jun 2019 16:04:39 +0200 Subject: [PATCH] netopt: add NETOPTs required for gnrc_lorawan --- sys/include/net/netopt.h | 23 +++++++++++++++++++++++ sys/net/crosslayer/netopt/netopt.c | 4 ++++ 2 files changed, 27 insertions(+) diff --git a/sys/include/net/netopt.h b/sys/include/net/netopt.h index 73dcbbd900..794e07cd87 100644 --- a/sys/include/net/netopt.h +++ b/sys/include/net/netopt.h @@ -670,6 +670,29 @@ typedef enum { /* add more options if needed */ + /** + * @brief (@ref netopt_enable_t) Enable or disable OTAA activation (LoRaWAN) + */ + NETOPT_OTAA, + + /** + * @brief (uint8_t) Get the demodulation margin of the last Link Check request. + */ + NETOPT_DEMOD_MARGIN, + + /** + * @brief (uint8_t) Get the number of gateways of the last Link Check request. + */ + NETOPT_NUM_GATEWAYS, + + /** + * @brief (@ref netopt_enable_t) Perform a Link Check request (LoRaWAN) + * + * When set, the next transmission will request a Link Check and will + * be received on the next downlink + */ + NETOPT_LINK_CHECK, + /** * @brief maximum number of options defined here. * diff --git a/sys/net/crosslayer/netopt/netopt.c b/sys/net/crosslayer/netopt/netopt.c index db0a75bca9..e9f420f1bb 100644 --- a/sys/net/crosslayer/netopt/netopt.c +++ b/sys/net/crosslayer/netopt/netopt.c @@ -109,6 +109,10 @@ static const char *_netopt_strmap[] = { [NETOPT_SYNCWORD] = "NETOPT_SYNCWORD", [NETOPT_RANDOM] = "NETOPT_RANDOM", [NETOPT_RX_SYMBOL_TIMEOUT] = "NETOPT_RX_SYMBOL_TIMEOUT", + [NETOPT_OTAA] = "NETOPT_OTAA", + [NETOPT_DEMOD_MARGIN] = "NETOPT_DEMOD_MARGIN", + [NETOPT_NUM_GATEWAYS] = "NETOPT_NUM_GATEWAYS", + [NETOPT_LINK_CHECK] = "NETOPT_LINK_CHECK", [NETOPT_NUMOF] = "NETOPT_NUMOF", };