Nikhil
Nikhil

Reputation: 137

Disable Node in CANoe using CAPL

I am trying to disable a CAN node from sending messages. I have a function defined in CANoe:

long ILNodeControlStop(char aNodeName[])

When I try to use this in my CAPL script it shows type of parameters do not match. The error might be a very simple one, but I am not able to find it.

Suppose my node name is BECM. So I will use it as,

on start
{
   //some variables;
}

on key 'a'
{
   ILNodeControlStop(BECM);
}

This throws an error 'Type of parameters do not match'. Do I have to declare something in variables section ? (Using Node layer IL functions)

Upvotes: 0

Views: 5711

Answers (1)

VioletVynil
VioletVynil

Reputation: 512

Pay attention to the parameter type. It is not dbNode, it is char array. So you have to pass it as a char array (string in common language).

ILNodeControlStop("BECM");

Also, consider using the ILStartSim(), ILStopSim() variants, check out their help and their availability.

Upvotes: 3

Related Questions