Lines Matching refs:wpan
30 import wpan
31 from wpan import verify
43 node = wpan.Node()
48 wpan.Node.init_all_nodes()
54 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_ON)
63 verify(node.get(wpan.WPAN_STATE) == wpan.STATE_OFFLINE)
67 verify(node.get(wpan.WPAN_STATE) == wpan.STATE_DEEP_SLEEP)
71 verify(node.get(wpan.WPAN_STATE) == wpan.STATE_COMMISSIONED)
75 verify(node.get(wpan.WPAN_STATE) == wpan.STATE_ASSOCIATED)
79 verify(node.get(wpan.WPAN_STATE) == wpan.STATE_ASSOCIATING)
85 node.set(wpan.WPAN_NCP_MCU_POWER_STATE, 'low-power')
86 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_LOW_POWER)
87 verify(node.get(wpan.WPAN_STATE) == wpan.STATE_ASSOCIATED)
89 node.set(wpan.WPAN_NCP_MCU_POWER_STATE, 'on')
90 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_ON)
92 node.set(wpan.WPAN_NCP_MCU_POWER_STATE, 'lp') # special short-form string for low-power
93 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_LOW_POWER)
95 node.set(wpan.WPAN_NCP_MCU_POWER_STATE, wpan.MCU_POWER_STATE_ON)
96 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_ON)
98 node.set(wpan.WPAN_NCP_MCU_POWER_STATE, wpan.MCU_POWER_STATE_LOW_POWER)
99 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_LOW_POWER)
100 verify(node.get(wpan.WPAN_STATE) == wpan.STATE_ASSOCIATED)
106 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_LOW_POWER)
107 node.set(wpan.WPAN_NCP_MCU_POWER_STATE, wpan.MCU_POWER_STATE_ON)
115 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_ON)
116 verify(node.get(wpan.WPAN_STATE) == wpan.STATE_OFFLINE)
121 node.set(wpan.WPAN_NCP_MCU_POWER_STATE, wpan.MCU_POWER_STATE_LOW_POWER)
122 wpan.verify_within(check_wpan_is_in_deep_sleep_state, WAIT_TIME)
126 node.get(wpan.WPAN_THREAD_RLOC16)
127 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_LOW_POWER)
128 verify(node.get(wpan.WPAN_STATE) == wpan.STATE_DEEP_SLEEP)
132 node.set(wpan.WPAN_NCP_MCU_POWER_STATE, wpan.MCU_POWER_STATE_ON)
133 wpan.verify_within(check_wpan_is_in_offline_state, WAIT_TIME)
139 wpan.verify_within(check_wpan_is_in_deep_sleep_state, WAIT_TIME)
140 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_LOW_POWER)
142 node.set(wpan.WPAN_NCP_MCU_POWER_STATE, wpan.MCU_POWER_STATE_ON)
143 wpan.verify_within(check_wpan_is_in_offline_state, WAIT_TIME)
154 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_LOW_POWER)
155 verify(node.get(wpan.WPAN_STATE) == wpan.STATE_ASSOCIATED)
162 wpan.verify_within(check_wpan_is_in_deep_sleep_state, WAIT_TIME)
164 node.set(wpan.WPAN_NCP_MCU_POWER_STATE, wpan.MCU_POWER_STATE_ON)
165 wpan.verify_within(check_wpan_is_in_commissioned_state, WAIT_TIME)
167 node.set(wpan.WPAN_NCP_MCU_POWER_STATE, wpan.MCU_POWER_STATE_LOW_POWER)
168 wpan.verify_within(check_wpan_is_in_deep_sleep_state, WAIT_TIME)
170 node.set(wpan.WPAN_NCP_MCU_POWER_STATE, wpan.MCU_POWER_STATE_ON)
177 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_ON)
178 verify(node.get(wpan.WPAN_STATE) == wpan.STATE_OFFLINE)
184 wpan.verify_within(check_wpan_is_in_deep_sleep_state, WAIT_TIME)
185 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_LOW_POWER)
189 wpan.verify_within(check_wpan_is_in_offline_state, WAIT_TIME)
190 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_ON)
198 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_ON)
202 wpan.verify_within(check_wpan_is_in_deep_sleep_state, WAIT_TIME)
203 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_LOW_POWER)
206 wpan.verify_within(check_wpan_is_in_commissioned_state, WAIT_TIME)
207 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_ON)
217 node.set(wpan.WPAN_NCP_MCU_POWER_STATE, wpan.MCU_POWER_STATE_LOW_POWER)
218 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_LOW_POWER)
222 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_LOW_POWER)
230 wpan.verify_within(check_wpan_is_in_associating_state, WAIT_TIME)
231 verify(node.get(wpan.WPAN_NCP_MCU_POWER_STATE) == wpan.MCU_POWER_STATE_LOW_POWER)
236 wpan.Node.finalize_all_nodes()