AGHAF  4.5.1
Annecy electronique Generic Hardware Access Framework
aghaf_can.h
Go to the documentation of this file.
1 // Copyright (c) 2019 by ANNECY ELECTRONIQUE, Chavanod, France
2 
6 
7 #ifndef EXXOTEST_AGHAF_CAN_H
8 #define EXXOTEST_AGHAF_CAN_H
9 
10 #include "aghaf_global.h"
11 #include <ghap/aghaf_can_enums.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
19 
21 typedef enum
22 {
26 
28 typedef enum
29 {
33 
35 typedef enum
36 {
42 
44 typedef enum {
52 
54 typedef enum {
60 
62 typedef enum {
66 
68 typedef enum {
72 
74 typedef enum {
80 
82 typedef void * AGHAF_CAN_Bus;
83 
85 typedef void * AGHAF_CAN_Frame;
86 
88 typedef void * AGHAF_CAN_Event;
89 
91 typedef void const* AGHAF_CAN_Event_busInfo;
92 
101 typedef void (*AGHAF_CAN_Callback)(AGHAF_CAN_Event event, void *userContext);
102 
103 /* Structures */
104 #pragma pack(push, 1)
105 
107 typedef struct AGHAF_CAN_Identifier
108 {
110  union {
111  uint16_t std: 11;
112  uint32_t xtd: 29;
113  } id;
115 
116 #pragma pack(pop)
117 
119 typedef struct AGHAF_CAN_FilterDesc
120 {
121  uint16_t caps;
122  uint16_t count;
124 
125 /* Accessing bus */
126 AGHAF_PUBLIC_FUNCTION(AGHAF_CAN_Bus, AGHAF_CAN_getBus, (AGHAF_Device device, uint8_t index));
127 AGHAF_PUBLIC_FUNCTION(uint8_t, AGHAF_CAN_getBusIndex, (AGHAF_CAN_Bus bus));
128 AGHAF_PUBLIC_FUNCTION(uint8_t, AGHAF_CAN_getBusCount, (AGHAF_Device device));
129 
130 /* Event handling */
131 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_registerCallback, (AGHAF_CAN_Bus bus, AGHAF_CAN_Callback callback, void *userContext));
132 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_deregisterCallback, (AGHAF_CAN_Bus bus, AGHAF_CAN_Callback callback));
133 
134 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_getParam, (AGHAF_CAN_Bus bus, AGHAF_CAN_Param param, uint32_t *value));
135 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_setParam, (AGHAF_CAN_Bus bus, AGHAF_CAN_Param param, uint32_t value));
136 
137 /* Functions for bus configuration */
138 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_supportedModes, (AGHAF_CAN_Bus bus, AGHAF_CAN_Mode **modes, uint8_t *nbModes));
139 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_Bus_freeSupportedModes, (AGHAF_CAN_Mode *modes));
140 
141 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_state, (AGHAF_CAN_Bus bus, AGHAF_CAN_BusState* canBusState));
142 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_BusOn, (AGHAF_CAN_Bus bus));
143 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_activate, (AGHAF_CAN_Bus bus));
144 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_deactivate, (AGHAF_CAN_Bus bus));
145 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_isActivated, (AGHAF_CAN_Bus bus, AGHAF_BOOL *isActivated));
146 
147 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_supportedTerminations, (AGHAF_CAN_Bus bus, uint32_t **terminations, uint32_t *nbTerminations));
148 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_supportedTerminationsLs, (AGHAF_CAN_Bus bus, uint32_t **terminations, uint32_t *nbTerminations));
149 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_Bus_freeSupportedTerminations, (uint32_t *terminations));
150 
151 /* Functions for perdiodic frames */
152 AGHAF_PUBLIC_FUNCTION(uint8_t, AGHAF_CAN_Bus_getPeriodicCount, (AGHAF_CAN_Bus bus));
153 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_sendPeriodic, (AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame, uint8_t index, uint8_t flags, uint32_t period));
154 
155 /* Functions for filters */
156 AGHAF_PUBLIC_FUNCTION(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));
157 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_clearFilters, (AGHAF_CAN_Bus bus));
158 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_filtersCount, (AGHAF_CAN_Bus bus, AGHAF_CAN_FilterId idType, uint16_t *count));
159 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_supportedFilters, (AGHAF_CAN_Bus bus, uint16_t *globalFilterCaps, AGHAF_CAN_FilterDesc **values, uint16_t *size));
160 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_Bus_freeSupportedFilters, (AGHAF_CAN_FilterDesc *values));
161 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_reject, (AGHAF_CAN_Bus bus, AGHAF_CAN_RejectType rejectType, AGHAF_BOOL rtr));
162 
163 /* Functions for CAN frames */
164 AGHAF_PUBLIC_FUNCTION(AGHAF_CAN_Frame, AGHAF_CAN_Frame_new, (void));
165 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_Frame_delete, (AGHAF_CAN_Frame frame));
166 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Frame_setId, (AGHAF_CAN_Frame frame, AGHAF_CAN_Identifier *identifier));
167 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Frame_id, (AGHAF_CAN_Frame frame, AGHAF_CAN_Identifier *identifier));
169 AGHAF_PUBLIC_FUNCTION(AGHAF_CAN_FrameType, AGHAF_CAN_Frame_frameType, (AGHAF_CAN_Frame frame) );
170 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Frame_setFDF, (AGHAF_CAN_Frame frame, AGHAF_BOOL fdf, AGHAF_BOOL esi, AGHAF_BOOL brs));
171 AGHAF_PUBLIC_FUNCTION(AGHAF_BOOL, AGHAF_CAN_Frame_fdf, (AGHAF_CAN_Frame frame));
172 AGHAF_PUBLIC_FUNCTION(AGHAF_BOOL, AGHAF_CAN_Frame_esi, (AGHAF_CAN_Frame frame));
173 AGHAF_PUBLIC_FUNCTION(AGHAF_BOOL, AGHAF_CAN_Frame_brs, (AGHAF_CAN_Frame frame));
174 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Frame_setData, (AGHAF_CAN_Frame frame, const void *data, int64_t size));
175 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Frame_data, (AGHAF_CAN_Frame frame, void *data, int64_t size));
176 AGHAF_PUBLIC_FUNCTION(int64_t, AGHAF_CAN_Frame_dataSize, (AGHAF_CAN_Frame frame));
177 
178 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_sendFrame, (AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame));
179 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_sendMessage, (AGHAF_CAN_Bus bus, uint32_t ident, uint8_t flags, uint16_t dataLen, uint8_t const* data));
180 
181 /* Event functions */
182 AGHAF_PUBLIC_FUNCTION(AGHAF_CAN_Frame, AGHAF_CAN_Event_frame, (AGHAF_CAN_Event event));
183 AGHAF_PUBLIC_FUNCTION(AGHAF_CAN_EventType, AGHAF_CAN_typeEvent, (AGHAF_EventInfo event));
184 AGHAF_PUBLIC_FUNCTION(AGHAF_CAN_Event_busInfo, AGHAF_CAN_getEventBusInfo, (AGHAF_CAN_Event event));
185 AGHAF_PUBLIC_FUNCTION(uint8_t, AGHAF_CAN_getEventBusIndex, (AGHAF_CAN_Event event));
186 AGHAF_PUBLIC_FUNCTION(uint32_t, AGHAF_CAN_Event_chipState, (AGHAF_CAN_Event_busInfo busState));
187 AGHAF_PUBLIC_FUNCTION(uint32_t, AGHAF_CAN_Event_busLoad, (AGHAF_CAN_Event_busInfo busState));
188 AGHAF_PUBLIC_FUNCTION(uint32_t, AGHAF_CAN_Event_busError, (AGHAF_CAN_Event_busInfo busState));
189 
190 /* asynchronous API */
199 typedef void (*AGHAF_CAN_asyncSendFrame_Callback)(AGHAF_Status status, uint32_t id, void *userContext);
200 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_asyncSendFrame_registerCallback, (AGHAF_CAN_Bus bus, AGHAF_CAN_asyncSendFrame_Callback callback, void *userContext));
202 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_asyncSendFrame, (AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame, uint32_t *id));
203 
205 
206 #ifdef __cplusplus
207 }
208 #endif
209 
210 #endif
@ AGHAF_CAN_FILTER_MODE_ACCEPT
Accept mode for a can filter.
Definition: aghaf_can.h:69
@ AGHAF_CAN_FILTER_MODE_REJECT
Reject mode for a can filter.
Definition: aghaf_can.h:70
@ AGHAF_CAN_REJECT_NONE
Accept all the frames.
Definition: aghaf_can.h:58
@ AGHAF_CAN_REJECT_ALL
Reject all non matching frames.
Definition: aghaf_can.h:55
@ AGHAF_CAN_REJECT_STD
Reject all non matching frames with a standard can Id.
Definition: aghaf_can.h:56
@ AGHAF_CAN_REJECT_EXT
Reject all non matching frames with an extended can Id.
Definition: aghaf_can.h:57
@ AGHAF_CAN_FILTER_ID_XTD
filter for frames with an extended can Id
Definition: aghaf_can.h:64
@ AGHAF_CAN_FILTER_ID_STD
Filter for frames with standard can Id.
Definition: aghaf_can.h:63
@ AGHAF_CAN_BUS_PASSIVE
Passive error state.
Definition: aghaf_can.h:39
@ AGHAF_CAN_BUS_BUSOFF
Bus off state.
Definition: aghaf_can.h:40
@ AGHAF_CAN_BUS_ACTIVE
active error state
Definition: aghaf_can.h:38
@ AGHAF_CAN_BUS_UNKNOW
Invalide mode.
Definition: aghaf_can.h:37
@ AGHAF_CAN_EVENT_BUSCHANGE
Chip state has chaged active or passive error ou bus off.
Definition: aghaf_can.h:49
@ AGHAF_CAN_EVENT_ERROR
Bus error.
Definition: aghaf_can.h:48
@ AGHAF_CAN_EVENT_MSGRX
Message has been received.
Definition: aghaf_can.h:47
@ AGHAF_CAN_EVENT_BUSLOAD
Bus load information.
Definition: aghaf_can.h:50
@ AGHAF_CAN_EVENT_MSGTX
End of transmission.
Definition: aghaf_can.h:46
@ AGHAF_CAN_EVENT_UNKNOW
Unknown type of event.
Definition: aghaf_can.h:45
@ AGHAF_CAN_RemoteFrame
a remote frame means we send only the id and the data field is completed by another device on the bus
Definition: aghaf_can.h:31
@ AGHAF_CAN_DataFrame
standard frame of data
Definition: aghaf_can.h:30
@ AGHAF_CAN_FILTER_TYPE_CLASSIC
id1 is the identifier and id2 is the mask
Definition: aghaf_can.h:75
@ AGHAF_CAN_FILTER_TYPE_DUAL
id1 is an identifier and id2 is an identifier too
Definition: aghaf_can.h:77
@ AGHAF_CAN_FILTER_TYPE_SINGLE
id1 is the identifier you want to filter. id2 is not used.
Definition: aghaf_can.h:76
@ AGHAF_CAN_FILTER_TYPE_RANGE
allow to filter on a range (id1 is the beginning and id2 is the end)
Definition: aghaf_can.h:78
AGHAF_CAN_Param
List of parameters used to configure a CAN bus.
Definition: aghaf_can_enums.h:62
AGHAF_CAN_Mode
Possible modes for CAN.
Definition: aghaf_can_enums.h:44
AGHAF_CAN_FilterMode
enumerator to choose the type of the filter: accept or reject
Definition: aghaf_can.h:68
AGHAF_CAN_Frame AGHAF_CAN_Frame_new(void)
Return a handle on a CAN frame.
Definition: aghaf_can.cpp:372
AGHAF_BOOL AGHAF_CAN_Frame_esi(AGHAF_CAN_Frame frame)
AGHAF_CAN_Frame_esi.
Definition: aghaf_can.cpp:468
AGHAF_Status AGHAF_CAN_Bus_deactivate(AGHAF_CAN_Bus bus)
deactivate a CAN bus
Definition: aghaf_can.cpp:194
AGHAF_Status AGHAF_CAN_Bus_isActivated(AGHAF_CAN_Bus bus, AGHAF_BOOL *isActivated)
Request if a CAN bus is yet activated or not.
Definition: aghaf_can.cpp:206
void AGHAF_CAN_deregisterCallback(AGHAF_CAN_Bus bus, AGHAF_CAN_Callback callback)
deregister a callback
Definition: aghaf_can.cpp:64
AGHAF_Status AGHAF_CAN_Bus_reject(AGHAF_CAN_Bus bus, AGHAF_CAN_RejectType rejectType, AGHAF_BOOL rtr)
Set a global filter.
Definition: aghaf_can.cpp:361
void * AGHAF_CAN_Bus
handle to a CAN bus
Definition: aghaf_can.h:82
AGHAF_CAN_RejectType
enumerator to choose the type of exclusion filter
Definition: aghaf_can.h:54
AGHAF_CAN_FrameType AGHAF_CAN_Frame_frameType(AGHAF_CAN_Frame frame)
Get the type from the frame.
Definition: aghaf_can.cpp:431
AGHAF_CAN_Bus AGHAF_CAN_getBus(AGHAF_Device device, uint8_t index)
return the CAN bus at index in parameter
Definition: aghaf_can.cpp:16
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
Definition: aghaf_can.cpp:290
AGHAF_Status AGHAF_CAN_Frame_data(AGHAF_CAN_Frame frame, void *data, int64_t size)
Provide the data contained in a frame.
Definition: aghaf_can.cpp:509
AGHAF_CAN_IdentifierType
enumerator to choose the type of CAN identifier
Definition: aghaf_can.h:22
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.
Definition: aghaf_can.cpp:237
AGHAF_Status AGHAF_CAN_Bus_state(AGHAF_CAN_Bus bus, AGHAF_CAN_BusState *canBusState)
AGHAF_CAN_Bus_state.
Definition: aghaf_can.cpp:161
struct AGHAF_CAN_Identifier AGHAF_CAN_Identifier
structure to represent an indentifier CAN in the AGHAF library
uint8_t AGHAF_CAN_getBusIndex(AGHAF_CAN_Bus bus)
return the index from a CAN bus
Definition: aghaf_can.cpp:27
void AGHAF_CAN_Bus_freeSupportedTerminations(uint32_t *terminations)
Free the memory allocated with AGHAF_CAN_Bus_supportedTerminations or AGHAF_CAN_Bus_supportedTerminat...
Definition: aghaf_can.cpp:247
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.
Definition: aghaf_can.cpp:339
AGHAF_CAN_FilterId
enumerator to choose the identifier type for can filter
Definition: aghaf_can.h:62
AGHAF_CAN_BusState
enumerator for the state of the bus
Definition: aghaf_can.h:36
AGHAF_CAN_EventType
enumerator to tell the type of the event
Definition: aghaf_can.h:44
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.
Definition: aghaf_can.cpp:273
void AGHAF_CAN_asyncSendFrame(AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame, uint32_t *id)
AGHAF_CAN_asyncSendFrame.
Definition: aghaf_can.cpp:576
AGHAF_CAN_Frame AGHAF_CAN_Event_frame(AGHAF_CAN_Event event)
return the frame contained in an event
Definition: aghaf_can.cpp:587
void AGHAF_CAN_registerCallback(AGHAF_CAN_Bus bus, AGHAF_CAN_Callback callback, void *userContext)
Register a callback for the CAN events from a bus.
Definition: aghaf_can.cpp:50
AGHAF_BOOL AGHAF_CAN_Frame_fdf(AGHAF_CAN_Frame frame)
AGHAF_CAN_Frame_fdf.
Definition: aghaf_can.cpp:457
AGHAF_Status AGHAF_CAN_sendFrame(AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame)
send a frame on a CAN bus
Definition: aghaf_can.cpp:539
void const * AGHAF_CAN_Event_busInfo
Handle to a CAN event bus info.
Definition: aghaf_can.h:91
AGHAF_Status AGHAF_CAN_Frame_setId(AGHAF_CAN_Frame frame, AGHAF_CAN_Identifier *identifier)
Set the identifier from a CAN frame.
Definition: aghaf_can.cpp:393
AGHAF_Status AGHAF_CAN_Frame_setData(AGHAF_CAN_Frame frame, const void *data, int64_t size)
Set the data from a frame.
Definition: aghaf_can.cpp:492
uint8_t AGHAF_CAN_getBusCount(AGHAF_Device device)
return the number of CAN bus from a device
Definition: aghaf_can.cpp:38
uint8_t AGHAF_CAN_Bus_getPeriodicCount(AGHAF_CAN_Bus bus)
Return the number of periodic message available on a CAN bus.
Definition: aghaf_can.cpp:257
AGHAF_Status AGHAF_CAN_Frame_id(AGHAF_CAN_Frame frame, AGHAF_CAN_Identifier *identifier)
Get the identifier from a CAN frame.
Definition: aghaf_can.cpp:406
AGHAF_Status AGHAF_CAN_Bus_BusOn(AGHAF_CAN_Bus bus)
reactivate the bus after an error
Definition: aghaf_can.cpp:172
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
Definition: aghaf_can.cpp:554
AGHAF_Status AGHAF_CAN_Bus_clearFilters(AGHAF_CAN_Bus bus)
clear the filters from a bus
Definition: aghaf_can.cpp:308
void(* AGHAF_CAN_Callback)(AGHAF_CAN_Event event, void *userContext)
Callback function type to recieve CAN events.
Definition: aghaf_can.h:101
uint8_t AGHAF_CAN_getEventBusIndex(AGHAF_CAN_Event event)
return the index from the bus on which occured the event
Definition: aghaf_can.cpp:619
void AGHAF_CAN_Bus_freeSupportedModes(AGHAF_CAN_Mode *modes)
Free the memory allocated with AGHAF_CAN_Bus_supportedModes.
Definition: aghaf_can.cpp:150
void AGHAF_CAN_Frame_delete(AGHAF_CAN_Frame frame)
Free the memory from a CAN frame.
Definition: aghaf_can.cpp:381
struct AGHAF_CAN_FilterDesc AGHAF_CAN_FilterDesc
structure to tell the filter capabilities from an exxotest device
uint32_t AGHAF_CAN_Event_busLoad(AGHAF_CAN_Event_busInfo busState)
return the bus load
Definition: aghaf_can.cpp:641
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.
Definition: aghaf_can.cpp:140
AGHAF_Status AGHAF_CAN_Frame_setFrameType(AGHAF_CAN_Frame frame, AGHAF_CAN_FrameType type)
Set the type from the frame.
Definition: aghaf_can.cpp:419
AGHAF_CAN_FrameType
type of frame
Definition: aghaf_can.h:29
int64_t AGHAF_CAN_Frame_dataSize(AGHAF_CAN_Frame frame)
return the size from the data
Definition: aghaf_can.cpp:527
AGHAF_Status AGHAF_CAN_Bus_supportedTerminations(AGHAF_CAN_Bus bus, uint32_t **terminations, uint32_t *nbTerminations)
Request the supported terminations from a CAN bus.
Definition: aghaf_can.cpp:223
AGHAF_CAN_Event_busInfo AGHAF_CAN_getEventBusInfo(AGHAF_CAN_Event event)
return the bus informations from an event
Definition: aghaf_can.cpp:608
AGHAF_Status AGHAF_CAN_Bus_filtersCount(AGHAF_CAN_Bus bus, AGHAF_CAN_FilterId idType, uint16_t *count)
Provide the current number of filters.
Definition: aghaf_can.cpp:321
void AGHAF_CAN_asyncSendFrame_deregisterCallback(AGHAF_CAN_Bus bus, AGHAF_CAN_asyncSendFrame_Callback callback)
AGHAF_CAN_asyncSendFrame_deregisterCallback.
Definition: aghaf_can.cpp:92
AGHAF_Status AGHAF_CAN_Bus_getParam(AGHAF_CAN_Bus bus, AGHAF_CAN_Param param, uint32_t *value)
Provide the value from a CAN parameter.
Definition: aghaf_can.cpp:107
uint32_t AGHAF_CAN_Event_chipState(AGHAF_CAN_Event_busInfo busState)
return the chipstate
Definition: aghaf_can.cpp:630
AGHAF_Status AGHAF_CAN_Frame_setFDF(AGHAF_CAN_Frame frame, AGHAF_BOOL fdf, AGHAF_BOOL esi, AGHAF_BOOL brs)
AGHAF_CAN_Frame_setFDF.
Definition: aghaf_can.cpp:445
void * AGHAF_CAN_Event
Handle to a CAN event.
Definition: aghaf_can.h:88
AGHAF_Status AGHAF_CAN_Bus_setParam(AGHAF_CAN_Bus bus, AGHAF_CAN_Param param, uint32_t value)
Set the value from a CAN parameter.
Definition: aghaf_can.cpp:123
uint32_t AGHAF_CAN_Event_busError(AGHAF_CAN_Event_busInfo busState)
return the value from the error
Definition: aghaf_can.cpp:652
AGHAF_CAN_FILTER_Type
type of the filter
Definition: aghaf_can.h:74
AGHAF_CAN_EventType AGHAF_CAN_typeEvent(AGHAF_EventInfo event)
return the type from the event
Definition: aghaf_can.cpp:598
void(* AGHAF_CAN_asyncSendFrame_Callback)(AGHAF_Status status, uint32_t id, void *userContext)
Callback function type to recieve CAN events.
Definition: aghaf_can.h:199
AGHAF_BOOL AGHAF_CAN_Frame_brs(AGHAF_CAN_Frame frame)
AGHAF_CAN_Frame_brs.
Definition: aghaf_can.cpp:479
void AGHAF_CAN_Bus_freeSupportedFilters(AGHAF_CAN_FilterDesc *values)
Free the memory allocated with AGHAF_CAN_Bus_supportedFilters.
Definition: aghaf_can.cpp:349
void AGHAF_CAN_asyncSendFrame_registerCallback(AGHAF_CAN_Bus bus, AGHAF_CAN_asyncSendFrame_Callback callback, void *userContext)
AGHAF_CAN_asyncSendFrame_registerCallback.
Definition: aghaf_can.cpp:78
AGHAF_Status AGHAF_CAN_Bus_activate(AGHAF_CAN_Bus bus)
activate a CAN bus
Definition: aghaf_can.cpp:183
void * AGHAF_CAN_Frame
Handle to a CAN frame.
Definition: aghaf_can.h:85
@ AGHAF_CAN_IdStd
Standard 11 bit identifier.
Definition: aghaf_can.h:23
@ AGHAF_CAN_IdXtd
Extended 29 bit identifier.
Definition: aghaf_can.h:24
AGHAF_Status
enumerator to define the error type in aghaf functions
Definition: aghaf_global.h:109
AGHAF_BOOL
enumerator to get a bool definition
Definition: aghaf_global.h:102
void * AGHAF_Device
handle on an exxotest device
Definition: aghaf_global.h:145
structure to tell the filter capabilities from an exxotest device
Definition: aghaf_can.h:120
uint16_t count
number of filters supported
Definition: aghaf_can.h:122
structure to represent an indentifier CAN in the AGHAF library
Definition: aghaf_can.h:108
union AGHAF_CAN_Identifier::@0 id
Identifier.
uint16_t std
Standard identifier.
Definition: aghaf_can.h:111
AGHAF_CAN_IdentifierType type
Identifier type.
Definition: aghaf_can.h:109
uint32_t xtd
Extended identifier.
Definition: aghaf_can.h:112
generic stucture to read an event in a callback
Definition: aghaf_global.h:201