cogu / autosar

A set of python modules for working with AUTOSAR XML files
MIT License
381 stars 165 forks source link

<PR-PORT-PROTOTYPE> #54

Closed Tofeni closed 6 months ago

Tofeni commented 4 years ago

Hello,

i have 3 questions:

1) Is there a way to add to an element? 2) It is possible to create Provider receiver port? 3) Why i can not crate ProvidePort if i have many elements in a PortInterface?

Capture

Thank you, Tofeni

cogu commented 4 years ago

Question 1: I'm not sure what you mean. Is it related to question 3? Question 2: No, PR-PORT-PROTOTYPE has not been implemented in this Python package. Question 3: You can certainly have many data elements in an interface. See test case test_create_nvblock_software_component in file ar4_component_test.py for example. @kallemooo Thanks for providing that test case.

Tofeni commented 4 years ago

1) at the first question i write < desc> (DESC)

3) and at the 3th, i am trying this: swc.createProvidePort('P_DiagNv_ParameterHandler_Cfg_PRDiagNv_ParameterHandler', '/PortInterfaces/IfDiagNv_ParameterHandler_Cfg', romBlockInitValue='0'), and i get next error: Capture

i will try with the test case test_create_nvblock_software_component in file ar4_component_test.py

Thank you

cogu commented 4 years ago

Description fields are not implemented for ports.

Some time ago I refactored the XML parser to share common parsing code for tags that occurs often.

I will need to refactor the XML writer in a similar fashion so that it automatically handles common fields such as desc and admin-data without having to add them manually for every single XML element.

cogu commented 6 months ago