I am new to AUTOSAR com module. I would like to perform some scenario to check specific messages in CAN FD. Here I want to block all the CAN FD messages except one message (eg: ID: 0x22) during some event occurred.
My idea is to loop all the CAN FD PDU ID's and check the corresponding message ID(0x22). Here the problem is, I have to traverse through all the CAN FD PDU ID's. (If CAN FD PDU's are 200, I have to loop 200 times.)
I would like to know, Is there any other good method to block all the CAN FD message except some messages in AUTOSAR environment? Also where i have to block this PDU's ? Is it in COM module or CANIf module ? Please correct me if my understandings are wrong.
You can try to create several Tx ISignalIPduGroups in the SystemDescription/EcuExtract. You assign each ISignalIpdu to the according ISignalIPduGroup. Then you can enable/disable the necessary ISignalIPduGroup.
e.g.
You can either trigger it directly over Com
So, when
cond_tx_a == TRUEit will start theIPduGroup_TX_Aand therefore, theISignalIPdu_Tx1andISignalIPdu_Tx2will be transmitted now, butISignalIPdu_Tx1andISignalIPdu_Tx2will not be sent, unlesscond_tx_b == TRUE. The same is happening with theIPduGroup_RX_AandIPduGroup_RX_Band their mapped ISignalIPdus, except, for Rx PDUs, you actually disable to the reception, but actually the Deadline Monitoring of Rx ISignalIPdus.You could also configure such switching of IPduGroups in BswM (see configuration
BswMPduGroupSwitch) without much writing direct code.We had this with some OEM, where all messages had a assignment to a PowerSource, if transmitted or not.
We had some rules generated out of the NetworkDescription, which automatically start/stop the Ipdus depending on, if they are mapped to the group or not. PowerStatus was the input to the BswM. BswM even has now BswMTimer support. So you could e.g. make rules, to:
The nice thing about BswM is, it is mostly configured, without actually writing one line of code manually. You could even update this in case of POSTBUILD configurations.