#include <device/MiniscopeDeviceInterface.h>
Public Member Functions | |
| DeviceInterface (AnsiString asDllName) | |
| Constructor. | |
| int | Load (void) |
| load dll (dll name was supplied to constructor) | |
| void | ShowSettings (void) |
| Show device settings window. | |
| void | AcquireStart (void) |
| void | AcquireStop (void) |
| int | Connect (void) |
| Connect device. | |
| int | Disconnect (void) |
| Disconnect device. | |
| int | SetSensitivity (int sens) |
| Set analog gain. | |
| int | SetSampling (int sampl) |
| Set sampling frequency. | |
| int | SetAcqMode (int mode) |
| int | SetTriggerType (int type) |
| Set required trigger type. | |
| int | SetTriggerLevel (int level) |
| Set level of trigger. | |
| int | ManualTrigger (void) |
| Immediate trigger request. | |
| int | SetBufferSize (int size) |
| Set device acquision buffer size. After each triggering receiving full buffer from device is expected. | |
| int | SetCouplingType (int type) |
| Set coupling type (AC/DC..) for analog part of device. | |
| int | GetSettings (struct S_SCOPE_SETTINGS *settings) |
| Get default or saved in configuration settings for device. | |
| int | SaveSettings (struct S_SCOPE_SETTINGS *settings) |
| Save configuration settings for device. | |
| int | StoreCalibration (int range, int offset, float gain) |
| Save calibration data for specified sensitivity range. | |
| int | GetCalibration (int range, int *const offset, float *const gain) |
| Read calibration data. | |
| bool | hasCalibration (void) |
| struct ConnectionInfo & | GetConnectionInfo (void) |
Static Public Member Functions | |
| static void | EnumerateDlls (AnsiString dir) |
| Make list of valid dlls in supplied location. | |
| static void __stdcall | OnLog (void *cookie, char *szText) |
| called to generate log in parent application | |
| static void __stdcall | OnConnect (void *cookie, int state, char *szMsgText) |
| called on connection/disconnection of device | |
| static void __stdcall | OnData (void *cookie, void *buffer, unsigned int buffersize) |
| called to pass data (samples) to parent application | |
| static void __stdcall | OnTrigger (void *cookie) |
| called when device is triggered | |
| static AnsiString | GetTriggerTypeName (enum E_TRIGGER_TYPE type) |
| static AnsiString | GetCouplingTypeName (enum E_COUPLING_TYPE type) |
Public Attributes | |
| struct S_SCOPE_CAPABILITIES * | capabilities |
| CallbackData | callbackData |
| if set called when new data is received from device | |
| CallbackConnect | callbackConnect |
| if set called when connection state changes | |
| CallbackTrigger | callbackTrigger |
| if set called when device is triggered | |
| struct S_SCOPE_SETTINGS | settings |
Static Public Attributes | |
| static std::vector< DllInfo > | dlls |
| DeviceInterface::DeviceInterface | ( | AnsiString | asDllName | ) |
Constructor.
| asDllName | Name of dll used by object to communicate with device |
| int DeviceInterface::GetCalibration | ( | int | range, | |
| int *const | offset, | |||
| float *const | gain | |||
| ) | [inline] |
Read calibration data.
| range | sensitivity range (index from capabilities structure) | |
| offset | value (int LSB) corresponding to 0 V | |
| gain | real_sensitivity/capabilities_sensitivity |
| int DeviceInterface::ManualTrigger | ( | void | ) | [inline] |
Immediate trigger request.
| int DeviceInterface::SetBufferSize | ( | int | size | ) | [inline] |
Set device acquision buffer size. After each triggering receiving full buffer from device is expected.
| size | size of buffer [samples] |
| int DeviceInterface::SetCouplingType | ( | int | type | ) | [inline] |
Set coupling type (AC/DC..) for analog part of device.
| type | index of coupling type inside capabilities structure |
| int DeviceInterface::SetSampling | ( | int | sampl | ) | [inline] |
Set sampling frequency.
| sampl | index of new sampling period inside capabilities structure |
| int DeviceInterface::SetSensitivity | ( | int | sens | ) | [inline] |
Set analog gain.
| sens | index of new sensitivity value inside capabilities structure |
| int DeviceInterface::SetTriggerLevel | ( | int | level | ) | [inline] |
Set level of trigger.
| level | trigger level -100%...100% |
| int DeviceInterface::SetTriggerType | ( | int | type | ) | [inline] |
Set required trigger type.
| type | trigger type according to enum E_TRIGGER_TYPE |
| void DeviceInterface::ShowSettings | ( | void | ) | [inline] |
Show device settings window.
Show device settings window. Miniscope doesn't manage any settigs related to input devices. Device dll is responsible for storing/restoring data and can supply it's own window for this settings.
| int DeviceInterface::StoreCalibration | ( | int | range, | |
| int | offset, | |||
| float | gain | |||
| ) | [inline] |
Save calibration data for specified sensitivity range.
| range | sensitivity range (index from capabilities structure) | |
| offset | value (int LSB) corresponding to 0 V | |
| gain | real_sensitivity/capabilities_sensitivity |
struct S_SCOPE_CAPABILITIES* DeviceInterface::capabilities [read] |
Ptr to structure describing device functionality. Actual structure is allocated by device library
std::vector< DllInfo > DeviceInterface::dlls [static] |
Info about found device interface libraries
1.5.9