DeviceInterface Class Reference

Encapsulates dll plugin. More...

#include <device/MiniscopeDeviceInterface.h>

List of all members.

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 ConnectionInfoGetConnectionInfo (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_CAPABILITIEScapabilities
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< DllInfodlls


Detailed Description

Encapsulates dll plugin.

Constructor & Destructor Documentation

DeviceInterface::DeviceInterface ( AnsiString  asDllName  ) 

Constructor.

Parameters:
asDllName Name of dll used by object to communicate with device


Member Function Documentation

int DeviceInterface::GetCalibration ( int  range,
int *const   offset,
float *const   gain 
) [inline]

Read calibration data.

Parameters:
range sensitivity range (index from capabilities structure)
offset value (int LSB) corresponding to 0 V
gain real_sensitivity/capabilities_sensitivity
Returns:
0 on success

int DeviceInterface::ManualTrigger ( void   )  [inline]

Immediate trigger request.

Returns:
0 on success

int DeviceInterface::SetBufferSize ( int  size  )  [inline]

Set device acquision buffer size. After each triggering receiving full buffer from device is expected.

Parameters:
size size of buffer [samples]

int DeviceInterface::SetCouplingType ( int  type  )  [inline]

Set coupling type (AC/DC..) for analog part of device.

Parameters:
type index of coupling type inside capabilities structure
Returns:
0 on success

int DeviceInterface::SetSampling ( int  sampl  )  [inline]

Set sampling frequency.

Parameters:
sampl index of new sampling period inside capabilities structure
Returns:
0 on successs

int DeviceInterface::SetSensitivity ( int  sens  )  [inline]

Set analog gain.

Parameters:
sens index of new sensitivity value inside capabilities structure
Returns:
0 on successs

int DeviceInterface::SetTriggerLevel ( int  level  )  [inline]

Set level of trigger.

Parameters:
level trigger level -100%...100%
Returns:
0 on successs

int DeviceInterface::SetTriggerType ( int  type  )  [inline]

Set required trigger type.

Parameters:
type trigger type according to enum E_TRIGGER_TYPE
Returns:
0 on successs

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.

Parameters:
range sensitivity range (index from capabilities structure)
offset value (int LSB) corresponding to 0 V
gain real_sensitivity/capabilities_sensitivity
Returns:
0 on success


Member Data Documentation

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


The documentation for this class was generated from the following files:

Generated on Wed May 15 22:42:22 2013 for miniscope v3 by  doxygen 1.5.9
Tomasz Ostrowski