AGHAF  4.5.5
Annecy electronique Generic Hardware Access Framework
KLine

API to use KLine on exxotest devices. More...

typedef void * AGHAF_KLine
 handle on KLine
 
typedef void(* AGHAF_KLine_onMsgTx) (uint64_t timestamp, uint8_t flags, uint16_t dataLen, uint8_t const *data, void *userContext)
 callback function called when a character is transmitted on a KLine More...
 
typedef void(* AGHAF_KLine_onMsgRx) (uint64_t timestamp, uint8_t flags, uint16_t dataLen, uint8_t const *data, void *userContext)
 callback function called when a character is received on a KLine More...
 
typedef void(* AGHAF_KLine_onSOM) (uint64_t timestamp, void *userContext)
 callback called when SOM event happens More...
 
typedef void(* AGHAF_KLine_onTxError) (uint64_t timestamp, AGHAF_KLine_Error error, void *userContext)
 callback called when a transmission error happens on a KLine More...
 
typedef void(* AGHAF_KLine_onRxError) (uint64_t timestamp, AGHAF_KLine_Error error, void *userContext)
 callback called when a reception error happens on a KLine More...
 
typedef void(* AGHAF_KLine_on5BaudInit) (uint64_t timestamp, uint8_t flags, uint16_t dataLen, uint8_t const *data, void *userContext)
 callback called on a 5 baud init event More...
 
void AGHAF_KLine_setOnMsgTxCallback (AGHAF_KLine kline, AGHAF_KLine_onMsgTx callback, void *userContext)
 set the callback called on a tx event More...
 
void AGHAF_KLine_setOnMsgRxCallback (AGHAF_KLine kline, AGHAF_KLine_onMsgRx callback, void *userContext)
 set the callback called on a rx event More...
 
void AGHAF_KLine_setOnSomCallback (AGHAF_KLine kline, AGHAF_KLine_onSOM callback, void *userContext)
 set the callback called on a SOM event More...
 
void AGHAF_KLine_setOnTxErrorCallback (AGHAF_KLine kline, AGHAF_KLine_onTxError callback, void *userContext)
 set the callback called on a transmission error event More...
 
void AGHAF_KLine_setOnRxErrorCallback (AGHAF_KLine kline, AGHAF_KLine_onRxError callback, void *userContext)
 set the callback called on a reception error event More...
 
void AGHAF_KLine_setOn5BaudInitCallback (AGHAF_KLine kline, AGHAF_KLine_on5BaudInit callback, void *userContext)
 set the callback called on a 5 baud init event More...
 
AGHAF_KLine AGHAF_KLine_get (AGHAF_Device device, uint8_t index)
 return the KLine bus at the index specified More...
 
uint8_t AGHAF_KLine_getIndex (AGHAF_KLine kline)
 return the index from an KLine More...
 
uint8_t AGHAF_KLine_getCount (AGHAF_Device device)
 return the number of KLines available on a device More...
 
AGHAF_Status AGHAF_KLine_activate (AGHAF_KLine kline)
 start the communication with the KLine More...
 
AGHAF_Status AGHAF_KLine_deactivate (AGHAF_KLine kline)
 stop the communication with the KLine More...
 
AGHAF_Status AGHAF_KLine_isActivated (AGHAF_KLine kline, AGHAF_BOOL *isActivated)
 allow to know if the communication on the KLine is started or not More...
 
AGHAF_Status AGHAF_KLine_getParam (AGHAF_KLine kline, AGHAF_KLine_Param param, uint32_t *value)
 get a parameter from a KLine More...
 
AGHAF_Status AGHAF_KLine_setParam (AGHAF_KLine kline, AGHAF_KLine_Param param, uint32_t value)
 set a parameter from a KLine More...
 
AGHAF_Status AGHAF_KLine_sendMessage (AGHAF_KLine kline, uint8_t flags, uint16_t dataLen, uint8_t const *data)
 send data on the KLine More...
 

Detailed Description

API to use KLine on exxotest devices.

Usage Example

Call order and priority

Device is in "init" state at startup.

The following section describes state management:


Symbol Description
Forbidden
Authorized
Next status


