Component¤
Component
dataclass
¤
Component(
name: str = "",
adjustments: tuple[Adjustment, ...] = (),
digital_reports: tuple[DigitalReport, ...] = (),
performance_checks: tuple[PerformanceCheck, ...] = (),
reports: tuple[Report, ...] = (),
)
Represents the component element in an equipment register.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name to associate with this component. The value must be unique amongst the other component elements within the same measurand element. An empty string is permitted. |
''
|
adjustments
|
tuple[Adjustment, ...]
|
The history of adjustments. |
()
|
digital_reports
|
tuple[DigitalReport, ...]
|
The history of digital calibration reports. |
()
|
performance_checks
|
tuple[PerformanceCheck, ...]
|
The history of performance checks. |
()
|
reports
|
tuple[Report, ...]
|
The history of calibration reports. |
()
|
adjustments
class-attribute
instance-attribute
¤
adjustments: tuple[Adjustment, ...] = ()
The history of adjustments.
digital_reports
class-attribute
instance-attribute
¤
digital_reports: tuple[DigitalReport, ...] = ()
The history of digital calibration reports.
performance_checks
class-attribute
instance-attribute
¤
performance_checks: tuple[PerformanceCheck, ...] = ()
The history of performance checks.
reports
class-attribute
instance-attribute
¤
The history of calibration reports.
from_xml
classmethod
¤
Convert an XML element into a Component instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element
|
Element[str]
|
A component XML element from an equipment register. |
required |
Returns:
| Type | Description |
|---|---|
Component
|
The Component instance. |
Source code in src/msl/equipment/schema.py
2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 | |
to_xml
¤
Convert the Component class into an XML element.
Returns:
| Type | Description |
|---|---|
Element[str]
|
The Component as an XML element. |
Source code in src/msl/equipment/schema.py
2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 | |