AGHAF
4.5.1
Annecy electronique Generic Hardware Access Framework
|
API to use CAN on exxotest devices. More...
enum | AGHAF_CAN_IdentifierType { AGHAF_CAN_IdStd , AGHAF_CAN_IdXtd } |
enumerator to choose the type of CAN identifier More... | |
enum | AGHAF_CAN_FrameType { AGHAF_CAN_DataFrame = 0 , AGHAF_CAN_RemoteFrame = 1 } |
type of frame More... | |
enum | AGHAF_CAN_BusState { AGHAF_CAN_BUS_UNKNOW = 0 , AGHAF_CAN_BUS_ACTIVE , AGHAF_CAN_BUS_PASSIVE , AGHAF_CAN_BUS_BUSOFF } |
enumerator for the state of the bus More... | |
enum | AGHAF_CAN_EventType { AGHAF_CAN_EVENT_UNKNOW = 0 , AGHAF_CAN_EVENT_MSGTX = 1 , AGHAF_CAN_EVENT_MSGRX = 2 , AGHAF_CAN_EVENT_ERROR = 3 , AGHAF_CAN_EVENT_BUSCHANGE = 4 , AGHAF_CAN_EVENT_BUSLOAD = 5 } |
enumerator to tell the type of the event More... | |
enum | AGHAF_CAN_RejectType { AGHAF_CAN_REJECT_ALL = 0 , AGHAF_CAN_REJECT_STD = 1 , AGHAF_CAN_REJECT_EXT = 2 , AGHAF_CAN_REJECT_NONE = 3 } |
enumerator to choose the type of exclusion filter More... | |
enum | AGHAF_CAN_FilterId { AGHAF_CAN_FILTER_ID_STD = 0 , AGHAF_CAN_FILTER_ID_XTD = 1 } |
enumerator to choose the identifier type for can filter More... | |
enum | AGHAF_CAN_FilterMode { AGHAF_CAN_FILTER_MODE_ACCEPT = 0 , AGHAF_CAN_FILTER_MODE_REJECT = 1 } |
enumerator to choose the type of the filter: accept or reject More... | |
enum | AGHAF_CAN_FILTER_Type { AGHAF_CAN_FILTER_TYPE_CLASSIC = 0 , AGHAF_CAN_FILTER_TYPE_SINGLE = 1 , AGHAF_CAN_FILTER_TYPE_DUAL = 2 , AGHAF_CAN_FILTER_TYPE_RANGE = 3 } |
type of the filter More... | |
typedef void * | AGHAF_CAN_Bus |
handle to a CAN bus More... | |
typedef void * | AGHAF_CAN_Frame |
Handle to a CAN frame. More... | |
typedef void * | AGHAF_CAN_Event |
Handle to a CAN event. | |
typedef void const * | AGHAF_CAN_Event_busInfo |
Handle to a CAN event bus info. | |
typedef void(* | AGHAF_CAN_Callback) (AGHAF_CAN_Event event, void *userContext) |
Callback function type to recieve CAN events. More... | |
typedef struct AGHAF_CAN_Identifier | AGHAF_CAN_Identifier |
structure to represent an indentifier CAN in the AGHAF library | |
typedef struct AGHAF_CAN_FilterDesc | AGHAF_CAN_FilterDesc |
structure to tell the filter capabilities from an exxotest device | |
typedef void(* | AGHAF_CAN_asyncSendFrame_Callback) (AGHAF_Status status, uint32_t id, void *userContext) |
Callback function type to recieve CAN events. More... | |
AGHAF_CAN_Bus | AGHAF_CAN_getBus (AGHAF_Device device, uint8_t index) |
return the CAN bus at index in parameter More... | |
uint8_t | AGHAF_CAN_getBusIndex (AGHAF_CAN_Bus bus) |
return the index from a CAN bus More... | |
uint8_t | AGHAF_CAN_getBusCount (AGHAF_Device device) |
return the number of CAN bus from a device More... | |
void | AGHAF_CAN_registerCallback (AGHAF_CAN_Bus bus, AGHAF_CAN_Callback callback, void *userContext) |
Register a callback for the CAN events from a bus. More... | |
void | AGHAF_CAN_deregisterCallback (AGHAF_CAN_Bus bus, AGHAF_CAN_Callback callback) |
deregister a callback More... | |
void | AGHAF_CAN_asyncSendFrame_registerCallback (AGHAF_CAN_Bus bus, AGHAF_CAN_asyncSendFrame_Callback callback, void *userContext) |
AGHAF_CAN_asyncSendFrame_registerCallback. More... | |
void | AGHAF_CAN_asyncSendFrame_deregisterCallback (AGHAF_CAN_Bus bus, AGHAF_CAN_asyncSendFrame_Callback callback) |
AGHAF_CAN_asyncSendFrame_deregisterCallback. More... | |
AGHAF_Status | AGHAF_CAN_Bus_getParam (AGHAF_CAN_Bus bus, AGHAF_CAN_Param param, uint32_t *value) |
Provide the value from a CAN parameter. More... | |
AGHAF_Status | AGHAF_CAN_Bus_setParam (AGHAF_CAN_Bus bus, AGHAF_CAN_Param param, uint32_t value) |
Set the value from a CAN parameter. More... | |
AGHAF_Status | AGHAF_CAN_Bus_supportedModes (AGHAF_CAN_Bus bus, AGHAF_CAN_Mode **modes, uint8_t *nbModes) |
Request the supported modes from the CAN bus in parameter. More... | |
void | AGHAF_CAN_Bus_freeSupportedModes (AGHAF_CAN_Mode *modes) |
Free the memory allocated with AGHAF_CAN_Bus_supportedModes. More... | |
AGHAF_Status | AGHAF_CAN_Bus_state (AGHAF_CAN_Bus bus, AGHAF_CAN_BusState *canBusState) |
AGHAF_CAN_Bus_state. More... | |
AGHAF_Status | AGHAF_CAN_Bus_BusOn (AGHAF_CAN_Bus bus) |
reactivate the bus after an error More... | |
AGHAF_Status | AGHAF_CAN_Bus_activate (AGHAF_CAN_Bus bus) |
activate a CAN bus More... | |
AGHAF_Status | AGHAF_CAN_Bus_deactivate (AGHAF_CAN_Bus bus) |
deactivate a CAN bus More... | |
AGHAF_Status | AGHAF_CAN_Bus_isActivated (AGHAF_CAN_Bus bus, AGHAF_BOOL *isActivated) |
Request if a CAN bus is yet activated or not. More... | |
AGHAF_Status | AGHAF_CAN_Bus_supportedTerminations (AGHAF_CAN_Bus bus, uint32_t **terminations, uint32_t *nbTerminations) |
Request the supported terminations from a CAN bus. More... | |
AGHAF_Status | AGHAF_CAN_Bus_supportedTerminationsLs (AGHAF_CAN_Bus bus, uint32_t **terminations, uint32_t *nbTerminations) |
Request the supported low speed terminations from a CAN bus. More... | |
void | AGHAF_CAN_Bus_freeSupportedTerminations (uint32_t *terminations) |
Free the memory allocated with AGHAF_CAN_Bus_supportedTerminations or AGHAF_CAN_Bus_supportedTerminationsLs. More... | |
uint8_t | AGHAF_CAN_Bus_getPeriodicCount (AGHAF_CAN_Bus bus) |
Return the number of periodic message available on a CAN bus. More... | |
AGHAF_Status | AGHAF_CAN_Bus_sendPeriodic (AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame, uint8_t index, uint8_t flags, uint32_t period) |
Add a periodic message to send. More... | |
AGHAF_Status | AGHAF_CAN_Bus_addFilter (AGHAF_CAN_Bus bus, 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 More... | |
AGHAF_Status | AGHAF_CAN_Bus_clearFilters (AGHAF_CAN_Bus bus) |
clear the filters from a bus More... | |
AGHAF_Status | AGHAF_CAN_Bus_filtersCount (AGHAF_CAN_Bus bus, AGHAF_CAN_FilterId idType, uint16_t *count) |
Provide the current number of filters. More... | |
AGHAF_Status | AGHAF_CAN_Bus_supportedFilters (AGHAF_CAN_Bus bus, uint16_t *globalFilterCaps, AGHAF_CAN_FilterDesc **values, uint16_t *size) |
Provide the supported filters from a CAN bus. More... | |
void | AGHAF_CAN_Bus_freeSupportedFilters (AGHAF_CAN_FilterDesc *values) |
Free the memory allocated with AGHAF_CAN_Bus_supportedFilters. More... | |
AGHAF_Status | AGHAF_CAN_Bus_reject (AGHAF_CAN_Bus bus, AGHAF_CAN_RejectType rejectType, AGHAF_BOOL rtr) |
Set a global filter. More... | |
AGHAF_CAN_Frame | AGHAF_CAN_Frame_new () |
Return a handle on a CAN frame. More... | |
void | AGHAF_CAN_Frame_delete (AGHAF_CAN_Frame frame) |
Free the memory from a CAN frame. More... | |
AGHAF_Status | AGHAF_CAN_Frame_setId (AGHAF_CAN_Frame frame, AGHAF_CAN_Identifier *identifier) |
Set the identifier from a CAN frame. More... | |
AGHAF_Status | AGHAF_CAN_Frame_id (AGHAF_CAN_Frame frame, AGHAF_CAN_Identifier *identifier) |
Get the identifier from a CAN frame. More... | |
AGHAF_Status | AGHAF_CAN_Frame_setFrameType (AGHAF_CAN_Frame frame, AGHAF_CAN_FrameType type) |
Set the type from the frame. More... | |
AGHAF_CAN_FrameType | AGHAF_CAN_Frame_frameType (AGHAF_CAN_Frame frame) |
Get the type from the frame. More... | |
AGHAF_Status | AGHAF_CAN_Frame_setFDF (AGHAF_CAN_Frame frame, AGHAF_BOOL fdf, AGHAF_BOOL esi, AGHAF_BOOL brs) |
AGHAF_CAN_Frame_setFDF. More... | |
AGHAF_BOOL | AGHAF_CAN_Frame_fdf (AGHAF_CAN_Frame frame) |
AGHAF_CAN_Frame_fdf. More... | |
AGHAF_BOOL | AGHAF_CAN_Frame_esi (AGHAF_CAN_Frame frame) |
AGHAF_CAN_Frame_esi. More... | |
AGHAF_BOOL | AGHAF_CAN_Frame_brs (AGHAF_CAN_Frame frame) |
AGHAF_CAN_Frame_brs. More... | |
AGHAF_Status | AGHAF_CAN_Frame_setData (AGHAF_CAN_Frame frame, const void *data, int64_t size) |
Set the data from a frame. More... | |
AGHAF_Status | AGHAF_CAN_Frame_data (AGHAF_CAN_Frame frame, void *data, int64_t size) |
Provide the data contained in a frame. More... | |
int64_t | AGHAF_CAN_Frame_dataSize (AGHAF_CAN_Frame frame) |
return the size from the data More... | |
AGHAF_Status | AGHAF_CAN_sendFrame (AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame) |
send a frame on a CAN bus More... | |
AGHAF_Status | AGHAF_CAN_sendMessage (AGHAF_CAN_Bus bus, uint32_t ident, uint8_t flags, uint16_t dataLen, uint8_t const *data) |
send data on a CAN bus More... | |
void | AGHAF_CAN_asyncSendFrame (AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame, uint32_t *id) |
AGHAF_CAN_asyncSendFrame. More... | |
AGHAF_CAN_Frame | AGHAF_CAN_Event_frame (AGHAF_CAN_Event event) |
return the frame contained in an event More... | |
AGHAF_CAN_EventType | AGHAF_CAN_typeEvent (AGHAF_EventInfo event) |
return the type from the event More... | |
AGHAF_CAN_Event_busInfo | AGHAF_CAN_getEventBusInfo (AGHAF_CAN_Event event) |
return the bus informations from an event More... | |
uint8_t | AGHAF_CAN_getEventBusIndex (AGHAF_CAN_Event event) |
return the index from the bus on which occured the event More... | |
uint32_t | AGHAF_CAN_Event_chipState (AGHAF_CAN_Event_busInfo busState) |
return the chipstate More... | |
uint32_t | AGHAF_CAN_Event_busLoad (AGHAF_CAN_Event_busInfo busState) |
return the bus load More... | |
uint32_t | AGHAF_CAN_Event_busError (AGHAF_CAN_Event_busInfo busState) |
return the value from the error More... | |
API to use CAN on exxotest devices.
Device is in "init" state at startup.
The following section describes state management:
Symbol | Description |
---|---|
Forbidden | |
Authorized | |
Followed status |
AGHAF_CAN_asyncSendFrame_Callback |
Callback function type to recieve CAN events.
status | of the sending to tell if it succeeded or not |
id | id of the frame sent |
userContext | Same parameter as the one passed to AGHAF_CAN_asyncSendFrame_registerCallback(). |
typedef void* AGHAF_CAN_Bus |
handle to a CAN bus
handle to a CAN bus
AGHAF_CAN_Callback |
Callback function type to recieve CAN events.
event | Handle to the event. |
userContext | Same parameter as the one passed to AGHAF_CAN_registerCallback(). |
typedef void* AGHAF_CAN_Frame |
Handle to a CAN frame.
Handle to a CAN frame
enum AGHAF_CAN_BusState |
enum AGHAF_CAN_EventType |
enumerator to tell the type of the event
type of the filter
enum AGHAF_CAN_FilterId |
enum AGHAF_CAN_FilterMode |
enum AGHAF_CAN_FrameType |
enum AGHAF_CAN_RejectType |
enumerator to choose the type of exclusion filter
void AGHAF_CAN_asyncSendFrame | ( | AGHAF_CAN_Bus | bus, |
AGHAF_CAN_Frame | frame, | ||
uint32_t * | id | ||
) |
AGHAF_CAN_asyncSendFrame.
bus | handle on the CAN bus |
frame | handle on the frame |
id | id used to recognize the frame in the callback |
void AGHAF_CAN_asyncSendFrame_deregisterCallback | ( | AGHAF_CAN_Bus | bus, |
AGHAF_CAN_asyncSendFrame_Callback | callback | ||
) |
AGHAF_CAN_asyncSendFrame_deregisterCallback.
bus | handle on the bus |
callback | function pointer to remove |
void AGHAF_CAN_asyncSendFrame_registerCallback | ( | AGHAF_CAN_Bus | bus, |
AGHAF_CAN_asyncSendFrame_Callback | callback, | ||
void * | userContext | ||
) |
AGHAF_CAN_asyncSendFrame_registerCallback.
bus | handle on the bus |
callback | function pointer to call when a frame has been sent |
userContext |
AGHAF_Status AGHAF_CAN_Bus_activate | ( | AGHAF_CAN_Bus | bus | ) |
activate a CAN bus
bus | handle on the bus |
AGHAF_Status AGHAF_CAN_Bus_addFilter | ( | AGHAF_CAN_Bus | bus, |
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
bus | handle on the bus |
idType | standard or extended CAN |
type | type from the filter |
mode | mode from the filter |
id1 | |
id2 |
AGHAF_Status AGHAF_CAN_Bus_BusOn | ( | AGHAF_CAN_Bus | bus | ) |
reactivate the bus after an error
bus | handle on the bus |
AGHAF_Status AGHAF_CAN_Bus_clearFilters | ( | AGHAF_CAN_Bus | bus | ) |
clear the filters from a bus
bus | handle on the bus |
AGHAF_Status AGHAF_CAN_Bus_deactivate | ( | AGHAF_CAN_Bus | bus | ) |
deactivate a CAN bus
bus | handle on the bus |
AGHAF_Status AGHAF_CAN_Bus_filtersCount | ( | AGHAF_CAN_Bus | bus, |
AGHAF_CAN_FilterId | idType, | ||
uint16_t * | count | ||
) |
Provide the current number of filters.
bus | handle on the bus |
idType | standard or extended CAN |
count | pointer to fill with the data |
void AGHAF_CAN_Bus_freeSupportedFilters | ( | AGHAF_CAN_FilterDesc * | values | ) |
Free the memory allocated with AGHAF_CAN_Bus_supportedFilters.
values | array to free |
void AGHAF_CAN_Bus_freeSupportedModes | ( | AGHAF_CAN_Mode * | modes | ) |
Free the memory allocated with AGHAF_CAN_Bus_supportedModes.
modes | array to free |
void AGHAF_CAN_Bus_freeSupportedTerminations | ( | uint32_t * | terminations | ) |
Free the memory allocated with AGHAF_CAN_Bus_supportedTerminations or AGHAF_CAN_Bus_supportedTerminationsLs.
terminations | array to free |
AGHAF_Status AGHAF_CAN_Bus_getParam | ( | AGHAF_CAN_Bus | bus, |
AGHAF_CAN_Param | param, | ||
uint32_t * | value | ||
) |
Provide the value from a CAN parameter.
bus | handle on the CAN bus |
param | parameter to request |
value | pointer to fill with the content |
uint8_t AGHAF_CAN_Bus_getPeriodicCount | ( | AGHAF_CAN_Bus | bus | ) |
Return the number of periodic message available on a CAN bus.
bus | handle on the bus |
AGHAF_Status AGHAF_CAN_Bus_isActivated | ( | AGHAF_CAN_Bus | bus, |
AGHAF_BOOL * | isActivated | ||
) |
Request if a CAN bus is yet activated or not.
bus | handle on the bus |
isActivated | pointer to fill with the information |
AGHAF_Status AGHAF_CAN_Bus_reject | ( | AGHAF_CAN_Bus | bus, |
AGHAF_CAN_RejectType | rejectType, | ||
AGHAF_BOOL | rtr | ||
) |
Set a global filter.
bus | handle on the bus |
rejectType | type of reject desired |
rtr |
AGHAF_Status AGHAF_CAN_Bus_sendPeriodic | ( | AGHAF_CAN_Bus | bus, |
AGHAF_CAN_Frame | frame, | ||
uint8_t | index, | ||
uint8_t | flags, | ||
uint32_t | period | ||
) |
Add a periodic message to send.
bus | handle on the bus |
frame | Frame to send periodically |
index | index in which to save the frame |
flags | AGHAF_CAN_PERIODIC_FLAGS |
period | period at which sending the frame (ms) |
AGHAF_Status AGHAF_CAN_Bus_setParam | ( | AGHAF_CAN_Bus | bus, |
AGHAF_CAN_Param | param, | ||
uint32_t | value | ||
) |
Set the value from a CAN parameter.
bus | handle on the CAN bus |
param | parameter to set |
value | value to set |
AGHAF_Status AGHAF_CAN_Bus_state | ( | AGHAF_CAN_Bus | bus, |
AGHAF_CAN_BusState * | canBusState | ||
) |
AGHAF_CAN_Bus_state.
bus | |
canBusState | UNKNOWN if can chip is not started, can chip state otherwise |
AGHAF_Status AGHAF_CAN_Bus_supportedFilters | ( | AGHAF_CAN_Bus | bus, |
uint16_t * | globalFilterCaps, | ||
AGHAF_CAN_FilterDesc ** | values, | ||
uint16_t * | size | ||
) |
Provide the supported filters from a CAN bus.
bus | handle on the bus |
globalFilterCaps | pointer to fill with global cappabilites informations |
values | pointer to fill with the datas |
size | size from values arrays |
AGHAF_Status AGHAF_CAN_Bus_supportedModes | ( | AGHAF_CAN_Bus | bus, |
AGHAF_CAN_Mode ** | modes, | ||
uint8_t * | nbModes | ||
) |
Request the supported modes from the CAN bus in parameter.
bus | handle on the bus |
modes | pointer on the datas |
nbModes | size from the modes array |
AGHAF_Status AGHAF_CAN_Bus_supportedTerminations | ( | AGHAF_CAN_Bus | bus, |
uint32_t ** | terminations, | ||
uint32_t * | nbTerminations | ||
) |
Request the supported terminations from a CAN bus.
bus | handle on the bus |
terminations | pointer on the datas |
nbTerminations | size from the modes array |
AGHAF_Status AGHAF_CAN_Bus_supportedTerminationsLs | ( | AGHAF_CAN_Bus | bus, |
uint32_t ** | terminations, | ||
uint32_t * | nbTerminations | ||
) |
Request the supported low speed terminations from a CAN bus.
bus | handle on the bus |
terminations | pointer on the datas |
nbTerminations | size from the modes array |
void AGHAF_CAN_deregisterCallback | ( | AGHAF_CAN_Bus | bus, |
AGHAF_CAN_Callback | callback | ||
) |
deregister a callback
bus | handle on the bus |
callback | function pointer to remove |
uint32_t AGHAF_CAN_Event_busError | ( | AGHAF_CAN_Event_busInfo | busState | ) |
return the value from the error
busState |
uint32_t AGHAF_CAN_Event_busLoad | ( | AGHAF_CAN_Event_busInfo | busState | ) |
return the bus load
busState |
uint32_t AGHAF_CAN_Event_chipState | ( | AGHAF_CAN_Event_busInfo | busState | ) |
return the chipstate
busState |
AGHAF_CAN_Frame AGHAF_CAN_Event_frame | ( | AGHAF_CAN_Event | event | ) |
return the frame contained in an event
event | handle on an event |
AGHAF_BOOL AGHAF_CAN_Frame_brs | ( | AGHAF_CAN_Frame | frame | ) |
AGHAF_CAN_Frame_brs.
frame | handle on the frame |
AGHAF_Status AGHAF_CAN_Frame_data | ( | AGHAF_CAN_Frame | frame, |
void * | data, | ||
int64_t | size | ||
) |
Provide the data contained in a frame.
frame | handle on the frame |
data | array to fill |
size | size that has been filled |
int64_t AGHAF_CAN_Frame_dataSize | ( | AGHAF_CAN_Frame | frame | ) |
return the size from the data
frame | handle on the frame |
void AGHAF_CAN_Frame_delete | ( | AGHAF_CAN_Frame | frame | ) |
Free the memory from a CAN frame.
frame | handle to free |
AGHAF_BOOL AGHAF_CAN_Frame_esi | ( | AGHAF_CAN_Frame | frame | ) |
AGHAF_CAN_Frame_esi.
frame | handle on the frame |
AGHAF_BOOL AGHAF_CAN_Frame_fdf | ( | AGHAF_CAN_Frame | frame | ) |
AGHAF_CAN_Frame_fdf.
frame | handle on the frame |
AGHAF_CAN_FrameType AGHAF_CAN_Frame_frameType | ( | AGHAF_CAN_Frame | frame | ) |
Get the type from the frame.
frame | handle on the frame |
AGHAF_Status AGHAF_CAN_Frame_id | ( | AGHAF_CAN_Frame | frame, |
AGHAF_CAN_Identifier * | identifier | ||
) |
Get the identifier from a CAN frame.
frame | handle on the frame |
identifier |
AGHAF_CAN_Frame AGHAF_CAN_Frame_new | ( | void | ) |
Return a handle on a CAN frame.
AGHAF_Status AGHAF_CAN_Frame_setData | ( | AGHAF_CAN_Frame | frame, |
const void * | data, | ||
int64_t | size | ||
) |
Set the data from a frame.
frame | handle on the frame |
data | data to set |
size | size from data array |
AGHAF_Status AGHAF_CAN_Frame_setFDF | ( | AGHAF_CAN_Frame | frame, |
AGHAF_BOOL | fdf, | ||
AGHAF_BOOL | esi, | ||
AGHAF_BOOL | brs | ||
) |
AGHAF_CAN_Frame_setFDF.
frame | handle on the frame |
fdf | activate the FD for the frame (allow to send more than 8 bytes) |
esi | error state indicator |
brs | if true then the field data is sent to the FD baudrate |
AGHAF_Status AGHAF_CAN_Frame_setFrameType | ( | AGHAF_CAN_Frame | frame, |
AGHAF_CAN_FrameType | type | ||
) |
Set the type from the frame.
frame | handle on the frame |
type | data or remote (a remote frame is completed by another device on the CAN bus) |
AGHAF_Status AGHAF_CAN_Frame_setId | ( | AGHAF_CAN_Frame | frame, |
AGHAF_CAN_Identifier * | identifier | ||
) |
Set the identifier from a CAN frame.
frame | handle on the frame |
identifier |
AGHAF_CAN_Bus AGHAF_CAN_getBus | ( | AGHAF_Device | device, |
uint8_t | index | ||
) |
return the CAN bus at index in parameter
device | device handle from the desired CAN bus |
index | index from the bus |
uint8_t AGHAF_CAN_getBusCount | ( | AGHAF_Device | device | ) |
return the number of CAN bus from a device
device | handle from the device |
uint8_t AGHAF_CAN_getBusIndex | ( | AGHAF_CAN_Bus | bus | ) |
return the index from a CAN bus
bus | handle from the CAN bus |
uint8_t AGHAF_CAN_getEventBusIndex | ( | AGHAF_CAN_Event | event | ) |
return the index from the bus on which occured the event
event | handle on an event |
AGHAF_CAN_Event_busInfo AGHAF_CAN_getEventBusInfo | ( | AGHAF_CAN_Event | event | ) |
return the bus informations from an event
event | handle on an event |
void AGHAF_CAN_registerCallback | ( | AGHAF_CAN_Bus | bus, |
AGHAF_CAN_Callback | callback, | ||
void * | userContext | ||
) |
Register a callback for the CAN events from a bus.
bus | handle on the bus |
callback | function pointer to call on an event |
userContext |
AGHAF_Status AGHAF_CAN_sendFrame | ( | AGHAF_CAN_Bus | bus, |
AGHAF_CAN_Frame | frame | ||
) |
send a frame on a CAN bus
bus | handle on the CAN bus |
frame | handle on the frame |
AGHAF_Status AGHAF_CAN_sendMessage | ( | AGHAF_CAN_Bus | bus, |
uint32_t | ident, | ||
uint8_t | flags, | ||
uint16_t | dataLen, | ||
uint8_t const * | data | ||
) |
send data on a CAN bus
bus | handle on the CAN bus |
ident | CAN identifier |
flags | flags starting with AGHAF_CAN_MSG_ |
dataLen | length of data |
data | data to send |
AGHAF_CAN_EventType AGHAF_CAN_typeEvent | ( | AGHAF_EventInfo | event | ) |
return the type from the event
event |