Loading...
Searching...
No Matches
dsme_settings.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 HAW Hamburg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
18#ifndef OPENDSME_DSME_SETTINGS_H
19#define OPENDSME_DSME_SETTINGS_H
20
21#include <stdint.h>
22
23#include <stdio.h>
24#include "kernel_defines.h"
25#include "net/ieee802154.h"
26#include "opendsme.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
35#define DSME_MAX_LOST_BEACONS CONFIG_OPENDSME_MAX_LOST_BEACONS
36
37namespace dsme {
38
39namespace const_redefines {
43constexpr uint8_t aNumSuperframeSlots = 16;
47constexpr uint8_t macSIFSPeriod = 12;
48
52constexpr uint8_t macLIFSPeriod = 40;
53}
54
58constexpr uint8_t PRE_EVENT_SHIFT = const_redefines::macLIFSPeriod;
59
63constexpr uint8_t MIN_CSMA_SLOTS = 0;
64
68constexpr uint8_t MAX_GTSLOTS = const_redefines::aNumSuperframeSlots - MIN_CSMA_SLOTS - 1;
69
73constexpr uint8_t MAX_CHANNELS = 16; /* For O-QPSK */
74
78constexpr uint8_t MIN_CHANNEL = 11; /* For O-QPSK */
79
83constexpr uint8_t MAC_DEFAULT_CHANNEL = CONFIG_IEEE802154_DEFAULT_CHANNEL; /* For O-QPSK */
84
89
94
99
104
109
113constexpr uint16_t MAX_SLOTS_PER_SUPERFRAMES = 1 << (uint16_t)(MAX_BO - MIN_SO);
114
118constexpr uint16_t MAX_TOTAL_SUPERFRAMES = 1 << (uint16_t)(MAX_BO - MIN_SO);
119
123constexpr uint16_t MAX_SUPERFRAMES_PER_MULTI_SUPERFRAME = 1 << (uint16_t)(MAX_MO - MIN_SO);
124
129
133constexpr uint8_t MAX_SAB_UNITS = 1;
134
139
144
148constexpr uint16_t UPPER_LAYER_QUEUE_SIZE = 4;
149
153constexpr uint16_t DSME_BROADCAST_PAN_ID = 0xffff;
154
158constexpr uint8_t ADDITIONAL_ACK_WAIT_DURATION = 63;
159}
160
161#ifdef __cplusplus
162}
163#endif
164
165#endif /* OPENDSME_DSME_SETTINGS_H */
constexpr uint8_t aNumSuperframeSlots
fixed value, see Table 8-80 of IEEE 802.15.4-2015, this includes beacon, CAP and GTS
constexpr uint8_t macSIFSPeriod
fixed value, see 8.1.3 of IEEE 802.15.4-2011 (assuming no UWB PHY)
constexpr uint16_t MAC_DEFAULT_NWK_ID
default PAN ID
constexpr uint8_t MAX_CHANNELS
maximum number of IEEE 802.15.4 channels
constexpr uint16_t MAX_OCCUPIED_SLOTS
Maximum number of GTS slots per superframe.
constexpr uint16_t DSME_BROADCAST_PAN_ID
Broadcast PAN ID.
constexpr uint8_t MIN_SO
Minimum superframe order.
constexpr uint8_t MIN_CSMA_SLOTS
Minimum number of CSMA slots.
constexpr uint8_t MAX_NEIGHBORS
maximum number of neighbors
constexpr uint16_t MAX_TOTAL_SUPERFRAMES
Maximum number of superframes per beacon interval.
constexpr uint16_t UPPER_LAYER_QUEUE_SIZE
Size of the CAP queue.
constexpr uint8_t MAX_BO
Maximum beacon order.
constexpr uint8_t ADDITIONAL_ACK_WAIT_DURATION
Additional time to wait for an ACK.
constexpr uint16_t TOTAL_GTS_QUEUE_SIZE
Size of the CFP queue.
constexpr uint16_t CAP_QUEUE_SIZE
Size of the CAP queue.
constexpr uint8_t MAX_GTSLOTS
maximum number of GTS slots
constexpr uint8_t MAX_SAB_UNITS
Maximum number of SAB units.
constexpr uint16_t MAX_SLOTS_PER_SUPERFRAMES
Maximum number of slots per superframe.
constexpr uint8_t MIN_CHANNEL
minimum number of IEEE 802.15.4 channels
constexpr uint16_t MAX_SUPERFRAMES_PER_MULTI_SUPERFRAME
Maximum number of superframes per multi-superframe.
constexpr uint8_t MAC_DEFAULT_CHANNEL
default MAC channel
constexpr uint8_t MAX_MO
Maximum multi-superframe order.
constexpr uint8_t PRE_EVENT_SHIFT
guard time before a DSME event
constexpr uint8_t macLIFSPeriod
fixed value, see 8.1.3 of IEEE 802.15.4-2011 (assuming no UWB PHY)
#define CONFIG_IEEE802154_DEFAULT_PANID
IEEE802.15.4 default PANID.
Definition ieee802154.h:263
#define CONFIG_IEEE802154_DEFAULT_CHANNEL
IEEE802.15.4 default channel.
Definition ieee802154.h:249
#define CONFIG_IEEE802154_DSME_BEACON_ORDER
Set IEEE 802.15.4 DSME Beacon Order (BO)
Definition ieee802154.h:402
#define CONFIG_IEEE802154_DSME_SUPERFRAME_ORDER
Set IEEE 802.15.4 DSME Superframe Order (SO) The SO sets the slot duration to 60 * symbol_time_us * 2...
Definition ieee802154.h:376
#define CONFIG_IEEE802154_DSME_MULTISUPERFRAME_ORDER
Set IEEE 802.15.4 DSME Multisuperframe Order (MO)
Definition ieee802154.h:389
#define CONFIG_OPENDSME_CFP_QUEUE_SIZE
DSME CFP queue size (for GTS transmissions)
Definition opendsme.h:242
#define CONFIG_OPENDSME_MAX_NEIGHBOURS
maximum number of DSME neighbours
Definition opendsme.h:206
#define CONFIG_OPENDSME_CAP_QUEUE_SIZE
DSME CAP queue size.
Definition opendsme.h:230
Common macros and compiler attributes/pragmas configuration.
stdio wrapper to extend the C libs stdio
IEEE 802.15.4 header definitions.