@@ -124,12 +124,12 @@ def record_warning(location, problem):
124
124
record_error (location = location , problem = f'Unknown feature with mask 0x{ f :02x} ' )
125
125
continue
126
126
xml_feature = self .xml_clusters [cluster_id ].features [f ]
127
- conformance_decision = xml_feature .conformance (feature_map , attribute_list , all_command_list )
128
- if not conformance_allowed (conformance_decision , allow_provisional ):
127
+ conformance_decision_with_choice = xml_feature .conformance (feature_map , attribute_list , all_command_list )
128
+ if not conformance_allowed (conformance_decision_with_choice , allow_provisional ):
129
129
record_error (location = location , problem = f'Disallowed feature with mask 0x{ f :02x} ' )
130
130
for feature_mask , xml_feature in self .xml_clusters [cluster_id ].features .items ():
131
- conformance_decision = xml_feature .conformance (feature_map , attribute_list , all_command_list )
132
- if conformance_decision == ConformanceDecision .MANDATORY and feature_mask not in feature_masks :
131
+ conformance_decision_with_choice = xml_feature .conformance (feature_map , attribute_list , all_command_list )
132
+ if conformance_decision_with_choice . decision == ConformanceDecision .MANDATORY and feature_mask not in feature_masks :
133
133
record_error (
134
134
location = location , problem = f'Required feature with mask 0x{ f :02x} is not present in feature map. { conformance_str (xml_feature .conformance , feature_map , self .xml_clusters [cluster_id ].features )} ' )
135
135
@@ -145,16 +145,16 @@ def record_warning(location, problem):
145
145
record_error (location = location , problem = 'Standard attribute found on device, but not in spec' )
146
146
continue
147
147
xml_attribute = self .xml_clusters [cluster_id ].attributes [attribute_id ]
148
- conformance_decision = xml_attribute .conformance (feature_map , attribute_list , all_command_list )
149
- if not conformance_allowed (conformance_decision , allow_provisional ):
148
+ conformance_decision_with_choice = xml_attribute .conformance (feature_map , attribute_list , all_command_list )
149
+ if not conformance_allowed (conformance_decision_with_choice , allow_provisional ):
150
150
location = AttributePathLocation (endpoint_id = endpoint_id , cluster_id = cluster_id , attribute_id = attribute_id )
151
151
record_error (
152
152
location = location , problem = f'Attribute 0x{ attribute_id :02x} is included, but is disallowed by conformance. { conformance_str (xml_attribute .conformance , feature_map , self .xml_clusters [cluster_id ].features )} ' )
153
153
for attribute_id , xml_attribute in self .xml_clusters [cluster_id ].attributes .items ():
154
154
if cluster_id in ignore_attributes and attribute_id in ignore_attributes [cluster_id ]:
155
155
continue
156
- conformance_decision = xml_attribute .conformance (feature_map , attribute_list , all_command_list )
157
- if conformance_decision == ConformanceDecision .MANDATORY and attribute_id not in cluster .keys ():
156
+ conformance_decision_with_choice = xml_attribute .conformance (feature_map , attribute_list , all_command_list )
157
+ if conformance_decision_with_choice . decision == ConformanceDecision .MANDATORY and attribute_id not in cluster .keys ():
158
158
location = AttributePathLocation (endpoint_id = endpoint_id , cluster_id = cluster_id , attribute_id = attribute_id )
159
159
record_error (
160
160
location = location , problem = f'Attribute 0x{ attribute_id :02x} is required, but is not present on the DUT. { conformance_str (xml_attribute .conformance , feature_map , self .xml_clusters [cluster_id ].features )} ' )
@@ -173,13 +173,13 @@ def check_spec_conformance_for_commands(command_type: CommandType):
173
173
record_error (location = location , problem = 'Standard command found on device, but not in spec' )
174
174
continue
175
175
xml_command = xml_commands_dict [command_id ]
176
- conformance_decision = xml_command .conformance (feature_map , attribute_list , all_command_list )
177
- if not conformance_allowed (conformance_decision , allow_provisional ):
176
+ conformance_decision_with_choice = xml_command .conformance (feature_map , attribute_list , all_command_list )
177
+ if not conformance_allowed (conformance_decision_with_choice , allow_provisional ):
178
178
record_error (
179
179
location = location , problem = f'Command 0x{ command_id :02x} is included, but disallowed by conformance. { conformance_str (xml_command .conformance , feature_map , self .xml_clusters [cluster_id ].features )} ' )
180
180
for command_id , xml_command in xml_commands_dict .items ():
181
- conformance_decision = xml_command .conformance (feature_map , attribute_list , all_command_list )
182
- if conformance_decision == ConformanceDecision .MANDATORY and command_id not in command_list :
181
+ conformance_decision_with_choice = xml_command .conformance (feature_map , attribute_list , all_command_list )
182
+ if conformance_decision_with_choice . decision == ConformanceDecision .MANDATORY and command_id not in command_list :
183
183
location = CommandPathLocation (endpoint_id = endpoint_id , cluster_id = cluster_id , command_id = command_id )
184
184
record_error (
185
185
location = location , problem = f'Command 0x{ command_id :02x} is required, but is not present on the DUT. { conformance_str (xml_command .conformance , feature_map , self .xml_clusters [cluster_id ].features )} ' )
0 commit comments