[csl] add TLV for CSL clock accuracy (#6802)

This commit is contained in:
canisLupus1313
2021-07-23 17:08:05 -07:00
committed by GitHub
parent daf2ad7c24
commit 02d968baa6
17 changed files with 380 additions and 20 deletions
+1
View File
@@ -265,6 +265,7 @@ def create_default_mle_tlvs_factories():
mle.TlvType.PENDING_TIMESTAMP: mle.PendingTimestampFactory(),
mle.TlvType.CSL_CHANNEL: mle.CslChannelFactory(),
mle.TlvType.CSL_SYNCHRONIZED_TIMEOUT: mle.CslSynchronizedTimeoutFactory(),
mle.TlvType.CSL_CLOCK_ACCURACY: mle.CslClockAccuracyFactory(),
mle.TlvType.ACTIVE_OPERATIONAL_DATASET: mle.ActiveOperationalDatasetFactory(),
mle.TlvType.PENDING_OPERATIONAL_DATASET: mle.PendingOperationalDatasetFactory(),
mle.TlvType.TIME_REQUEST: mle.TimeRequestFactory(),
+1
View File
@@ -77,6 +77,7 @@ class TlvType(IntEnum):
SCAN_DURATION = 56
ENERGY_LIST = 57
CSL_SYNCHRONIZED_TIMEOUT = 85
CSL_CLOCK_ACCURACY = 86
DISCOVERY_REQUEST = 128
DISCOVERY_RESPONSE = 129
+14
View File
@@ -92,6 +92,7 @@ class TlvType(IntEnum):
THREAD_DISCOVERY = 26
CSL_CHANNEL = 80
CSL_SYNCHRONIZED_TIMEOUT = 85
CSL_CLOCK_ACCURACY = 86
LINK_METRICS_QUERY = 87
LINK_METRICS_MANAGEMENT = 88
LINK_METRICS_REPORT = 89
@@ -1092,6 +1093,19 @@ class CslSynchronizedTimeoutFactory:
return CslSynchronizedTimeout()
class CslClockAccuracy:
# TODO: Not implemented yet
def __init__(self):
print("CslClockAccuracy is not implemented yet.")
class CslClockAccuracyFactory:
def parse(self, data, message_info):
return CslClockAccuracy()
class TimeRequest:
# TODO: Not implemented yet
@@ -161,6 +161,7 @@ ACTIVE_OPERATION_DATASET_TLV = 24
PENDING_OPERATION_DATASET_TLV = 25
THREAD_DISCOVERY_TLV = 26
CSL_SYNCHRONIZED_TIMEOUT = 85
CSL_CLOCK_ACCURACY = 86
# Network Layer TLVs
NL_TARGET_EID_TLV = 0