LASP 1.0
Library for Acoustic Signal Processing
Loading...
Searching...
No Matches
DeviceInfo Class Reference

Structure containing device info parameters. More...

#include <lasp_deviceinfo.h>

Inheritance diagram for DeviceInfo:
Collaboration diagram for DeviceInfo:

Public Member Functions

virtual ~DeviceInfo ()
 Virtual desctructor. Can be derived class.
 
DeviceInfooperator= (const DeviceInfo &)=delete
 
virtual std::unique_ptr< DeviceInfoclone () const
 Clone a device info.
 
double prefSampleRate () const
 
 operator string () const
 String representation of DeviceInfo.
 

Static Public Member Functions

static DeviceInfoList getDeviceInfo ()
 Create a list of DeviceInfo's that are at call time avalable.
 

Public Attributes

DaqApi api
 Backend API corresponding to device.
 
string device_name = ""
 The name of the device.
 
std::vector< DataTypeDescriptor::DataTypeavailableDataTypes
 The available data types the device can output.
 
int prefDataTypeIndex = 0
 The device's prefferd data type.
 
dvec availableSampleRates
 Available sample rates the device can run on.
 
int prefSampleRateIndex = -1
 Preferred setting for the sample rate.
 
usvec availableFramesPerBlock
 Available latency-setting (number of frames passed in each callback).
 
us prefFramesPerBlockIndex = 0
 Preffered number of frames per callback.
 
dvec availableInputRanges
 Available ranges for the input, i.e. +/- 1V and/or +/- 10 V etc.
 
int prefInputRangeIndex = 0
 Its preffered range.
 
unsigned ninchannels = 0
 The number of input channels available for the device.
 
unsigned noutchannels = 0
 The number of output channels available for the device.
 
bool hasInputIEPE = false
 Whether the device is capable to provide IEPE constant current power supply.
 
bool hasInputACCouplingSwitch = false
 Whether the device is capable of enabling a hardware AC-coupling.
 
bool hasInputTrigger = false
 Whether the device is able to trigger on input.
 
bool hasInternalOutputMonitor = false
 Whether the device has an internal monitor of the output signal. If true, the device is able to monitor output signals internally and able to present output signals as virtual input signals. This only works together Daq's that are able to run in full duplex mode.
 
bool duplexModeForced = false
 This flag is used to be able to indicate that the device cannot run input and output streams independently, without opening the device in duplex mode. This is for example true for the UlDaq: only one handle to the device can be given at the same time.
 
DaqChannel::Qty physicalOutputQty = DaqChannel::Qty::Number
 The physical quantity of the output signal. For 'normal' audio devices, this is typically a 'number' between +/- full scale. For some devices however, the output quantity corresponds to a physical signal, such a Volts.
 

Detailed Description

Structure containing device info parameters.

Definition at line 16 of file lasp_deviceinfo.h.

Constructor & Destructor Documentation

◆ ~DeviceInfo()

virtual DeviceInfo::~DeviceInfo ( )
inlinevirtual

Virtual desctructor. Can be derived class.

Definition at line 21 of file lasp_deviceinfo.h.

Member Function Documentation

◆ clone()

virtual std::unique_ptr< DeviceInfo > DeviceInfo::clone ( ) const
inlinevirtual

Clone a device info.

Returns
Cloned device info

Reimplemented in UlDaqDeviceInfo.

Definition at line 29 of file lasp_deviceinfo.h.

◆ getDeviceInfo()

DeviceInfoList DeviceInfo::getDeviceInfo ( )
static

Create a list of DeviceInfo's that are at call time avalable.

Returns
The device info's for each found device.

Definition at line 18 of file lasp_deviceinfo.cpp.

◆ operator string()

DeviceInfo::operator string ( ) const
inline

String representation of DeviceInfo.

Returns
string

Definition at line 140 of file lasp_deviceinfo.h.

◆ operator=()

DeviceInfo & DeviceInfo::operator= ( const DeviceInfo )
delete

