Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Lehrstuhl für Prozessleittechnik
PyI40AAS
Commits
8195316e
Commit
8195316e
authored
Apr 09, 2020
by
Michael Thies
Browse files
Merge branch fix/xml_serialization with refs/heads/master into refs/merge-requests/21/train
parents
6278d03f
6eaf4c7d
Pipeline
#266468
passed with stage
in 3 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
aas/adapter/xml/xml_serialization.py
View file @
8195316e
...
...
@@ -327,6 +327,12 @@ def concept_description_to_xml(obj: model.ConceptDescription,
et_data_spec_content
.
append
(
_iec61360_concept_description_to_xml
(
obj
))
et_embedded_data_specification
.
append
(
et_data_spec_content
)
et_concept_description
.
append
(
et_embedded_data_specification
)
et_embedded_data_specification
.
append
(
reference_to_xml
(
model
.
Reference
(
tuple
([
model
.
Key
(
model
.
KeyElements
.
GLOBAL_REFERENCE
,
False
,
"http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0"
,
model
.
KeyType
.
IRI
)])),
NS_AAS
+
"dataSpecification"
))
if
obj
.
is_case_of
:
for
reference
in
obj
.
is_case_of
:
et_concept_description
.
append
(
reference_to_xml
(
reference
,
NS_AAS
+
"isCaseOf"
))
...
...
@@ -614,9 +620,9 @@ def range_to_xml(obj: model.Range,
:return: serialized ElementTree object
"""
et_range
=
abstract_classes_to_xml
(
tag
,
obj
)
if
obj
.
max
:
if
obj
.
max
is
not
None
:
et_range
.
append
(
_value_to_xml
(
obj
.
max
,
obj
.
value_type
,
tag
=
NS_AAS
+
"max"
))
if
obj
.
min
:
if
obj
.
min
is
not
None
:
et_range
.
append
(
_value_to_xml
(
obj
.
min
,
obj
.
value_type
,
tag
=
NS_AAS
+
"min"
))
et_range
.
append
(
_generate_element
(
name
=
NS_AAS
+
"valueType"
,
text
=
model
.
datatypes
.
XSD_TYPE_NAMES
[
obj
.
value_type
]))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment