DataSpecificationIec61360sForPropertyOrValueHaveAppropriateDataType🔗

Type: Transpilable verification function
Check that the DataSpecificationIec61360.dataType is defined appropriately for all data specifications whose content is given as IEC 61360.

Code

return all(
    not (
        isinstance(
            data_specification.data_specification_content,
            Data_specification_IEC_61360,
        )
    )
    or (
        data_specification.data_specification_content.data_type is not None
        and (
            data_specification.data_specification_content.data_type
            in Data_type_IEC_61360_for_property_or_value
        )
    )
    for data_specification in embedded_data_specifications
)