Function Config Active
AGHAF_KLine_setOnMsgTxCallback
AGHAF_KLine_setOnMsgRxCallback
AGHAF_KLine_setOnSomCallback
AGHAF_KLine_setOnTxErrorCallback
AGHAF_KLine_setOnRxErrorCallback
AGHAF_KLine_setOn5BaudInitCallback
AGHAF_KLine_get
AGHAF_KLine_getIndex
AGHAF_KLine_getCount
AGHAF_KLine_getParam
AGHAF_KLine_setParam
AGHAF_KLine_activate
AGHAF_KLine_deactivate
AGHAF_KLine_isActivated
AGHAF_KLine_sendMessage

Typedef Documentation

◆ AGHAF_KLine_on5BaudInit

typedef void(* AGHAF_KLine_on5BaudInit) (uint64_t timestamp, uint8_t flags, uint16_t dataLen, uint8_t const *data, void *userContext)

callback called on a 5 baud init event

Parameters
timestamptimestamp of the event
flagscorresponding to AGHAF_KLine_MSG_FLAGS
dataLenlength of the datas
datadatas received
userContextcontext given when setting the callabck in the system

◆ AGHAF_KLine_onMsgRx

typedef void(* AGHAF_KLine_onMsgRx) (uint64_t timestamp, uint8_t flags, uint16_t dataLen, uint8_t const *data, void *userContext)

callback function called when a character is received on a KLine

Parameters
timestamptimestamp of the event
flagscorresponding to AGHAF_KLine_MSG_FLAGS
dataLenlength of the datas received
datadatas received
userContextcontext given when setting the callabck in the system

◆ AGHAF_KLine_onMsgTx

typedef void(* AGHAF_KLine_onMsgTx) (uint64_t timestamp, uint8_t flags, uint16_t dataLen, uint8_t const *data, void *userContext)

callback function called when a character is transmitted on a KLine

Parameters
timestamptimestamp of the event
flagscorresponding to AGHAF_KLine_MSG_FLAGS
dataLenlength of the datas transmitted
datadatas transmitted
userContextcontext given when setting the callabck in the system

◆ AGHAF_KLine_onRxError

typedef void(* AGHAF_KLine_onRxError) (uint64_t timestamp, AGHAF_KLine_Error error, void *userContext)

callback called when a reception error happens on a KLine

Parameters
timestamptimestamp of the event
errorvalue of the error
userContextcontext given when setting the callback in the system

◆ AGHAF_KLine_onSOM

typedef void(* AGHAF_KLine_onSOM) (uint64_t timestamp, void *userContext)

callback called when SOM event happens

Parameters
timestamptimestamp of the event
userContextcontext given when setting the callback in the system

◆ AGHAF_KLine_onTxError

typedef void(* AGHAF_KLine_onTxError) (uint64_t timestamp, AGHAF_KLine_Error error, void *userContext)

callback called when a transmission error happens on a KLine

Parameters
timestamptimestamp of the event
errorvalue of the error
userContextcontext given when setting the callback in the system

Function Documentation

◆ AGHAF_KLine_activate()

AGHAF_Status AGHAF_KLine_activate ( AGHAF_KLine  kline)

start the communication with the KLine

Parameters
klinehandle on the KLine
Returns
status request information
Examples
DoKLine/main.cpp, and KLine/main.cpp.

◆ AGHAF_KLine_deactivate()

AGHAF_Status AGHAF_KLine_deactivate ( AGHAF_KLine  kline)

stop the communication with the KLine

Parameters
klinehandle on the KLine
Returns
status request information
Examples
DoKLine/main.cpp, and KLine/main.cpp.

◆ AGHAF_KLine_get()

AGHAF_KLine AGHAF_KLine_get ( AGHAF_Device  device,
uint8_t  index 
)

return the KLine bus at the index specified

Parameters
devicehandle on the device
indexindex from the KLine
Returns
handle on the uart (NULL if index invalid)
Examples
DoKLine/main.cpp, and KLine/main.cpp.

◆ AGHAF_KLine_getCount()

uint8_t AGHAF_KLine_getCount ( AGHAF_Device  device)

return the number of KLines available on a device

Parameters
devicehandle on the device
Returns
number of KLines available
Examples
DoKLine/main.cpp, and KLine/main.cpp.

◆ AGHAF_KLine_getIndex()

uint8_t AGHAF_KLine_getIndex ( AGHAF_KLine  kline)

return the index from an KLine

