AIOUSB is a library of C and C++ functions and classes for controlling ACCES I/O USB devices. Its function API conforms to the USB Software Reference Manual. The prior version of AIOUSB did not conform to this specification, so any application code based on the prior version will have to be revised to use the current API function names and parameter lists. Every effort was made to ensure that the current API implementation is 100% compliant with the specification.
Unfortunately, the current version of the AIOUSB API must be considered beta code and is far from finished. However, most of the general API functions and most of the general, DIO and ADC functions work, at least according to the testing so far. If any problems are observed, please notify ACCES.
Assuming you’re starting from the root directory of the distribution, installing AIOUSB consists of performing these few simple steps (logged in as ‘root’, of course).
mkdir /usr/local/include/aiousb
cp -p include/aiousb.h /usr/local/include/aiousb
cp -p lib/libaiousb.a /usr/local/lib
export CPATH=/usr/local/include/libusb-1.0/:/usr/local/include/aiousb
You can, of course, place the AIOUSB files (aiousb.h, libaiousb.a) elsewhere, such as in the local directory of the application program that will use AIOUSB. The above steps are suggested in order to conform to the usual Linux conventions and make the AIOUSB files available to all users and all application programs.
Assuming you have installed AIOUSB according to the above instructions, compiling a program to use it is as simple as:
g++ sample.cpp -laiousb -lusb-1.0 -o sample (C++)
or
gcc sample.c -laiousb -lusb-1.0 -lm -o sample (C)
The table below summarizes the AIOUSB API functions available in the library. For a detailed API reference, refer to AIOUSB API Reference.
| AIOUSB API Functions | ||
|---|---|---|
| General Functions | ||
| AIOUSB_ClearFIFO | AIOUSB_SetStreamingBlockSize | ClearDevices |
| CustomEEPROMRead | CustomEEPROMWrite | GetDeviceBySerialNumber |
| GetDevices | GetDeviceSerialNumber | QueryDeviceInfo |
| ResolveDeviceIndex | ||
| Extended General Functions | ||
| AIOUSB_Exit | AIOUSB_GetCommTimeout | AIOUSB_GetDeviceProperties |
| AIOUSB_GetResultCodeAsString | AIOUSB_GetVersion | AIOUSB_Init |
| AIOUSB_ListDevices | AIOUSB_SetCommTimeout | AIOUSB_SetMiscClock |
| DIO Functions | ||
| DIO_ConfigurationQuery | DIO_Configure | DIO_ConfigureEx |
| DIO_Read1 | DIO_Read8 | DIO_ReadAll |
| DIO_Write1 | DIO_Write8 | DIO_WriteAll |
| DIO Streaming Functions (Advanced) | ||
| DIO_StreamClose | DIO_StreamFrame | DIO_StreamOpen |
| DIO_StreamSetClocks | ||
| CTR Functions | ||
| CTR_8254Load | CTR_8254Mode | CTR_8254ModeLoad |
| CTR_8254Read | CTR_8254ReadAll | CTR_8254ReadLatched |
| CTR_8254ReadModeLoad | CTR_8254ReadStatus | CTR_8254SelectGate |
| CTR_StartOutputFreq | ||
| ADC Functions | ||
| ADC_ADMode | ADC_BulkAcquire | ADC_BulkPoll |
| ADC_GetChannelV | ADC_GetConfig | ADC_GetScan |
| ADC_GetScanV | ADC_Initialize | ADC_QueryCal |
| ADC_Range1 | ADC_RangeAll | ADC_SetCal |
| ADC_SetConfig | ADC_SetOversample | ADC_SetScanLimits |
| Extended ADC Functions | ||
| AIOUSB_CountsToVolts | AIOUSB_GetCalMode | AIOUSB_GetEndChannel |
| AIOUSB_GetGainCode | AIOUSB_GetOversample | AIOUSB_GetStartChannel |
| AIOUSB_GetTriggerMode | AIOUSB_InitConfigBlock | AIOUSB_IsDifferentialMode |
| AIOUSB_IsDiscardFirstSample | AIOUSB_MultipleCountsToVolts | AIOUSB_SetAllGainCodeAndDiffMode |
| AIOUSB_SetCalMode | AIOUSB_SetDifferentialMode | AIOUSB_SetDiscardFirstSample |
| AIOUSB_SetGainCode | AIOUSB_SetOversample | AIOUSB_SetScanRange |
| AIOUSB_SetTriggerMode | ||
| DAC Functions | ||
| DACDirect | DACMultiDirect | DACOutputClose1 |
| DACOutputCloseNoEnd1 | DACOutputFrame1 | DACOutputFrameRaw1 |
| DACOutputOpen1 | DACOutputSetCount1 | DACOutputSetInterlock1 |
| DACOutputStart1 | DACSetBoardRange | |
| Notes | ||
| 1 Not yet implemented | ||