linInvertHeaderBit
Valid for: CANoe DEFunction Syntax
dword linInvertHeaderBit(dword byteIndex, dword bitIndex); // form 1dword linInvertHeaderBit(dword byteIndex, dword bitIndex, dword level); // form 2dword linInvertHeaderBit(dword byteIndex, dword bitIndex, dword level, dword numberOfExecutions); // form 3dword linInvertHeaderBit(dword byteIndex, dword bitIndex, dword level, dword numberOfExecutions, dword reportFallingEdges); // form 4dword linInvertHeaderBit(dword byteIndex, dword bitIndex, dword level, dword numberOfExecutions, dword reportFallingEdges, long disturbAfterHeaderID, dword waitForHeaders); // form 5
Description
Inverts the specified bit in the next LIN header.Parameters
-
byteIndex: Index of the byte.
-1: Sync Break0: Sync Byte1: ProtectedId Byte
- bitIndex: The index of the bit to be manipulated. An index in the range 0-7 will manipulate a data bit, while the index 8 will manipulate the stop bit. Higher index values will cause the interbyte-space after the data byte to be manipulated. Value range: 0..255
-
level: Level of the disturbance
0: Dominant (inverts recessive bit)1: Recessive (inverts dominant bit – requires mag-Cab/Piggyback and external power supply)- Note: The default level used for the first type of the function is 0!
- numberOfExecutions: The number of consecutive headers in which the bit inversion will be executed. Default: 1 (single shot). The largest possible value is 255.
-
reportFallingEdges: Flag indicating whether time stamps of the falling edges in the resulting pseudo-byte have to be reported.
0: Deactivate report1: Activate report
-
disturbAfterHeaderID: With this parameter and the next one it is possible to define exactly which header will be disturbed. For example: To disturb the next header directly after a header with the ID=5, set the
disturbAfterHeaderIDparameter to 5 and thewaitForHeadersto 0. -
waitForHeaders: See explanation for
disturbAfterHeaderID.