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
904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 |
|
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
935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 |
|