AGHAF  4.5.1
Annecy electronique Generic Hardware Access Framework
aghaf_dynamic_lib.h
Go to the documentation of this file.
1 // Copyright (c) 2019 by ANNECY ELECTRONIQUE, Chavanod, France
2 
6 
7 #ifndef EXXOTEST_AGHAF_DYNAMIC_LIB_H
8 #define EXXOTEST_AGHAF_DYNAMIC_LIB_H
9 
10 #if !defined( AGHAF_LIBRARY ) && defined( AGHAF_DYNAMIC_LIBRARY ) && defined( AGHAF_DYNAMIC_LIBRARY_INIT )
11 
35 #if defined(AGHAF_OS_WIN)
36 #include <Windows.h>
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 #define AGHAF_DEFAULT_FILENAME L"aghaf.dll"
43 
44 static HMODULE AGHAF_LibraryHandle = NULL;
45 static const wchar_t *AGHAF_LastLoadError = L"";
46 
47 #define AGHAF_LOAD_FUNCTION(name) \
48  if( NULL == (name = (t ## name )GetProcAddress(AGHAF_LibraryHandle, #name) ) ) { \
49  AGHAF_LastLoadError = L"Failed to load " L#name L"()"; \
50  return AGHAF_FALSE; \
51 }
52 
53 #define AGHAF_UNLOAD_FUNCTION( name ) name = NULL;
54 
55 AGHAF_BOOL AGHAF_initializeLibraryFunctions(void)
56 {
57  if (NULL == AGHAF_LibraryHandle )
58  return AGHAF_FALSE;
59 
60  // NOTICE:
61  // The macro AGHAF_LOAD_FUNCTION() loads a function and returns AGHAF_FALSE if it fails.
62 
63  // aghaf_global
64  AGHAF_LOAD_FUNCTION( AGHAF_getVersion );
65  AGHAF_LOAD_FUNCTION( AGHAF_getVersionString );
66  AGHAF_LOAD_FUNCTION( AGHAF_getServiceVersion );
67  AGHAF_LOAD_FUNCTION( AGHAF_isServiceRunning );
68  AGHAF_LOAD_FUNCTION( AGHAF_DeviceEvent_getProductName );
69  AGHAF_LOAD_FUNCTION( AGHAF_DeviceEvent_getProductNumber );
70  AGHAF_LOAD_FUNCTION( AGHAF_DeviceEvent_getSerialNumber );
71  AGHAF_LOAD_FUNCTION( AGHAF_getDeviceCount );
72  AGHAF_LOAD_FUNCTION( AGHAF_getDeviceList );
73  AGHAF_LOAD_FUNCTION( AGHAF_freeDeviceList );
74  AGHAF_LOAD_FUNCTION( AGHAF_refreshDeviceList);
75  AGHAF_LOAD_FUNCTION( AGHAF_getDeviceBySN );
76  AGHAF_LOAD_FUNCTION( AGHAF_getDeviceInfo );
77  AGHAF_LOAD_FUNCTION( AGHAF_Device_getConnectionMode );
78  AGHAF_LOAD_FUNCTION( AGHAF_Device_getFriendlyNameEthCard );
79  AGHAF_LOAD_FUNCTION( AGHAF_Device_freeFriendlyName );
80  AGHAF_LOAD_FUNCTION( AGHAF_Device_getUsbInfo );
81  AGHAF_LOAD_FUNCTION( AGHAF_openDevice );
82  AGHAF_LOAD_FUNCTION( AGHAF_closeDevice );
83  AGHAF_LOAD_FUNCTION( AGHAF_Device_getTimestamp );
84  AGHAF_LOAD_FUNCTION( AGHAF_Event_getInfo );
85  AGHAF_LOAD_FUNCTION( AGHAF_registerCallback );
86  AGHAF_LOAD_FUNCTION( AGHAF_deregisterCallback );
87 
88 #ifdef INTERN_AGHAF
89  AGHAF_LOAD_FUNCTION( AGHAF_DeviceEvent_getHardwareUniqueId );
90  AGHAF_LOAD_FUNCTION( AGHAF_getDeviceByHardID );
91 
92  // ADC
93  AGHAF_LOAD_FUNCTION( AGHAF_ADC_setOnTriggerCallback );
94  AGHAF_LOAD_FUNCTION( AGHAF_ADC_get );
95  AGHAF_LOAD_FUNCTION( AGHAF_ADC_getIndex );
96  AGHAF_LOAD_FUNCTION( AGHAF_ADC_getCount );
97  AGHAF_LOAD_FUNCTION( AGHAF_ADC_activate );
98  AGHAF_LOAD_FUNCTION( AGHAF_ADC_deactivate );
99  AGHAF_LOAD_FUNCTION( AGHAF_ADC_isActivated );
100  AGHAF_LOAD_FUNCTION( AGHAF_ADC_getParam );
101  AGHAF_LOAD_FUNCTION( AGHAF_ADC_setParam );
102  AGHAF_LOAD_FUNCTION( AGHAF_ADC_getTriggerState );
103 
104  // aghaf_dwld
105  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_getModuleCount );
106  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_getModuleList );
107  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_freeModuleList );
108  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_getModuleInfo );
109  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_getModuleByHardwareId );
110  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_setOnNewModuleCallback );
111  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_setOnModuleLeftCallback );
112  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_writeKey );
113  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_eraseOtpArea );
114  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_reset );
115  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_startUpload );
116  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_sendData );
117  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_stopUpload );
118  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_getStatus );
119  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_writeString );
120  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_readString );
121  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_writeMacString );
122  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_readMacString );
123  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_freeString );
124  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_readDeviceAssembly );
125  AGHAF_LOAD_FUNCTION( AGHAF_CTRL_writeDeviceAssembly );
126 
127  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_getChannelByIndex );
128  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Channel_getIndex );
129 
130  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_getChannelByIndex );
131  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_Channel_getIndex );
132 
133  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_getChannelByIndex );
134  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_Channel_getIndex );
135 
136  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoCAN_getByIndex );
137  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoKLine_getByIndex );
138  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoLIN_getByIndex );
139  AGHAF_LOAD_FUNCTION( AGHAF_Session_getIndex );
140 
141  // aghaf_prop
142  AGHAF_LOAD_FUNCTION( AGHAF_PROP_setOnDataCallback );
143  AGHAF_LOAD_FUNCTION( AGHAF_PROP_getBus );
144  AGHAF_LOAD_FUNCTION( AGHAF_PROP_getBusCount );
145  AGHAF_LOAD_FUNCTION( AGHAF_PROP_Bus_activate );
146  AGHAF_LOAD_FUNCTION( AGHAF_PROP_Bus_deactivate );
147  AGHAF_LOAD_FUNCTION( AGHAF_PROP_Bus_isActivated );
148  AGHAF_LOAD_FUNCTION( AGHAF_PROP_sendCommand );
149  AGHAF_LOAD_FUNCTION( AGHAF_PROP_sendAllocCommand );
150  AGHAF_LOAD_FUNCTION( AGHAF_PROP_freeResponse );
151 
152  // Session
153  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoCAN_getCount );
154  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoCAN_getFreeCount );
155  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoCAN_create );
156  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoCAN_channelSetParam );
157  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoCAN_channelGetParam );
158  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoCAN_setOnRxErrorCallback );
159  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoCAN_setOnTxErrorCallback );
160 
161  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoKLine_getCount );
162  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoKLine_getFreeCount );
163  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoKLine_create );
164  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoKLine_channelSetParam );
165  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoKLine_channelGetParam );
166  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoKLine_setOnRxErrorCallback );
167  AGHAF_LOAD_FUNCTION( AGHAF_Session_DoKLine_setOnTxErrorCallback );
168 
169  AGHAF_LOAD_FUNCTION( AGHAF_Session_setOnErrorCallback );
170  AGHAF_LOAD_FUNCTION( AGHAF_Session_setOnFuncRxFinishedCallback );
171  AGHAF_LOAD_FUNCTION( AGHAF_Session_setOnSOMReceivedCallback );
172  AGHAF_LOAD_FUNCTION( AGHAF_Session_setOnFrameReceivedCallback );
173  AGHAF_LOAD_FUNCTION( AGHAF_Session_setOnFrameTransmittedCallback );
174  AGHAF_LOAD_FUNCTION( AGHAF_Session_release );
175  AGHAF_LOAD_FUNCTION( AGHAF_Session_getType );
176  AGHAF_LOAD_FUNCTION( AGHAF_Session_start );
177  AGHAF_LOAD_FUNCTION( AGHAF_Session_stop );
178  AGHAF_LOAD_FUNCTION( AGHAF_Session_setParam );
179  AGHAF_LOAD_FUNCTION( AGHAF_Session_getParam );
180  AGHAF_LOAD_FUNCTION( AGHAF_Session_setParamArray );
181  AGHAF_LOAD_FUNCTION( AGHAF_Session_getParamArray );
182  AGHAF_LOAD_FUNCTION( AGHAF_Session_freeParamArray );
183  AGHAF_LOAD_FUNCTION( AGHAF_Session_assignFunctional );
184  AGHAF_LOAD_FUNCTION( AGHAF_Session_clearFunctional );
185  AGHAF_LOAD_FUNCTION( AGHAF_Session_send );
186 
187  // Serial
188  // AGHAF_LOAD_FUNCTION( AGHAF_Serial_setOnCharTxCallback );
189  // AGHAF_LOAD_FUNCTION( AGHAF_Serial_setOnCharRxCallback );
190  // AGHAF_LOAD_FUNCTION( AGHAF_Serial_setOnErrorCallback );
191  // AGHAF_LOAD_FUNCTION( AGHAF_Serial_get );
192  // AGHAF_LOAD_FUNCTION( AGHAF_Serial_getIndex );
193  // AGHAF_LOAD_FUNCTION( AGHAF_Serial_getCount );
194  // AGHAF_LOAD_FUNCTION( AGHAF_Serial_activate );
195  // AGHAF_LOAD_FUNCTION( AGHAF_Serial_deactivate );
196  // AGHAF_LOAD_FUNCTION( AGHAF_Serial_isActivated );
197  // AGHAF_LOAD_FUNCTION( AGHAF_Serial_getParam );
198  // AGHAF_LOAD_FUNCTION( AGHAF_Serial_setParam );
199  // AGHAF_LOAD_FUNCTION( AGHAF_Serial_sendCharacter );
200 
201  // KLine
202  AGHAF_LOAD_FUNCTION( AGHAF_KLine_setOnMsgTxCallback );
203  AGHAF_LOAD_FUNCTION( AGHAF_KLine_setOnMsgRxCallback );
204  AGHAF_LOAD_FUNCTION( AGHAF_KLine_setOnSomCallback );
205  AGHAF_LOAD_FUNCTION( AGHAF_KLine_setOnTxErrorCallback );
206  AGHAF_LOAD_FUNCTION( AGHAF_KLine_setOnRxErrorCallback );
207  AGHAF_LOAD_FUNCTION( AGHAF_KLine_get );
208  AGHAF_LOAD_FUNCTION( AGHAF_KLine_getIndex );
209  AGHAF_LOAD_FUNCTION( AGHAF_KLine_getCount );
210  AGHAF_LOAD_FUNCTION( AGHAF_KLine_activate );
211  AGHAF_LOAD_FUNCTION( AGHAF_KLine_deactivate );
212  AGHAF_LOAD_FUNCTION( AGHAF_KLine_isActivated );
213  AGHAF_LOAD_FUNCTION( AGHAF_KLine_getParam );
214  AGHAF_LOAD_FUNCTION( AGHAF_KLine_setParam );
215  AGHAF_LOAD_FUNCTION( AGHAF_KLine_sendMessage );
216 
217  // DoKLine
218  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_setOnMsgTxCallback );
219  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_setOnMsgRxCallback );
220  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_setOnMsgTxErrCallback );
221  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_getChannelCount );
222  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_getFreeChannelCount );
223  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_createChannel );
224  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_releaseChannel );
225  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_Channel_setParam );
226  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_Channel_getParam );
227  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_Channel_start );
228  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_Channel_stop );
229  AGHAF_LOAD_FUNCTION( AGHAF_DoKLine_Channel_send );
230 
231  // DoLIN
232  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_setOnMsgTxCallback );
233  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_setOnMsgRxCallback );
234  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_setOnSOMCallback );
235  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_setOnMsgTxErrCallback );
236  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_setOnMsgRxErrCallback );
237  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_getChannelCount );
238  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_getFreeChannelCount );
239  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_createChannel );
240  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_releaseChannel );
241  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_Channel_setParam );
242  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_Channel_getParam );
243  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_Channel_start );
244  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_Channel_stop );
245  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_Channel_send );
246  AGHAF_LOAD_FUNCTION( AGHAF_DoLIN_Channel_activateTrace );
247 #endif
248 
249  // CAN
250  AGHAF_LOAD_FUNCTION( AGHAF_CAN_getBus );
251  AGHAF_LOAD_FUNCTION( AGHAF_CAN_getBusIndex );
252  AGHAF_LOAD_FUNCTION( AGHAF_CAN_getBusCount );
253  AGHAF_LOAD_FUNCTION( AGHAF_CAN_registerCallback );
254  AGHAF_LOAD_FUNCTION( AGHAF_CAN_deregisterCallback );
255  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_getParam );
256  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_setParam );
257  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_supportedTerminations );
258  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_supportedTerminationsLs );
259  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_freeSupportedTerminations );
260  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_getPeriodicCount );
261  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_sendPeriodic );
262  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_supportedModes );
263  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_freeSupportedModes );
264  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_state );
265  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_BusOn );
266  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_activate );
267  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_deactivate );
268  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_isActivated );
269  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_addFilter );
270  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_clearFilters );
271  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_filtersCount );
272  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_supportedFilters );
273  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Bus_reject );
274  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Frame_new );
275  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Frame_delete );
276  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Frame_setId );
277  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Frame_id );
278  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Frame_setFrameType );
279  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Frame_frameType );
280  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Frame_setFDF );
281  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Frame_fdf );
282  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Frame_esi );
283  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Frame_brs );
284  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Frame_setData );
285  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Frame_data );
286  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Frame_dataSize );
287  AGHAF_LOAD_FUNCTION( AGHAF_CAN_sendFrame );
288  AGHAF_LOAD_FUNCTION( AGHAF_CAN_sendMessage );
289  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Event_frame );
290  AGHAF_LOAD_FUNCTION( AGHAF_CAN_typeEvent );
291  AGHAF_LOAD_FUNCTION( AGHAF_CAN_getEventBusInfo );
292  AGHAF_LOAD_FUNCTION( AGHAF_CAN_getEventBusIndex );
293  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Event_chipState );
294  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Event_busLoad );
295  AGHAF_LOAD_FUNCTION( AGHAF_CAN_Event_busError );
296  AGHAF_LOAD_FUNCTION( AGHAF_CAN_asyncSendFrame_registerCallback );
297  AGHAF_LOAD_FUNCTION( AGHAF_CAN_asyncSendFrame_deregisterCallback );
298  AGHAF_LOAD_FUNCTION( AGHAF_CAN_asyncSendFrame );
299 
300  // DoCAN
301  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_getBus);
302  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_getBusCount );
303  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_registerCallback );
304  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_deregisterCallback );
305  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_getChannelCount );
306  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_getFreeChannelCount );
307  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_createChannel );
308  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_releaseChannel );
309  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Channel_setParam );
310  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Channel_getParam );
311  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Channel_start );
312  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Channel_stop );
313  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Channel_send );
314  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Channel_activateTrace );
315  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Event_type );
316  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Event_getBusIndex );
317  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Event_getDataSize );
318  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Event_getData );
319  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Event_getId );
320  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Event_getError );
321  AGHAF_LOAD_FUNCTION( AGHAF_DoCAN_Event_getChannel );
322 
323  // Ethernet
324  AGHAF_LOAD_FUNCTION( AGHAF_ETH_getBus );
325  AGHAF_LOAD_FUNCTION( AGHAF_ETH_getBusIndex );
326  AGHAF_LOAD_FUNCTION( AGHAF_ETH_getBusCount );
327  AGHAF_LOAD_FUNCTION( AGHAF_ETH_activate );
328  AGHAF_LOAD_FUNCTION( AGHAF_ETH_deactivate );
329  AGHAF_LOAD_FUNCTION( AGHAF_ETH_isActivated );
330  AGHAF_LOAD_FUNCTION( AGHAF_ETH_getParam );
331  AGHAF_LOAD_FUNCTION( AGHAF_ETH_setParam );
332  AGHAF_LOAD_FUNCTION( AGHAF_ETH_getFriendlyNameEthCard );
333  AGHAF_LOAD_FUNCTION( AGHAF_ETH_freeFriendlyName );
334  AGHAF_LOAD_FUNCTION( AGHAF_ETH_getMacAddress);
335  AGHAF_LOAD_FUNCTION( AGHAF_ETH_setEthernetDiagLineState );
336 
337  // LIN
338  AGHAF_LOAD_FUNCTION( AGHAF_LIN_setOnMessageTxCallback );
339  AGHAF_LOAD_FUNCTION( AGHAF_LIN_setOnMessageRxCallback );
340  AGHAF_LOAD_FUNCTION( AGHAF_LIN_setOnErrorCallback );
341  AGHAF_LOAD_FUNCTION( AGHAF_LIN_setOnBusStateChangedCallback );
342  AGHAF_LOAD_FUNCTION( AGHAF_LIN_setOnWakeUpSentCallback );
343  AGHAF_LOAD_FUNCTION( AGHAF_LIN_get );
344  AGHAF_LOAD_FUNCTION( AGHAF_LIN_getIndex );
345  AGHAF_LOAD_FUNCTION( AGHAF_LIN_getCount );
346  AGHAF_LOAD_FUNCTION( AGHAF_LIN_activate );
347  AGHAF_LOAD_FUNCTION( AGHAF_LIN_deactivate );
348  AGHAF_LOAD_FUNCTION( AGHAF_LIN_isActivated );
349  AGHAF_LOAD_FUNCTION( AGHAF_LIN_getParam );
350  AGHAF_LOAD_FUNCTION( AGHAF_LIN_setParam );
351  AGHAF_LOAD_FUNCTION( AGHAF_LIN_sendHeader );
352  AGHAF_LOAD_FUNCTION( AGHAF_LIN_updateFrame );
353  AGHAF_LOAD_FUNCTION( AGHAF_LIN_configureFrame );
354  AGHAF_LOAD_FUNCTION( AGHAF_LIN_wakeUp );
355  AGHAF_LOAD_FUNCTION( AGHAF_LIN_SCHEDULE_clearDatas );
356  AGHAF_LOAD_FUNCTION( AGHAF_LIN_SCHEDULE_addUnconditional );
357  AGHAF_LOAD_FUNCTION( AGHAF_LIN_SCHEDULE_addSporadic );
358  AGHAF_LOAD_FUNCTION( AGHAF_LIN_SCHEDULE_addEventTriggered );
359  AGHAF_LOAD_FUNCTION( AGHAF_LIN_SCHEDULE_addWakeUp );
360  AGHAF_LOAD_FUNCTION( AGHAF_LIN_SCHEDULE_configure );
361  AGHAF_LOAD_FUNCTION( AGHAF_LIN_SCHEDULE_start );
362  AGHAF_LOAD_FUNCTION( AGHAF_LIN_SCHEDULE_stop );
363  AGHAF_LOAD_FUNCTION( AGHAF_LIN_SCHEDULE_getCount );
364 
365  return AGHAF_TRUE;
366 }
367 
368 AGHAF_BOOL AGHAF_unloadLibraryFunctions(void)
369 {
370  if (NULL == AGHAF_LibraryHandle)
371  return AGHAF_FALSE;
372 
373  // aghaf_global
374  AGHAF_UNLOAD_FUNCTION( AGHAF_getVersion );
375  AGHAF_UNLOAD_FUNCTION( AGHAF_getVersionString );
376  AGHAF_UNLOAD_FUNCTION( AGHAF_getServiceVersion );
377  AGHAF_UNLOAD_FUNCTION( AGHAF_isServiceRunning );
378  AGHAF_UNLOAD_FUNCTION( AGHAF_DeviceEvent_getProductName );
379  AGHAF_UNLOAD_FUNCTION( AGHAF_DeviceEvent_getProductNumber );
380  AGHAF_UNLOAD_FUNCTION( AGHAF_DeviceEvent_getSerialNumber );
381  AGHAF_UNLOAD_FUNCTION( AGHAF_getDeviceCount );
382  AGHAF_UNLOAD_FUNCTION( AGHAF_getDeviceList );
383  AGHAF_UNLOAD_FUNCTION( AGHAF_freeDeviceList );
384  AGHAF_UNLOAD_FUNCTION( AGHAF_refreshDeviceList);
385  AGHAF_UNLOAD_FUNCTION( AGHAF_getDeviceBySN );
386  AGHAF_UNLOAD_FUNCTION( AGHAF_getDeviceInfo );
387  AGHAF_UNLOAD_FUNCTION( AGHAF_Device_getConnectionMode );
388  AGHAF_UNLOAD_FUNCTION( AGHAF_Device_getFriendlyNameEthCard );
389  AGHAF_UNLOAD_FUNCTION( AGHAF_Device_freeFriendlyName );
390  AGHAF_UNLOAD_FUNCTION( AGHAF_Device_getUsbInfo );
391  AGHAF_UNLOAD_FUNCTION( AGHAF_openDevice );
392  AGHAF_UNLOAD_FUNCTION( AGHAF_closeDevice );
393  AGHAF_UNLOAD_FUNCTION( AGHAF_Device_getTimestamp );
394  AGHAF_UNLOAD_FUNCTION( AGHAF_Event_getInfo );
395  AGHAF_UNLOAD_FUNCTION( AGHAF_registerCallback );
396  AGHAF_UNLOAD_FUNCTION( AGHAF_deregisterCallback );
397 
398 #ifdef INTERN_AGHAF
399  AGHAF_UNLOAD_FUNCTION( AGHAF_DeviceEvent_getHardwareUniqueId );
400  AGHAF_UNLOAD_FUNCTION( AGHAF_getDeviceByHardID );
401 
402  // ADC
403  AGHAF_UNLOAD_FUNCTION( AGHAF_ADC_setOnTriggerCallback );
404  AGHAF_UNLOAD_FUNCTION( AGHAF_ADC_get );
405  AGHAF_UNLOAD_FUNCTION( AGHAF_ADC_getIndex );
406  AGHAF_UNLOAD_FUNCTION( AGHAF_ADC_getCount );
407  AGHAF_UNLOAD_FUNCTION( AGHAF_ADC_activate );
408  AGHAF_UNLOAD_FUNCTION( AGHAF_ADC_deactivate );
409  AGHAF_UNLOAD_FUNCTION( AGHAF_ADC_isActivated );
410  AGHAF_UNLOAD_FUNCTION( AGHAF_ADC_getParam );
411  AGHAF_UNLOAD_FUNCTION( AGHAF_ADC_setParam );
412  AGHAF_UNLOAD_FUNCTION( AGHAF_ADC_getTriggerState );
413 
414  // aghaf_dwld
415  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_getModuleCount );
416  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_getModuleList );
417  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_freeModuleList );
418  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_getModuleInfo );
419  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_getModuleByHardwareId );
420  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_setOnNewModuleCallback );
421  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_setOnModuleLeftCallback );
422  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_writeKey );
423  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_eraseOtpArea );
424  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_reset );
425  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_startUpload );
426  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_sendData );
427  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_stopUpload );
428  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_getStatus );
429  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_writeString );
430  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_readString );
431  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_writeMacString );
432  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_readMacString );
433  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_freeString );
434  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_readDeviceAssembly );
435  AGHAF_UNLOAD_FUNCTION( AGHAF_CTRL_writeDeviceAssembly );
436 
437  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_getChannelByIndex );
438  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Channel_getIndex );
439 
440  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_getChannelByIndex );
441  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_Channel_getIndex );
442 
443  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_getChannelByIndex );
444  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_Channel_getIndex );
445 
446  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoCAN_getByIndex );
447  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoKLine_getByIndex );
448  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoLIN_getByIndex );
449  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_getIndex );
450 
451  // aghaf_prop
452  AGHAF_UNLOAD_FUNCTION( AGHAF_PROP_setOnDataCallback );
453  AGHAF_UNLOAD_FUNCTION( AGHAF_PROP_getBus );
454  AGHAF_UNLOAD_FUNCTION( AGHAF_PROP_getBusCount );
455  AGHAF_UNLOAD_FUNCTION( AGHAF_PROP_Bus_activate );
456  AGHAF_UNLOAD_FUNCTION( AGHAF_PROP_Bus_deactivate );
457  AGHAF_UNLOAD_FUNCTION( AGHAF_PROP_Bus_isActivated );
458  AGHAF_UNLOAD_FUNCTION( AGHAF_PROP_sendCommand );
459  AGHAF_UNLOAD_FUNCTION( AGHAF_PROP_sendAllocCommand );
460  AGHAF_UNLOAD_FUNCTION( AGHAF_PROP_freeResponse );
461 
462  // Session
463  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoCAN_getCount );
464  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoCAN_getFreeCount );
465  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoCAN_create );
466  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoCAN_channelSetParam );
467  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoCAN_channelGetParam );
468  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoCAN_setOnRxErrorCallback );
469  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoCAN_setOnTxErrorCallback );
470 
471  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoKLine_getCount );
472  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoKLine_getFreeCount );
473  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoKLine_create );
474  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoKLine_channelSetParam );
475  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoKLine_channelGetParam );
476  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoKLine_setOnRxErrorCallback );
477  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_DoKLine_setOnTxErrorCallback );
478 
479  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_setOnErrorCallback );
480  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_setOnFuncRxFinishedCallback );
481  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_setOnSOMReceivedCallback );
482  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_setOnFrameReceivedCallback );
483  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_setOnFrameTransmittedCallback );
484  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_release );
485  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_getType );
486  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_start );
487  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_stop );
488  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_setParam );
489  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_getParam );
490  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_setParamArray );
491  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_getParamArray );
492  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_freeParamArray );
493  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_assignFunctional );
494  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_clearFunctional );
495  AGHAF_UNLOAD_FUNCTION( AGHAF_Session_send );
496 
497  // Serial
498  // AGHAF_UNLOAD_FUNCTION( AGHAF_Serial_setOnCharTxCallback );
499  // AGHAF_UNLOAD_FUNCTION( AGHAF_Serial_setOnCharRxCallback );
500  // AGHAF_UNLOAD_FUNCTION( AGHAF_Serial_setOnErrorCallback );
501  // AGHAF_UNLOAD_FUNCTION( AGHAF_Serial_get );
502  // AGHAF_UNLOAD_FUNCTION( AGHAF_Serial_getIndex );
503  // AGHAF_UNLOAD_FUNCTION( AGHAF_Serial_getCount );
504  // AGHAF_UNLOAD_FUNCTION( AGHAF_Serial_activate );
505  // AGHAF_UNLOAD_FUNCTION( AGHAF_Serial_deactivate );
506  // AGHAF_UNLOAD_FUNCTION( AGHAF_Serial_isActivated );
507  // AGHAF_UNLOAD_FUNCTION( AGHAF_Serial_getParam );
508  // AGHAF_UNLOAD_FUNCTION( AGHAF_Serial_setParam );
509  // AGHAF_UNLOAD_FUNCTION( AGHAF_Serial_sendCharacter );
510 
511  // KLine
512  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_setOnMsgTxCallback );
513  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_setOnMsgRxCallback );
514  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_setOnSomCallback );
515  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_setOnTxErrorCallback );
516  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_setOnRxErrorCallback );
517  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_get );
518  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_getIndex );
519  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_getCount );
520  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_activate );
521  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_deactivate );
522  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_isActivated );
523  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_getParam );
524  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_setParam );
525  AGHAF_UNLOAD_FUNCTION( AGHAF_KLine_sendMessage );
526 
527  // DoKLine
528  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_setOnMsgTxCallback );
529  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_setOnMsgRxCallback );
530  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_setOnMsgTxErrCallback );
531  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_getChannelCount );
532  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_getFreeChannelCount );
533  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_createChannel );
534  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_releaseChannel );
535  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_Channel_setParam );
536  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_Channel_getParam );
537  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_Channel_start );
538  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_Channel_stop );
539  AGHAF_UNLOAD_FUNCTION( AGHAF_DoKLine_Channel_send );
540 
541  // DoLIN
542  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_setOnMsgTxCallback );
543  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_setOnMsgRxCallback );
544  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_setOnSOMCallback );
545  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_setOnMsgTxErrCallback );
546  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_setOnMsgRxErrCallback );
547  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_getChannelCount );
548  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_getFreeChannelCount );
549  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_createChannel );
550  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_releaseChannel );
551  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_Channel_setParam );
552  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_Channel_getParam );
553  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_Channel_start );
554  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_Channel_stop );
555  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_Channel_send );
556  AGHAF_UNLOAD_FUNCTION( AGHAF_DoLIN_Channel_activateTrace );
557 #endif
558 
559  // CAN
560  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_getBus );
561  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_getBusIndex );
562  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_getBusCount );
563  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_registerCallback );
564  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_deregisterCallback );
565  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_getParam );
566  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_setParam );
567  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_supportedTerminations );
568  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_supportedTerminationsLs );
569  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_freeSupportedTerminations );
570  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_getPeriodicCount );
571  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_sendPeriodic );
572  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_BusOn );
573  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_state );
574  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_supportedModes );
575  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_freeSupportedModes );
576  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_activate );
577  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_deactivate );
578  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_isActivated );
579  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_addFilter );
580  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_clearFilters );
581  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_filtersCount );
582  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_supportedFilters );
583  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Bus_reject );
584  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Frame_new );
585  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Frame_delete );
586  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Frame_setId );
587  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Frame_id );
588  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Frame_setFrameType );
589  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Frame_frameType );
590  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Frame_setFDF );
591  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Frame_fdf );
592  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Frame_esi );
593  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Frame_brs );
594  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Frame_setData );
595  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Frame_data );
596  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Frame_dataSize );
597  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_sendFrame );
598  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_sendMessage );
599  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Event_frame );
600  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_typeEvent );
601  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_getEventBusInfo );
602  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_getEventBusIndex );
603  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Event_chipState );
604  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Event_busLoad );
605  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_Event_busError );
606  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_asyncSendFrame_registerCallback );
607  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_asyncSendFrame_deregisterCallback );
608  AGHAF_UNLOAD_FUNCTION( AGHAF_CAN_asyncSendFrame );
609 
610  // DoCAN
611  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_getBus);
612  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_getBusCount );
613  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_registerCallback );
614  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_deregisterCallback );
615  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_getChannelCount );
616  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_getFreeChannelCount );
617  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_createChannel );
618  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_releaseChannel );
619  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Channel_setParam );
620  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Channel_getParam );
621  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Channel_start );
622  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Channel_stop );
623  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Channel_send );
624  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Channel_activateTrace );
625  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Event_type );
626  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Event_getBusIndex );
627  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Event_getDataSize );
628  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Event_getData );
629  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Event_getId );
630  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Event_getError );
631  AGHAF_UNLOAD_FUNCTION( AGHAF_DoCAN_Event_getChannel );
632 
633  // Ethernet
634  AGHAF_UNLOAD_FUNCTION( AGHAF_ETH_getBus );
635  AGHAF_UNLOAD_FUNCTION( AGHAF_ETH_getBusIndex );
636  AGHAF_UNLOAD_FUNCTION( AGHAF_ETH_getBusCount );
637  AGHAF_UNLOAD_FUNCTION( AGHAF_ETH_activate );
638  AGHAF_UNLOAD_FUNCTION( AGHAF_ETH_deactivate );
639  AGHAF_UNLOAD_FUNCTION( AGHAF_ETH_isActivated );
640  AGHAF_UNLOAD_FUNCTION( AGHAF_ETH_getParam );
641  AGHAF_UNLOAD_FUNCTION( AGHAF_ETH_setParam );
642  AGHAF_UNLOAD_FUNCTION( AGHAF_ETH_getFriendlyNameEthCard );
643  AGHAF_UNLOAD_FUNCTION( AGHAF_ETH_freeFriendlyName );
644  AGHAF_UNLOAD_FUNCTION( AGHAF_ETH_getMacAddress);
645  AGHAF_UNLOAD_FUNCTION( AGHAF_ETH_setEthernetDiagLineState );
646 
647  // LIN
648  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_setOnMessageTxCallback );
649  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_setOnMessageRxCallback );
650  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_setOnBusStateChangedCallback );
651  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_setOnErrorCallback );
652  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_setOnWakeUpSentCallback );
653  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_get );
654  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_getIndex );
655  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_getCount );
656  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_activate );
657  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_deactivate );
658  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_isActivated );
659  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_getParam );
660  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_setParam );
661  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_sendHeader );
662  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_updateFrame );
663  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_configureFrame );
664  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_wakeUp );
665  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_SCHEDULE_clearDatas );
666  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_SCHEDULE_addUnconditional );
667  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_SCHEDULE_addSporadic );
668  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_SCHEDULE_addEventTriggered );
669  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_SCHEDULE_configure );
670  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_SCHEDULE_start );
671  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_SCHEDULE_stop );
672  AGHAF_UNLOAD_FUNCTION( AGHAF_LIN_SCHEDULE_getCount );
673 
674  return AGHAF_TRUE;
675 }
676 
683 AGHAF_BOOL AGHAF_unloadLibrary()
684 {
685  AGHAF_BOOL tResult = AGHAF_TRUE;
686 
687  if (AGHAF_LibraryHandle == NULL)
688  {
689  return AGHAF_TRUE;
690  }
691 
692  //unload the library
693  if (FreeLibrary( AGHAF_LibraryHandle ) == AGHAF_FALSE)
694  {
695  tResult = AGHAF_FALSE;
696  }
697  AGHAF_unloadLibraryFunctions();
698  AGHAF_LibraryHandle = NULL;
699  return tResult;
700 }
701 
709 AGHAF_BOOL AGHAF_loadLibrary( const wchar_t *fileName )
710 {
711  AGHAF_BOOL tResult;
712 
713  if (AGHAF_LibraryHandle != NULL)
714  {
715  return AGHAF_FALSE;
716  }
717 
718  // Load the library
719  if (fileName == NULL)
720  AGHAF_LibraryHandle = LoadLibraryW( AGHAF_DEFAULT_FILENAME );
721  else
722  AGHAF_LibraryHandle = LoadLibraryW( fileName );
723 
724  if (NULL == AGHAF_LibraryHandle )
725  return AGHAF_FALSE;
726 
727  // Initialize the functions
728  tResult = AGHAF_initializeLibraryFunctions();
729  if (AGHAF_FALSE == tResult )
730  AGHAF_unloadLibrary();
731 
732  return tResult;
733 }
734 
740 const wchar_t* AGHAF_getLastLoadError()
741 {
742  return AGHAF_LastLoadError;
743 }
744 #ifdef __cplusplus
745 }
746 #endif
747 
748 #endif
749 
750 #undef AGHAF_DYNAMIC_LIBRARY_INIT
754 #endif
755 
756 #endif // AGHAF_DYNAMIC_LIB_H
AGHAF_CAN_Frame AGHAF_CAN_Frame_new()
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
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_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
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_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
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
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
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
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
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_EventType AGHAF_CAN_typeEvent(AGHAF_EventInfo event)
return the type from the event
Definition: aghaf_can.cpp:598
AGHAF_BOOL AGHAF_CAN_Frame_brs(AGHAF_CAN_Frame frame)
AGHAF_CAN_Frame_brs.
Definition: aghaf_can.cpp:479
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
AGHAF_Status AGHAF_DoCAN_Channel_setParam(AGHAF_DoCAN_Channel channel, AGHAF_DoCAN_ChannelParam param, uint32_t value)
Set the parameter from a channel.
Definition: aghaf_docan.cpp:133
AGHAF_DoCAN_Bus AGHAF_DoCAN_getBus(AGHAF_Device device, uint8_t index)
return the DoCAN bus at index in parameter
Definition: aghaf_docan.cpp:15
AGHAF_Status AGHAF_DoCAN_releaseChannel(AGHAF_DoCAN_Channel channel)
Release the channel.
Definition: aghaf_docan.cpp:95
uint32_t AGHAF_DoCAN_Event_getDataSize(AGHAF_DoCAN_Event event)
return the size from the datas in the event
Definition: aghaf_docan.cpp:224
AGHAF_Status AGHAF_DoCAN_Channel_stop(AGHAF_DoCAN_Channel channel)
Stop a channel.
Definition: aghaf_docan.cpp:168
AGHAF_DoCAN_EventType AGHAF_DoCAN_Event_type(AGHAF_EventInfo event)
return the type from the event
Definition: aghaf_docan.cpp:203
AGHAF_Status AGHAF_DoCAN_getChannelCount(AGHAF_DoCAN_Bus bus, uint8_t *count)
Provide the number of channels available on the bus.
Definition: aghaf_docan.cpp:61
void AGHAF_DoCAN_Channel_activateTrace(AGHAF_DoCAN_Channel channel, AGHAF_BOOL value)
Activate the CAN trace.
Definition: aghaf_docan.cpp:192
void AGHAF_DoCAN_deregisterCallback(AGHAF_DoCAN_Bus bus, AGHAF_DoCAN_Callback callback)
deregister a callback
Definition: aghaf_docan.cpp:49
AGHAF_DoCAN_Channel AGHAF_DoCAN_Event_getChannel(AGHAF_DoCAN_Event event)
Return the channel on which occured the event.
Definition: aghaf_docan.cpp:270
uint32_t AGHAF_DoCAN_getBusCount(AGHAF_Device device)
return the number of DoCAN bus from a device
Definition: aghaf_docan.cpp:26
AGHAF_Status AGHAF_DoCAN_Channel_send(AGHAF_DoCAN_Channel channel, uint32_t dataLen, uint8_t const *data)
Send on the DoCAN channel in parameter.
Definition: aghaf_docan.cpp:181
AGHAF_CAN_Identifier AGHAF_DoCAN_Event_getId(AGHAF_DoCAN_Event event)
Return the CAN identifier from the event.
Definition: aghaf_docan.cpp:248
AGHAF_Status AGHAF_DoCAN_Event_getData(AGHAF_DoCAN_Event event, uint8_t *data, uint32_t *size)
Provide the datas received in the event.
Definition: aghaf_docan.cpp:237
AGHAF_Status AGHAF_DoCAN_Channel_getParam(AGHAF_DoCAN_Channel channel, AGHAF_DoCAN_ChannelParam param, uint32_t *value)
Provide the value from a channel parameter.
Definition: aghaf_docan.cpp:146
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)
Definition: aghaf_docan.cpp:109
AGHAF_DoCAN_Channel AGHAF_DoCAN_createChannel(AGHAF_DoCAN_Bus bus)
Create a channel.
Definition: aghaf_docan.cpp:84
uint8_t AGHAF_DoCAN_Event_getError(AGHAF_DoCAN_Event event)
Return the error value from the event.
Definition: aghaf_docan.cpp:259
AGHAF_Status AGHAF_DoCAN_Channel_start(AGHAF_DoCAN_Channel channel)
Start a channel.
Definition: aghaf_docan.cpp:157
AGHAF_Status AGHAF_DoCAN_getFreeChannelCount(AGHAF_DoCAN_Bus bus, uint8_t *count)
Return the number of free channels still available.
Definition: aghaf_docan.cpp:73
uint8_t AGHAF_DoCAN_Channel_getIndex(AGHAF_DoCAN_Channel channel)
Return the intern index from the channel.
Definition: aghaf_docan.cpp:120
uint8_t AGHAF_DoCAN_Event_getBusIndex(AGHAF_DoCAN_Event event)
return the index from the bus on which occured the event
Definition: aghaf_docan.cpp:213
void AGHAF_DoCAN_registerCallback(AGHAF_DoCAN_Bus bus, AGHAF_DoCAN_Callback callback, void *userContext)
Register a callback for the DoCAN events from a bus.
Definition: aghaf_docan.cpp:38
AGHAF_Status AGHAF_ETH_setParam(AGHAF_EthBus ethernet, AGHAF_ETH_Param param, uint32_t value)
set a parameter from an ethernet card
Definition: aghaf_eth.cpp:111
AGHAF_Status AGHAF_ETH_deactivate(AGHAF_EthBus ethernet)
stop the communication with the Ethernet
Definition: aghaf_eth.cpp:64
void AGHAF_ETH_freeFriendlyName(char *friendlyName)
Free the memory allocated with AGHAF_Device_getFriendlyNameEthCard.
Definition: aghaf_eth.cpp:139
AGHAF_Status AGHAF_ETH_isActivated(AGHAF_EthBus ethernet, AGHAF_BOOL *isActivated)
allow to know if the communication on the Ethernet is started or not
Definition: aghaf_eth.cpp:77
AGHAF_Status AGHAF_ETH_setEthernetDiagLineState(AGHAF_EthBus ethernet, AGHAF_BOOL active)
AGHAF_ETH_setEthernetDiagLineState.
Definition: aghaf_eth.cpp:172
AGHAF_Status AGHAF_ETH_activate(AGHAF_EthBus ethernet)
start the communication with the Ethernet
Definition: aghaf_eth.cpp:52
AGHAF_Status AGHAF_ETH_getParam(AGHAF_EthBus ethernet, AGHAF_ETH_Param param, uint32_t *value)
get a parameter from an ethernet card
Definition: aghaf_eth.cpp:95
AGHAF_EthBus AGHAF_ETH_getBus(AGHAF_Device device, uint8_t index)
return the Ethernet bus at index in parameter
Definition: aghaf_eth.cpp:15
uint8_t AGHAF_ETH_getBusCount(AGHAF_Device device)
return the number of CAN bus from a device
Definition: aghaf_eth.cpp:40
AGHAF_Status AGHAF_ETH_getMacAddress(AGHAF_EthBus ethernet, AGHAF_ETH_MacAddress *macAddress)
return the Ethernet mac address on device "device", and channel "index"
Definition: aghaf_eth.cpp:151
uint8_t AGHAF_ETH_getBusIndex(AGHAF_EthBus ethernet)
return the index from a Ethernet
Definition: aghaf_eth.cpp:28
void AGHAF_ETH_getFriendlyNameEthCard(AGHAF_EthBus ethernet, char **name)
Provide the friendly name associated to the network card.
Definition: aghaf_eth.cpp:127
void AGHAF_LIN_setOnMessageTxCallback(AGHAF_LIN lin, AGHAF_LIN_onMessageTx callback, void *userContext)
Set the callback called on tx event.
Definition: aghaf_lin.cpp:15
AGHAF_Status AGHAF_LIN_SCHEDULE_configure(AGHAF_LIN lin, uint8_t scheduleIndex, AGHAF_LIN_ScheduleKind kind)
AGHAF_LIN_SCHEDULE_configure.
Definition: aghaf_lin.cpp:310
void AGHAF_LIN_setOnBusStateChangedCallback(AGHAF_LIN lin, AGHAF_LIN_onBusStateChanged callback, void *userContext)
Set the callback called on a bus state changed event.
Definition: aghaf_lin.cpp:51
AGHAF_Status AGHAF_LIN_activate(AGHAF_LIN lin)
Start the communication with the LIN.
Definition: aghaf_lin.cpp:108
AGHAF_Status AGHAF_LIN_deactivate(AGHAF_LIN lin)
Stop the communication with the LIN.
Definition: aghaf_lin.cpp:119
AGHAF_Status AGHAF_LIN_sendHeader(AGHAF_LIN lin, uint8_t fid)
Write header on the LIN.
Definition: aghaf_lin.cpp:173
AGHAF_Status AGHAF_LIN_isActivated(AGHAF_LIN lin, AGHAF_BOOL *isActivated)
Allow to know if the communication on the LIN is started or not.
Definition: aghaf_lin.cpp:131
AGHAF_Status AGHAF_LIN_SCHEDULE_addSporadic(AGHAF_LIN lin, uint8_t scheduleIndex, uint8_t timeBaseCount, uint8_t nbSpo, uint8_t *idList)
Add a sporadic frame in a schedule.
Definition: aghaf_lin.cpp:269
void AGHAF_LIN_setOnWakeUpSentCallback(AGHAF_LIN lin, AGHAF_LIN_onWakeUpSent callback, void *userContext)
Set the callback called on a wake up sent event.
Definition: aghaf_lin.cpp:63
AGHAF_Status AGHAF_LIN_SCHEDULE_stop(AGHAF_LIN lin)
Stop the schedule currently executed on the LIN.
Definition: aghaf_lin.cpp:334
AGHAF_Status AGHAF_LIN_wakeUp(AGHAF_LIN lin)
Send a wake up request on the bus LIN.
Definition: aghaf_lin.cpp:228
AGHAF_Status AGHAF_LIN_SCHEDULE_getCount(AGHAF_LIN lin, uint8_t *count)
Number of LIN schedule that can be configured.
Definition: aghaf_lin.cpp:346
uint8_t AGHAF_LIN_getIndex(AGHAF_LIN lin)
Return the index from a LIN.
Definition: aghaf_lin.cpp:86
AGHAF_Status AGHAF_LIN_SCHEDULE_addUnconditional(AGHAF_LIN lin, uint8_t scheduleIndex, uint8_t fid, uint8_t timeBaseCount)
Add an unconditionale frame in a schedule.
Definition: aghaf_lin.cpp:254
AGHAF_Status AGHAF_LIN_SCHEDULE_clearDatas(AGHAF_LIN lin, uint8_t scheduleIndex)
Clear the datas associated to a schedule index.
Definition: aghaf_lin.cpp:240
AGHAF_Status AGHAF_LIN_getParam(AGHAF_LIN lin, AGHAF_LIN_Param param, uint32_t *value)
Get a parameter from a LIN.
Definition: aghaf_lin.cpp:147
AGHAF_Status AGHAF_LIN_SCHEDULE_addWakeUp(AGHAF_LIN lin, uint8_t scheduleIndex, uint8_t timeBaseCount)
Add a wake in a schedule.
Definition: aghaf_lin.cpp:297
AGHAF_Status AGHAF_LIN_configureFrame(AGHAF_LIN lin, uint8_t fid, AGHAF_LIN_FrameKind kind, uint8_t publishFlags, uint8_t dataLen, uint8_t const *initialData)
Configure the frame associated with the frame identifier.
Definition: aghaf_lin.cpp:211
void AGHAF_LIN_setOnMessageRxCallback(AGHAF_LIN lin, AGHAF_LIN_onMessageRx callback, void *userContext)
Set the callback called on rx event.
Definition: aghaf_lin.cpp:27
AGHAF_LIN AGHAF_LIN_get(AGHAF_Device device, uint8_t index)
Return the LIN bus at the index specified.
Definition: aghaf_lin.cpp:75
AGHAF_Status AGHAF_LIN_SCHEDULE_start(AGHAF_LIN lin, uint8_t scheduleIndex)
Start a schedule.
Definition: aghaf_lin.cpp:323
AGHAF_Status AGHAF_LIN_setParam(AGHAF_LIN lin, AGHAF_LIN_Param param, uint32_t value)
Set a parameter from a LIN.
Definition: aghaf_lin.cpp:160
AGHAF_Status AGHAF_LIN_updateFrame(AGHAF_LIN lin, uint8_t fid, uint8_t dataLen, uint8_t const *data)
Update the datas associated to a frame identifier.
Definition: aghaf_lin.cpp:190
void AGHAF_LIN_setOnErrorCallback(AGHAF_LIN lin, AGHAF_LIN_onError callback, void *userContext)
Set the callback called on an error event.
Definition: aghaf_lin.cpp:39
AGHAF_Status AGHAF_LIN_SCHEDULE_addEventTriggered(AGHAF_LIN lin, uint8_t scheduleIndex, uint8_t timeBaseCount, uint8_t eventTriggerId, uint8_t collisionTable)
Add an event triggered in a schedule.
Definition: aghaf_lin.cpp:284
uint8_t AGHAF_LIN_getCount(AGHAF_Device device)
Return the number of LINs available on a device.
Definition: aghaf_lin.cpp:97
uint32_t AGHAF_getDeviceCount()
Return the number of devices onnected.
Definition: aghaf_global.cpp:111
AGHAF_Status AGHAF_Device_getTimestamp(AGHAF_Device device, uint64_t *timestamp)
Return the current timestamp on the device.
Definition: aghaf_global.cpp:278
AGHAF_Status AGHAF_Device_getUsbInfo(AGHAF_Device device, uint16_t *vid, uint16_t *pid, uint16_t *rev)
AGHAF_Device_getUsbInfo.
Definition: aghaf_global.cpp:236
uint32_t AGHAF_getServiceVersion()
Return the version from aeds.
Definition: aghaf_global.cpp:34
AGHAF_Status AGHAF_getDeviceList(AGHAF_DeviceInfo **devices, uint32_t *size)
Provide the list of devices connected.
Definition: aghaf_global.cpp:123
char const * AGHAF_getVersionString()
Return the version from Aghaf.
Definition: aghaf_global.cpp:43
char const * AGHAF_DeviceEvent_getProductName(AGHAF_Event event)
return the product name from the device which emitted the device event
Definition: aghaf_global.cpp:68
void AGHAF_Device_getFriendlyNameEthCard(AGHAF_Device device, char **name)
AGHAF_Device_getFriendlyNameEthCard.
Definition: aghaf_global.cpp:210
void AGHAF_deregisterCallback(AGHAF_Callback callback)
Deregister a callback.
Definition: aghaf_global.cpp:311
AGHAF_Device AGHAF_getDeviceBySN(const char *productNumber, const char *serialNumber)
Return the handle on the specified device.
Definition: aghaf_global.cpp:156
AGHAF_ConnectionMode AGHAF_Device_getConnectionMode(AGHAF_Device device)
AGHAF_Device_getConnectionMode.
Definition: aghaf_global.cpp:197
AGHAF_Device AGHAF_getDeviceByHardID(uint8_t const *hardwareID)
AGHAF_getDeviceByHardID.
Definition: aghaf_global.cpp:170
AGHAF_BOOL
enumerator to get a bool definition
Definition: aghaf_global.h:102
void AGHAF_Device_freeFriendlyName(char *friendlyName)
Free the memory allocated with AGHAF_Device_getFriendlyNameEthCard.
Definition: aghaf_global.cpp:223
AGHAF_BOOL AGHAF_isServiceRunning()
Inform if ghaston is running or not.
Definition: aghaf_global.cpp:58
void AGHAF_freeDeviceList(AGHAF_DeviceInfo *devices)
Free the memory allocated with AGHAF_getDeviceList.
Definition: aghaf_global.cpp:135
AGHAF_Status AGHAF_getDeviceInfo(AGHAF_Device device, AGHAF_DeviceInfo *deviceInfo)
Return the informations from a device.
Definition: aghaf_global.cpp:183
AGHAF_Status AGHAF_refreshDeviceList()
Call the device event callbacks with the devices connected.
Definition: aghaf_global.cpp:144
void AGHAF_registerCallback(AGHAF_Callback callback, void *userContext)
Register a callback for the device event.
Definition: aghaf_global.cpp:302
char const * AGHAF_DeviceEvent_getSerialNumber(AGHAF_Event event)
return the serial number from the device which emitted the device event
Definition: aghaf_global.cpp:90
AGHAF_Status AGHAF_Event_getInfo(AGHAF_Event event, AGHAF_EventInfo *info)
AGHAF_Event_getInfo.
Definition: aghaf_global.cpp:290
AGHAF_Status AGHAF_closeDevice(AGHAF_Device device)
close the device
Definition: aghaf_global.cpp:266
AGHAF_Status AGHAF_openDevice(AGHAF_Device device)
Open a device.
Definition: aghaf_global.cpp:255
char const * AGHAF_DeviceEvent_getProductNumber(AGHAF_Event event)
return the product number from the device which emitted the device event
Definition: aghaf_global.cpp:79
uint8_t const * AGHAF_DeviceEvent_getHardwareUniqueId(AGHAF_Event event)
return the hardware unique id from the device which emitted the device event
Definition: aghaf_global.cpp:101
uint32_t AGHAF_getVersion()
Return the version from Aghaf.
Definition: aghaf_global.cpp:18
@ AGHAF_FALSE
false
Definition: aghaf_global.h:103
@ AGHAF_TRUE
true
Definition: aghaf_global.h:104