kvDiag.h File Reference

The CANtegrity API is based on high frequency sampling of the CAN bus. This allows it to be used for various purposes, such as calculating the bitrate on the bus and measuring clock speeds of devices on the bus. More...

#include <canlib.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  bitrate_t
 
struct  bitrates_t
 
struct  kvDiagSample
 
struct  kvAnalyzerInfo_t
 

Macros

DIAG_ANALYZER_TYPE_xxx

Analyzer type.

#define DIAG_ANALYZER_TYPE_DEFAULT   0
 
DIAG_PROGRAM_TYPE

Possible programs that can be run on an analyzer. Used with kvDiagSetProgram().

#define DIAG_PROGRAM_TYPE_NORMAL   0
 
#define DIAG_PROGRAM_TYPE_AUTOBAUD   1
 

Functions

canStatus kvDiagGetNumberOfAnalyzers (const canHandle canHnd, int *analyzerCount)
 
canStatus kvDiagGetAnalyzerInfo (const canHandle canHnd, kvAnalyzerInfo_t *info)
 
canStatus kvDiagAttachAnalyzer (const canHandle canHnd, int type)
 
canStatus kvDiagDetachAnalyzer (const canHandle canHnd)
 
canStatus kvDiagSetProgram (const canHandle canHnd, int programType, const char *const configBuffer)
 
canStatus kvDiagStart (const canHandle canHnd)
 
canStatus kvDiagStop (const canHandle canHnd)
 
canStatus kvDiagReadSample (const canHandle canHnd, kvDiagSample *sample)
 
canStatus kvDiagReadSampleWait (const canHandle canHnd, kvDiagSample *sample, int timeout)
 
canStatus kvDiagCalculateBitrate (const canHandle canHnd, bitrates_t *btr)
 
canStatus kvDiagResetBitrateCalculation (const canHandle canHnd)
 
canStatus kvDiagCalculateClockOffset (const canHandle canHnd, int id, double *fMin, double *fMax, double *fMean, double *fStd, int *n)
 
canStatus kvDiagResetClockOffsetCalculation (const canHandle canHnd)
 

Detailed Description

The CANtegrity API is based on high frequency sampling of the CAN bus. This allows it to be used for various purposes, such as calculating the bitrate on the bus and measuring clock speeds of devices on the bus.

Note
Not supported in linux!
Note
The CANtegrity API is preliminary and will change!

Macro Definition Documentation

◆ DIAG_ANALYZER_TYPE_DEFAULT

#define DIAG_ANALYZER_TYPE_DEFAULT   0

◆ DIAG_PROGRAM_TYPE_AUTOBAUD

#define DIAG_PROGRAM_TYPE_AUTOBAUD   1

◆ DIAG_PROGRAM_TYPE_NORMAL

#define DIAG_PROGRAM_TYPE_NORMAL   0