[low-power] implement link metrics - single probe (#5481)

This commit is the first part in link metrics. It implements single
probe function.

An overview of major changes:
- Add link metrics apis which allow apps to send a single probe and
  set report callback.
- Add cli commands for calling link metrics api and related README
  doc.
- Add a new module link_metrics to implement the query process and
  handle the report.
- Add related tlv types.
- Add simple script test to run single probe process.
This commit is contained in:
Li Cao
2020-09-25 09:50:09 -07:00
committed by GitHub
parent 88c976e3f7
commit dc94758e84
36 changed files with 1591 additions and 9 deletions
+28
View File
@@ -89,6 +89,8 @@ class TlvType(IntEnum):
THREAD_DISCOVERY = 26
CSL_CHANNEL = 80
CSL_SYNCHRONIZED_TIMEOUT = 85
LINK_METRICS_QUERY = 87
LINK_METRICS_REPORT = 89
TIME_REQUEST = 252
TIME_PARAMETER = 253
@@ -1102,6 +1104,32 @@ class TimeParameterFactory:
return TimeParameter()
class LinkMetricsQuery:
# TODO: Not implemented yet
def __init__(self):
print("LinkMetricsQuery is not implemented yet.")
class LinkMetricsQueryFactory:
def parse(self, data, message_info):
return LinkMetricsQuery()
class LinkMetricsReport:
# TODO: Not implemented yet
def __init__(self):
print("LinkMetricsReport is not implemented yet.")
class LinkMetricsReportFactory:
def parse(self, data, message_info):
return LinkMetricsReport()
class MleCommand(object):
def __init__(self, _type, tlvs):