Deserialised¤
Deserialised
dataclass
¤
Represents the opposite of the serialised element in an equipment register.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
The value of the deserialised object. |
required |
comment
|
str
|
A comment to associate with the (de)serialised object. |
''
|
comment
class-attribute
instance-attribute
¤
comment: str = ''
A comment associated with the (de)serialised object.
from_xml
classmethod
¤
from_xml(element: Element[str]) -> Deserialised
Convert a serialised XML element into a Deserialised instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
element
|
Element[str]
|
A serialised XML element from an equipment register. |
required |
Returns:
| Type | Description |
|---|---|
Deserialised
|
The Deserialised instance. |
Source code in src/msl/equipment/schema.py
967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 | |
to_xml
¤
Convert the Deserialised class into a serialised XML element.
Returns:
| Type | Description |
|---|---|
Element[str]
|
The serialised XML element. |
Source code in src/msl/equipment/schema.py
998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 | |