Replies: 1 comment
-
Short answer: Yes, you can most often search for an XML tag in element.py and find the corresponding Python class name. Long answer: When I implement an element in The true source of this information is the AUTOSAR XML Schema file. I'm currently using In the schema file there are two kinds of elements called called Complex Types are elements which can have an XML tag but the actual tag name depends on its direct ancestor (parent XML element). Groups are elements which cannot be created but are acting as a sort of base class for various complex types. Any complex type can inherit any number of groups. The hierarchies can be seen in the schema. It also uses multiple inheritance which I so far have been able to avoid while porting it to Python. Even the CHANGELOG is written from XML schema perspective. All the text-strings prefixed with The Python class names themselves are also from the schema file. Each group and complex-type has a camel-case name which I believe comes from the Enterprise Architect model which is the origin to the schema file. They can be found amongst the annotation-text attached to each element. I try to use those when I define a Python class. Only in some rare occasions have I deviated from the camel-cased name. For example, in some instances I have merged two groups or two complex-types together into a single Python class. These merges are documented in |
Beta Was this translation helpful? Give feedback.
-
First question is regarding the underlying architecture of 0.5.x. It finally hit me this morning that if I know the XML elements I need in the output ARXML, I can search elements.py for the XML tag to find the objects I need to instantiate.
For instance, here are a P-PORT and R-PORT definition generated with ver 0.4:
From this and element.py I know I need to instantiate:
Correct?
If so, then I can easily see from the ARXML examples I need to generate what I need to create for all elements. I can also see what is currently supported and what will need to wait for later releases.
Beta Was this translation helpful? Give feedback.
All reactions