AGHAF
4.5.1
Annecy electronique Generic Hardware Access Framework
|
API to use DoCAN on exxotest devices. More...
API to use DoCAN on exxotest devices.
below, the description of channel state management:
Symbol | Description |
---|---|
Forbidden | |
Authorized | |
Next state |
Function | Stop | Start |
---|---|---|
AGHAF_DoCAN_Channel_setParam | ||
AGHAF_DoCAN_Channel_getParam | ||
AGHAF_DoCAN_Channel_start | ||
AGHAF_DoCAN_Channel_stop | ||
AGHAF_DoCAN_Channel_send |
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 |
AGHAF_DoCAN_Callback |
Callback function type to recieve DoCAN events.
event | Handle to the event. |
userContext | Same parameter as the one passed to AGHAF_DoCAN_registerCallback(). |
enum AGHAF_DoCAN_AddrMode |
List of parameters used to configure a DoCAN channel.
Enumerator | |
---|---|
AGHAF_DoCAN_CHANNEL_PARAM_DIRECTION | Set channel direction. |
AGHAF_DoCAN_CHANNEL_PARAM_TXDL | Define TX_DL and identitify if CAN FD or Classic CAN is to be used. |
AGHAF_DoCAN_CHANNEL_PARAM_PAD_HANDLING | Enable padding handling. |
AGHAF_DoCAN_CHANNEL_PARAM_PAD_VALUE | Padding value to use when padding handling is enabled. |
AGHAF_DoCAN_CHANNEL_PARAM_ADDRMODE | Addressing mode used by the channel |
AGHAF_DoCAN_CHANNEL_PARAM_TIMING_AS | As - Time for transmission of the CAN frame (any N_PDU) on the sender side. |
AGHAF_DoCAN_CHANNEL_PARAM_TIMING_AR | Ar - Time for transmission of the CAN frame (any N_PDU) on the receiver side. |
AGHAF_DoCAN_CHANNEL_PARAM_TIMING_BS | Bs - Timeout until reception of the next FlowControl N_PDU. |
AGHAF_DoCAN_CHANNEL_PARAM_TIMING_BR | Br - Performance requirement (not used). |
AGHAF_DoCAN_CHANNEL_PARAM_TIMING_CS | Cs - Performance requirement (not used). |
AGHAF_DoCAN_CHANNEL_PARAM_TIMING_CR | Cr - Timeout until reception of the next ConsecutiveFrame. |
AGHAF_DoCAN_CHANNEL_PARAM_TIMING_STMIN | STmin - Separation time (Receiver only). |
AGHAF_DoCAN_CHANNEL_PARAM_REQ_ID_FMT | CAN ID format used to transmit data. |
AGHAF_DoCAN_CHANNEL_PARAM_REQ_ID_VALUE | CAN ID used to transmit data. |
AGHAF_DoCAN_CHANNEL_PARAM_REQ_ID_AE | Address extension used to transmit data. |
AGHAF_DoCAN_CHANNEL_PARAM_RESP_ID_FMT | CAN ID format used to receive data. |
AGHAF_DoCAN_CHANNEL_PARAM_RESP_ID_VALUE | CAN ID used to receive data. |
AGHAF_DoCAN_CHANNEL_PARAM_RESP_ID_AE | Address extension used to receive data. |
AGHAF_DoCAN_CHANNEL_PARAM_WAITFRAME | Maximum number of WAIT flow control frames allowed during a multi-segment transfer. |
AGHAF_DoCAN_CHANNEL_PARAM_BLOCKSIZE | Block Size (Receiver only). |
AGHAF_DoCAN_CHANNEL_PARAM_MAXDATALEN | Maximum byte length of received segmented message (Receiver only). |
AGHAF_DoCAN_CHANNEL_PARAM_PAD_NOCHECK | If enable, doesn't check padding of response against the AGHAF_DoCAN_CHANNEL_PARAM_PAD_HANDLING setting. |
AGHAF_DoCAN_CHANNEL_PARAM_CANFD_BRS | Manage Bit Rate Switch when sending frame. |
AGHAF_DoCAN_CHANNEL_PARAM_TIMING_STMIN_OVRD | STmin Override - Separation time (Sender only). |
AGHAF_DoCAN_CHANNEL_PARAM_BS_OVRD | Block Size Override (Sender only). |
enum AGHAF_DoCan_Error |
enumerator to describe the error on the bus
enum AGHAF_DoCAN_IdFormat |
Flags to configure DoCAN identifier format.
Enable or disable padding handling.
Enumerator | |
---|---|
AGHAF_DoCAN_PAD_DISABLE | Disable padding handling. |
AGHAF_DoCAN_PAD_ENABLE | Enable padding handling. |
enum AGHAF_DoCAN_TxDL |
Possible TX_DL for DoCAN transmissions.
void AGHAF_DoCAN_Channel_activateTrace | ( | AGHAF_DoCAN_Channel | channel, |
AGHAF_BOOL | value | ||
) |
Activate the CAN trace.
channel | handle on the channel |
value | AGHAF_TRUE ? activate : deactivate |
uint8_t AGHAF_DoCAN_Channel_getIndex | ( | AGHAF_DoCAN_Channel | channel | ) |
Return the intern index from the channel.
channel |
AGHAF_Status AGHAF_DoCAN_Channel_getParam | ( | AGHAF_DoCAN_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_Channel_send | ( | AGHAF_DoCAN_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_Channel_setParam | ( | AGHAF_DoCAN_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_Channel_start | ( | AGHAF_DoCAN_Channel | channel | ) |
Start a channel.
channel | handle on the channel |
AGHAF_Status AGHAF_DoCAN_Channel_stop | ( | AGHAF_DoCAN_Channel | channel | ) |
Stop a channel.
channel | handle on the channel |
AGHAF_DoCAN_Channel AGHAF_DoCAN_createChannel | ( | AGHAF_DoCAN_Bus | bus | ) |
Create a channel.
bus | handle on the bus |
void AGHAF_DoCAN_deregisterCallback | ( | AGHAF_DoCAN_Bus | bus, |
AGHAF_DoCAN_Callback | callback | ||
) |
deregister a callback
bus | handle on the bus |
callback | function pointer to remove |
uint8_t AGHAF_DoCAN_Event_getBusIndex | ( | AGHAF_DoCAN_Event | event | ) |
return the index from the bus on which occured the event
event | handle on an event |
AGHAF_DoCAN_Channel AGHAF_DoCAN_Event_getChannel | ( | AGHAF_DoCAN_Event | event | ) |
Return the channel on which occured the event.
event | handle on the event |
AGHAF_Status AGHAF_DoCAN_Event_getData | ( | AGHAF_DoCAN_Event | event, |
uint8_t * | data, | ||
uint32_t * | size | ||
) |
Provide the datas received in the event.
event | handle on the event |
data | array to fill with the data |
size | [in] data array size [out] size of copied data |
uint32_t AGHAF_DoCAN_Event_getDataSize | ( | AGHAF_DoCAN_Event | event | ) |
return the size from the datas in the event
event |
uint8_t AGHAF_DoCAN_Event_getError | ( | AGHAF_DoCAN_Event | event | ) |
Return the error value from the event.
event | handle on the event |
AGHAF_CAN_Identifier AGHAF_DoCAN_Event_getId | ( | AGHAF_DoCAN_Event | event | ) |
Return the CAN identifier from the event.
event | handle on the event |
AGHAF_DoCAN_EventType AGHAF_DoCAN_Event_type | ( | AGHAF_EventInfo | event | ) |
return the type from the event
event |
AGHAF_DoCAN_Bus AGHAF_DoCAN_getBus | ( | AGHAF_Device | device, |
uint8_t | index | ||
) |
return the DoCAN bus at index in parameter
device | device handle from the desired DoCAN bus |
index | index from the bus |
uint32_t AGHAF_DoCAN_getBusCount | ( | AGHAF_Device | device | ) |
return the number of DoCAN bus from a device
device | handle from the device |
AGHAF_DoCAN_Channel AGHAF_DoCAN_getChannelByIndex | ( | AGHAF_DoCAN_Bus | bus, |
uint8_t | index | ||
) |
return the index corrsponding to the index in parameter (nullptr if the index is not found)
bus | bus on which is the channel |
index | index from the channel |
AGHAF_Status AGHAF_DoCAN_getChannelCount | ( | AGHAF_DoCAN_Bus | bus, |
uint8_t * | count | ||
) |
Provide the number of channels available on the bus.
bus | handle on the bus |
count | pointer to fill with the data |
AGHAF_Status AGHAF_DoCAN_getFreeChannelCount | ( | AGHAF_DoCAN_Bus | bus, |
uint8_t * | count | ||
) |
Return the number of free channels still available.
bus | handle on the bus |
count | number of free channels still available |
void AGHAF_DoCAN_registerCallback | ( | AGHAF_DoCAN_Bus | bus, |
AGHAF_DoCAN_Callback | callback, | ||
void * | userContext | ||
) |
Register a callback for the DoCAN events from a bus.
bus | handle on the bus |
callback | function pointer to call on an event |
userContext |
AGHAF_Status AGHAF_DoCAN_releaseChannel | ( | AGHAF_DoCAN_Channel | channel | ) |
Release the channel.
channel | handle on the channel to release |