Kvaser Linux CANLIB: Welcome to Kvaser CANLIB!
Data Fields
LinMessageInfo Struct Reference

#include <linlib.h>

Data Fields

unsigned long timestamp
 
unsigned long synchBreakLength
 
unsigned long frameLength
 
unsigned long bitrate
 
unsigned char checkSum
 
unsigned char idPar
 
unsigned short z
 
unsigned long synchEdgeTime [4]
 
unsigned long byteTime [8]
 

Detailed Description

In certain LIN bus API calls, the following structure is used to provide more information about the LIN messages.

Note
The precision of the timing data given in us (microseconds) can be less than one microsecond; for low bitrates the lowest bits might always be zero.
The min and max values listed inside [] of the message timing values can be calculated from the LIN specification by using the shortest (0 bytes) or longest (8 bytes) messages at the lowest or highest allowed bitrate.
The LIN interface will accept messages that are a bit out-of-bounds as well.

Field Documentation

◆ timestamp

unsigned long timestamp

Kvaser DRV Lin timestamp - Timestamp in milliseconds of the falling edge of the synch break of the message. Uses the canlib CAN timer.

Kvaser LIN Leaf timestamp - Timestamp in milliseconds of the falling edge of the synch break of the message. Uses the canlib CAN timer.

Note
All Kvaser Leaf with Kvaser MagiSync™ are synchronized (also with CAN channels).

◆ synchBreakLength

unsigned long synchBreakLength

Length of the synch break in microseconds. [650 .. 13000], [400 .. 8000] for a wakeup signal.

◆ frameLength

unsigned long frameLength

The total frame length in microseconds; from the synch break to the end of the crc. [2200 .. 173600]

◆ bitrate

unsigned long bitrate

The bitrate of the message in bits per seconds. Range [1000 .. 20000] (plus some margin)

◆ checkSum

unsigned char checkSum

The checksum as read from the LIN bus. Might not match the data in case of LIN_CSUM_ERROR.

◆ idPar

unsigned char idPar

The id with parity of the message as read from the LIN bus. Might be invalid in case of LIN_PARITY_ERROR.

◆ z

unsigned short z

Dummy for alignment.

◆ synchEdgeTime

unsigned long synchEdgeTime[4]

Time in microseconds of the falling edges in the synch byte relative the falling edge of the start bit.

◆ byteTime

unsigned long byteTime[8]

Start time in microseconds of each data byte. In case of 8-byte messages, the crc time isn't included (but can be deduced from frameLength).