CAPL Script

SetJitter

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

setJitter(int min, int max)

Function

The Jitter interval for the timers of a network node can be set with this function. The two values may lie between –10000 and 10000 (corresponds to –100.00% to 100.00%). If one of the two values does not lie within this range, a message is output in the Write Window.

Parameters

min Integer for the lower interval limit.

max

Integer for the upper interval limit.

Return Values

—

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. The following blocks are separate fragments or alternatives, not one combined program.

// ... surrounding context omitted

// Set a Jitter with +–4 percent
setJitter(-400, 400);
// ... surrounding context omitted
// ... surrounding context omitted

// Set a Jitter with +–4 percent
// and a Drift of 17 percent
setJitter(1300, 2100);
// ... surrounding context omitted

getJitterMax | getJitterMin | setDrift | getDrift