girishchandranc / autosarfactory

AutosarFactory is a python package which helps user to read/create/modify AUTOSAR standard arxml files.
MIT License
87 stars 28 forks source link

SHORT-NAME creation #16

Closed qCyb3r closed 1 year ago

qCyb3r commented 1 year ago

Hello,

I would like to address the following problem:

When creating a new EcucNumericalParamValue, I want to add a short name. Currently however when running the function "new_EcucNumericalParamValue()" from the class "EcucContainerValue", it does only create the yellow marked output, without a SHORT-NAME node. image By default I would expect a SHORT-NAME to be created if I enter a value inside "new_EcucNumericalParamValue(value)". Is there a way to add a short name to this EcucNumericalParamValue like in the other ECUC-NUMERICAL-PARAM-VALUE?

girishchandranc commented 1 year ago

Hi @qCyb3r , First of all, sorry for the late response.

The EcucParameterValue doesn't have short-name property according to Arxml schema and hence you can't set the short-name using the autosarfactory. Infact, you can set the definition node to a EcucParameterValue which has the actual short-name tag configured. It's the DEFINITION-REF tag in your arxml snippet.

qCyb3r commented 1 year ago

Thank you @girishchandranc . Can you perhaps provide a hint how a call to create a DEFINITION-REF as shown above with a "DEST" (Destination) would look like?

girishchandranc commented 1 year ago

Sure, please checkout the method EcucParameterValue.set_definition. Hope this helps.

girishchandranc commented 1 year ago

Can we close this ticket if it works for you?

girishchandranc commented 1 year ago

Closing as no feedback yet.