[radio-selector] adding multi radio link support (#4440)

This commit adds support for multi radio links in OpenThread core.

A set of `OPENTHREAD_CONFIG_RADIO_LINK_*` definitions (in header
`config/radio_link.h`) determines the supported radio link types.

This commit adds a new class `RadioSelector` which selects the radio
link for each message transmission. Per neighbor it tracks the
supported radio types and a preference value for each type.
`RadioSelector` updates the preference value based on the history of
rx/tx events with the neighbor, e.g., a successful tx on a radio link
increases the preference, whereas a failed tx attempt decreases it.

A new class `Mac::Links` is added defining a layer between `Mac` and
different radio links (e.g., `SubMac` for 802.15.4 radio type).
Broadcast frames are sent in parallel over all radio links. A unicast
transmission is sent over a single radio link at a time but on a tx
failure it may be retransmitted over other radio links.

This commit also adds the concept of deferred ack, allowing radio
links report status of ack at a later time through a different
callback.
This commit is contained in:
Abtin Keshavarzian
2020-12-10 11:46:07 -08:00
committed by Jonathan Hui
parent 48333ce530
commit ffb3fdf9bd
49 changed files with 3948 additions and 413 deletions
+4 -3
View File
@@ -272,11 +272,12 @@ void TestMacHeader(void)
for (const auto &test : tests)
{
uint8_t psdu[Mac::Frame::kMtu];
uint8_t psdu[OT_RADIO_FRAME_MAX_SIZE];
Mac::TxFrame frame;
frame.mPsdu = psdu;
frame.mLength = 0;
frame.mPsdu = psdu;
frame.mLength = 0;
frame.mRadioType = 0;
frame.InitMacHeader(test.fcf, test.secCtl);
VerifyOrQuit(frame.GetHeaderLength() == test.headerLength, "MacHeader test failed");