Download CAPL Callback Interface in CANoe
Transcript
CAPL Callback Interface in CANoe 7. You may add additional “on diagRequest <service>” handlers for all diagnostic services you want to support with your simulation and change the value of “gECU” to the ECU qualifier you defined in the “Configuration | Diagnostics/ISO TP…” dialog. Additionally, you might need to adapt the service name for the “Tester Present” service (in this example: “TesterPresent_Process”) to the service identifier specified in your diagnostic description. 4.2 Example how to use the CCI include files in a Test Module Note: You will typically only use the CCI in a Test Module, if you need to do some modifications to the reference CCI implementation for whatever reason. For most use cases, a Test Module will not need to implement a CCI - the CANoe internal diagnostics channel will be sufficient. The difference is that when using the internal diagnostics channel, you do not need to include the *.cin file containing the CCI implementation and also do not need to define the constants “gECU” and “cIsTester”. You only need to set the diagnostic target using “diagSetTarget()”. 1. Open the simulation setup and add a new Test Module. 2. From the context menu of the new node, choose “Configuration…” and select the tab “Components”. 3. Add the TP DLL manually, choosing the respective DLL (here: “osek_tp.dll”) provided in the EXEC32folder of your CANoe installation: 4. If you did not already add a diagnostics description for an ECU simulation, open the “Configuration | Diagnostics/ISO TP…” dialog, add a diagnostics description of your ECU and specify a unique ECU qualifier for it. 5. Add the following CAPL code to your Test Module (you might need to adapt the service name for the “DiagnosticSessionControl_Process” service to the service identifier specified in your diagnostic description, change the value of “gECU” to the ECU qualifier you defined in the “Configuration | Diagnostics/ISO TP…” dialog and adapt e.g. some parameter names according to your diagnostics description): Application Note AN-IND-1-012 9