Skip to main content

Chk_AddNode

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

dword Chk_AddNode (dword aCheckId, Node aNode, dword aAddress, dword aac, dword ig, dword sys, dword sysi, dword fct, dword fcti, dword ecui, dword mc, dword in);

Constructor

TestCheck::AddNode (Node aNode, dword aAddress, dword aac, dword ig, dword sys, dword sysi, dword fct, dword fcti, dword ecui, dword mc, dword in);

Check Name

Description

Adds a J1939 node to an existing check.

Parameters

  • aCheckId: Check Id of an existing check.
  • aNode: Name of the node to be checked. Must exist in database.
  • aAddress: Address of the node. 0-253 or 0xFFFFFFFF if value of the node in database is used.
  • aac: Arbitrary Address Capable 0..1 or 0xFFFFFFFF if value of the node in database is used.
  • ig: Industry Group 0..7 or 0xFFFFFFFF if value of the node in database is used.
  • sys: Vehicle System Instance 0..15 or 0xFFFFFFFF if value of database is used.
  • sysi: Vehicle System 0..127 or 0xFFFFFFFF if value of the node in database is used.
  • fct: Function 0..255 or 0xFFFFFFFF if value of the node in database is used.
  • fcti: Function Instance 0..31 or 0xFFFFFFFF if value of the node in database is used.
  • ecui: ECU Instance 0..7 or 0xFFFFFFFF if value of the node in database is used.
  • mc: Manufacturer Code 0..2047 or 0xFFFFFFFF if value of the node in database is used.
  • in: Identity Number 0..209715 or 0xFFFFFFFF if value of the node in database is used.

Return Values

  • 0: Check could not be created and must not be referenced.
  • -1: Node could not be added due to invalid parameter, e.g. invalid address.
  • -5: Node could not be added due to invalid check identifier.

Possible Errors

  • Check Id does not exist.
  • Node object does not exist in database.

Example

// checks the address claim violation of node N1
checkId = ChkCreate_J1939AddressClaimViolation ( N1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 200, 0x01);

// add node N2 to the check
Chk_AddNode (checkId, N2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1);
TestAddCondition(checkId);

// Start check
ChkControl_Start(checkId);

// sequence of different actions and waiting conditions
TestWaitForTimeout(1000);
TestRemoveCondition(checkId);
Functions to Configure ChecksCommands to Control ChecksChkCreate_J1939AddressClaimViolation