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
1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 |
|
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
1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 |
|