AGHAF
4.5.5
Annecy electronique Generic Hardware Access Framework
|
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... | |
API to use KLine on exxotest devices.
Device is in "init" state at startup.
The following section describes state management:
Symbol | Description |
---|---|
![]() | Forbidden |
![]() | Authorized |
![]() | Next status |
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
timestamp | timestamp of the event |
flags | corresponding to AGHAF_KLine_MSG_FLAGS |
dataLen | length of the datas |
data | datas received |
userContext | context given when setting the callabck in the system |
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
timestamp | timestamp of the event |
flags | corresponding to AGHAF_KLine_MSG_FLAGS |
dataLen | length of the datas received |
data | datas received |
userContext | context given when setting the callabck in the system |
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
timestamp | timestamp of the event |
flags | corresponding to AGHAF_KLine_MSG_FLAGS |
dataLen | length of the datas transmitted |
data | datas transmitted |
userContext | context given when setting the callabck in the system |
typedef void(* AGHAF_KLine_onRxError) (uint64_t timestamp, AGHAF_KLine_Error error, void *userContext) |
callback called when a reception error happens on a KLine
timestamp | timestamp of the event |
error | value of the error |
userContext | context given when setting the callback in the system |
typedef void(* AGHAF_KLine_onSOM) (uint64_t timestamp, void *userContext) |
callback called when SOM event happens
timestamp | timestamp of the event |
userContext | context given when setting the callback in the system |
typedef void(* AGHAF_KLine_onTxError) (uint64_t timestamp, AGHAF_KLine_Error error, void *userContext) |
callback called when a transmission error happens on a KLine
timestamp | timestamp of the event |
error | value of the error |
userContext | context given when setting the callback in the system |
AGHAF_Status AGHAF_KLine_activate | ( | AGHAF_KLine | kline | ) |
start the communication with the KLine
kline | handle on the KLine |
AGHAF_Status AGHAF_KLine_deactivate | ( | AGHAF_KLine | kline | ) |
stop the communication with the KLine
kline | handle on the KLine |
AGHAF_KLine AGHAF_KLine_get | ( | AGHAF_Device | device, |
uint8_t | index | ||
) |
return the KLine bus at the index specified
device | handle on the device |
index | index from the KLine |
uint8_t AGHAF_KLine_getCount | ( | AGHAF_Device | device | ) |
return the number of KLines available on a device
device | handle on the device |
uint8_t AGHAF_KLine_getIndex | ( | AGHAF_KLine | kline | ) |
return the index from an KLine
kline | handle on the KLine |
AGHAF_Status AGHAF_KLine_getParam | ( | AGHAF_KLine | kline, |
AGHAF_KLine_Param | param, | ||
uint32_t * | value | ||
) |
get a parameter from a KLine
kline | handle on the KLine |
param | parameter to get |
value | value to get |
AGHAF_Status AGHAF_KLine_isActivated | ( | AGHAF_KLine | kline, |
AGHAF_BOOL * | isActivated | ||
) |
allow to know if the communication on the KLine is started or not
kline | handle on the KLine |
isActivated | boolean to know if the communication is started or not |
AGHAF_Status AGHAF_KLine_sendMessage | ( | AGHAF_KLine | kline, |
uint8_t | flags, | ||
uint16_t | dataLen, | ||
uint8_t const * | data | ||
) |
send data on the KLine
kline | handle on the KLine |
flags | flags starting with AGHAF_KLine_MSG_ |
dataLen | length of data |
data | data to send |
void AGHAF_KLine_setOn5BaudInitCallback | ( | AGHAF_KLine | kline, |
AGHAF_KLine_on5BaudInit | callback, | ||
void * | userContext | ||
) |
set the callback called on a 5 baud init event
kline | handle on the KLine |
callback | callback to be used for the event |
userContext | context provided by the user for custom datas |
void AGHAF_KLine_setOnMsgRxCallback | ( | AGHAF_KLine | kline, |
AGHAF_KLine_onMsgRx | callback, | ||
void * | userContext | ||
) |
set the callback called on a rx event
kline | handle on the KLine |
callback | callback to be used for the event |
userContext | context provided by the user for custom datas |
void AGHAF_KLine_setOnMsgTxCallback | ( | AGHAF_KLine | kline, |
AGHAF_KLine_onMsgTx | callback, | ||
void * | userContext | ||
) |
set the callback called on a tx event
kline | handle on the KLine |
callback | callback to be used for the event |
userContext | context provided by the user for custom datas |
void AGHAF_KLine_setOnRxErrorCallback | ( | AGHAF_KLine | kline, |
AGHAF_KLine_onRxError | callback, | ||
void * | userContext | ||
) |
set the callback called on a reception error event
kline | handle on the KLine |
callback | callback to be used for the event |
userContext | context provided by the user for custom datas |
void AGHAF_KLine_setOnSomCallback | ( | AGHAF_KLine | kline, |
AGHAF_KLine_onSOM | callback, | ||
void * | userContext | ||
) |
set the callback called on a SOM event
kline | handle on the KLine |
callback | callback to be used for the event |
userContext | context provided by the user for custom datas |
void AGHAF_KLine_setOnTxErrorCallback | ( | AGHAF_KLine | kline, |
AGHAF_KLine_onTxError | callback, | ||
void * | userContext | ||
) |
set the callback called on a transmission error event
kline | handle on the KLine |
callback | callback to be used for the event |
userContext | context provided by the user for custom datas |
AGHAF_Status AGHAF_KLine_setParam | ( | AGHAF_KLine | kline, |
AGHAF_KLine_Param | param, | ||
uint32_t | value | ||
) |
set a parameter from a KLine
kline | handle on the KLine |
param | parameter to set |
value | value to set |