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
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
|
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
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 |
|