mirror of
https://github.com/espressif/openthread.git
synced 2026-09-11 03:30:09 +00:00
Remove RAM buffers for local operational datasets. (#1929)
The local Active and Pending Operational Datsets are stored in non-volatile memory. This commit dynamically retrieves those datasets from non-volatile memory when they are needed. This commit also simplifies the use of the Operational Datasets by having the RAM buffer store the local Operational Dataset when in the detached state.
This commit is contained in:
@@ -45,7 +45,7 @@ LEADER_ACTIVE_TIMESTAMP = 10
|
||||
COMMISSIONER_PENDING_CHANNEL = 20
|
||||
COMMISSIONER_PENDING_PANID = 0xafce
|
||||
|
||||
class Cert_9_2_8_DelayTimer(unittest.TestCase):
|
||||
class Cert_9_2_8_PersistentDatasets(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.nodes = {}
|
||||
for i in range(1,6):
|
||||
@@ -129,11 +129,8 @@ class Cert_9_2_8_DelayTimer(unittest.TestCase):
|
||||
time.sleep(5)
|
||||
|
||||
self.nodes[ROUTER].reset()
|
||||
self._setUpRouter()
|
||||
self.nodes[ED].reset()
|
||||
self._setUpEd()
|
||||
self.nodes[SED].reset()
|
||||
self._setUpSed()
|
||||
|
||||
time.sleep(60)
|
||||
|
||||
@@ -143,8 +140,15 @@ class Cert_9_2_8_DelayTimer(unittest.TestCase):
|
||||
self.assertEqual(self.nodes[LEADER].get_channel(), COMMISSIONER_PENDING_CHANNEL)
|
||||
self.assertEqual(self.nodes[COMMISSIONER].get_channel(), COMMISSIONER_PENDING_CHANNEL)
|
||||
|
||||
# reset the devices here again to simulate the fact that the devices were disabled the entire time
|
||||
self.nodes[ROUTER].reset()
|
||||
self._setUpRouter()
|
||||
self.nodes[ROUTER].start()
|
||||
self.nodes[ED].reset()
|
||||
self._setUpEd()
|
||||
self.nodes[ED].start()
|
||||
self.nodes[SED].reset()
|
||||
self._setUpSed()
|
||||
self.nodes[SED].start()
|
||||
|
||||
self.assertEqual(self.nodes[ROUTER].get_panid(), PANID_INIT)
|
||||
|
||||
Reference in New Issue
Block a user