◆ prefSampleRate()

double DeviceInfo::prefSampleRate ( ) const
inline

Definition at line 102 of file lasp_deviceinfo.h.

Member Data Documentation

◆ api

DaqApi DeviceInfo::api

Backend API corresponding to device.

Definition at line 36 of file lasp_deviceinfo.h.

◆ availableDataTypes

std::vector<DataTypeDescriptor::DataType> DeviceInfo::availableDataTypes

The available data types the device can output.

Definition at line 45 of file lasp_deviceinfo.h.

◆ availableFramesPerBlock

usvec DeviceInfo::availableFramesPerBlock

Available latency-setting (number of frames passed in each callback).

Definition at line 64 of file lasp_deviceinfo.h.

◆ availableInputRanges

dvec DeviceInfo::availableInputRanges

Available ranges for the input, i.e. +/- 1V and/or +/- 10 V etc.

Definition at line 73 of file lasp_deviceinfo.h.

◆ availableSampleRates

dvec DeviceInfo::availableSampleRates

Available sample rates the device can run on.

Definition at line 54 of file lasp_deviceinfo.h.

◆ device_name

string DeviceInfo::device_name = ""

The name of the device.

Definition at line 40 of file lasp_deviceinfo.h.

◆ duplexModeForced

bool DeviceInfo::duplexModeForced = false

This flag is used to be able to indicate that the device cannot run input and output streams independently, without opening the device in duplex mode. This is for example true for the UlDaq: only one handle to the device can be given at the same time.

Definition at line 125 of file lasp_deviceinfo.h.

◆ hasInputACCouplingSwitch

bool DeviceInfo::hasInputACCouplingSwitch = false

Whether the device is capable of enabling a hardware AC-coupling.

Definition at line 96 of file lasp_deviceinfo.h.

◆ hasInputIEPE

bool DeviceInfo::hasInputIEPE = false

Whether the device is capable to provide IEPE constant current power supply.

Definition at line 92 of file lasp_deviceinfo.h.

◆ hasInputTrigger

bool DeviceInfo::hasInputTrigger = false

Whether the device is able to trigger on input.

Definition at line 100 of file lasp_deviceinfo.h.

◆ hasInternalOutputMonitor

bool DeviceInfo::hasInternalOutputMonitor = false

Whether the device has an internal monitor of the output signal. If true, the device is able to monitor output signals internally and able to present output signals as virtual input signals. This only works together Daq's that are able to run in full duplex mode.

Definition at line 117 of file lasp_deviceinfo.h.

◆ ninchannels

unsigned DeviceInfo::ninchannels = 0

The number of input channels available for the device.

Definition at line 82 of file lasp_deviceinfo.h.

◆ noutchannels

unsigned DeviceInfo::noutchannels = 0

The number of output channels available for the device.

Definition at line 86 of file lasp_deviceinfo.h.

◆ physicalOutputQty

DaqChannel::Qty DeviceInfo::physicalOutputQty = DaqChannel::Qty::Number

The physical quantity of the output signal. For 'normal' audio devices, this is typically a 'number' between +/- full scale. For some devices however, the output quantity corresponds to a physical signal, such a Volts.

Definition at line 133 of file lasp_deviceinfo.h.

◆ prefDataTypeIndex

int DeviceInfo::prefDataTypeIndex = 0

The device's prefferd data type.

Definition at line 49 of file lasp_deviceinfo.h.

◆ prefFramesPerBlockIndex

us DeviceInfo::prefFramesPerBlockIndex = 0

Preffered number of frames per callback.

Definition at line 68 of file lasp_deviceinfo.h.

◆ prefInputRangeIndex

int DeviceInfo::prefInputRangeIndex = 0

Its preffered range.

Definition at line 77 of file lasp_deviceinfo.h.

◆ prefSampleRateIndex

int DeviceInfo::prefSampleRateIndex = -1

Preferred setting for the sample rate.

Definition at line 58 of file lasp_deviceinfo.h.


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