on frStartCycle
CAPL Functions » FlexRay » on frStartCycle Valid for: CANoe DE • CANoe4SW DEFunction Syntax
-
on frStartCycle *This procedure is always called if one of the cycle definitions below does not apply. This means that for a certain cycle either this function or one of the two functions below is called. -
on frStartCycle <cycle>This function is only called for a certain cycle<cycle>. This procedure must not describe any cycle that has already been described by a procedure of the form “on frStartCycle (<base cycle>,<cycle repetition>)”. -
on frStartCycle (<base cycle>, <cycle repetition>)This function is called for all cycles that comply with the defined cycle multiplexing (FR_Cycle modulo <cycle repetition> = <base cycle>). This procedure must not describe any cycle that has already been described by a procedure of the form “on frStartCycle<cycle>”.
Description
This event procedure can be generated by FlexRay at the beginning of each communication cycle and contains the NM vector valid for this cycle. An optional channel parameter for event filtering can be assigned to all functions. Example: In the example, the event procedure is only called for the 16 cycles of FlexRay channel 2.Parameters
*: Specifies the default procedure. This procedure is called on every cycle start for which no explicit event procedure exists.<cycle>: This number describes a certain cycle. The value range is 0…63.<base cycle>: This number describes the base cycle. The value has to be less than the repetition factor; the value range is 0…63. Together with the repetition factor this value determines the “Cycle Multiplexing”.<cycle repetition>: This number describes the cycle repetition factor. The value has to be between 1 and 64 and has to be a power of 2 (1, 2, 4, 8, 16, 32 or 64). Together with the base cycle this value determines the “Cycle Multiplexing”.
Selectors
- Time (data type dword) / Time_ns (data type int64): The StartCycle event time stamp that has been synchronized with the global time base in the computer (CAN hardware or computer system clock). Timer unit: 10 microseconds. NS timer unit: nanoseconds. Write-protected!
- MsgChannel: Channel in the tool that the FlexRay CC determines. Write-protected!
- FR_Cycle: Cycle number of the FlexRay cycle beginning herewith. Write-protected!
- FR_nmLength: Length of the presented Network Management Vector in bytes. Write-protected!
-
FR_nmVector: Network Management Vector of the message. The number of valid data bytes is specified by the
nmLength. Direct access to the data is not possible. Write-protected! -
FR_correctionOffset: Provides the signed correction value for the synchronization offset of the previous cycle. Permitted maximum value from the FlexRay parameters:
pOffsetCorrectionOut. Unit: Microticks. Write-protected! -
FR_correctionRate: Provides the signed correction value for the synchronization rate of the previous cycle. Permitted maximum value from the FlexRay parameters:
pRateCorrectionOut. Unit: Microticks. Write-protected! - FR_correctionFailedCounter: Indicates the number of continuous previous cycles in which synchronization was not possible. Write-protected!
- FR_passiveToActiveCounter: If the CC is in passive mode, this counter will indicate the number of continuous previous cycles in which clock synchronization was possible. Write-protected!