mirror of
https://github.com/espressif/openthread.git
synced 2026-09-12 04:00:10 +00:00
[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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user