mirror of
https://github.com/espressif/openthread.git
synced 2026-08-22 02:19:52 +00:00
[travis] test parent selection rules (#4423)
This commit has five scenarios to test the four Mesh Impacting Criteria and one Child Impacting Criterion (version).
This commit is contained in:
@@ -34,6 +34,14 @@ from enum import IntEnum
|
||||
|
||||
import ipaddress
|
||||
|
||||
# Map of 2 bits of parent priority.
|
||||
pp_map = {1: 1, 0: 0, 3: -1, 2: -2}
|
||||
|
||||
|
||||
# Get the signed parent priority from the byte that parent priority is in.
|
||||
def map_pp(self, pp_byte):
|
||||
return pp_map[((pp_byte & 0xC0) >> 6)]
|
||||
|
||||
|
||||
def expect_the_same_class(self, other):
|
||||
if not isinstance(other, self.__class__):
|
||||
|
||||
Reference in New Issue
Block a user