Replies: 3 comments 1 reply
-
Now that I've dug deeper, I see the support for ProvidePortPrototype and RequirePortPrototype in the switcher_non_collectible dict that has a comment "only for unit test purposes". I use these in my application. Can I help get them implemented? What needs to be done to make them writable elements? |
Beta Was this translation helpful? Give feedback.
-
PortPrototypes always belong to a software component. As far as I know it has never been allowed in the ARXML schema (see for example AUTOSAR_00051.xsd) to add PortProtypes directly to a package. What would a package with ports even mean? Are you perhaps trying to create some sort of "generic" ports library that you want to "import" later and use in multiple software components? If so, then read on: It would look something like this: swc = package.createApplicationSoftwareComponent(componentName)
swc.apply(Modes.EcuM_CurrentMode.Require)
swc.apply(Signals.SWS_PushButtonStatus_Back.Receive)
swc.apply(Signals.SWS_PushButtonStatus_Down.Receive)
swc.apply(Signals.SWS_PushButtonStatus_Enter.Receive)
swc.apply(Signals.SWS_PushButtonStatus_Home.Receive)
swc.apply(Signals.SWS_PushButtonStatus_Left.Receive)
swc.apply(Signals.SWS_PushButtonStatus_Right.Receive)
swc.apply(Signals.SWS_PushButtonStatus_Up.Receive)
swc.apply(Services.BspApi.Call) The code above I have copied from my very old autosar-demo project. See https://github.com/cogu/autosar-demo/blob/master/template/components/SteeringWheelButtonFeedback.py. (In that project I called the ports file Signals.py for some reason). I haven't yet created an equivalent version of "ports.py" in the template example in v0.5.4. I could try and add it for v0.5.5. If the above is not what you were looking for and you still want to create packages with ports I can't help you since that would mean dealing with invalid ARXML. |
Beta Was this translation helpful? Give feedback.
-
I see. This is all my incomplete understanding of the structure of AUTOSAR ARXML. Thank you for the explanation. I'll close this issue and continue working on my port from 0.4 to 0.5 with this info. Thank you for the explanation. |
Beta Was this translation helpful? Give feedback.
-
Because its not, I can't add it to a package. Bug?
Beta Was this translation helpful? Give feedback.
All reactions