7 #ifndef EXXOTEST_AGHAF_DYNAMIC_LIB_H
8 #define EXXOTEST_AGHAF_DYNAMIC_LIB_H
10 #if !defined(AGHAF_LIBRARY) && defined(AGHAF_DYNAMIC_LIBRARY) && \
11 defined(AGHAF_DYNAMIC_LIBRARY_INIT)
38 #if defined(AGHAF_OS_WIN)
45 #define AGHAF_DEFAULT_FILENAME L"aghaf.dll"
47 static HMODULE AGHAF_LibraryHandle = NULL;
48 static const wchar_t *AGHAF_LastLoadError = L
"";
50 #define AGHAF_LOAD_FUNCTION(name) \
51 if (NULL == (name = (t##name)GetProcAddress(AGHAF_LibraryHandle, #name))) { \
52 AGHAF_LastLoadError = L"Failed to load " L#name L"()"; \
56 #define AGHAF_UNLOAD_FUNCTION(name) name = NULL;
58 AGHAF_BOOL AGHAF_initializeLibraryFunctions(
void) {
59 if (NULL == AGHAF_LibraryHandle)
return AGHAF_FALSE;
95 AGHAF_LOAD_FUNCTION(AGHAF_ADC_setOnTriggerCallback);
96 AGHAF_LOAD_FUNCTION(AGHAF_ADC_get);
97 AGHAF_LOAD_FUNCTION(AGHAF_ADC_getIndex);
98 AGHAF_LOAD_FUNCTION(AGHAF_ADC_getCount);
99 AGHAF_LOAD_FUNCTION(AGHAF_ADC_activate);
100 AGHAF_LOAD_FUNCTION(AGHAF_ADC_deactivate);
101 AGHAF_LOAD_FUNCTION(AGHAF_ADC_isActivated);
102 AGHAF_LOAD_FUNCTION(AGHAF_ADC_getParam);
103 AGHAF_LOAD_FUNCTION(AGHAF_ADC_setParam);
104 AGHAF_LOAD_FUNCTION(AGHAF_ADC_getTriggerState);
107 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_getModuleCount);
108 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_getModuleList);
109 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_freeModuleList);
110 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_getModuleInfo);
111 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_getModuleByHardwareId);
112 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_setOnNewModuleCallback);
113 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_setOnModuleLeftCallback);
114 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_writeKey);
115 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_eraseOtpArea);
116 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_reset);
117 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_startUpload);
118 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_sendData);
119 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_stopUpload);
120 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_getStatus);
121 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_writeString);
122 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_readString);
123 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_writeMacString);
124 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_readMacString);
125 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_freeString);
126 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_readDeviceAssembly);
127 AGHAF_LOAD_FUNCTION(AGHAF_CTRL_writeDeviceAssembly);
135 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_getChannelByIndex);
136 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_Channel_getIndex);
138 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoCAN_getByIndex);
139 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoKLine_getByIndex);
140 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoLIN_getByIndex);
141 AGHAF_LOAD_FUNCTION(AGHAF_Session_getIndex);
144 AGHAF_LOAD_FUNCTION(AGHAF_PROP_setOnDataCallback);
145 AGHAF_LOAD_FUNCTION(AGHAF_PROP_getBus);
146 AGHAF_LOAD_FUNCTION(AGHAF_PROP_getBusCount);
147 AGHAF_LOAD_FUNCTION(AGHAF_PROP_Bus_activate);
148 AGHAF_LOAD_FUNCTION(AGHAF_PROP_Bus_deactivate);
149 AGHAF_LOAD_FUNCTION(AGHAF_PROP_Bus_isActivated);
150 AGHAF_LOAD_FUNCTION(AGHAF_PROP_sendCommand);
151 AGHAF_LOAD_FUNCTION(AGHAF_PROP_sendAllocCommand);
152 AGHAF_LOAD_FUNCTION(AGHAF_PROP_freeResponse);
155 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoCAN_getCount);
156 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoCAN_getFreeCount);
157 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoCAN_create);
158 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoCAN_channelSetParam);
159 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoCAN_channelGetParam);
160 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoCAN_setOnRxErrorCallback);
161 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoCAN_setOnTxErrorCallback);
163 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoKLine_getCount);
164 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoKLine_getFreeCount);
165 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoKLine_create);
166 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoKLine_channelSetParam);
167 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoKLine_channelGetParam);
168 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoKLine_setOnRxErrorCallback);
169 AGHAF_LOAD_FUNCTION(AGHAF_Session_DoKLine_setOnTxErrorCallback);
171 AGHAF_LOAD_FUNCTION(AGHAF_Session_setOnErrorCallback);
172 AGHAF_LOAD_FUNCTION(AGHAF_Session_setOnFuncRxFinishedCallback);
173 AGHAF_LOAD_FUNCTION(AGHAF_Session_setOnSOMReceivedCallback);
174 AGHAF_LOAD_FUNCTION(AGHAF_Session_setOnFrameReceivedCallback);
175 AGHAF_LOAD_FUNCTION(AGHAF_Session_setOnFrameTransmittedCallback);
176 AGHAF_LOAD_FUNCTION(AGHAF_Session_release);
177 AGHAF_LOAD_FUNCTION(AGHAF_Session_getType);
178 AGHAF_LOAD_FUNCTION(AGHAF_Session_start);
179 AGHAF_LOAD_FUNCTION(AGHAF_Session_stop);
180 AGHAF_LOAD_FUNCTION(AGHAF_Session_setParam);
181 AGHAF_LOAD_FUNCTION(AGHAF_Session_getParam);
182 AGHAF_LOAD_FUNCTION(AGHAF_Session_setParamArray);
183 AGHAF_LOAD_FUNCTION(AGHAF_Session_getParamArray);
184 AGHAF_LOAD_FUNCTION(AGHAF_Session_freeParamArray);
185 AGHAF_LOAD_FUNCTION(AGHAF_Session_assignFunctional);
186 AGHAF_LOAD_FUNCTION(AGHAF_Session_clearFunctional);
187 AGHAF_LOAD_FUNCTION(AGHAF_Session_send);
204 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_setOnMsgTxCallback);
205 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_setOnMsgRxCallback);
206 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_setOnSOMCallback);
207 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_setOnMsgTxErrCallback);
208 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_setOnMsgRxErrCallback);
209 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_getChannelCount);
210 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_getFreeChannelCount);
211 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_createChannel);
212 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_releaseChannel);
213 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_Channel_setParam);
214 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_Channel_getParam);
215 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_Channel_start);
216 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_Channel_stop);
217 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_Channel_send);
218 AGHAF_LOAD_FUNCTION(AGHAF_DoLIN_Channel_activateTrace);
419 AGHAF_BOOL AGHAF_unloadLibraryFunctions(
void) {
420 if (NULL == AGHAF_LibraryHandle)
return AGHAF_FALSE;
452 AGHAF_UNLOAD_FUNCTION(AGHAF_ADC_setOnTriggerCallback);
453 AGHAF_UNLOAD_FUNCTION(AGHAF_ADC_get);
454 AGHAF_UNLOAD_FUNCTION(AGHAF_ADC_getIndex);
455 AGHAF_UNLOAD_FUNCTION(AGHAF_ADC_getCount);
456 AGHAF_UNLOAD_FUNCTION(AGHAF_ADC_activate);
457 AGHAF_UNLOAD_FUNCTION(AGHAF_ADC_deactivate);
458 AGHAF_UNLOAD_FUNCTION(AGHAF_ADC_isActivated);
459 AGHAF_UNLOAD_FUNCTION(AGHAF_ADC_getParam);
460 AGHAF_UNLOAD_FUNCTION(AGHAF_ADC_setParam);
461 AGHAF_UNLOAD_FUNCTION(AGHAF_ADC_getTriggerState);
464 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_getModuleCount);
465 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_getModuleList);
466 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_freeModuleList);
467 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_getModuleInfo);
468 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_getModuleByHardwareId);
469 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_setOnNewModuleCallback);
470 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_setOnModuleLeftCallback);
471 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_writeKey);
472 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_eraseOtpArea);
473 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_reset);
474 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_startUpload);
475 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_sendData);
476 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_stopUpload);
477 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_getStatus);
478 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_writeString);
479 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_readString);
480 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_writeMacString);
481 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_readMacString);
482 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_freeString);
483 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_readDeviceAssembly);
484 AGHAF_UNLOAD_FUNCTION(AGHAF_CTRL_writeDeviceAssembly);
492 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_getChannelByIndex);
493 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_Channel_getIndex);
495 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoCAN_getByIndex);
496 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoKLine_getByIndex);
497 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoLIN_getByIndex);
498 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_getIndex);
501 AGHAF_UNLOAD_FUNCTION(AGHAF_PROP_setOnDataCallback);
502 AGHAF_UNLOAD_FUNCTION(AGHAF_PROP_getBus);
503 AGHAF_UNLOAD_FUNCTION(AGHAF_PROP_getBusCount);
504 AGHAF_UNLOAD_FUNCTION(AGHAF_PROP_Bus_activate);
505 AGHAF_UNLOAD_FUNCTION(AGHAF_PROP_Bus_deactivate);
506 AGHAF_UNLOAD_FUNCTION(AGHAF_PROP_Bus_isActivated);
507 AGHAF_UNLOAD_FUNCTION(AGHAF_PROP_sendCommand);
508 AGHAF_UNLOAD_FUNCTION(AGHAF_PROP_sendAllocCommand);
509 AGHAF_UNLOAD_FUNCTION(AGHAF_PROP_freeResponse);
512 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoCAN_getCount);
513 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoCAN_getFreeCount);
514 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoCAN_create);
515 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoCAN_channelSetParam);
516 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoCAN_channelGetParam);
517 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoCAN_setOnRxErrorCallback);
518 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoCAN_setOnTxErrorCallback);
520 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoKLine_getCount);
521 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoKLine_getFreeCount);
522 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoKLine_create);
523 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoKLine_channelSetParam);
524 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoKLine_channelGetParam);
525 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoKLine_setOnRxErrorCallback);
526 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_DoKLine_setOnTxErrorCallback);
528 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_setOnErrorCallback);
529 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_setOnFuncRxFinishedCallback);
530 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_setOnSOMReceivedCallback);
531 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_setOnFrameReceivedCallback);
532 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_setOnFrameTransmittedCallback);
533 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_release);
534 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_getType);
535 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_start);
536 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_stop);
537 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_setParam);
538 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_getParam);
539 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_setParamArray);
540 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_getParamArray);
541 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_freeParamArray);
542 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_assignFunctional);
543 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_clearFunctional);
544 AGHAF_UNLOAD_FUNCTION(AGHAF_Session_send);
561 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_setOnMsgTxCallback);
562 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_setOnMsgRxCallback);
563 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_setOnSOMCallback);
564 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_setOnMsgTxErrCallback);
565 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_setOnMsgRxErrCallback);
566 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_getChannelCount);
567 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_getFreeChannelCount);
568 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_createChannel);
569 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_releaseChannel);
570 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_Channel_setParam);
571 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_Channel_getParam);
572 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_Channel_start);
573 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_Channel_stop);
574 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_Channel_send);
575 AGHAF_UNLOAD_FUNCTION(AGHAF_DoLIN_Channel_activateTrace);
736 if (AGHAF_LibraryHandle == NULL) {
741 if (FreeLibrary(AGHAF_LibraryHandle) ==
AGHAF_FALSE) {
744 AGHAF_unloadLibraryFunctions();
745 AGHAF_LibraryHandle = NULL;
757 AGHAF_BOOL AGHAF_loadLibrary(
const wchar_t *fileName) {
760 if (AGHAF_LibraryHandle != NULL) {
765 if (fileName == NULL)
766 AGHAF_LibraryHandle = LoadLibraryW(AGHAF_DEFAULT_FILENAME);
768 AGHAF_LibraryHandle = LoadLibraryW(fileName);
770 if (NULL == AGHAF_LibraryHandle)
return AGHAF_FALSE;
773 tResult = AGHAF_initializeLibraryFunctions();
784 const wchar_t *AGHAF_getLastLoadError() {
return AGHAF_LastLoadError; }
791 #undef AGHAF_DYNAMIC_LIBRARY_INIT
AGHAF_Status AGHAF_CAN_v2_setParam(AGHAF_CAN can, AGHAF_CAN_Param param, uint32_t value)
Set the value from a CAN parameter.
Definition: aghaf_can_v2.cpp:165
uint8_t AGHAF_CAN_v2_Periodic_getCount(AGHAF_CAN can)
Return the number of periodic message available on a CAN bus.
Definition: aghaf_can_v2.cpp:262
AGHAF_Status AGHAF_CAN_v2_getChipSstate(AGHAF_CAN can, AGHAF_CAN_ChipState *chipState)
Return the chip state from the bus.
Definition: aghaf_can_v2.cpp:200
AGHAF_Status AGHAF_CAN_v2_activate(AGHAF_CAN can)
activate a CAN bus
Definition: aghaf_can_v2.cpp:116
AGHAF_Status AGHAF_CAN_v2_supportedTerminationsLs(AGHAF_CAN can, uint32_t **terminations, uint32_t *nbTerminations)
Request the supported low speed terminations from a CAN bus.
Definition: aghaf_can_v2.cpp:241
AGHAF_CAN AGHAF_CAN_v2_get(AGHAF_Device device, uint8_t index)
return the CAN bus at index in parameter
Definition: aghaf_can_v2.cpp:86
AGHAF_Status AGHAF_CAN_v2_BusOn(AGHAF_CAN can)
reactivate the bus after an error
Definition: aghaf_can_v2.cpp:211
uint8_t AGHAF_CAN_v2_getIndex(AGHAF_CAN can)
return the index from a CAN bus
Definition: aghaf_can_v2.cpp:96
uint8_t AGHAF_CAN_v2_getCount(AGHAF_Device device)
return the number of CAN bus from a device
Definition: aghaf_can_v2.cpp:106
AGHAF_Status AGHAF_CAN_v2_filtersCount(AGHAF_CAN can, AGHAF_CAN_FilterId idType, uint16_t *count)
Provide the current number of filters.
Definition: aghaf_can_v2.cpp:325
AGHAF_Status AGHAF_CAN_v2_isActivated(AGHAF_CAN can, AGHAF_BOOL *isActivated)
Request if a CAN bus is yet activated or not.
Definition: aghaf_can_v2.cpp:137
AGHAF_Status AGHAF_CAN_v2_addFilter(AGHAF_CAN can, AGHAF_CAN_FilterId idType, AGHAF_CAN_FILTER_Type type, AGHAF_CAN_FilterMode mode, uint32_t id1, uint32_t id2)
add a filter to the CAN bus
Definition: aghaf_can_v2.cpp:300
void AGHAF_CAN_v2_freeSupportedFilters(AGHAF_CAN_FilterDesc *values)
Free the memory allocated with AGHAF_CAN_Bus_supportedFilters.
Definition: aghaf_can_v2.cpp:354
AGHAF_Status AGHAF_CAN_v2_Periodic_send(AGHAF_CAN can, uint8_t frameDatalen, uint8_t const *const frameData, uint8_t frameFlags, uint32_t frameIdent, uint8_t index, uint8_t flags, uint32_t period)
Add a periodic message to send.
Definition: aghaf_can_v2.cpp:280
AGHAF_Status AGHAF_CAN_v2_supportedFilters(AGHAF_CAN can, uint16_t *globalFilterCaps, AGHAF_CAN_FilterDesc **values, uint16_t *size)
Provide the supported filters from a CAN bus.
Definition: aghaf_can_v2.cpp:342
void AGHAF_CAN_v2_freeSupportedModes(AGHAF_CAN_Mode *modes)
Free the memory allocated with AGHAF_CAN_Bus_supportedModes.
Definition: aghaf_can_v2.cpp:190
AGHAF_Status AGHAF_CAN_v2_sendMessage(AGHAF_CAN can, uint32_t ident, uint8_t flags, uint16_t dataLen, uint8_t const *data)
send data on a CAN bus
Definition: aghaf_can_v2.cpp:380
AGHAF_Status AGHAF_CAN_v2_supportedModes(AGHAF_CAN can, AGHAF_CAN_Mode **modes, uint8_t *nbModes)
Request the supported modes from the CAN bus in parameter.
Definition: aghaf_can_v2.cpp:180
void AGHAF_CAN_v2_setOnBusLoadCallback(AGHAF_CAN can, AGHAF_CAN_onBusLoad callback, void *userContext)
set the callback called on a bus noad event
Definition: aghaf_can_v2.cpp:73
void AGHAF_CAN_v2_setOnMessageRxCallback(AGHAF_CAN can, AGHAF_CAN_onMessageRx callback, void *userContext)
set the callback called on a rx event
Definition: aghaf_can_v2.cpp:35
AGHAF_Status AGHAF_CAN_v2_getParam(AGHAF_CAN can, AGHAF_CAN_Param param, uint32_t *value)
Provide the value from a CAN parameter.
Definition: aghaf_can_v2.cpp:152
AGHAF_Status AGHAF_CAN_v2_supportedTerminations(AGHAF_CAN can, uint32_t **terminations, uint32_t *nbTerminations)
Request the supported terminations from a CAN bus.
Definition: aghaf_can_v2.cpp:225
void AGHAF_CAN_v2_setOnBusChangeCallback(AGHAF_CAN can, AGHAF_CAN_onBusChange callback, void *userContext)
set the callback called on a bus change event
Definition: aghaf_can_v2.cpp:60
AGHAF_Status AGHAF_CAN_v2_clearFilters(AGHAF_CAN can)
clear the filters from a bus
Definition: aghaf_can_v2.cpp:313
void AGHAF_CAN_v2_useAPI()
Inform the library tu use the V2 CAN API.
Definition: aghaf_can_v2.cpp:12
void AGHAF_CAN_v2_freeSupportedTerminations(uint32_t *terminations)
Free the memory allocated with AGHAF_CAN_Bus_supportedTerminations or AGHAF_CAN_Bus_supportedTerminat...
Definition: aghaf_can_v2.cpp:253
void AGHAF_CAN_v2_setOnMessageTxCallback(AGHAF_CAN can, AGHAF_CAN_onMessageTx callback, void *userContext)
set the callback called on a tx event
Definition: aghaf_can_v2.cpp:22
AGHAF_Status AGHAF_CAN_v2_deactivate(AGHAF_CAN can)
deactivate a CAN bus
Definition: aghaf_can_v2.cpp:126
void AGHAF_CAN_v2_setOnErrorCallback(AGHAF_CAN can, AGHAF_CAN_onError callback, void *userContext)
set the callback called on error event
Definition: aghaf_can_v2.cpp:48
AGHAF_CAN_Frame AGHAF_CAN_Frame_new()
Return a handle on a CAN frame.
Definition: aghaf_can.cpp:354
AGHAF_BOOL AGHAF_CAN_Frame_esi(AGHAF_CAN_Frame frame)
AGHAF_CAN_Frame_esi.
Definition: aghaf_can.cpp:445
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:342
AGHAF_CAN_FrameType AGHAF_CAN_Frame_frameType(AGHAF_CAN_Frame frame)
Get the type from the frame.
Definition: aghaf_can.cpp:410
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:485
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
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:319
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:542
AGHAF_CAN_Frame AGHAF_CAN_Event_frame(AGHAF_CAN_Event event)
return the frame contained in an event
Definition: aghaf_can.cpp:553
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:435
AGHAF_Status AGHAF_CAN_sendFrame(AGHAF_CAN_Bus bus, AGHAF_CAN_Frame frame)
send a frame on a CAN bus
Definition: aghaf_can.cpp:514
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:371
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:468
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:384
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:528
AGHAF_Status AGHAF_CAN_Bus_clearFilters(AGHAF_CAN_Bus bus)
clear the filters from a bus
Definition: aghaf_can.cpp:289
uint8_t AGHAF_CAN_getEventBusIndex(AGHAF_CAN_Event event)
return the index from the bus on which occured the event
Definition: aghaf_can.cpp:582
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:360
uint32_t AGHAF_CAN_Event_busLoad(AGHAF_CAN_Event_busInfo busState)
return the bus load
Definition: aghaf_can.cpp:602
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:398
int64_t AGHAF_CAN_Frame_dataSize(AGHAF_CAN_Frame frame)
return the size from the data
Definition: aghaf_can.cpp:503
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:572
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:301
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:592
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:423
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:612
AGHAF_CAN_EventType AGHAF_CAN_typeEvent(AGHAF_EventInfo event)
return the type from the event
Definition: aghaf_can.cpp:563
AGHAF_BOOL AGHAF_CAN_Frame_brs(AGHAF_CAN_Frame frame)
AGHAF_CAN_Frame_brs.
Definition: aghaf_can.cpp:456
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_DoCAN_v2_setOnMessageRxErrorCallback(AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_onMessageRxError callback, void *userContext)
set the callback called on a reception error event
Definition: aghaf_docan_v2.cpp:70
AGHAF_Status AGHAF_DoCAN_v2_Channel_start(AGHAF_DoCAN_v2_Channel channel)
Start a channel.
Definition: aghaf_docan_v2.cpp:182
AGHAF_Status AGHAF_DoCAN_v2_Channel_setParam(AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_ChannelParam param, uint32_t value)
Set the parameter from a channel.
Definition: aghaf_docan_v2.cpp:154
AGHAF_Status AGHAF_DoCAN_v2_getChannelCount(AGHAF_CAN can, uint8_t *count)
Provide the number of channels available on the bus.
Definition: aghaf_docan_v2.cpp:84
void AGHAF_DoCAN_v2_Channel_activateTrace(AGHAF_DoCAN_v2_Channel channel, AGHAF_BOOL value)
Activate the CAN trace.
Definition: aghaf_docan_v2.cpp:219
AGHAF_Status AGHAF_DoCAN_v2_Channel_send(AGHAF_DoCAN_v2_Channel channel, uint32_t dataLen, uint8_t const *data)
Send on the DoCAN channel in parameter.
Definition: aghaf_docan_v2.cpp:206
void AGHAF_DoCAN_v2_setOnMessageTxErrorCallback(AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_onMessageTxError callback, void *userContext)
set the callback called on a transmission error event
Definition: aghaf_docan_v2.cpp:28
void AGHAF_DoCAN_v2_setOnMessageRxFFCallback(AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_onMessageRxFF callback, void *userContext)
set the callback called on the reception from a first frame event
Definition: aghaf_docan_v2.cpp:56
AGHAF_Status AGHAF_DoCAN_v2_releaseChannel(AGHAF_DoCAN_v2_Channel channel)
Release the channel.
Definition: aghaf_docan_v2.cpp:115
AGHAF_Status AGHAF_DoCAN_v2_Channel_getParam(AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_ChannelParam param, uint32_t *value)
Provide the value from a channel parameter.
Definition: aghaf_docan_v2.cpp:169
void AGHAF_DoCAN_v2_setOnMessageTxCallback(AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_onMessageTx callback, void *userContext)
set the callback called on a transmission event
Definition: aghaf_docan_v2.cpp:14
AGHAF_Status AGHAF_DoCAN_v2_getFreeChannelCount(AGHAF_CAN can, uint8_t *count)
Return the number of free channels still available.
Definition: aghaf_docan_v2.cpp:95
void AGHAF_DoCAN_v2_setOnMessageRxCallback(AGHAF_DoCAN_v2_Channel channel, AGHAF_DoCAN_onMessageRx callback, void *userContext)
set the callback called on a reception event
Definition: aghaf_docan_v2.cpp:42
AGHAF_Status AGHAF_DoCAN_v2_Channel_stop(AGHAF_DoCAN_v2_Channel channel)
Stop a channel.
Definition: aghaf_docan_v2.cpp:193
AGHAF_DoCAN_v2_Channel AGHAF_DoCAN_v2_createChannel(AGHAF_CAN can)
Create a channel.
Definition: aghaf_docan_v2.cpp:105
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:130
AGHAF_DoCAN_Bus AGHAF_DoCAN_getBus(AGHAF_Device device, uint8_t index)
return the DoCAN bus at index in parameter
Definition: aghaf_docan.cpp:14
AGHAF_Status AGHAF_DoCAN_releaseChannel(AGHAF_DoCAN_Channel channel)
Release the channel.
Definition: aghaf_docan.cpp:91
uint32_t AGHAF_DoCAN_Event_getDataSize(AGHAF_DoCAN_Event event)
return the size from the datas in the event
Definition: aghaf_docan.cpp:225
AGHAF_Status AGHAF_DoCAN_Channel_stop(AGHAF_DoCAN_Channel channel)
Stop a channel.
Definition: aghaf_docan.cpp:169
AGHAF_DoCAN_EventType AGHAF_DoCAN_Event_type(AGHAF_EventInfo event)
return the type from the event
Definition: aghaf_docan.cpp:206
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:59
void AGHAF_DoCAN_Channel_activateTrace(AGHAF_DoCAN_Channel channel, AGHAF_BOOL value)
Activate the CAN trace.
Definition: aghaf_docan.cpp:194
void AGHAF_DoCAN_deregisterCallback(AGHAF_DoCAN_Bus bus, AGHAF_DoCAN_Callback callback)
deregister a callback
Definition: aghaf_docan.cpp:47
AGHAF_DoCAN_Channel AGHAF_DoCAN_Event_getChannel(AGHAF_DoCAN_Event event)
Return the channel on which occured the event.
Definition: aghaf_docan.cpp:268
uint32_t AGHAF_DoCAN_getBusCount(AGHAF_Device device)
return the number of DoCAN bus from a device
Definition: aghaf_docan.cpp:24
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:182
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:145
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:106
AGHAF_DoCAN_Channel AGHAF_DoCAN_createChannel(AGHAF_DoCAN_Bus bus)
Create a channel.
Definition: aghaf_docan.cpp:81
uint8_t AGHAF_DoCAN_Event_getError(AGHAF_DoCAN_Event event)
Return the error value from the event.
Definition: aghaf_docan.cpp:258
AGHAF_Status AGHAF_DoCAN_Channel_start(AGHAF_DoCAN_Channel channel)
Start a channel.
Definition: aghaf_docan.cpp:158
AGHAF_Status AGHAF_DoCAN_getFreeChannelCount(AGHAF_DoCAN_Bus bus, uint8_t *count)
Return the number of free channels still available.
Definition: aghaf_docan.cpp:70
uint8_t AGHAF_DoCAN_Channel_getIndex(AGHAF_DoCAN_Channel channel)
Return the intern index from the channel.
Definition: aghaf_docan.cpp:117
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:215
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:35
AGHAF_DoKLine_Channel AGHAF_DoKLine_createChannel(AGHAF_KLine kline)
Create a channel.
Definition: aghaf_dokline.cpp:77
void AGHAF_DoKLine_setOnMsgTxCallback(AGHAF_DoKLine_Channel channel, AGHAF_DoKLine_onMsgTx callback, void *userContext)
set the callback on a transmission event
Definition: aghaf_dokline.cpp:13
AGHAF_Status AGHAF_DoKLine_getFreeChannelCount(AGHAF_KLine kline, uint8_t *count)
Return the number of free channels still available.
Definition: aghaf_dokline.cpp:66
void AGHAF_DoKLine_setOnMsgTxErrCallback(AGHAF_DoKLine_Channel channel, AGHAF_DoKLine_onMsgTxErr callback, void *userContext)
set the callback a transmission error event
Definition: aghaf_dokline.cpp:41
AGHAF_DoKLine_Channel AGHAF_DoKLine_getChannelByIndex(AGHAF_KLine kline, uint8_t index)
return the index corrsponding to the index in parameter (nullptr if the index is not found)
Definition: aghaf_dokline.cpp:101
AGHAF_Status AGHAF_DoKLine_Channel_setParam(AGHAF_DoKLine_Channel channel, AGHAF_DoKLine_ChannelParam param, uint32_t value)
Set the parameter from a channel.
Definition: aghaf_dokline.cpp:125
void AGHAF_DoKLine_releaseChannel(AGHAF_DoKLine_Channel channel)
Release the channel.
Definition: aghaf_dokline.cpp:87
AGHAF_Status AGHAF_DoKLine_Channel_send(AGHAF_DoKLine_Channel channel, uint8_t flags, uint32_t dataLen, uint8_t const *data)
Send on the DoKLine channel in parameter.
Definition: aghaf_dokline.cpp:178
AGHAF_Status AGHAF_DoKLine_Channel_getParam(AGHAF_DoKLine_Channel channel, AGHAF_DoKLine_ChannelParam param, uint32_t *value)
Provide the value from a channel parameter.
Definition: aghaf_dokline.cpp:140
AGHAF_Status AGHAF_DoKLine_Channel_start(AGHAF_DoKLine_Channel channel)
Start a channel.
Definition: aghaf_dokline.cpp:153
void AGHAF_DoKLine_setOnMsgRxCallback(AGHAF_DoKLine_Channel channel, AGHAF_DoKLine_onMsgRx callback, void *userContext)
set the callback on a reception event
Definition: aghaf_dokline.cpp:27
AGHAF_Status AGHAF_DoKLine_Channel_stop(AGHAF_DoKLine_Channel channel)
Stop a channel.
Definition: aghaf_dokline.cpp:164
AGHAF_Status AGHAF_DoKLine_getChannelCount(AGHAF_KLine kline, uint8_t *count)
Provide the number of channels available on the bus.
Definition: aghaf_dokline.cpp:55
uint8_t AGHAF_DoKLine_Channel_getIndex(AGHAF_DoKLine_Channel channel)
Return the intern index from the channel.
Definition: aghaf_dokline.cpp:112
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:104
AGHAF_Status AGHAF_ETH_deactivate(AGHAF_EthBus ethernet)
stop the communication with the Ethernet
Definition: aghaf_eth.cpp:58
void AGHAF_ETH_freeFriendlyName(char *friendlyName)
Free the memory allocated with AGHAF_Device_getFriendlyNameEthCard.
Definition: aghaf_eth.cpp:127
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:71
AGHAF_Status AGHAF_ETH_setEthernetDiagLineState(AGHAF_EthBus ethernet, AGHAF_BOOL active)
AGHAF_ETH_setEthernetDiagLineState.
Definition: aghaf_eth.cpp:161
AGHAF_Status AGHAF_ETH_activate(AGHAF_EthBus ethernet)
start the communication with the Ethernet
Definition: aghaf_eth.cpp:46
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:89
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:35
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:138
uint8_t AGHAF_ETH_getBusIndex(AGHAF_EthBus ethernet)
return the index from a Ethernet
Definition: aghaf_eth.cpp:25
void AGHAF_ETH_getFriendlyNameEthCard(AGHAF_EthBus ethernet, char **name)
Provide the friendly name associated to the network card.
Definition: aghaf_eth.cpp:118
AGHAF_Status AGHAF_KLine_sendMessage(AGHAF_KLine kline, uint8_t flags, uint16_t dataLen, uint8_t const *data)
send data on the KLine
Definition: aghaf_kline.cpp:185
void AGHAF_KLine_setOnMsgTxCallback(AGHAF_KLine kline, AGHAF_KLine_onMsgTx callback, void *userContext)
set the callback called on a tx event
Definition: aghaf_kline.cpp:14
uint8_t AGHAF_KLine_getIndex(AGHAF_KLine kline)
return the index from an KLine
Definition: aghaf_kline.cpp:101
void AGHAF_KLine_setOn5BaudInitCallback(AGHAF_KLine kline, AGHAF_KLine_on5BaudInit callback, void *userContext)
set the callback called on a 5 baud init event
Definition: aghaf_kline.cpp:78
AGHAF_Status AGHAF_KLine_setParam(AGHAF_KLine kline, AGHAF_KLine_Param param, uint32_t value)
set a parameter from a KLine
Definition: aghaf_kline.cpp:171
void AGHAF_KLine_setOnRxErrorCallback(AGHAF_KLine kline, AGHAF_KLine_onRxError callback, void *userContext)
set the callback called on a reception error event
Definition: aghaf_kline.cpp:65
void AGHAF_KLine_setOnSomCallback(AGHAF_KLine kline, AGHAF_KLine_onSOM callback, void *userContext)
set the callback called on a SOM event
Definition: aghaf_kline.cpp:40
AGHAF_Status AGHAF_KLine_isActivated(AGHAF_KLine kline, AGHAF_BOOL *isActivated)
allow to know if the communication on the KLine is started or not
Definition: aghaf_kline.cpp:142
AGHAF_Status AGHAF_KLine_deactivate(AGHAF_KLine kline)
stop the communication with the KLine
Definition: aghaf_kline.cpp:131
uint8_t AGHAF_KLine_getCount(AGHAF_Device device)
return the number of KLines available on a device
Definition: aghaf_kline.cpp:111
void AGHAF_KLine_setOnMsgRxCallback(AGHAF_KLine kline, AGHAF_KLine_onMsgRx callback, void *userContext)
set the callback called on a rx event
Definition: aghaf_kline.cpp:27
AGHAF_KLine AGHAF_KLine_get(AGHAF_Device device, uint8_t index)
return the KLine bus at the index specified
Definition: aghaf_kline.cpp:91
void AGHAF_KLine_setOnTxErrorCallback(AGHAF_KLine kline, AGHAF_KLine_onTxError callback, void *userContext)
set the callback called on a transmission error event
Definition: aghaf_kline.cpp:52
AGHAF_Status AGHAF_KLine_activate(AGHAF_KLine kline)
start the communication with the KLine
Definition: aghaf_kline.cpp:121
AGHAF_Status AGHAF_KLine_getParam(AGHAF_KLine kline, AGHAF_KLine_Param param, uint32_t *value)
get a parameter from a KLine
Definition: aghaf_kline.cpp:158
void AGHAF_LIN_setOnMessageTxCallback(AGHAF_LIN lin, AGHAF_LIN_onMessageTx callback, void *userContext)
Set the callback called on tx event.
Definition: aghaf_lin.cpp:14
AGHAF_Status AGHAF_LIN_SCHEDULE_configure(AGHAF_LIN lin, uint8_t scheduleIndex, AGHAF_LIN_ScheduleKind kind)
AGHAF_LIN_SCHEDULE_configure.
Definition: aghaf_lin.cpp:303
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:52
AGHAF_Status AGHAF_LIN_activate(AGHAF_LIN lin)
Start the communication with the LIN.
Definition: aghaf_lin.cpp:107
AGHAF_Status AGHAF_LIN_deactivate(AGHAF_LIN lin)
Stop the communication with the LIN.
Definition: aghaf_lin.cpp:117
AGHAF_Status AGHAF_LIN_sendHeader(AGHAF_LIN lin, uint8_t fid)
Write header on the LIN.
Definition: aghaf_lin.cpp:169
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:128
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:255
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:64
AGHAF_Status AGHAF_LIN_SCHEDULE_stop(AGHAF_LIN lin)
Stop the schedule currently executed on the LIN.
Definition: aghaf_lin.cpp:326
AGHAF_Status AGHAF_LIN_wakeUp(AGHAF_LIN lin)
Send a wake up request on the bus LIN.
Definition: aghaf_lin.cpp:214
AGHAF_Status AGHAF_LIN_SCHEDULE_getCount(AGHAF_LIN lin, uint8_t *count)
Number of LIN schedule that can be configured.
Definition: aghaf_lin.cpp:337
uint8_t AGHAF_LIN_getIndex(AGHAF_LIN lin)
Return the index from a LIN.
Definition: aghaf_lin.cpp:87
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:239
AGHAF_Status AGHAF_LIN_SCHEDULE_clearDatas(AGHAF_LIN lin, uint8_t scheduleIndex)
Clear the datas associated to a schedule index.
Definition: aghaf_lin.cpp:225
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:143
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:290
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:201
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:77
AGHAF_Status AGHAF_LIN_SCHEDULE_start(AGHAF_LIN lin, uint8_t scheduleIndex)
Start a schedule.
Definition: aghaf_lin.cpp:316
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:156
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:183
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:40
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:273
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:105
AGHAF_Status AGHAF_Device_getTimestamp(AGHAF_Device device, uint64_t *timestamp)
Return the current timestamp on the device.
Definition: aghaf_global.cpp:252
AGHAF_Status AGHAF_Device_getUsbInfo(AGHAF_Device device, uint16_t *vid, uint16_t *pid, uint16_t *rev)
AGHAF_Device_getUsbInfo.
Definition: aghaf_global.cpp:216
uint32_t AGHAF_getServiceVersion()
Return the version from aeds.
Definition: aghaf_global.cpp:33
AGHAF_Status AGHAF_getDeviceList(AGHAF_DeviceInfo **devices, uint32_t *size)
Provide the list of devices connected.
Definition: aghaf_global.cpp:117
char const * AGHAF_getVersionString()
Return the version from Aghaf.
Definition: aghaf_global.cpp:41
char const * AGHAF_DeviceEvent_getProductName(AGHAF_Event event)
return the product name from the device which emitted the device event
Definition: aghaf_global.cpp:63
void AGHAF_Device_getFriendlyNameEthCard(AGHAF_Device device, char **name)
AGHAF_Device_getFriendlyNameEthCard.
Definition: aghaf_global.cpp:194
void AGHAF_deregisterCallback(AGHAF_Callback callback)
Deregister a callback.
Definition: aghaf_global.cpp:283
AGHAF_Device AGHAF_getDeviceBySN(const char *productNumber, const char *serialNumber)
Return the handle on the specified device.
Definition: aghaf_global.cpp:145
AGHAF_ConnectionMode AGHAF_Device_getConnectionMode(AGHAF_Device device)
AGHAF_Device_getConnectionMode.
Definition: aghaf_global.cpp:183
AGHAF_Device AGHAF_getDeviceByHardID(uint8_t const *hardwareID)
AGHAF_getDeviceByHardID.
Definition: aghaf_global.cpp:155
AGHAF_BOOL
enumerator to get a bool definition
Definition: aghaf_global.h:114
void AGHAF_Device_freeFriendlyName(char *friendlyName)
Free the memory allocated with AGHAF_Device_getFriendlyNameEthCard.
Definition: aghaf_global.cpp:204
AGHAF_BOOL AGHAF_isServiceRunning()
Inform if ghaston is running or not.
Definition: aghaf_global.cpp:55
void AGHAF_freeDeviceList(AGHAF_DeviceInfo *devices)
Free the memory allocated with AGHAF_getDeviceList.
Definition: aghaf_global.cpp:126
AGHAF_Status AGHAF_getDeviceInfo(AGHAF_Device device, AGHAF_DeviceInfo *deviceInfo)
Return the informations from a device.
Definition: aghaf_global.cpp:171
AGHAF_Status AGHAF_refreshDeviceList()
Call the device event callbacks with the devices connected.
Definition: aghaf_global.cpp:134
void AGHAF_registerCallback(AGHAF_Callback callback, void *userContext)
Register a callback for the device event.
Definition: aghaf_global.cpp:275
char const * AGHAF_DeviceEvent_getSerialNumber(AGHAF_Event event)
return the serial number from the device which emitted the device event
Definition: aghaf_global.cpp:85
AGHAF_Status AGHAF_Event_getInfo(AGHAF_Event event, AGHAF_EventInfo *info)
AGHAF_Event_getInfo.
Definition: aghaf_global.cpp:264
AGHAF_Status AGHAF_closeDevice(AGHAF_Device device)
close the device
Definition: aghaf_global.cpp:241
AGHAF_Status AGHAF_openDevice(AGHAF_Device device)
Open a device.
Definition: aghaf_global.cpp:231
char const * AGHAF_DeviceEvent_getProductNumber(AGHAF_Event event)
return the product number from the device which emitted the device event
Definition: aghaf_global.cpp:74
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:96
uint32_t AGHAF_getVersion()
Return the version from Aghaf.
Definition: aghaf_global.cpp:18
@ AGHAF_FALSE
false
Definition: aghaf_global.h:115
@ AGHAF_TRUE
true
Definition: aghaf_global.h:116