gnrc_netif_lorawan: add headers
This commit is contained in:
parent
4192cd5578
commit
845944e092
56
sys/include/net/gnrc/netif/lorawan.h
Normal file
56
sys/include/net/gnrc/netif/lorawan.h
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (C) 2019 HAW Hamburg
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup net_gnrc_netif
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief LoRaWAN adaption for @ref net_gnrc_netif
|
||||
*
|
||||
* @author Jose Ignacio Alamos <jose.alamos@haw-hamburg.de>
|
||||
*/
|
||||
#ifndef NET_GNRC_NETIF_LORAWAN_H
|
||||
#define NET_GNRC_NETIF_LORAWAN_H
|
||||
|
||||
#include "net/gnrc/lorawan.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief A Link Check request was scheduled
|
||||
*/
|
||||
#define GNRC_NETIF_LORAWAN_FLAGS_LINK_CHECK (0x1U)
|
||||
|
||||
/**
|
||||
* @brief GNRC LoRaWAN interface descriptor
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t nwkskey[LORAMAC_NWKSKEY_LEN]; /**< network SKey buffer */
|
||||
uint8_t appskey[LORAMAC_APPSKEY_LEN]; /**< App SKey buffer */
|
||||
uint8_t appkey[LORAMAC_APPKEY_LEN]; /**< App Key buffer */
|
||||
uint8_t deveui[LORAMAC_DEVEUI_LEN]; /**< Device EUI buffer */
|
||||
uint8_t appeui[LORAMAC_APPEUI_LEN]; /**< App EUI buffer */
|
||||
gnrc_lorawan_t mac; /**< gnrc lorawan mac descriptor */
|
||||
uint8_t flags; /**< flags for the LoRaWAN interface */
|
||||
uint8_t demod_margin; /**< value of last demodulation margin */
|
||||
uint8_t num_gateways; /**< number of gateways of last link check */
|
||||
uint8_t datarate; /**< LoRaWAN datarate for the next transmission */
|
||||
uint8_t port; /**< LoRaWAN port for the next transmission */
|
||||
uint8_t ack_req; /**< Request ACK in the next transmission */
|
||||
uint8_t otaa; /**< wether the next transmission is OTAA or not */
|
||||
} gnrc_netif_lorawan_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* NET_GNRC_NETIF_LORAWAN_H */
|
||||
/** @} */
|
||||
49
sys/include/net/gnrc/netif/lorawan_base.h
Normal file
49
sys/include/net/gnrc/netif/lorawan_base.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (C) 2019 HAW Hamburg
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
* directory for more details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup net_gnrc_netif
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief LoRaWAN base @ref net_gnrc_netif header
|
||||
*
|
||||
* @author Jose Ignacio Alamos <jose.alamos@haw-hamburg.de>
|
||||
*/
|
||||
#ifndef NET_GNRC_NETIF_LORAWAN_BASE_H
|
||||
#define NET_GNRC_NETIF_LORAWAN_BASE_H
|
||||
|
||||
#include "net/gnrc/netif.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Creates a raw network interface
|
||||
*
|
||||
* @param[in] stack The stack for the network interface's thread.
|
||||
* @param[in] stacksize Size of @p stack.
|
||||
* @param[in] priority Priority for the network interface's thread.
|
||||
* @param[in] name Name for the network interface. May be NULL.
|
||||
* @param[in] dev Device for the interface.
|
||||
*
|
||||
* @see @ref gnrc_netif_create()
|
||||
*
|
||||
* @return The network interface on success.
|
||||
* @return NULL, on error.
|
||||
*/
|
||||
gnrc_netif_t *gnrc_netif_lorawan_create(char *stack, int stacksize, char priority,
|
||||
char *name, netdev_t *dev);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* NET_GNRC_NETIF_LORAWAN_BASE_H */
|
||||
/** @} */
|
||||
Loading…
x
Reference in New Issue
Block a user