mirror of
https://github.com/espressif/openthread.git
synced 2026-09-07 01:30:11 +00:00
[mac] adding sub-MAC layer (#3262)
This commit introduces sub-MAC layer (class `Mac::SubMac`) in OpenThread implementing a subset of IEEE802.15.4 MAC primitives which are shared by both MAC layer (in FTD/MTD modes) and Raw Link (Radio only mode). The sub-MAC layer handles the following (if not provided by radio platform): - Ack timeout for frame transmission, - CSMA backoff logic, - Frame re-transmissions, - Energy scan on a single channel and RSSI sampling. It also act as the interface (to radio platform) for setting/getting radio configurations such as short or extended addresses and PAN Id. In addition, this commit contains following improvements in `Mac`: - The implementation of `STAY_AWAKE_BETWEEN_FRAGMENTS` (delay sleep) feature is simplified by adding a new state variable tracking if sleep is being delayed and canceling sleep delay on start of any operation. - Member variables in `Mac` class are re-ordered to avoid alignment gaps. - `Mac` timers are combined into one which is used for Active Scan, Data Poll timeout, and delaying sleep.
This commit is contained in:
committed by
Jonathan Hui
parent
5d6dccf35c
commit
8d12513591
@@ -110,6 +110,8 @@ LOCAL_SRC_FILES := \
|
||||
src/core/mac/mac.cpp \
|
||||
src/core/mac/mac_filter.cpp \
|
||||
src/core/mac/mac_frame.cpp \
|
||||
src/core/mac/sub_mac.cpp \
|
||||
src/core/mac/sub_mac_callbacks.cpp \
|
||||
src/core/meshcop/announce_begin_client.cpp \
|
||||
src/core/meshcop/border_agent.cpp \
|
||||
src/core/meshcop/commissioner.cpp \
|
||||
|
||||
Reference in New Issue
Block a user