[low-power] implement enhanced-ack based probing (#5780)

This commit implements Enhanced-ACK Probing (on simulation platform).

- Add a new public API otLinkMetricsConfigEnhAckProbing which sends
  Link Metrics Management Request to configure the probing. This is
  called on Probing Initiator side.

- Add a new radio platform API otPlatRadioConfigureEnhAckProbing. This
  API should be called on Probing Subject side when handling the
  requests from Initiators. This API notifies the radio to start/stop
  aggregating link metrics info and include the data into Vendor IE in
  enhanced-ACK for the specific neighbor. As discussed in #5746, the
  code for doing such thing should be put in radio driver.

- Add a util module util/link_metrics, which provides a group of APIs
  to implement Probing Subject side logic for Enh-ACK Probing. Any
  platform could use this module to implement the feature easily in
  radio driver.

- Add new util APIs in util/mac_frame to generate Enh-ACK Probing IE
  (Vendor IE with Thread OUI and SubType = 0) and set value for this
  IE.

- Update the implementation in simulation/radio.c to support Probing
  Subject side logic for Enh-ACK Probing, using APIs in
  util/link_metrics and util/mac_frame.

- Add a test
  v1_2_LowPower_7_1_01_SingleProbeLinkMetricsWithEnhancedAcks.py for
  testing.

Misc:

  - Add check for all the public Link Metrics APIs (Initiator side) to
    ensure that the Subject is a neighbor of the Initiator. If the
    address is not link-local or the neighbor is not found, an error
    UNKNOWN_NEIGHBOR would be returned.

  - Update PrepareEmptyFrame so that when it's called for reference
    device, its frame version would be set to 2015.
This commit is contained in:
Li Cao
2020-12-10 23:31:41 -08:00
committed by GitHub
parent 02f7dbb42b
commit ae07fe27ff
33 changed files with 1877 additions and 176 deletions
+21
View File
@@ -653,4 +653,25 @@ otError otPlatTrelUdp6SetTestMode(otInstance *aInstance, bool aEnable)
#endif // OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_ENABLE
otError otPlatRadioConfigureEnhAckProbing(otInstance * aInstance,
otLinkMetrics aLinkMetrics,
const otShortAddress aShortAddress,
const otExtAddress * aExtAddress)
{
OT_UNUSED_VARIABLE(aInstance);
OT_UNUSED_VARIABLE(aLinkMetrics);
OT_UNUSED_VARIABLE(aShortAddress);
OT_UNUSED_VARIABLE(aExtAddress);
return OT_ERROR_NONE;
}
otLinkMetrics otPlatRadioGetEnhAckProbingMetrics(otInstance *aInstance, const otShortAddress aShortAddress)
{
OT_UNUSED_VARIABLE(aInstance);
OT_UNUSED_VARIABLE(aShortAddress);
}
#endif
} // extern "C"