|
AGHAF 5.0.9
Annecy electronique Generic Hardware Access Framework
|
API to interrogate AEDS about connected devices. More...
| enum | AGHAF_BOOL { AGHAF_FALSE = 0 , AGHAF_TRUE = 1 } |
| enumerator to get a bool definition More... | |
| enum | AGHAF_Status { AGHAF_STATUS_OK = 0 , AGHAF_ERROR_PARAM = 1 , AGHAF_ERROR_NOT_ENOUGH_MEMORY = 2 , AGHAF_ERROR_OUT_OF_MEMORY = 3 , AGHAF_ERROR_NOT_IMPLEMENTED = 4 , AGHAF_ERROR_END_REACHED = 5 , AGHAF_INTERNAL_ERROR , AGHAF_ERROR_CONNECTION = 7 , AGHAF_ERROR_BUS_NOT_FOUND = 8 , AGHAF_ERROR_PENDING = 9 , AGHAF_ERROR_WRONG_STATE = 10 , AGHAF_ERROR_NOT_ENOUGH_BUS = 11 , AGHAF_WRONG_SERVICE_VERSION = 12 , AGHAF_TIMEOUT_COM = 13 , AGHAF_DEPRECATED = 14 , AGHAF_ERROR_SEQUENCE = 15 , AGHAF_ERROR_FIFOFULL = 16 , AGHAF_ERROR_ALREADY_OPEN = 17 , AGHAF_ERROR_BUSY = 18 , AGHAF_ERROR_NOMORECHANNEL = 19 , AGHAF_ERROR_UNKNOWN = 20 , AGHAF_ERROR_WRONG_SESSION_TYPE = 21 , AGHAF_ERROR_NO_DATA = 22 , AGHAF_ERROR_NOT_SUPPORTED = 23 , AGHAF_ERROR_UNINITIALIZED = 0xFF } |
| enumerator to define the error type in aghaf functions More... | |
| enum | AGHAF_ConnectionMode { AGHAF_OFFLINE , AGHAF_USB , AGHAF_ETH } |
| deprecated More... | |
| enum | AGHAF_DeviceEvent { AGHAF_Device_noEvent , AGHAF_Device_Arrival , AGHAF_Device_Leave , AGHAF_Device_Present } |
| device event fot hotplug management More... | |
| enum | AGHAF_TypeEvent { AGHAF_TypeNoEvent , AGHAF_TypeDeviceEvent , AGHAF_TypeEthernetEvent , AGHAF_TypeCanEvent , AGHAF_TypeDoCanEvent } |
| type of event received in a callback More... | |
| enum | AGHAF_DeviceState { AGHAF_DeviceState_error = 0 , AGHAF_DeviceState_boot , AGHAF_DeviceState_ready } |
| current state of the device (in the boot or in the application part of the firmware) More... | |
| typedef void * | AGHAF_Device |
| handle on an exxotest device | |
| typedef void * | AGHAF_Event |
| Typedef of a native event handle that can be used to wait for events. | |
| typedef void(* | AGHAF_Callback) (AGHAF_Event event, void *userContext) |
| callback for the devices hotplug management | |
| typedef enum AGHAF_DeviceState | AGHAF_DeviceState |
| current state of the device (in the boot or in the application part of the firmware) | |
| typedef struct AGHAF_DeviceInfo | AGHAF_DeviceInfo |
| structure containing the informtions about a device | |
| typedef struct AGHAF_EventInfo | AGHAF_EventInfo |
| generic stucture to read an event in a callback | |
| void | AGHAF_initialize (void) |
| Initialize Aghaf library. | |
| void | AGHAF_uninitialize (void) |
| Uninitialize Aghaf library. | |
| uint32_t | AGHAF_getVersion (void) |
| Return the version from Aghaf. | |
| const char * | AGHAF_getVersionString (void) |
| Return the version from Aghaf. | |
| AGHAF_Status | AGHAF_getServiceVersion (uint32_t *version) |
| Return the version from aeds. | |
| char const * | AGHAF_DeviceEvent_getProductName (AGHAF_Event event) |
| return the product name from the device which emitted the device event | |
| char const * | AGHAF_DeviceEvent_getProductNumber (AGHAF_Event event) |
| return the product number from the device which emitted the device event | |
| char const * | AGHAF_DeviceEvent_getSerialNumber (AGHAF_Event event) |
| return the serial number from the device which emitted the device event | |
| uint8_t const * | AGHAF_DeviceEvent_getHardwareUniqueId (AGHAF_Event event) |
| return the hardware unique id from the device which emitted the device event | |
| 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_freeDeviceList (AGHAF_DeviceInfo *devices) |
| Free the memory allocated with AGHAF_getDeviceList. | |
| AGHAF_Status | AGHAF_refreshDeviceList (void) |
| Call the device event callbacks with the devices connected. | |
| AGHAF_Status | AGHAF_getDeviceBySN (char const *productNumber, char const *serialNumber, AGHAF_Device *device) |
| Return the handle on the specified device. | |
| AGHAF_Status | AGHAF_getDeviceByHardID (uint8_t const *hardwareID, AGHAF_Device *device) |
| AGHAF_getDeviceByHardID. | |
| AGHAF_Status | AGHAF_getDeviceInfo (AGHAF_Device device, AGHAF_DeviceInfo *deviceInfo) |
| Return the informations from a device. | |
| AGHAF_ConnectionMode | AGHAF_Device_getConnectionMode (AGHAF_Device device) |
| AGHAF_Device_getConnectionMode. | |
| void | AGHAF_Device_getFriendlyNameEthCard (AGHAF_Device device, char **name) |
| AGHAF_Device_getFriendlyNameEthCard. | |
| void | AGHAF_Device_freeFriendlyName (char *friendlyName) |
| Free the memory allocated with AGHAF_Device_getFriendlyNameEthCard. | |
| AGHAF_Status | AGHAF_Device_getUsbInfo (AGHAF_Device device, uint16_t *vid, uint16_t *pid, uint16_t *rev) |
| AGHAF_Device_getUsbInfo. | |
| AGHAF_Status | AGHAF_openDevice (AGHAF_Device device) |
| Open a device. | |
| AGHAF_Status | AGHAF_closeDevice (AGHAF_Device device) |
| close the device | |
| AGHAF_Status | AGHAF_Device_getTimestamp (AGHAF_Device device, uint64_t *timestamp) |
| Return the current timestamp on the device. | |
| AGHAF_Status | AGHAF_Event_getInfo (AGHAF_Event event, AGHAF_EventInfo *info) |
| AGHAF_Event_getInfo. | |
| AGHAF_Status | AGHAF_registerCallback (AGHAF_Callback callback, void *userContext) |
| Register a callback for the device event. | |
| AGHAF_Status | AGHAF_deregisterCallback (AGHAF_Callback callback) |
| Deregister a callback. | |
API to interrogate AEDS about connected devices.
| AGHAF_Callback |
callback for the devices hotplug management
| event | handle on the event |
| userContext | context given in AGHAF_registerCallback |
| enum AGHAF_BOOL |
| enum AGHAF_ConnectionMode |
| enum AGHAF_DeviceEvent |
| enum AGHAF_DeviceState |
| enum AGHAF_Status |
enumerator to define the error type in aghaf functions
| Enumerator | |
|---|---|
| AGHAF_STATUS_OK | The operation succeeded. |
| AGHAF_ERROR_PARAM | One or more parameters are invalid. |
| AGHAF_ERROR_NOT_ENOUGH_MEMORY | Not enough memory. Generally means that the output buffer of a function is too small to hold all the data |
| AGHAF_ERROR_OUT_OF_MEMORY | This is an internal error meaning that the library or its underlying elements have run out of memory |
| AGHAF_ERROR_NOT_IMPLEMENTED | The function is not yet implemented. This error probably means that you are using an unstable development version. Please contact software support to get the latest stable version. |
| AGHAF_ERROR_END_REACHED | There was not enough elements left and the end has been reached. This error happens when trying to access at least 1 element after the end, i.e. reading the last element does not trigger this error. |
| AGHAF_INTERNAL_ERROR | There was an error in internal object management. |
| AGHAF_ERROR_CONNECTION | This error happens when communication with service is lost. |
| AGHAF_ERROR_BUS_NOT_FOUND | This error happens when trying to access a bus or device with a invalid handle. |
| AGHAF_ERROR_PENDING | Internal use only. |
| AGHAF_ERROR_WRONG_STATE | This error happens when user call function in wrong state. |
| AGHAF_ERROR_NOT_ENOUGH_BUS | This error happens when user try to access a wrong AGHAF_DoCAN_Bus. |
| AGHAF_WRONG_SERVICE_VERSION | This error happens when the service is not compatible with the version of this library. |
| AGHAF_TIMEOUT_COM | This error happens when service take too long time to response. |
| AGHAF_DEPRECATED | This error happens when a function is deprecated. |
| AGHAF_ERROR_SEQUENCE | sequence of function call is wrong |
| AGHAF_ERROR_FIFOFULL | intern fifo if full |
| AGHAF_ERROR_ALREADY_OPEN | device already opened |
| AGHAF_ERROR_BUSY | busy |
| AGHAF_ERROR_NOMORECHANNEL | no more do can channels are available |
| AGHAF_ERROR_UNKNOWN | unknown error, contact your provider |
| AGHAF_ERROR_WRONG_SESSION_TYPE | the type of the session does not match the function called |
| AGHAF_ERROR_NO_DATA | This error happens when a problem occur between this library and service. |
| AGHAF_ERROR_NOT_SUPPORTED | This error happens when a function is not supported by the device. |
| enum AGHAF_TypeEvent |
| AGHAF_Status AGHAF_closeDevice | ( | AGHAF_Device | device | ) |
close the device
| device | handle on the device |
| AGHAF_Status AGHAF_deregisterCallback | ( | AGHAF_Callback | callback | ) |
| void AGHAF_Device_freeFriendlyName | ( | char * | friendlyName | ) |
Free the memory allocated with AGHAF_Device_getFriendlyNameEthCard.
| friendlyName | name to free |
| AGHAF_ConnectionMode AGHAF_Device_getConnectionMode | ( | AGHAF_Device | device | ) |
AGHAF_Device_getConnectionMode.
| device |
| void AGHAF_Device_getFriendlyNameEthCard | ( | AGHAF_Device | device, |
| char ** | name | ||
| ) |
AGHAF_Device_getFriendlyNameEthCard.
| device | |
| name |
| AGHAF_Status AGHAF_Device_getTimestamp | ( | AGHAF_Device | device, |
| uint64_t * | timestamp | ||
| ) |
Return the current timestamp on the device.
| device | handle on the device |
| timestamp | will be filled with the timestamp if request success |
| AGHAF_Status AGHAF_Device_getUsbInfo | ( | AGHAF_Device | device, |
| uint16_t * | vid, | ||
| uint16_t * | pid, | ||
| uint16_t * | rev | ||
| ) |
AGHAF_Device_getUsbInfo.
| device | |
| vid | |
| pid | |
| rev |
| uint8_t const * AGHAF_DeviceEvent_getHardwareUniqueId | ( | AGHAF_Event | event | ) |
return the hardware unique id from the device which emitted the device event
| event |
| char const * AGHAF_DeviceEvent_getProductName | ( | AGHAF_Event | event | ) |
return the product name from the device which emitted the device event
| event |
| char const * AGHAF_DeviceEvent_getProductNumber | ( | AGHAF_Event | event | ) |
return the product number from the device which emitted the device event
| event |
| char const * AGHAF_DeviceEvent_getSerialNumber | ( | AGHAF_Event | event | ) |
return the serial number from the device which emitted the device event
| event |
| AGHAF_Status AGHAF_Event_getInfo | ( | AGHAF_Event | event, |
| AGHAF_EventInfo * | info | ||
| ) |
AGHAF_Event_getInfo.
| event | |
| info |
| void AGHAF_freeDeviceList | ( | AGHAF_DeviceInfo * | devices | ) |
Free the memory allocated with AGHAF_getDeviceList.
| devices | array to free |
| AGHAF_Status AGHAF_getDeviceByHardID | ( | uint8_t const * | hardwareID, |
| AGHAF_Device * | device | ||
| ) |
AGHAF_getDeviceByHardID.
| hardwareID | hardware unique ID of the device |
| device | pointer on the handle from the device to fill |
| AGHAF_Status AGHAF_getDeviceBySN | ( | char const * | productNumber, |
| char const * | serialNumber, | ||
| AGHAF_Device * | device | ||
| ) |
Return the handle on the specified device.
| productNumber | product number of the device |
| serialNumber | serial number of the device |
| device | pointer on the handle from the device to fill |
| AGHAF_Status AGHAF_getDeviceCount | ( | uint32_t * | count | ) |
Return the number of devices onnected.
| AGHAF_Status AGHAF_getDeviceInfo | ( | AGHAF_Device | device, |
| AGHAF_DeviceInfo * | deviceInfo | ||
| ) |
Return the informations from a device.
| device | handle on the device |
| deviceInfo | pointer to fill with the data |
| AGHAF_Status AGHAF_getDeviceList | ( | AGHAF_DeviceInfo ** | devices, |
| uint32_t * | size | ||
| ) |
Provide the list of devices connected.
| devices | pointer to fill with devices |
| size | number of devices in devices |
| AGHAF_Status AGHAF_getServiceVersion | ( | uint32_t * | version | ) |
Return the version from aeds.
| uint32_t AGHAF_getVersion | ( | void | ) |
Return the version from Aghaf.
| const char * AGHAF_getVersionString | ( | void | ) |
Return the version from Aghaf.
| void AGHAF_initialize | ( | void | ) |
Initialize Aghaf library.
| AGHAF_Status AGHAF_openDevice | ( | AGHAF_Device | device | ) |
Open a device.
| device | handle on the device |
| AGHAF_Status AGHAF_refreshDeviceList | ( | void | ) |
Call the device event callbacks with the devices connected.
| AGHAF_Status AGHAF_registerCallback | ( | AGHAF_Callback | callback, |
| void * | userContext | ||
| ) |
Register a callback for the device event.
| callback | |
| userContext |
| void AGHAF_uninitialize | ( | void | ) |
Uninitialize Aghaf library.