mirror of
https://github.com/espressif/openthread.git
synced 2026-09-02 23:30:07 +00:00
[tests] add traffic analysis for Cert_5_2_01 as TestPlan (#2463)
This commit modifies the method assertSentToNode to confirm if the destination Mac address of the message is the node's Mac address. Add method check_parent_request, check_parent_response, check_child_id_request and check_child_id_request to command.py.
This commit is contained in:
committed by
Jonathan Hui
parent
33065099e1
commit
836377093e
@@ -270,6 +270,16 @@ class Message(object):
|
||||
if dst_addr == ipaddress.ip_address(addr):
|
||||
sent_to_node = True
|
||||
|
||||
if self.mac_header.dest_address.type == common.MacAddressType.SHORT:
|
||||
mac_address = common.MacAddress.from_rloc16(node.get_addr16())
|
||||
if self.mac_header.dest_address == mac_address:
|
||||
sent_to_node = True
|
||||
|
||||
elif self.mac_header.dest_address.type == common.MacAddressType.LONG:
|
||||
mac_address = common.MacAddress.from_eui64(bytearray(node.get_addr64(), encoding="utf-8"))
|
||||
if self.mac_header.dest_address == mac_address:
|
||||
sent_to_node = True
|
||||
|
||||
assert sent_to_node == True
|
||||
|
||||
def assertSentToDestinationAddress(self, ipv6_address):
|
||||
|
||||
Reference in New Issue
Block a user