CanOnline
This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.
Syntax
void canOnline(); // form 1: deprecated
dword canOnline(dword flags); // form 2
Function
Restores the connection of the node to the bus. After a call to the functioncanOffline()the node can be connected to the bus with the functioncanOnline(). Messages send from the node are passed through to the bus. If the node is set to offline, output instructions for sending messages in CAPL or NodeLayer DLL are ignored (refers to a node locally only).Regardless of the status, all messages are received in the CAPL program/NodeLayer. Form 1 only has an effect on the CAPL-program. In Form 2 you can choose between the CAPL-program and/or the Nodelayer-DLL.
Parameters
Flags Indicates the activated part of the node.
Return Values
Form 2 returns the part of the node being online before the function call. Equal to the flags.
Reference example from the CANoe 12 help. This is an incomplete context fragment: omitted surrounding code is shown as comments. Do not paste it as a complete program.
dword var;
var = canOffline(3); // Deactivates CAPL-Program and Nodelayer-DLL.
// ... surrounding context omitted
canOnline(); // Activates CAPL-Program. Form 1
// ... surrounding context omitted
var = canOnline(2); // Activates Nodelayer-DLL