Loading...
Searching...
No Matches
dsme_settings.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include <stdint.h>
19
20#include <stdio.h>
21#include "kernel_defines.h"
22#include "net/ieee802154.h"
23#include "opendsme.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
32#define DSME_MAX_LOST_BEACONS CONFIG_OPENDSME_MAX_LOST_BEACONS
33
34namespace dsme {
35
36namespace const_redefines {
40constexpr uint8_t aNumSuperframeSlots = 16;
44constexpr uint8_t macSIFSPeriod = 12;
45
49constexpr uint8_t macLIFSPeriod = 40;
50}
51
56
60constexpr uint8_t MIN_CSMA_SLOTS = 0;
61
66
70constexpr uint8_t MAX_CHANNELS = 16; /* For O-QPSK */
71
75constexpr uint8_t MIN_CHANNEL = 11; /* For O-QPSK */
76
80constexpr uint8_t MAC_DEFAULT_CHANNEL = CONFIG_IEEE802154_DEFAULT_CHANNEL; /* For O-QPSK */
81
86
91
96
101
106
110constexpr uint16_t MAX_SLOTS_PER_SUPERFRAMES = 1 << (uint16_t)(MAX_BO - MIN_SO);
111
115constexpr uint16_t MAX_TOTAL_SUPERFRAMES = 1 << (uint16_t)(MAX_BO - MIN_SO);
116
120constexpr uint16_t MAX_SUPERFRAMES_PER_MULTI_SUPERFRAME = 1 << (uint16_t)(MAX_MO - MIN_SO);
121
127
131constexpr uint8_t MAX_SAB_UNITS = 1;
132
137
142
146constexpr uint16_t UPPER_LAYER_QUEUE_SIZE = 4;
147
151constexpr uint16_t DSME_BROADCAST_PAN_ID = 0xffff;
152
156constexpr uint8_t ADDITIONAL_ACK_WAIT_DURATION = 63;
157}
158
159#ifdef __cplusplus
160}
161#endif
162
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:389
#define CONFIG_IEEE802154_DEFAULT_CHANNEL
IEEE802.15.4 default channel.
Definition ieee802154.h:319
#define CONFIG_IEEE802154_DSME_BEACON_ORDER
Set IEEE 802.15.4 DSME Beacon Order (BO)
Definition ieee802154.h:528
#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:502
#define CONFIG_IEEE802154_DSME_MULTISUPERFRAME_ORDER
Set IEEE 802.15.4 DSME Multisuperframe Order (MO)
Definition ieee802154.h:515
#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.
IEEE 802.15.4 header definitions.