Parameters
klinehandle on the KLine
Returns
index from the KLine

◆ AGHAF_KLine_getParam()

AGHAF_Status AGHAF_KLine_getParam ( AGHAF_KLine  kline,
AGHAF_KLine_Param  param,
uint32_t *  value 
)

get a parameter from a KLine

Parameters
klinehandle on the KLine
paramparameter to get
valuevalue to get
Returns
status request information

◆ AGHAF_KLine_isActivated()

AGHAF_Status AGHAF_KLine_isActivated ( AGHAF_KLine  kline,
AGHAF_BOOL isActivated 
)

allow to know if the communication on the KLine is started or not

Parameters
klinehandle on the KLine
isActivatedboolean to know if the communication is started or not
Returns
status request information

◆ AGHAF_KLine_sendMessage()

AGHAF_Status AGHAF_KLine_sendMessage ( AGHAF_KLine  kline,
uint8_t  flags,
uint16_t  dataLen,
uint8_t const *  data 
)

send data on the KLine

Parameters
klinehandle on the KLine
flagsflags starting with AGHAF_KLine_MSG_
dataLenlength of data
datadata to send
Returns
status request information
Examples
KLine/main.cpp.

◆ AGHAF_KLine_setOn5BaudInitCallback()

void AGHAF_KLine_setOn5BaudInitCallback ( AGHAF_KLine  kline,
AGHAF_KLine_on5BaudInit  callback,
void *  userContext 
)

set the callback called on a 5 baud init event

Parameters
klinehandle on the KLine
callbackcallback to be used for the event
userContextcontext provided by the user for custom datas
Examples
DoKLine/main.cpp, and KLine/main.cpp.

◆ AGHAF_KLine_setOnMsgRxCallback()

void AGHAF_KLine_setOnMsgRxCallback ( AGHAF_KLine  kline,
AGHAF_KLine_onMsgRx  callback,
void *  userContext 
)

set the callback called on a rx event

Parameters
klinehandle on the KLine
callbackcallback to be used for the event
userContextcontext provided by the user for custom datas
Examples
DoKLine/main.cpp, and KLine/main.cpp.

◆ AGHAF_KLine_setOnMsgTxCallback()

void AGHAF_KLine_setOnMsgTxCallback ( AGHAF_KLine  kline,
AGHAF_KLine_onMsgTx  callback,
void *  userContext 
)

set the callback called on a tx event

Parameters
klinehandle on the KLine
callbackcallback to be used for the event
userContextcontext provided by the user for custom datas
Examples
DoKLine/main.cpp, and KLine/main.cpp.

◆ AGHAF_KLine_setOnRxErrorCallback()

void AGHAF_KLine_setOnRxErrorCallback ( AGHAF_KLine  kline,
AGHAF_KLine_onRxError  callback,
void *  userContext 
)

set the callback called on a reception error event

Parameters
klinehandle on the KLine
callbackcallback to be used for the event
userContextcontext provided by the user for custom datas
Examples
DoKLine/main.cpp, and KLine/main.cpp.

◆ AGHAF_KLine_setOnSomCallback()

void AGHAF_KLine_setOnSomCallback ( AGHAF_KLine  kline,
AGHAF_KLine_onSOM  callback,
void *  userContext 
)

set the callback called on a SOM event

Parameters
klinehandle on the KLine
callbackcallback to be used for the event
userContextcontext provided by the user for custom datas
Examples
DoKLine/main.cpp, and KLine/main.cpp.

◆ AGHAF_KLine_setOnTxErrorCallback()

void AGHAF_KLine_setOnTxErrorCallback ( AGHAF_KLine  kline,
AGHAF_KLine_onTxError  callback,
void *  userContext 
)

set the callback called on a transmission error event

Parameters
klinehandle on the KLine
callbackcallback to be used for the event
userContextcontext provided by the user for custom datas
Examples
DoKLine/main.cpp, and KLine/main.cpp.

◆ AGHAF_KLine_setParam()

AGHAF_Status AGHAF_KLine_setParam ( AGHAF_KLine  kline,
AGHAF_KLine_Param  param,
uint32_t  value 
)

set a parameter from a KLine

Parameters
klinehandle on the KLine
paramparameter to set
valuevalue to set
Returns
status request information
Examples
DoKLine/main.cpp, and KLine/main.cpp.