1#ifndef EXXOTEST_AGHAF_CAN_V2_H
2#define EXXOTEST_AGHAF_CAN_V2_H
4#include "aghaf_can_common.h"
27 uint8_t flags, uint8_t dataLen,
28 uint8_t
const* data,
void* userContext);
40 uint8_t flags, uint8_t dataLen,
41 uint8_t
const* data,
void* userContext);
241 uint32_t* nbTerminations));
254 uint32_t* nbTerminations));
262 (uint32_t* terminations));
286 uint8_t
const* frameData, uint8_t frameFlags,
287 uint32_t frameIdent, uint8_t index, uint8_t flags,
306 uint8_t
const* frameData, uint8_t frameFlags,
307 uint32_t frameIdent, uint8_t index, uint8_t flags,
308 uint32_t offset, uint32_t period));
322 (
AGHAF_CAN can, uint16_t* globalFilterCaps,
323 AGHAF_CAN_FilterDesc** values, uint16_t* size));
330 (AGHAF_CAN_FilterDesc * values));
346 uint32_t id1, uint32_t id2));
387 (
AGHAF_CAN can, uint32_t ident, uint8_t flags,
388 uint16_t dataLen, uint8_t
const* data));
AGHAF_CAN_FilterMode
enumerator to choose the type of the filter: accept or reject
Definition aghaf_can_enums.h:82
AGHAF_CAN_RejectType
enumerator to choose the type of exclusion filter
Definition aghaf_can_enums.h:66
AGHAF_CAN_Param
List of parameters used to configure a CAN bus.
Definition aghaf_can_enums.h:136
AGHAF_CAN_FilterId
enumerator to choose the identifier type for can filter
Definition aghaf_can_enums.h:76
AGHAF_CAN_Mode
Possible modes for CAN.
Definition aghaf_can_enums.h:118
AGHAF_CAN_ChipState
Enumeration of the chip states.
Definition aghaf_can_enums.h:39
AGHAF_CAN_Error
Enumerator to describe the error on the bus.
Definition aghaf_can_enums.h:100
AGHAF_CAN_FILTER_Type
type of the filter
Definition aghaf_can_enums.h:88
uint8_t AGHAF_CAN_v2_Periodic_getCount(AGHAF_CAN can)
Return the number of periodic message available on a CAN bus.
AGHAF_Status AGHAF_CAN_v2_getChipSstate(AGHAF_CAN can, AGHAF_CAN_ChipState *chipState)
Return the chip state from the bus.
AGHAF_Status AGHAF_CAN_v2_Periodic_send(AGHAF_CAN can, uint8_t frameDatalen, uint8_t const *frameData, uint8_t frameFlags, uint32_t frameIdent, uint8_t index, uint8_t flags, uint32_t period)
Add a periodic message to send.
AGHAF_Status AGHAF_CAN_v2_activate(AGHAF_CAN can)
activate a CAN bus
AGHAF_Status AGHAF_CAN_v2_supportedTerminationsLs(AGHAF_CAN can, uint32_t **terminations, uint32_t *nbTerminations)
Request the supported low speed terminations from a CAN bus.
AGHAF_CAN AGHAF_CAN_v2_get(AGHAF_Device device, uint8_t index)
return the CAN at index in parameter
AGHAF_Status AGHAF_CAN_v2_BusOn(AGHAF_CAN can)
reactivate the bus after an error
uint8_t AGHAF_CAN_v2_getIndex(AGHAF_CAN can)
return the index from a CAN bus
AGHAF_Status AGHAF_CAN_v2_getParam(AGHAF_CAN can, AGHAF_CAN_Param type, uint32_t *value)
Provide the value from a CAN parameter.
void(* AGHAF_CAN_onBusChange)(uint64_t timestamp, uint8_t chipState, void *userContext)
callback function called when a bus change happens on a CAN
Definition aghaf_can_v2.h:58
uint8_t AGHAF_CAN_v2_getCount(AGHAF_Device device)
return the number of CAN bus from a device
AGHAF_Status AGHAF_CAN_v2_Periodic_send_v2(AGHAF_CAN can, uint8_t frameDatalen, uint8_t const *frameData, uint8_t frameFlags, uint32_t frameIdent, uint8_t index, uint8_t flags, uint32_t offset, uint32_t period)
Add a periodic message to send.
AGHAF_Status AGHAF_CAN_v2_filtersCount(AGHAF_CAN can, AGHAF_CAN_FilterId idType, uint16_t *count)
Provide the current number of filters.
AGHAF_Status AGHAF_CAN_v2_isActivated(AGHAF_CAN can, AGHAF_BOOL *isActivated)
Request if a CAN bus is yet activated or not.
void(* AGHAF_CAN_onMessageRx)(uint64_t timestamp, uint32_t ident, uint8_t flags, uint8_t dataLen, uint8_t const *data, void *userContext)
callback function called when a message is received on a CAN
Definition aghaf_can_v2.h:39
AGHAF_Status AGHAF_CAN_v2_addFilter(AGHAF_CAN can, AGHAF_CAN_FilterId idType, AGHAF_CAN_FILTER_Type type, AGHAF_CAN_FilterMode mode, uint32_t id1, uint32_t id2)
add a filter to the CAN bus
AGHAF_Status AGHAF_CAN_v2_setParam(AGHAF_CAN can, AGHAF_CAN_Param type, uint32_t value)
Set the value from a CAN parameter.
void * AGHAF_CAN
handle on CAN
Definition aghaf_can_v2.h:15
AGHAF_Status AGHAF_CAN_v2_reject(AGHAF_CAN can, AGHAF_CAN_RejectType rejectType, AGHAF_BOOL rejectRtr)
Set a global filter.
void AGHAF_CAN_v2_freeSupportedFilters(AGHAF_CAN_FilterDesc *values)
Free the memory allocated with AGHAF_CAN_Bus_supportedFilters.
void(* AGHAF_CAN_onBusLoad)(uint64_t timestamp, uint8_t chipState, uint8_t busLoad, AGHAF_CAN_Error error, void *userContext)
callback function called when a bus laod is from a CAN is transmitted
Definition aghaf_can_v2.h:69
AGHAF_Status AGHAF_CAN_v2_supportedFilters(AGHAF_CAN can, uint16_t *globalFilterCaps, AGHAF_CAN_FilterDesc **values, uint16_t *size)
Provide the supported filters from a CAN bus.
void AGHAF_CAN_v2_freeSupportedModes(AGHAF_CAN_Mode *modes)
Free the memory allocated with AGHAF_CAN_Bus_supportedModes.
AGHAF_Status AGHAF_CAN_v2_sendMessage(AGHAF_CAN can, uint32_t ident, uint8_t flags, uint16_t dataLen, uint8_t const *data)
send data on a CAN bus
AGHAF_Status AGHAF_CAN_v2_supportedModes(AGHAF_CAN can, AGHAF_CAN_Mode **modes, uint8_t *nbModes)
Request the supported modes from the CAN bus in parameter.
void AGHAF_CAN_v2_setOnBusLoadCallback(AGHAF_CAN can, AGHAF_CAN_onBusLoad callback, void *userContext)
set the callback called on a bus noad event
void AGHAF_CAN_v2_setOnMessageRxCallback(AGHAF_CAN can, AGHAF_CAN_onMessageRx callback, void *userContext)
set the callback called on a rx event
void(* AGHAF_CAN_onError)(uint64_t timestamp, AGHAF_CAN_Error error, void *userContext)
callback function called when an error happens on a CAN
Definition aghaf_can_v2.h:49
void(* AGHAF_CAN_onMessageTx)(uint64_t timestamp, uint32_t ident, uint8_t flags, uint8_t dataLen, uint8_t const *data, void *userContext)
callback function called when a message is transmitted on a CAN
Definition aghaf_can_v2.h:26
AGHAF_Status AGHAF_CAN_v2_supportedTerminations(AGHAF_CAN can, uint32_t **terminations, uint32_t *nbTerminations)
Request the supported terminations from a CAN bus.
void AGHAF_CAN_v2_setOnBusChangeCallback(AGHAF_CAN can, AGHAF_CAN_onBusChange callback, void *userContext)
set the callback called on a bus change event
AGHAF_Status AGHAF_CAN_v2_clearFilters(AGHAF_CAN can)
clear the filters from a bus
void AGHAF_CAN_v2_useAPI()
Inform the library tu use the V2 CAN API.
void AGHAF_CAN_v2_freeSupportedTerminations(uint32_t *terminations)
Free the memory allocated with AGHAF_CAN_Bus_supportedTerminations or AGHAF_CAN_Bus_supportedTerminat...
void AGHAF_CAN_v2_setOnMessageTxCallback(AGHAF_CAN can, AGHAF_CAN_onMessageTx callback, void *userContext)
set the callback called on a tx event
AGHAF_Status AGHAF_CAN_v2_deactivate(AGHAF_CAN can)
deactivate a CAN bus
void AGHAF_CAN_v2_setOnErrorCallback(AGHAF_CAN can, AGHAF_CAN_onError callback, void *userContext)
set the callback called on error event
AGHAF_Status
enumerator to define the error type in aghaf functions
Definition aghaf_global.h:28
AGHAF_BOOL
enumerator to get a bool definition
Definition aghaf_global.h:22
void * AGHAF_Device
handle on an exxotest device
Definition aghaf_global.h:87