AGHAF
4.5.5
Annecy electronique Generic Hardware Access Framework
|
API to use DoCAN on exxotest devices. More...
typedef void * | AGHAF_DoCAN_v2_Channel |
Handle to a DoCAN channel. | |
typedef void(* | AGHAF_DoCAN_onMessageTx) (uint64_t timestamp, uint32_t canIdent, uint8_t canFlags, uint32_t dataLen, uint8_t const *data, void *userContext) |
callback function called when a message is transmitted on a DoCAN channel More... | |
typedef void(* | AGHAF_DoCAN_onMessageTxError) (uint64_t timestamp, AGHAF_DoCan_Error error, void *userContext) |
callback function called when an error happens on the transmission from a DoCAN channel More... | |
typedef void(* | AGHAF_DoCAN_onMessageRx) (uint64_t timestamp, uint32_t canIdent, uint8_t canFlags, uint32_t dataLen, uint8_t const *data, void *userContext) |
callback function called when a message is received on a DoCAN channel More... | |
typedef void(* | AGHAF_DoCAN_onMessageRxFF) (uint64_t timestamp, uint32_t canIdent, uint8_t canFlags, void *userContext) |
callback function called when a first frame is received on a DoCAN channel More... | |
typedef void(* | AGHAF_DoCAN_onMessageRxError) (uint64_t timestamp, AGHAF_DoCan_Error error, void *userContext) |
callback function called when an error happens on the reception from a DoCAN channel More... | |
void | AGHAF_DoCAN_v2_setOnMessageTxCallback (AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_onMessageTx callback, void *userContext) |
set the callback called on a transmission event More... | |
void | AGHAF_DoCAN_v2_setOnMessageTxErrorCallback (AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_onMessageTxError callback, void *userContext) |
set the callback called on a transmission error event More... | |
void | AGHAF_DoCAN_v2_setOnMessageRxCallback (AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_onMessageRx callback, void *userContext) |
set the callback called on a reception event More... | |
void | AGHAF_DoCAN_v2_setOnMessageRxFFCallback (AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_onMessageRxFF callback, void *userContext) |
set the callback called on the reception from a first frame event More... | |
void | AGHAF_DoCAN_v2_setOnMessageRxErrorCallback (AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_onMessageRxError callback, void *userContext) |
set the callback called on a reception error event More... | |
AGHAF_Status | AGHAF_DoCAN_v2_getChannelCount (AGHAF_CAN can, uint8_t *count) |
Provide the number of channels available on the bus. More... | |
AGHAF_Status | AGHAF_DoCAN_v2_getFreeChannelCount (AGHAF_CAN can, uint8_t *count) |
Return the number of free channels still available. More... | |
AGHAF_DoCAN_v2_Channel | AGHAF_DoCAN_v2_createChannel (AGHAF_CAN can) |
Create a channel. More... | |
AGHAF_Status | AGHAF_DoCAN_v2_releaseChannel (AGHAF_DoCAN_v2_Channel channel) |
Release the channel. More... | |
AGHAF_DoCAN_Channel | AGHAF_DoCAN_v2_getChannelByIndex (AGHAF_CAN can, uint8_t index) |
return the index corrsponding to the index in parameter (nullptr if the index is not found) More... | |
uint8_t | AGHAF_DoCAN_v2_Channel_getIndex (AGHAF_DoCAN_v2_Channel channel) |
Return the intern index from the channel. More... | |
AGHAF_Status | AGHAF_DoCAN_v2_Channel_setParam (AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_ChannelParam param, uint32_t value) |
Set the parameter from a channel. More... | |
AGHAF_Status | AGHAF_DoCAN_v2_Channel_getParam (AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_ChannelParam param, uint32_t *value) |
Provide the value from a channel parameter. More... | |
AGHAF_Status | AGHAF_DoCAN_v2_Channel_start (AGHAF_DoCAN_v2_Channel channel) |
Start a channel. More... | |
AGHAF_Status | AGHAF_DoCAN_v2_Channel_stop (AGHAF_DoCAN_v2_Channel channel) |
Stop a channel. More... | |
AGHAF_Status | AGHAF_DoCAN_v2_Channel_send (AGHAF_DoCAN_v2_Channel channel, uint32_t dataLen, uint8_t const *data) |
Send on the DoCAN channel in parameter. More... | |
void | AGHAF_DoCAN_v2_Channel_activateTrace (AGHAF_DoCAN_v2_Channel channel, AGHAF_BOOL value) |
Activate the CAN trace. More... | |
API to use DoCAN on exxotest devices.
below, the description of channel state management:
Symbol | Description |
---|---|
![]() | Forbidden |
![]() | Authorized |
![]() | Next state |
This table presents the results obtained during a test in ko.s-1. The rate corresponds to the transmission rate on the whole bus. For this test, there was 32 channels and 10 messages exchanged on each channel. The CAN baudrate was 1Mb/s and FD baudrate was 5Mb/s. The message size is in bytes. Datas are exchanged between two MuxDiag 3.
Message Size | Classic CAN | TxDL 8 | TxDL 12 | TXDL 16 | TxDL 20 | TxDL 24 | TxDL 32 | TxDL 48 | TxDL 64 |
---|---|---|---|---|---|---|---|---|---|
12 | 19 | 28 | 32 | 32 | 28 | 29 | 31 | 32 | 30 |
100 | 42 | 85 | 102 | 129 | 134 | 159 | 167 | 173 | 173 |
1000 | 47 | 93 | 134 | 165 | 189 | 213 | 257 | 301 | 340 |
10000 | 48 | 96 | 137 | 172 | 200 | 224 | 266 | 323 | 362 |
typedef void(* AGHAF_DoCAN_onMessageRx) (uint64_t timestamp, uint32_t canIdent, uint8_t canFlags, uint32_t dataLen, uint8_t const *data, void *userContext) |
callback function called when a message is received on a DoCAN channel
timestamp | timestamp of the event |
canIdent | can identifier |
canFlags | corresponding to AGHAF_CAN_MSG_FLAGS |
dataLen | length of the datas received |
data | datas received |
userContext | context given when setting the callabck in the system |
typedef void(* AGHAF_DoCAN_onMessageRxError) (uint64_t timestamp, AGHAF_DoCan_Error error, void *userContext) |
callback function called when an error happens on the reception from a DoCAN channel
timestamp | timestamp of the event |
error | value of the error |
userContext | context given when setting the callabck in the system |
typedef void(* AGHAF_DoCAN_onMessageRxFF) (uint64_t timestamp, uint32_t canIdent, uint8_t canFlags, void *userContext) |
callback function called when a first frame is received on a DoCAN channel
timestamp | timestamp of the event |
canIdent | can identifier |
canFlags | corresponding to AGHAF_CAN_MSG_FLAGS |
userContext | context given when setting the callabck in the system |
typedef void(* AGHAF_DoCAN_onMessageTx) (uint64_t timestamp, uint32_t canIdent, uint8_t canFlags, uint32_t dataLen, uint8_t const *data, void *userContext) |
callback function called when a message is transmitted on a DoCAN channel
timestamp | timestamp of the event |
canIdent | can identifier |
canFlags | corresponding to AGHAF_CAN_MSG_FLAGS |
dataLen | length of the datas transmitted |
data | datas transmitted |
userContext | context given when setting the callabck in the system |
typedef void(* AGHAF_DoCAN_onMessageTxError) (uint64_t timestamp, AGHAF_DoCan_Error error, void *userContext) |
callback function called when an error happens on the transmission from a DoCAN channel
timestamp | timestamp of the event |
error | value of the error |
userContext | context given when setting the callabck in the system |
void AGHAF_DoCAN_v2_Channel_activateTrace | ( | AGHAF_DoCAN_v2_Channel | channel, |
AGHAF_BOOL | value | ||
) |
Activate the CAN trace.
channel | handle on the channel |
value | AGHAF_TRUE ? activate : deactivate |
uint8_t AGHAF_DoCAN_v2_Channel_getIndex | ( | AGHAF_DoCAN_v2_Channel | channel | ) |
Return the intern index from the channel.
channel |
AGHAF_Status AGHAF_DoCAN_v2_Channel_getParam | ( | AGHAF_DoCAN_v2_Channel | channel, |
AGHAF_DoCAN_ChannelParam | param, | ||
uint32_t * | value | ||
) |
Provide the value from a channel parameter.
channel | handle on the channel |
param | parameter to get |
value | value to get |
AGHAF_Status AGHAF_DoCAN_v2_Channel_send | ( | AGHAF_DoCAN_v2_Channel | channel, |
uint32_t | dataLen, | ||
uint8_t const * | data | ||
) |
Send on the DoCAN channel in parameter.
channel | handle on the channel |
dataLen | length from the datas |
data | pointer on data |
AGHAF_Status AGHAF_DoCAN_v2_Channel_setParam | ( | AGHAF_DoCAN_v2_Channel | channel, |
AGHAF_DoCAN_ChannelParam | param, | ||
uint32_t | value | ||
) |
Set the parameter from a channel.
channel | handle on the channel |
param | parameter to set |
value | value to set |
AGHAF_Status AGHAF_DoCAN_v2_Channel_start | ( | AGHAF_DoCAN_v2_Channel | channel | ) |
Start a channel.
channel | handle on the channel |
AGHAF_Status AGHAF_DoCAN_v2_Channel_stop | ( | AGHAF_DoCAN_v2_Channel | channel | ) |
Stop a channel.
channel | handle on the channel |
AGHAF_DoCAN_v2_Channel AGHAF_DoCAN_v2_createChannel | ( | AGHAF_CAN | can | ) |
Create a channel.
can | handle on the bus |
AGHAF_DoCAN_Channel AGHAF_DoCAN_v2_getChannelByIndex | ( | AGHAF_CAN | can, |
uint8_t | index | ||
) |
return the index corrsponding to the index in parameter (nullptr if the index is not found)
can | bus on which is the channel |
index | index from the channel |
AGHAF_Status AGHAF_DoCAN_v2_getChannelCount | ( | AGHAF_CAN | can, |
uint8_t * | count | ||
) |
Provide the number of channels available on the bus.
can | handle on the bus |
count | pointer to fill with the data |
AGHAF_Status AGHAF_DoCAN_v2_getFreeChannelCount | ( | AGHAF_CAN | can, |
uint8_t * | count | ||
) |
Return the number of free channels still available.
can | handle on the bus |
count | number of free channels still available |
AGHAF_Status AGHAF_DoCAN_v2_releaseChannel | ( | AGHAF_DoCAN_v2_Channel | channel | ) |
Release the channel.
channel | handle on the channel to release |
void AGHAF_DoCAN_v2_setOnMessageRxCallback | ( | AGHAF_DoCAN_v2_Channel | channel, |
AGHAF_DoCAN_onMessageRx | callback, | ||
void * | userContext | ||
) |
set the callback called on a reception event
channel | handle on the channel |
callback | callback to be used for the event |
userContext | context provided by the user for custom datas |
void AGHAF_DoCAN_v2_setOnMessageRxErrorCallback | ( | AGHAF_DoCAN_v2_Channel | channel, |
AGHAF_DoCAN_onMessageRxError | callback, | ||
void * | userContext | ||
) |
set the callback called on a reception error event
channel | handle on the channel |
callback | callback to be used for the event |
userContext | context provided by the user for custom datas |
void AGHAF_DoCAN_v2_setOnMessageRxFFCallback | ( | AGHAF_DoCAN_v2_Channel | channel, |
AGHAF_DoCAN_onMessageRxFF | callback, | ||
void * | userContext | ||
) |
set the callback called on the reception from a first frame event
channel | handle on the channel |
callback | callback to be used for the event |
userContext | context provided by the user for custom datas |
void AGHAF_DoCAN_v2_setOnMessageTxCallback | ( | AGHAF_DoCAN_v2_Channel | channel, |
AGHAF_DoCAN_onMessageTx | callback, | ||
void * | userContext | ||
) |
set the callback called on a transmission event
channel | handle on the channel |
callback | callback to be used for the event |
userContext | context provided by the user for custom datas |
void AGHAF_DoCAN_v2_setOnMessageTxErrorCallback | ( | AGHAF_DoCAN_v2_Channel | channel, |
AGHAF_DoCAN_onMessageTxError | callback, | ||
void * | userContext | ||
) |
set the callback called on a transmission error event
channel | handle on the channel |
callback | callback to be used for the event |
userContext | context provided by the user for custom datas |