Skip to content

Commit

Permalink
add PowerThreshold feature, add MeterInstallation, PowerThreshold and…
Browse files Browse the repository at this point in the history
… PowerThresholdSourse attributes, remove obsolete attributes

Signed-off-by: Dmitry Maslov <[email protected]>
  • Loading branch information
dmitrymaslovdsr committed Jun 4, 2024
1 parent ef1b001 commit 4dc5abf
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 73 deletions.
53 changes: 47 additions & 6 deletions src/app/tests/suites/certification/Test_TC_MTRID_1_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,30 @@ tests:
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 3
value: 1
constraints:
type: int16u

- label: "Step 3: Read the global attribute: FeatureMap"
- label: "Step 3a: TH reads from the DUT the FeatureMap attribute"
PICS: "!MTRID.S.F00"
command: "readAttribute"
attribute: "FeatureMap"
response:
value: 0
constraints:
type: bitmap32

- label:
"Step 3b: Given MTRID.S.F00(PowerThreshold) ensure featuremap has
the correct bit set"
PICS: MTRID.S.F00
command: "readAttribute"
attribute: "FeatureMap"
response:
constraints:
type: bitmap32
hasMasksSet: [0x1]

- label: "Step 4a: Read the global attribute: AttributeList"
PICS: PICS_EVENT_LIST_ENABLED
command: "readAttribute"
Expand All @@ -57,10 +69,7 @@ tests:
contains: [
0x0000,
0x0001,
0x0002,
0x0009,
0x000A,
0x000B,
0x0004,
0xFFF8, # GeneratedCommandList
0xFFF9, # AcceptedCommandList
0xFFFA, # EventList
Expand Down Expand Up @@ -90,6 +99,38 @@ tests:
0xFFFD # ClusterRevision
]

- label: "Step 4b: Read the optional attribute(CustomerName) in AttributeList"
PICS: MTRID.S.A0002
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [0x0002]

- label: "Step 4c: Read the optional attribute(UtilityName) in AttributeList"
PICS: MTRID.S.A0003
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [0x0003]

- label:
"Step 4d: Read the feature dependent(MTRID.S.F00) attribute in
AttributeList"
PICS: MTRID.S.F00
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [
0x0005, # PowerThreshold
0x0006 # PowerThresholdSourse
]

- label: "Step 5: Read the global attribute: EventList"
PICS: PICS_EVENT_LIST_ENABLED
command: "readAttribute"
Expand Down
98 changes: 31 additions & 67 deletions src/app/tests/suites/certification/Test_TC_MTRID_2_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,120 +32,84 @@ tests:
- name: "nodeId"
value: nodeId

- label: "Step 2: TH reads the CompanyName attribute from the DUT"
- label: "Step 2: TH reads the MeterType attribute from the DUT"
PICS: MTRID.S.A0000
command: "readAttribute"
attribute: "CompanyName"
attribute: "MeterType"
response:
constraints:
type: char_string
maxLength: 16
type: MeterTypeEnum

- label: "Step 3: TH reads the MeterTypeID attribute from the DUT"
- label: "Step 3: TH reads the MeterInstallation attribute from the DUT"
PICS: MTRID.S.A0001
command: "readAttribute"
attribute: "MeterTypeID"
attribute: "MeterInstallation"
response:
constraints:
type: enum
type: MeterInstallationEnum

- label: "Step 4: TH reads the DataQualityID attribute from the DUT"
- label: "Step 4: TH reads the CustomerName attribute from the DUT"
PICS: MTRID.S.A0002
command: "readAttribute"
attribute: "DataQualityID"
response:
constraints:
type: enum

- label: "Step 5: TH reads the CustomerName attribute from the DUT"
PICS: MTRID.S.A0003
command: "readAttribute"
attribute: "CustomerName"
response:
constraints:
type: char_string
maxLength: 16
maxLength: 64

- label: "Step 5a: TH writes the CustomerName attribute as 'CUSTOMERNAME'"
PICS: MTRID.S.A0003
- label: "Step 4a: TH writes CustomerName attribute as CUSTOMERNAME"
PICS: MTRID.S.M.CustomerNameAttributeWritable && MTRID.S.A0002
command: "writeAttribute"
attribute: "CustomerName"
arguments:
value: "CUSTOMERNAME"

- label: "Step 5b: TH reads the CustomerName attribute from the DUT"
PICS: MTRID.S.A0003
command: "readAttribute"
- label: "Step 4a: TH writes CustomerName attribute as CUSTOMERNAME"
PICS: " !MTRID.S.M.CustomerNameAttributeWritable && MTRID.S.A0002 "
command: "writeAttribute"
attribute: "CustomerName"
arguments:
value: "CUSTOMERNAME"
response:
value: "CUSTOMERNAME"

- label: "Step 6: TH reads the Model attribute from the DUT"
PICS: MTRID.S.A0004
command: "readAttribute"
attribute: "Model"
response:
constraints:
type: octstr
maxLength: 16

- label: "Step 7: TH reads the PartNumber attribute from the DUT"
PICS: MTRID.S.A0005
command: "readAttribute"
attribute: "PartNumber"
response:
constraints:
type: octstr
maxLength: 16

- label: "Step 8: TH reads the ProductRevision attribute from the DUT"
PICS: MTRID.S.A0006
command: "readAttribute"
attribute: "ProductRevision"
response:
constraints:
type: octstr
maxLength: 6
error: UNSUPPORTED_WRITE

- label: "Step 9: TH reads the SoftwareRevision attribute from the DUT"
PICS: MTRID.S.A0007
- label: "Step 4b: TH reads CustomerName attribute from DUT"
PICS: MTRID.S.M.CustomerNameAttributeWritable && MTRID.S.A0002
command: "readAttribute"
attribute: "SoftwareRevision"
attribute: "CustomerName"
response:
constraints:
type: octstr
maxLength: 6
value: "CUSTOMERNAME"

- label: "Step 10: TH reads the UtilityName attribute from the DUT"
PICS: MTRID.S.A0008
- label: "Step 5: TH reads UtilityName attribute from DUT"
PICS: MTRID.S.A0003
command: "readAttribute"
attribute: "UtilityName"
response:
constraints:
type: char_string
maxLength: 16

- label: "Step 11: TH reads the PointOfDelivery attribute from the DUT"
PICS: MTRID.S.A0009
- label: "Step 6: TH reads PointOfDelivery attribute from DUT"
PICS: MTRID.S.A0004
command: "readAttribute"
attribute: "PointOfDelivery"
response:
constraints:
type: char_string
maxLength: 16

- label: "Step 12: TH reads the AvailablePower attribute from the DUT"
PICS: MTRID.S.A000A
- label: "Step 7: TH reads PowerThreshold attribute from DUT"
PICS: MTRID.S.A0005
command: "readAttribute"
attribute: "AvailablePower"
attribute: "PowerThreshold"
response:
constraints:
type: power-mW

- label: "Step 13: TH reads the PowerThreshold attribute from the DUT"
PICS: MTRID.S.A000B
- label: "Step 7: TH reads PowerThresholdSourse attribute from DUT"
PICS: MTRID.S.A0006
command: "readAttribute"
attribute: "PowerThreshold"
attribute: "PowerThresholdSourse"
response:
constraints:
type: int24
type: PowerThresholdSourceEnum

0 comments on commit 4dc5abf

Please sign in to comment.