@@ -124,12 +124,12 @@ def record_warning(location, problem):
124124 record_error (location = location , problem = f'Unknown feature with mask 0x{ f :02x} ' )
125125 continue
126126 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 ):
129129 record_error (location = location , problem = f'Disallowed feature with mask 0x{ f :02x} ' )
130130 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 :
133133 record_error (
134134 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 )} ' )
135135
@@ -145,16 +145,16 @@ def record_warning(location, problem):
145145 record_error (location = location , problem = 'Standard attribute found on device, but not in spec' )
146146 continue
147147 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 ):
150150 location = AttributePathLocation (endpoint_id = endpoint_id , cluster_id = cluster_id , attribute_id = attribute_id )
151151 record_error (
152152 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 )} ' )
153153 for attribute_id , xml_attribute in self .xml_clusters [cluster_id ].attributes .items ():
154154 if cluster_id in ignore_attributes and attribute_id in ignore_attributes [cluster_id ]:
155155 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 ():
158158 location = AttributePathLocation (endpoint_id = endpoint_id , cluster_id = cluster_id , attribute_id = attribute_id )
159159 record_error (
160160 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):
173173 record_error (location = location , problem = 'Standard command found on device, but not in spec' )
174174 continue
175175 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 ):
178178 record_error (
179179 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 )} ' )
180180 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 :
183183 location = CommandPathLocation (endpoint_id = endpoint_id , cluster_id = cluster_id , command_id = command_id )
184184 record_error (
185185 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