#define AGHAF_DYNAMIC_LIBRARY_INIT
#include <iostream>
int main() {
#ifdef _WIN32
AGHAF_loadLibrary(AGHAF_DEFAULT_FILENAME);
#endif
uint32_t deviceCount = 0;
if (deviceCount > 0) {
uint32_t deviceInfoNumber = 0;
&device);
} else {
std::cerr << "no ethernet on this device" << '\n';
}
} else {
std::cerr << "device is used by another application" << '\n';
}
} else {
std::cerr << "no exxotest device connected" << '\n';
}
#ifdef _WIN32
AGHAF_unloadLibrary();
#endif
return 0;
}
@ AGHAF_STATUS_OK
The operation succeeded.
Definition aghaf_global.h:29
AGHAF_Status AGHAF_ETH_setEthernetDiagLineState(AGHAF_EthBus ethernet, AGHAF_BOOL active)
AGHAF_ETH_setEthernetDiagLineState.
void * AGHAF_EthBus
Handle on a ethernet object.
Definition aghaf_eth.h:24
AGHAF_EthBus AGHAF_ETH_getBus(AGHAF_Device device, uint8_t index)
return the Ethernet bus at index in parameter
uint8_t AGHAF_ETH_getBusCount(AGHAF_Device device)
return the number of CAN bus from a device
AGHAF_Status AGHAF_getDeviceCount(uint32_t *count)
Return the number of devices onnected.
AGHAF_Status AGHAF_getDeviceList(AGHAF_DeviceInfo **devices, uint32_t *size)
Provide the list of devices connected.
void AGHAF_uninitialize(void)
Uninitialize Aghaf library.
void AGHAF_freeDeviceList(AGHAF_DeviceInfo *devices)
Free the memory allocated with AGHAF_getDeviceList.
void * AGHAF_Device
handle on an exxotest device
Definition aghaf_global.h:87
void AGHAF_initialize(void)
Initialize Aghaf library.
AGHAF_Status AGHAF_getDeviceBySN(char const *productNumber, char const *serialNumber, AGHAF_Device *device)
Return the handle on the specified device.
AGHAF_Status AGHAF_closeDevice(AGHAF_Device device)
close the device
AGHAF_Status AGHAF_openDevice(AGHAF_Device device)
Open a device.
@ AGHAF_TRUE
true
Definition aghaf_global.h:24
structure containing the informtions about a device
Definition aghaf_global.h:127