Skip to content

Commit

Permalink
Merge branch 'master' into bflb-iot-tool
Browse files Browse the repository at this point in the history
  • Loading branch information
shchen-Lab authored Oct 8, 2023
2 parents e02c630 + f34b13c commit cf481c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ limitations under the License.
<globalAttribute side="either" code="0xFFFD" value="1"/>

<attribute side="server" code="0x00" define="IDLE_MODE_INTERVAL" type="INT32U" min="1" max="64800" default="1" writable="false" optional="false" isNullable="false">IdleModeInterval</attribute>
<attribute side="server" code="0x01" define="ACTIVE_MODE_INTERVAL" type="INT32U" min="300" default="300" writable="false" optional="false" isNullable="false">ActiveModeInterval</attribute>
<attribute side="server" code="0x02" define="ACTIVE_MODE_THRESHOLD" type="INT16U" min="300" default="300" writable="false" optional="false" isNullable="false">ActiveModeThreshold</attribute>
<attribute side="server" code="0x01" define="ACTIVE_MODE_INTERVAL" type="INT32U" default="300" writable="false" optional="false" isNullable="false">ActiveModeInterval</attribute>
<attribute side="server" code="0x02" define="ACTIVE_MODE_THRESHOLD" type="INT16U" default="300" writable="false" optional="false" isNullable="false">ActiveModeThreshold</attribute>
<attribute side="server" code="0x03" define="REGISTERED_CLIENTS" type="ARRAY" entryType="MonitoringRegistrationStruct" writable="false" optional="true" isNullable="false">
<description>RegisteredClients</description>
<access op="read" privilege="administer"/>
Expand Down
8 changes: 4 additions & 4 deletions src/python_testing/TC_ICDM_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ async def test_TC_ICDM_2_1(self):
idleModeInterval *= 1000 # Convert seconds to milliseconds
activeModeInterval = await self.read_icdm_attribute_expect_success(endpoint=endpoint,
attribute=attributes.ActiveModeInterval)
asserts.assert_greater_equal(activeModeInterval, 300,
"ActiveModeInterval attribute is smaller than minimum value (300).")
asserts.assert_true(0 <= activeModeInterval <= 65535,
"ActiveModeInterval attribute does not fit in a uint16.")
asserts.assert_less_equal(activeModeInterval, idleModeInterval,
"ActiveModeInterval attribute is greater than the IdleModeInterval attrbiute.")
else:
Expand All @@ -64,8 +64,8 @@ async def test_TC_ICDM_2_1(self):

activeModeThreshold = await self.read_icdm_attribute_expect_success(endpoint=endpoint,
attribute=attributes.ActiveModeThreshold)
asserts.assert_greater_equal(activeModeThreshold, 300,
"ActiveModeThreshold attribute is smaller than minimum value (300).")
asserts.assert_true(0 <= activeModeThreshold <= 65535,
"ActiveModeThreshold attribute does not fit in a uint16.")
else:
asserts.assert_true(False, "ActiveModeThreshold is a mandatory attribute and must be present in the PICS file")

Expand Down

0 comments on commit cf481c7

Please sign in to comment.