@@ -119,14 +119,14 @@ def record_warning(location, problem):
119
119
if cluster_id in ignore_features and f in ignore_features [cluster_id ]:
120
120
continue
121
121
xml_feature = self .xml_clusters [cluster_id ].features [f ]
122
- conformance_decision = xml_feature .conformance (feature_map , attribute_list , all_command_list )
123
- if not conformance_allowed (conformance_decision , allow_provisional ):
122
+ conformance_decision_with_choice = xml_feature .conformance (feature_map , attribute_list , all_command_list )
123
+ if not conformance_allowed (conformance_decision_with_choice , allow_provisional ):
124
124
record_error (location = location , problem = f'Disallowed feature with mask 0x{ f :02x} ' )
125
125
for feature_mask , xml_feature in self .xml_clusters [cluster_id ].features .items ():
126
126
if cluster_id in ignore_features and feature_mask in ignore_features [cluster_id ]:
127
127
continue
128
- conformance_decision = xml_feature .conformance (feature_map , attribute_list , all_command_list )
129
- if conformance_decision == ConformanceDecision .MANDATORY and feature_mask not in feature_masks :
128
+ conformance_decision_with_choice = xml_feature .conformance (feature_map , attribute_list , all_command_list )
129
+ if conformance_decision_with_choice . decision == ConformanceDecision .MANDATORY and feature_mask not in feature_masks :
130
130
record_error (
131
131
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 )} ' )
132
132
@@ -142,16 +142,16 @@ def record_warning(location, problem):
142
142
record_error (location = location , problem = 'Standard attribute found on device, but not in spec' )
143
143
continue
144
144
xml_attribute = self .xml_clusters [cluster_id ].attributes [attribute_id ]
145
- conformance_decision = xml_attribute .conformance (feature_map , attribute_list , all_command_list )
146
- if not conformance_allowed (conformance_decision , allow_provisional ):
145
+ conformance_decision_with_choice = xml_attribute .conformance (feature_map , attribute_list , all_command_list )
146
+ if not conformance_allowed (conformance_decision_with_choice , allow_provisional ):
147
147
location = AttributePathLocation (endpoint_id = endpoint_id , cluster_id = cluster_id , attribute_id = attribute_id )
148
148
record_error (
149
149
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 )} ' )
150
150
for attribute_id , xml_attribute in self .xml_clusters [cluster_id ].attributes .items ():
151
151
if cluster_id in ignore_attributes and attribute_id in ignore_attributes [cluster_id ]:
152
152
continue
153
- conformance_decision = xml_attribute .conformance (feature_map , attribute_list , all_command_list )
154
- if conformance_decision == ConformanceDecision .MANDATORY and attribute_id not in cluster .keys ():
153
+ conformance_decision_with_choice = xml_attribute .conformance (feature_map , attribute_list , all_command_list )
154
+ if conformance_decision_with_choice . decision == ConformanceDecision .MANDATORY and attribute_id not in cluster .keys ():
155
155
location = AttributePathLocation (endpoint_id = endpoint_id , cluster_id = cluster_id , attribute_id = attribute_id )
156
156
record_error (
157
157
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 )} ' )
@@ -170,13 +170,13 @@ def check_spec_conformance_for_commands(command_type: CommandType):
170
170
record_error (location = location , problem = 'Standard command found on device, but not in spec' )
171
171
continue
172
172
xml_command = xml_commands_dict [command_id ]
173
- conformance_decision = xml_command .conformance (feature_map , attribute_list , all_command_list )
174
- if not conformance_allowed (conformance_decision , allow_provisional ):
173
+ conformance_decision_with_choice = xml_command .conformance (feature_map , attribute_list , all_command_list )
174
+ if not conformance_allowed (conformance_decision_with_choice , allow_provisional ):
175
175
record_error (
176
176
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 )} ' )
177
177
for command_id , xml_command in xml_commands_dict .items ():
178
- conformance_decision = xml_command .conformance (feature_map , attribute_list , all_command_list )
179
- if conformance_decision == ConformanceDecision .MANDATORY and command_id not in command_list :
178
+ conformance_decision_with_choice = xml_command .conformance (feature_map , attribute_list , all_command_list )
179
+ if conformance_decision_with_choice . decision == ConformanceDecision .MANDATORY and command_id not in command_list :
180
180
location = CommandPathLocation (endpoint_id = endpoint_id , cluster_id = cluster_id , command_id = command_id )
181
181
record_error (
182
182
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