LASP 1.0
Library for Acoustic Signal Processing
|
Configuration of a DAQ device. More...
#include <lasp_daqconfig.h>
Public Member Functions | |
std::string | toTOML () const |
Export the class to TOML markup language. | |
std::vector< DaqChannel > | enabledInChannels (const bool include_monitor=true) const |
Return list of enabled input channels. | |
DaqConfiguration (const DeviceInfo &deviceinfo) | |
Create a default configuration, with all channels disabled on both input and output, and default channel names. | |
DaqConfiguration () | |
bool | match (const DeviceInfo &devinfo) const |
Check to see whether the DAQ configuration matches with the device. This means, some basic checks are done on channels, sampling rate, etc, and that the name corresponds with the device name. | |
int | getHighestEnabledInChannel () const |
Get the enabled highest channel number from the list of enabled input channels. | |
int | getHighestEnabledOutChannel () const |
Get the highest channel number from the list of enabled output channels. | |
int | getLowestEnabledInChannel () const |
Get the lowest channel number from the list of enabled input channels. | |
int | getLowestEnabledOutChannel () const |
Get the lowest channel number from the list of enabled output channels. | |
void | setAllInputEnabled (bool val) |
Set all input channels to enabled / disabled state. | |
void | setAllOutputEnabled (bool val) |
Set all output channels to enabled / disabled state. | |
Static Public Member Functions | |
static DaqConfiguration | fromTOML (const std::string &toml) |
Load in a DAQConfiguration from TOML. | |
Public Attributes | |
DaqApi | api |
string | device_name |
The internal device name this DAQ configuration applies to. | |
std::vector< DaqChannel > | inchannel_config |
Channel configuration for input channels. | |
std::vector< DaqChannel > | outchannel_config |
Channel configuration for output channels. | |
int | sampleRateIndex = 0 |
Index in list of sample rates that are available for the device. | |
int | dataTypeIndex = 0 |
Required datatype for output, should be present in the list. | |
int | framesPerBlockIndex = 0 |
The index in the array of frames per block that can be used for the device. | |
bool | monitorOutput = false |
If set to true and if the device has this capability, the output channels are added as input channels as well. | |
Configuration of a DAQ device.
Definition at line 225 of file lasp_daqconfig.h.
DaqConfiguration::DaqConfiguration | ( | const DeviceInfo & | deviceinfo | ) |
Create a default configuration, with all channels disabled on both input and output, and default channel names.
deviceinfo | DeviceInfo structure |
Definition at line 28 of file lasp_daqconfig.cpp.
|
inline |
Definition at line 300 of file lasp_daqconfig.h.
vector< DaqChannel > DaqConfiguration::enabledInChannels | ( | const bool | include_monitor = true | ) | const |
Return list of enabled input channels.
include_monitor | If set to true and a monitor channel is available, the first indices in the array will correspond to the monitor channel(s). |
Definition at line 89 of file lasp_daqconfig.cpp.
|
static |
Load in a DAQConfiguration from TOML.
toml | String containing TOML data |
Definition at line 190 of file lasp_daqconfig.cpp.
int DaqConfiguration::getHighestEnabledInChannel | ( | ) | const |
Get the enabled highest channel number from the list of enabled input channels.
Definition at line 60 of file lasp_daqconfig.cpp.
int DaqConfiguration::getHighestEnabledOutChannel | ( | ) | const |
Get the highest channel number from the list of enabled output channels.
Definition at line 68 of file lasp_daqconfig.cpp.
int DaqConfiguration::getLowestEnabledInChannel | ( | ) | const |
Get the lowest channel number from the list of enabled input channels.
Definition at line 75 of file lasp_daqconfig.cpp.
int DaqConfiguration::getLowestEnabledOutChannel | ( | ) | const |
Get the lowest channel number from the list of enabled output channels.
Definition at line 82 of file lasp_daqconfig.cpp.
bool DaqConfiguration::match | ( | const DeviceInfo & | devinfo | ) | const |
Check to see whether the DAQ configuration matches with the device. This means, some basic checks are done on channels, sampling rate, etc, and that the name corresponds with the device name.
devinfo | The DeviceInfo to check |
Definition at line 56 of file lasp_daqconfig.cpp.
|
inline |
Set all input channels to enabled / disabled state.
val | true if enabled, false if disabled. |
Definition at line 352 of file lasp_daqconfig.h.
|
inline |
Set all output channels to enabled / disabled state.
val | true if enabled, false if disabled. |
Definition at line 363 of file lasp_daqconfig.h.
string DaqConfiguration::toTOML | ( | ) | const |
Export the class to TOML markup language.
Definition at line 124 of file lasp_daqconfig.cpp.
DaqApi DaqConfiguration::api |
Definition at line 243 of file lasp_daqconfig.h.
int DaqConfiguration::dataTypeIndex = 0 |
Required datatype for output, should be present in the list.
Definition at line 278 of file lasp_daqconfig.h.
string DaqConfiguration::device_name |
The internal device name this DAQ configuration applies to.
Definition at line 247 of file lasp_daqconfig.h.
int DaqConfiguration::framesPerBlockIndex = 0 |
The index in the array of frames per block that can be used for the device.
Definition at line 284 of file lasp_daqconfig.h.
std::vector<DaqChannel> DaqConfiguration::inchannel_config |
Channel configuration for input channels.
Definition at line 252 of file lasp_daqconfig.h.
bool DaqConfiguration::monitorOutput = false |
If set to true and if the device has this capability, the output channels are added as input channels as well.
Definition at line 290 of file lasp_daqconfig.h.
std::vector<DaqChannel> DaqConfiguration::outchannel_config |
Channel configuration for output channels.
Definition at line 268 of file lasp_daqconfig.h.
int DaqConfiguration::sampleRateIndex = 0 |
Index in list of sample rates that are available for the device.
Definition at line 273 of file lasp_daqconfig.h.