Relative Content

Tag Archive for autosar

about AUTOSAR C++ A4-7-1 example

I am in a position where I must strictly adhere to AUTOSAR’s C++ coding rules, and I am troubled by them every day. One day, while checking the rules, I noticed something strange about the sample for A4-7-1.

In AUTOSAR project, should a software function follow “Compiler Abstraction”?

I’m working in the field of Automotive. When I implement several software function belonging to a specific Application SWC, I normally follow “Compiler Abstraction” standard by AUTOSAR. But, when I participated in another project based on AUTOSAR platform, they didn’t follow “Compiler Abstraction” standard, when implementing application software functions. So, my question is that what is the criteria of using “Compiler Abstraction” in “Application SWC”?? For example, the EX1 code snippet below shows one example of that standard. It is same as EX2. It is just the difference of using MACRO or not. From my understanding, BSW software functions should follow “Compiler Abstraction”, but I don’t know the application software functions should follow this standard. From my point of view, when using the compiler abstraction, the one of the advantages is abstraction and code portability, when changing Micom. But in terms of microprocessor performance, I’m not sure. So my questions are as follow.

How to use EcuMWakeupSource which is not related to a ComM

I have defined wakeup sources in EcuMWakeupSource for which the parameter EcuMComMChannelRef is empty (=> there is no relationship to any ComM channel).
Now I am trying to set such a wakeup source by calling EcuM_SetWakeupEvent() but it won’t add the wakeup source to the internal variable for validated wakeup Sources (which can be retrieved by calling EcuM_GetValidatedWakeupEvents()).
Even using a EcuMValidationTimeout won’t improve the situation as EcuM_ValidateWakeupEvent() will still never set the (internal) flag for validated wakeup.

AUTOSAR NM User Data Enabled for one CAN Connector and not for other CAN Connectors

I have one ECU with two CAN Connectors [CAN1 and CAN2] and two are on different NM CAN Clusters.
I want NM-USER-DATA_ENABLED value TRUE only for CAN1 while I want FALSE for CAN2.
Is that allowed according to AUTOSAR TPS Template?
If so how?
Because I don’t see any relevant attribute under BusSecificNmEcu for this User Data parameter. Only under NmEcu as shown below.
Some example ARXML will help me a lot.
Shown below are snippets from Standard

Frame Gateway in AUTOSAR instead of PDU or Signal Gateway for N-PDU to pass-through

Is there anything possible in AUTOSAR related to N-PDU based routing, which essentially means Frame Based Routing? If so, some related AUTOSAR System Template Artifact snippets please to help better understand about the implementation details.
Related questions
Difference between Signal based routing and PDU based routing in AUTOSAR