AGHAF  4.5.5
Annecy electronique Generic Hardware Access Framework
aghaf_kline_enums.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

AGHAF_KLine_MSG_FLAGS

#define AGHAF_KLine_MSG_EVENT_DATA    (1 << 0)
 by this flag More...
 
#define AGHAF_KLine_MSG_INIT_SEQ    (1 << 1)
 

Enumerations

enum  AGHAF_KLine_5BaudMode { AGHAF_KLine_5BAUDMODE_14230 = 0x00 , AGHAF_KLine_5BAUDMODE_NO_ADDR , AGHAF_KLine_5BAUDMODE_NO_KEY2 , AGHAF_KLine_5BAUDMODE_9141 }
 Type of 5Baud initialization. More...
 
enum  AGHAF_KLine_Error {
  AGHAF_KLINE_ERROR_TO_TXCHAR = 0 , AGHAF_KLINE_ERROR_BADECHO , AGHAF_KLINE_ERROR_5BAUD_BADSYNC , AGHAF_KLINE_ERROR_5BAUD_TO_SYNC ,
  AGHAF_KLINE_ERROR_5BAUD_BADKEY1 , AGHAF_KLINE_ERROR_5BAUD_TO_KEY1 , AGHAF_KLINE_ERROR_5BAUD_BADKEY2 , AGHAF_KLINE_ERROR_5BAUD_TO_KEY2 ,
  AGHAF_KLINE_ERROR_5BAUD_BADADDR , AGHAF_KLINE_ERROR_5BAUD_TO_ADDR , AGHAF_KLINE_ERROR_OTHER
}
 List of possible errors in KLine. More...
 
enum  AGHAF_KLine_InitSequence { AGHAF_KLine_INIT_SEQ_NONE = 0x00 , AGHAF_KLine_INIT_SEQ_5BAUD = 0x01 , AGHAF_KLine_INIT_SEQ_FAST = 0x02 }
 Initialization sequence method. More...
 
enum  AGHAF_KLine_Mode { AGHAF_KLine_MODE_DEFAULT , AGHAF_KLine_MODE_RAW = 1 }
 Possible mode for KLine. More...
 
enum  AGHAF_KLine_Param {
  AGHAF_KLine_PARAM_BAUDRATE , AGHAF_KLine_PARAM_PARITY , AGHAF_KLine_PARAM_MODE , AGHAF_KLine_PARAM_5BAUD_ADDR ,
  AGHAF_KLine_PARAM_INIT_SEQ , AGHAF_KLine_PARAM_INIT_5BAUDMODE , AGHAF_KLine_PARAM_INIT_TIDLE , AGHAF_KLine_PARAM_INIT_TINITL ,
  AGHAF_KLine_PARAM_INIT_TWUP , AGHAF_KLine_PARAM_INIT_W1MAX , AGHAF_KLine_PARAM_INIT_W2MAX , AGHAF_KLine_PARAM_INIT_W3MAX ,
  AGHAF_KLine_PARAM_INIT_W4MAX , AGHAF_KLine_PARAM_INIT_W4MIN , AGHAF_KLine_PARAM_TIMING_P1MAX , AGHAF_KLine_PARAM_TIMING_P4MIN
}
 List of parameters used to configure a KLine bus. More...
 
enum  AGHAF_KLine_Parity { AGHAF_KLine_PARITY_NO = 0 , AGHAF_KLine_PARITY_EVEN , AGHAF_KLine_PARITY_ODD }
 Possible parity for KLine. More...
 

Macro Definition Documentation

◆ AGHAF_KLine_MSG_EVENT_DATA

#define AGHAF_KLine_MSG_EVENT_DATA    (1 << 0)

by this flag

Report Tx data in KLineEventMessage / dataLen is not affected

Examples
KLine/main.cpp.

◆ AGHAF_KLine_MSG_INIT_SEQ

#define AGHAF_KLine_MSG_INIT_SEQ    (1 << 1)

Send the initialization sequence. Fast initialization: The sequence is followed by the provided message

Enumeration Type Documentation

◆ AGHAF_KLine_5BaudMode

Type of 5Baud initialization.

Enumerator
AGHAF_KLine_5BAUDMODE_14230 

ISO 14230-4/9141-2 initialization.

AGHAF_KLine_5BAUDMODE_NO_ADDR 

ISO 9141 init followed by tester sending inverted key byte 2, no inverted address.

AGHAF_KLine_5BAUDMODE_NO_KEY2 

ISO 9141 init followed by ECU sending inverted address, no inverted key byte 2.

AGHAF_KLine_5BAUDMODE_9141 

ISO 9141 init (no inverted key byte 2 nor inverted address).

◆ AGHAF_KLine_Error

List of possible errors in KLine.

Enumerator
AGHAF_KLINE_ERROR_TO_TXCHAR 

Timeout character transmission.

AGHAF_KLINE_ERROR_BADECHO 

Bad echo.

AGHAF_KLINE_ERROR_5BAUD_BADSYNC 

Bad synchronization pattern received for 5 baud initialization

