AGHAF  4.5.4
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 <ghap/aghaf_can_enums.h>
11 
12 #include "aghaf_global.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
20 
22 typedef enum {
26 
28 typedef enum {
31  1
34 
36 typedef enum {
42 
44 typedef enum {
50  4,
53 
55 typedef enum {
58  1,
60  2,
63 
65 typedef enum {
69 
71 typedef enum {
75 
77 typedef enum {
79  0,
81  1,
83  2,
87 
89 typedef void *AGHAF_CAN_Bus;
90 
92 typedef void *AGHAF_CAN_Frame;
93 
95 typedef void *AGHAF_CAN_Event;
96 
98 typedef void const *AGHAF_CAN_Event_busInfo;
99 
109 typedef void (*AGHAF_CAN_Callback)(AGHAF_CAN_Event event, void *userContext);
110 
111 /* Structures */
112 #pragma pack(push, 1)
113 
115 typedef struct AGHAF_CAN_Identifier {
117  union {
118  uint16_t std : 11;
119  uint32_t xtd : 29;
120  } id;
122 
123 #pragma pack(pop)
124 
126 typedef struct AGHAF_CAN_FilterDesc {
127  uint16_t caps;
128  uint16_t count;
130 
131 /* Accessing bus */
132 AGHAF_PUBLIC_FUNCTION(AGHAF_CAN_Bus, AGHAF_CAN_getBus,
133  (AGHAF_Device device, uint8_t index));
134 AGHAF_PUBLIC_FUNCTION(uint8_t, AGHAF_CAN_getBusIndex, (AGHAF_CAN_Bus bus));
135 AGHAF_PUBLIC_FUNCTION(uint8_t, AGHAF_CAN_getBusCount, (AGHAF_Device device));
136 
137 /* Event handling */
138 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_registerCallback,
139  (AGHAF_CAN_Bus bus, AGHAF_CAN_Callback callback,
140  void *userContext));
141 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_deregisterCallback,
142  (AGHAF_CAN_Bus bus, AGHAF_CAN_Callback callback));
143 
144 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_getParam,
145  (AGHAF_CAN_Bus bus, AGHAF_CAN_Param param,
146  uint32_t *value));
147 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_setParam,
148  (AGHAF_CAN_Bus bus, AGHAF_CAN_Param param,
149  uint32_t value));
150 
151 /* Functions for bus configuration */
152 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_supportedModes,
153  (AGHAF_CAN_Bus bus, AGHAF_CAN_Mode **modes,
154  uint8_t *nbModes));
155 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_Bus_freeSupportedModes,
156  (AGHAF_CAN_Mode * modes));
157 
158 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_state,
159  (AGHAF_CAN_Bus bus, AGHAF_CAN_BusState *canBusState));
160 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_BusOn, (AGHAF_CAN_Bus bus));
161 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_activate,
162  (AGHAF_CAN_Bus bus));
163 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_deactivate,
164  (AGHAF_CAN_Bus bus));
165 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_isActivated,
166  (AGHAF_CAN_Bus bus, AGHAF_BOOL *isActivated));
167 
169  (AGHAF_CAN_Bus bus, uint32_t **terminations,
170  uint32_t *nbTerminations));
172  (AGHAF_CAN_Bus bus, uint32_t **terminations,
173  uint32_t *nbTerminations));
174 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_Bus_freeSupportedTerminations,
175  (uint32_t *terminations));
176 
177 /* Functions for perdiodic frames */
178 AGHAF_PUBLIC_FUNCTION(uint8_t, AGHAF_CAN_Bus_getPeriodicCount,
179  (AGHAF_CAN_Bus bus));
180 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_sendPeriodic,
181  (AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame, uint8_t index,
182  uint8_t flags, uint32_t period));
183 
184 /* Functions for filters */
185 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_addFilter,
186  (AGHAF_CAN_Bus bus, AGHAF_CAN_FilterId idType,
188  uint32_t id1, uint32_t id2));
189 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_clearFilters,
190  (AGHAF_CAN_Bus bus));
191 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_filtersCount,
192  (AGHAF_CAN_Bus bus, AGHAF_CAN_FilterId idType,
193  uint16_t *count));
194 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_supportedFilters,
195  (AGHAF_CAN_Bus bus, uint16_t *globalFilterCaps,
196  AGHAF_CAN_FilterDesc **values, uint16_t *size));
197 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_Bus_freeSupportedFilters,
198  (AGHAF_CAN_FilterDesc * values));
199 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Bus_reject,
200  (AGHAF_CAN_Bus bus, AGHAF_CAN_RejectType rejectType,
201  AGHAF_BOOL rtr));
202 
203 /* Functions for CAN frames */
204 AGHAF_PUBLIC_FUNCTION(AGHAF_CAN_Frame, AGHAF_CAN_Frame_new, (void));
205 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_Frame_delete, (AGHAF_CAN_Frame frame));
206 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Frame_setId,
207  (AGHAF_CAN_Frame frame,
208  AGHAF_CAN_Identifier *identifier));
209 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Frame_id,
210  (AGHAF_CAN_Frame frame,
211  AGHAF_CAN_Identifier *identifier));
212 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Frame_setFrameType,
213  (AGHAF_CAN_Frame frame, AGHAF_CAN_FrameType type));
214 AGHAF_PUBLIC_FUNCTION(AGHAF_CAN_FrameType, AGHAF_CAN_Frame_frameType,
215  (AGHAF_CAN_Frame frame));
216 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Frame_setFDF,
217  (AGHAF_CAN_Frame frame, AGHAF_BOOL fdf, AGHAF_BOOL esi,
218  AGHAF_BOOL brs));
219 AGHAF_PUBLIC_FUNCTION(AGHAF_BOOL, AGHAF_CAN_Frame_fdf, (AGHAF_CAN_Frame frame));
220 AGHAF_PUBLIC_FUNCTION(AGHAF_BOOL, AGHAF_CAN_Frame_esi, (AGHAF_CAN_Frame frame));
221 AGHAF_PUBLIC_FUNCTION(AGHAF_BOOL, AGHAF_CAN_Frame_brs, (AGHAF_CAN_Frame frame));
222 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Frame_setData,
223  (AGHAF_CAN_Frame frame, const void *data, int64_t size));
224 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_Frame_data,
225  (AGHAF_CAN_Frame frame, void *data, int64_t size));
226 AGHAF_PUBLIC_FUNCTION(int64_t, AGHAF_CAN_Frame_dataSize,
227  (AGHAF_CAN_Frame frame));
228 
229 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_sendFrame,
230  (AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame));
231 AGHAF_PUBLIC_FUNCTION(AGHAF_Status, AGHAF_CAN_sendMessage,
232  (AGHAF_CAN_Bus bus, uint32_t ident, uint8_t flags,
233  uint16_t dataLen, uint8_t const *data));
234 
235 /* Event functions */
236 AGHAF_PUBLIC_FUNCTION(AGHAF_CAN_Frame, AGHAF_CAN_Event_frame,
237  (AGHAF_CAN_Event event));
238 AGHAF_PUBLIC_FUNCTION(AGHAF_CAN_EventType, AGHAF_CAN_typeEvent,
239  (AGHAF_EventInfo event));
241  (AGHAF_CAN_Event event));
242 AGHAF_PUBLIC_FUNCTION(uint8_t, AGHAF_CAN_getEventBusIndex,
243  (AGHAF_CAN_Event event));
244 AGHAF_PUBLIC_FUNCTION(uint32_t, AGHAF_CAN_Event_chipState,
245  (AGHAF_CAN_Event_busInfo busState));
246 AGHAF_PUBLIC_FUNCTION(uint32_t, AGHAF_CAN_Event_busLoad,
247  (AGHAF_CAN_Event_busInfo busState));
248 AGHAF_PUBLIC_FUNCTION(uint32_t, AGHAF_CAN_Event_busError,
249  (AGHAF_CAN_Event_busInfo busState));
250 
251 /* asynchronous API */
261  uint32_t id,
262  void *userContext);
263 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_asyncSendFrame_registerCallback,
264  (AGHAF_CAN_Bus bus,
266  void *userContext));
267 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_asyncSendFrame_deregisterCallback,
268  (AGHAF_CAN_Bus bus,
270 AGHAF_PUBLIC_FUNCTION(void, AGHAF_CAN_asyncSendFrame,
271  (AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame, uint32_t *id));
272 
274 
275 #ifdef __cplusplus
276 }
277 #endif
278 
279 #endif
@ AGHAF_CAN_FILTER_MODE_ACCEPT
Accept mode for a can filter.
Definition: aghaf_can.h:72
@ AGHAF_CAN_FILTER_MODE_REJECT
Reject mode for a can filter.
Definition: aghaf_can.h:73
@ AGHAF_CAN_REJECT_NONE
Accept all the frames.
Definition: aghaf_can.h:61
@ AGHAF_CAN_REJECT_ALL
Reject all non matching frames.
Definition: aghaf_can.h:56
@ AGHAF_CAN_REJECT_STD
Reject all non matching frames with a standard can Id.
Definition: aghaf_can.h:57
@ AGHAF_CAN_REJECT_EXT
Reject all non matching frames with an extended can Id.
Definition: aghaf_can.h:59
@ AGHAF_CAN_FILTER_ID_XTD
filter for frames with an extended can Id
Definition: aghaf_can.h:67
@ AGHAF_CAN_FILTER_ID_STD
Filter for frames with standard can Id.
Definition: aghaf_can.h:66
@ 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:51
@ 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
Definition: aghaf_can.h:30
@ AGHAF_CAN_DataFrame
standard frame of data
Definition: aghaf_can.h:29
@ AGHAF_CAN_FILTER_TYPE_CLASSIC
id1 is the identifier and id2 is the mask
Definition: aghaf_can.h:78
@ AGHAF_CAN_FILTER_TYPE_DUAL
id1 is an identifier and id2 is an identifier too
Definition: aghaf_can.h:82
@ AGHAF_CAN_FILTER_TYPE_SINGLE
id1 is the identifier you want to filter. id2 is not used.
Definition: aghaf_can.h:80
@ AGHAF_CAN_FILTER_TYPE_RANGE
Definition: aghaf_can.h:84
AGHAF_CAN_Param
List of parameters used to configure a CAN bus.
Definition: aghaf_can_enums.h:75
AGHAF_CAN_Mode
Possible modes for CAN.
Definition: aghaf_can_enums.h:57
AGHAF_CAN_FilterMode
enumerator to choose the type of the filter: accept or reject
Definition: aghaf_can.h:71
AGHAF_CAN_Frame AGHAF_CAN_Frame_new(void)
Return a handle on a CAN frame.
Definition: aghaf_can.cpp:355
AGHAF_BOOL AGHAF_CAN_Frame_esi(AGHAF_CAN_Frame frame)
AGHAF_CAN_Frame_esi.
Definition: aghaf_can.cpp:446
AGHAF_Status AGHAF_CAN_Bus_deactivate(AGHAF_CAN_Bus bus)
deactivate a CAN bus
Definition: aghaf_can.cpp:175
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:186
void AGHAF_CAN_deregisterCallback(AGHAF_CAN_Bus bus, AGHAF_CAN_Callback callback)
deregister a callback
Definition: aghaf_can.cpp:57
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:343
void * AGHAF_CAN_Bus
handle to a CAN bus
Definition: aghaf_can.h:89
AGHAF_CAN_RejectType
enumerator to choose the type of exclusion filter
Definition: aghaf_can.h:55
AGHAF_CAN_FrameType AGHAF_CAN_Frame_frameType(AGHAF_CAN_Frame frame)
Get the type from the frame.
Definition: aghaf_can.cpp:411
AGHAF_CAN_Bus AGHAF_CAN_getBus(AGHAF_Device device, uint8_t index)
return the CAN bus at index in parameter
Definition: aghaf_can.cpp:15
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:275
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:486
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:220
AGHAF_Status AGHAF_CAN_Bus_state(AGHAF_CAN_Bus bus, AGHAF_CAN_BusState *canBusState)
AGHAF_CAN_Bus_state.
Definition: aghaf_can.cpp:144
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:25
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:232
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:320
AGHAF_CAN_FilterId
enumerator to choose the identifier type for can filter
Definition: aghaf_can.h:65
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:256
void AGHAF_CAN_asyncSendFrame(AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame, uint32_t *id)
AGHAF_CAN_asyncSendFrame.
Definition: aghaf_can.cpp:543
AGHAF_CAN_Frame AGHAF_CAN_Event_frame(AGHAF_CAN_Event event)
return the frame contained in an event
Definition: aghaf_can.cpp:554
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:46
AGHAF_BOOL AGHAF_CAN_Frame_fdf(AGHAF_CAN_Frame frame)
AGHAF_CAN_Frame_fdf.
Definition: aghaf_can.cpp:436
AGHAF_Status AGHAF_CAN_sendFrame(AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame)
send a frame on a CAN bus
Definition: aghaf_can.cpp:515
void const * AGHAF_CAN_Event_busInfo
Handle to a CAN event bus info.
Definition: aghaf_can.h:98
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:372
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:469
uint8_t AGHAF_CAN_getBusCount(AGHAF_Device device)
return the number of CAN bus from a device
Definition: aghaf_can.cpp:35
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:241
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:385
AGHAF_Status AGHAF_CAN_Bus_BusOn(AGHAF_CAN_Bus bus)
reactivate the bus after an error
Definition: aghaf_can.cpp:155
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:529
AGHAF_Status AGHAF_CAN_Bus_clearFilters(AGHAF_CAN_Bus bus)
clear the filters from a bus
Definition: aghaf_can.cpp:290
void(* AGHAF_CAN_Callback)(AGHAF_CAN_Event event, void *userContext)
Callback function type to recieve CAN events.
Definition: aghaf_can.h:109
uint8_t AGHAF_CAN_getEventBusIndex(AGHAF_CAN_Event event)
return the index from the bus on which occured the event
Definition: aghaf_can.cpp:583
void AGHAF_CAN_Bus_freeSupportedModes(AGHAF_CAN_Mode *modes)
Free the memory allocated with AGHAF_CAN_Bus_supportedModes.
Definition: aghaf_can.cpp:133
void AGHAF_CAN_Frame_delete(AGHAF_CAN_Frame frame)
Free the memory from a CAN frame.
Definition: aghaf_can.cpp:361
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:603
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:122
AGHAF_Status AGHAF_CAN_Frame_setFrameType(AGHAF_CAN_Frame frame, AGHAF_CAN_FrameType type)
Set the type from the frame.
Definition: aghaf_can.cpp:399
AGHAF_CAN_FrameType
type of frame
Definition: aghaf_can.h:28
int64_t AGHAF_CAN_Frame_dataSize(AGHAF_CAN_Frame frame)
return the size from the data
Definition: aghaf_can.cpp:504
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:204
AGHAF_CAN_Event_busInfo AGHAF_CAN_getEventBusInfo(AGHAF_CAN_Event event)
return the bus informations from an event
Definition: aghaf_can.cpp:573
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:302
void AGHAF_CAN_asyncSendFrame_deregisterCallback(AGHAF_CAN_Bus bus, AGHAF_CAN_asyncSendFrame_Callback callback)
AGHAF_CAN_asyncSendFrame_deregisterCallback.
Definition: aghaf_can.cpp:81
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:94
uint32_t AGHAF_CAN_Event_chipState(AGHAF_CAN_Event_busInfo busState)
return the chipstate
Definition: aghaf_can.cpp:593
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:424
void * AGHAF_CAN_Event
Handle to a CAN event.
Definition: aghaf_can.h:95
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:107
uint32_t AGHAF_CAN_Event_busError(AGHAF_CAN_Event_busInfo busState)
return the value from the error
Definition: aghaf_can.cpp:613
AGHAF_CAN_FILTER_Type
type of the filter
Definition: aghaf_can.h:77
AGHAF_CAN_EventType AGHAF_CAN_typeEvent(AGHAF_EventInfo event)
return the type from the event
Definition: aghaf_can.cpp:564
void(* AGHAF_CAN_asyncSendFrame_Callback)(AGHAF_Status status, uint32_t id, void *userContext)
Callback function type to recieve CAN events.
Definition: aghaf_can.h:260
AGHAF_BOOL AGHAF_CAN_Frame_brs(AGHAF_CAN_Frame frame)
AGHAF_CAN_Frame_brs.
Definition: aghaf_can.cpp:457
void AGHAF_CAN_Bus_freeSupportedFilters(AGHAF_CAN_FilterDesc *values)
Free the memory allocated with AGHAF_CAN_Bus_supportedFilters.
Definition: aghaf_can.cpp:332
void AGHAF_CAN_asyncSendFrame_registerCallback(AGHAF_CAN_Bus bus, AGHAF_CAN_asyncSendFrame_Callback callback, void *userContext)
AGHAF_CAN_asyncSendFrame_registerCallback.
Definition: aghaf_can.cpp:69
AGHAF_Status AGHAF_CAN_Bus_activate(AGHAF_CAN_Bus bus)
activate a CAN bus
Definition: aghaf_can.cpp:165
void * AGHAF_CAN_Frame
Handle to a CAN frame.
Definition: aghaf_can.h:92
@ 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:120
AGHAF_BOOL
enumerator to get a bool definition
Definition: aghaf_global.h:114
void * AGHAF_Device
handle on an exxotest device
Definition: aghaf_global.h:175
structure to tell the filter capabilities from an exxotest device
Definition: aghaf_can.h:126
uint16_t count
number of filters supported
Definition: aghaf_can.h:128
structure to represent an indentifier CAN in the AGHAF library
Definition: aghaf_can.h:115
union AGHAF_CAN_Identifier::@0 id
Identifier.
uint16_t std
Standard identifier.
Definition: aghaf_can.h:118
AGHAF_CAN_IdentifierType type
Identifier type.
Definition: aghaf_can.h:116
uint32_t xtd
Extended identifier.
Definition: aghaf_can.h:119
generic stucture to read an event in a callback
Definition: aghaf_global.h:229