Maintenance¤
Maintenance
dataclass
¤
Maintenance(
planned: tuple[PlannedTask, ...] = (),
completed: tuple[CompletedTask, ...] = (),
)
Represents the maintenance element in an equipment register.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
planned
|
tuple[PlannedTask, ...]
|
Maintenance tasks that are planned to be performed. |
()
|
completed
|
tuple[CompletedTask, ...]
|
Maintenance tasks that have been completed. |
()
|
completed
class-attribute
instance-attribute
¤
completed: tuple[CompletedTask, ...] = ()
Maintenance tasks that have been completed.
planned
class-attribute
instance-attribute
¤
planned: tuple[PlannedTask, ...] = ()
Maintenance tasks that are planned to be performed.
from_xml
classmethod
¤
from_xml(element: Element[str]) -> Maintenance
Convert an XML element into a Maintenance instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element
|
Element[str]
|
A maintenance XML element from an equipment register. |
required |
Returns:
| Type | Description |
|---|---|
Maintenance
|
The Maintenance instance. |
Source code in src/msl/equipment/schema.py
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 | |
to_xml
¤
Convert the Maintenance class into an XML element.
Returns:
| Type | Description |
|---|---|
Element[str]
|
The Maintenance as an XML element. |
Source code in src/msl/equipment/schema.py
611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 | |