AGHAF_KLINE_ERROR_5BAUD_TO_SYNC 

Timeout waiting 5 baud initialization synchronization pattern character

AGHAF_KLINE_ERROR_5BAUD_BADKEY1 

Error while waiting for Key1 character reception

AGHAF_KLINE_ERROR_5BAUD_TO_KEY1 

Timeout waiting 5 baud initialization Key1 character

AGHAF_KLINE_ERROR_5BAUD_BADKEY2 

Error while waiting for Key2 character reception

AGHAF_KLINE_ERROR_5BAUD_TO_KEY2 

Timeout waiting 5 baud initialization Key2 character

AGHAF_KLINE_ERROR_5BAUD_BADADDR 

Error while waiting for Key2 character reception

AGHAF_KLINE_ERROR_5BAUD_TO_ADDR 

Timeout waiting 5 baud initialization address character

AGHAF_KLINE_ERROR_OTHER 

Other error.

◆ AGHAF_KLine_InitSequence

Initialization sequence method.

Enumerator
AGHAF_KLine_INIT_SEQ_NONE 

No Init sequence.

AGHAF_KLine_INIT_SEQ_5BAUD 

5 Baud Init sequence

AGHAF_KLine_INIT_SEQ_FAST 

Fast Init sequence.

◆ AGHAF_KLine_Mode

Possible mode for KLine.

Enumerator
AGHAF_KLine_MODE_DEFAULT 

Messages use ISO14230 format and message length is used to determine the end of reception.

AGHAF_KLine_MODE_RAW 

The end of reception is based on P1Max timeout.

◆ AGHAF_KLine_Param

List of parameters used to configure a KLine bus.

Enumerator
AGHAF_KLine_PARAM_BAUDRATE 

Baudrate in bps.

Max: 250000 bps (250 kbps)
Default: 10400 bps

AGHAF_KLine_PARAM_PARITY 

Configure the parity.

Use: AGHAF_KLine_Parity
Default: AGHAF_KLine_PARITY_NO

AGHAF_KLine_PARAM_MODE 

Bus mode.
Use AGHAF_KLine_Mode
Default: AGHAF_KLine_MODE_DEFAULT

AGHAF_KLine_PARAM_5BAUD_ADDR 

Value of 5Baud Address.

Range: [0x00, 0xFF]
Default: 0x33

AGHAF_KLine_PARAM_INIT_SEQ 

Set Initialization sequence method.

Use AGHAF_KLine_InitSequence
Default: AGHAF_KLine_INIT_SEQ_FAST

AGHAF_KLine_PARAM_INIT_5BAUDMODE 

Set 5 Baud initialization mode.

Use AGHAF_KLine_5BaudMode
Default: AGHAF_KLine_5BAUDMODE_14230

AGHAF_KLine_PARAM_INIT_TIDLE 

TIdle - Minimum bus idle time before tester starts the address byte sequence or the fast init sequence.

Max: 10000 ms
Default: 300 ms

AGHAF_KLine_PARAM_INIT_TINITL 

TInil - Sets the duration for the low pulse in a fast initialization sequence.

Max: 250 ms
Default: 25 ms

AGHAF_KLine_PARAM_INIT_TWUP 

TWup - Sets total duration of the wakeup pulse (low and high pulse).

Max: 250 ms
Default: 50 ms

AGHAF_KLine_PARAM_INIT_W1MAX 

W1Max - Maximum time from the end of address byte to start of the synchronization pattern from the ECU.

Max: 1000 ms
Default: 300 ms

AGHAF_KLine_PARAM_INIT_W2MAX 

W2Max - Maximum time from the end of the synchronization pattern to the start of key byte 1.

Max: 1000 ms
Default: 20 ms

AGHAF_KLine_PARAM_INIT_W3MAX 

W3Max - Maximum time between key byte 1 and key byte 2.

Max: 1000 ms
Default: 20 ms

AGHAF_KLine_PARAM_INIT_W4MAX 

W4Max - Maximum time between receiving key byte 2 from the ECU and the inversion being returned by the tester.
Same is true for the inverted key byte 2 sent by the tester and the received inverted address from the ECU.

Max: 1000 ms
Default: 50 ms

AGHAF_KLine_PARAM_INIT_W4MIN 

W4Min - Minimum time between receiving key byte 2 from the ECU and the inversion being returned by the tester.

Same is true for the inverted key byte 2 sent by the tester and the received inverted address from the ECU.

Max: 250 ms
Default: 25 ms

AGHAF_KLine_PARAM_TIMING_P1MAX 

P1Max - Maximum inter-byte time for reception.

Max: 250 ms
Default: 20 ms

AGHAF_KLine_PARAM_TIMING_P4MIN 

P4Min - Minimum inter-byte time for transmission.

Max: 250 ms
Default: 5 ms

◆ AGHAF_KLine_Parity

Possible parity for KLine.

Enumerator
AGHAF_KLine_PARITY_NO 

No parity.

AGHAF_KLine_PARITY_EVEN 

Even Parity.

AGHAF_KLine_PARITY_ODD 

Odd Parity.