Search code examples
can-buscapl

Enable all msg of specific node(ECU) by CAPL function 'TestEnableMsgAllTx'


I tried to use the function 'TestEnableMsgAllTx(char node[])' to enable messages of node 'EMS', but this library function looks does not work.

There is my code and error text as below.

1) enable code

export void EnableAll_EMSMsg()
{
  testEnableMsgAllTx("EMS");
}

2)error text

TestEnableMsgAllTx: No node handle could be found for node EMS. error in test system

There is a node which named 'EMS' but it does not work. Is there anybody who use this function to enable all messages of some node?

I add a screenshot of simulation setup. enter image description here


Solution

  • Make sure there is a node with the name EMS in the simulation setup and it has the CANoe interaction layer assigned.

    In case you have multiple busses you might have to switch the bus context first:

    setBusContext(GetBusNameContext("VCAN"));