Skip to main content
Open topic with navigation CAPL Functions » LIN » linResetSlave

linResetSlave

Valid for: CANoe DE

Function Syntax

  • long linResetSlave (); // form 1
  • long linResetSlave(dword resetToLastConfiguration); // form 2

Description

This function resets the NAD (Node Address for Diagnostic) of the modeled Slave node and marks all its protected identifiers as invalid or it will load the last saved configuration if resetToLastConfiguration is set. See Notes to the way initial NAD is determined to understand how initial NAD is determined in CANoe. Note: If the CAPL-program calling this function does not model a LIN 2.x Slave node, then this function will have no effect.

Parameters

  • resetToLastConfiguration
    • 0: perform a complete reset
    • non-zero: load last saved configuration

Return Values

On success this function returns a value unequal to -1, otherwise -1.

Example

Force Slave reset on a keyboard event
on key 'r'
{
    if ( linResetSlave() != -1) {
        // from now on the Slave node stops publishing responses 
        ...
    }
}
linResetNADlinActivateRespslinDeactivateResps