16 class DataStreamInstrument;
21 namespace DataStreamInstrumentTasks
151 virtual void SeekBeg(std::ios_base::openmode Which = std::ios_base::in | std::ios_base::out) = 0;
159 virtual void SeekEnd(std::ios_base::openmode Which = std::ios_base::in | std::ios_base::out) = 0;
167 virtual bool SeekEqual(std::ios_base::openmode Which = std::ios_base::in | std::ios_base::out) = 0;
258 template <
typename T>
317 virtual
bool SeekRel(
signed long long OffsetInSamples, std::ios_base::seekdir SeekDir,
318 std::ios_base::openmode Which = std::ios_base::in | std::ios_base::out) = 0;
327 virtual
bool SeekAbs(
unsigned long long PositionInSamples, std::ios_base::openmode Which = std::ios_base::in | std::ios_base::out) = 0;
356 std::enable_if_t<std::is_trivially_copyable_v<SampleT>,
int> = 0
368 : StreamBuffer(sizeof(SampleT) * BufferSizeInSamples), Stream(&StreamBuffer), NumSamplesWritten(0)
370 Stream.exceptions(std::iostream::failbit | std::iostream::badbit);
382 size_t GetNumFreeSamplesToWrite() const noexcept
override {
return (StreamBuffer.psize() - StreamBuffer.ptellp()) /
sizeof(SampleT); }
383 std::streampos
GetReadPosition() const noexcept
override {
return StreamBuffer.gtellp() /
sizeof(SampleT); }
384 std::streampos
GetWritePosition() const noexcept
override {
return StreamBuffer.ptellp() /
sizeof(SampleT); }
386 virtual bool SeekRel(
signed long long OffsetInSamples, std::ios_base::seekdir SeekDir,
387 std::ios_base::openmode Which = std::ios_base::in | std::ios_base::out)
override
389 return StreamBuffer.pubseekoff(OffsetInSamples *
sizeof(SampleT), SeekDir, Which) !=
390 Util::circularbuf::pos_type(Util::circularbuf::off_type(-1));
393 virtual bool SeekAbs(
unsigned long long PositionInSamples,
394 std::ios_base::openmode Which = std::ios_base::in | std::ios_base::out)
override
396 return StreamBuffer.pubseekpos(PositionInSamples *
sizeof(SampleT), Which) !=
397 Util::circularbuf::pos_type(Util::circularbuf::off_type(-1));
400 virtual void SeekBeg(std::ios_base::openmode Which = std::ios_base::in | std::ios_base::out)
override
405 virtual void SeekEnd(std::ios_base::openmode Which = std::ios_base::in | std::ios_base::out)
override
407 if (Which & std::ios_base::in)
408 SeekRel(-1, std::ios_base::end, std::ios_base::in);
409 if (Which & std::ios_base::out)
410 SeekRel(0, std::ios_base::end, std::ios_base::out);
413 virtual bool SeekEqual(std::ios_base::openmode Which = std::ios_base::in | std::ios_base::out)
override
415 if (Which & std::ios_base::in)
417 StreamBuffer.pubsync();
426 if (Which & std::ios_base::out)
432 virtual size_t GetStreamSizeRead() const noexcept
override {
return StreamBuffer.gsize() /
sizeof(SampleT);}
433 virtual size_t GetStreamSizeWrite() const noexcept
override {
return StreamBuffer.psize() /
sizeof(SampleT); }
435 virtual void SetStreamSize(
size_t BufferSizeInSamples)
override { StreamBuffer.resize(
sizeof(SampleT) * BufferSizeInSamples); }
447 ValidateSample(Sample);
449 Stream.write(
reinterpret_cast<const char*
>(&Sample),
sizeof(SampleT));
453 if (NumSamplesWritten < std::numeric_limits<decltype(NumSamplesWritten)>::max())
465 template <
typename Rep,
typename Period>
466 void WriteSample(
const std::chrono::duration<Rep, Period>& Sample)
468 WriteSample(Sample.count());
478 Stream.read(
reinterpret_cast<char*
>(&Sample),
sizeof(SampleT));
488 template <
typename T>
491 for (
const auto& Sample : Samples)
502 std::vector<SampleT> Samples;
504 for (decltype(Count) i = 0; i < Count; ++i)
505 Samples.push_back(ReadSample());
514 StreamBuffer.clear();
567 std::enable_if_t<std::is_arithmetic_v<SampleT>,
int> = 0
578 MinValue(std::numeric_limits<SampleT>::lowest()), MaxValue(std::numeric_limits<SampleT>::max()) {}
588 :
CircularDataStream<SampleT>(BufferSizeInSamples), MinValue(MinValue), MaxValue(MaxValue) {}
601 this->MinValue = MinValue;
602 this->MaxValue = MaxValue;
648 if (Sample < MinValue || Sample > MaxValue)
650 "A sample cannot be written to a stream buffer because it exceeds the specified limits (min: " + std::to_string(MinValue)
651 +
", max: " + std::to_string(MaxValue) +
", sample: " + std::to_string(Sample) +
")");
690 : StreamSize{ Owner,
"StreamSize",
"Stream size",
691 "Size of the instrument's sample stream buffer in samples.", true, DefaultValue, MinValue, MaxValue, 1, 0 }
697 void DisableUserEditable();
759 : SamplingRate{ Owner,
"SamplingRate",
"Sampling rate",
760 "Sampling rate in samples per second.", true, DefaultSamplingRate, 0, std::numeric_limits<
ParamsConfigDialog::NumberType>::max(), 1, 3 },
761 SamplingMode{ Owner, SamplingModeTypeStrList(),
"SamplingMode",
"Sampling mode",
762 "Determines whether reading/writing happens only once or continuously.", true, DefaultSamplingMode }
768 void DisableUserEditable();
822 static const char* UnitTypeToStr(
const UnitType& Unit);
840 DataStreamBasePtrType::element_type*
GetSampleStream() const noexcept {
return SampleStream.get(); }
848 template <
typename T>
851 auto CastSampleStream =
dynamic_cast<T*
>(GetSampleStream());
852 if (!CastSampleStream)
855 return CastSampleStream;
866 void ResetImpl(dispatch_tag<InstrumentDataBase>)
override final;
896 virtual const char*
GetParamClassTag() const noexcept
override {
return "DataStreamInstrumentParams"; }
939 constexpr
static auto Name() noexcept {
return "Data Stream Instrument"; }
940 constexpr
static auto Category() noexcept {
return "I/O"; }
946 : InstrumentBase(OwnerThreadID, std::move(Params)) {}
950 virtual std::string
GetName()
const override {
return Name(); }
951 virtual std::string
GetCategory()
const override {
return Category(); }
1066 bool CanRead(
const std::chrono::milliseconds
Timeout = GetInstrumentDataTimeoutDefault)
const;
1074 void Clear(
const std::chrono::milliseconds
Timeout = GetInstrumentDataTimeoutDefault)
const;
1077 void ResetImpl(dispatch_tag<InstrumentBase>)
override final;
1080 virtual std::unique_ptr<DynExp::InitTaskBase>
MakeInitTask()
const override {
return DynExp::MakeTask<DataStreamInstrumentTasks::InitTask>(); }
1081 virtual std::unique_ptr<DynExp::ExitTaskBase>
MakeExitTask()
const override {
return DynExp::MakeTask<DataStreamInstrumentTasks::ExitTask>(); }
1082 virtual std::unique_ptr<DynExp::UpdateTaskBase>
MakeUpdateTask()
const override {
return DynExp::MakeTask<DataStreamInstrumentTasks::UpdateTask>(); }
Implementation of DynExp instrument objects.
Implements a circular data stream based on Util::circularbuf using samples of type BasicSample.
virtual void WriteBasicSampleChild(const BasicSample &Sample) override
Writes a single basic sample to the stream.
virtual ~BasicSampleStream()=default
virtual BasicSample ReadBasicSampleChild() override
Reads a single basic sample from the stream.
BasicSampleStream(size_t BufferSizeInSamples)
Constructs a BasicSampleStream instance.
bool IsBasicSampleTimeUsed() const noexcept override final
Determines whether the data stream holds basic samples (IsBasicSampleConvertible() returns true) whic...
bool IsBasicSampleConvertible() const noexcept override final
Determines whether the data stream holds samples which are compatible to BasicSample.
Base class for all circular data streams based on Util::circularbuf.
virtual ~CircularDataStreamBase()=default
size_t GetNumRecentBasicSamples(size_t Count) const
Determines the amount of samples which have been written to the stream after the last Count samples....
virtual bool SeekAbs(unsigned long long PositionInSamples, std::ios_base::openmode Which=std::ios_base::in|std::ios_base::out)=0
Moves the stream's read/write pointer(s) to an absolute position.
virtual size_t GetNumFreeSamplesToWrite() const noexcept=0
Determines the amount of samples which can be written to the stream untill the stream's end is reache...
BasicSampleListType ReadRecentBasicSamples(size_t Count)
Reads the most recent samples from the stream skipping Count samples. Also refer to GetNumRecentBasic...
virtual std::streampos GetReadPosition() const noexcept=0
Determines the current position of the stream's read (get) pointer in samples.
virtual bool SeekRel(signed long long OffsetInSamples, std::ios_base::seekdir SeekDir, std::ios_base::openmode Which=std::ios_base::in|std::ios_base::out)=0
Moves the stream's read/write pointer(s) to a position relative to SeekDir.
virtual size_t GetNumAvailableSamplesToReadTillEnd() const noexcept=0
Determines the amount of samples which can be read from the stream's current get pointer position til...
virtual std::streampos GetWritePosition() const noexcept=0
Determines the current position of the stream's write (put) pointer in samples.
CircularDataStreamBase()=default
Implements a circular data stream based on Util::circularbuf.
virtual bool SeekAbs(unsigned long long PositionInSamples, std::ios_base::openmode Which=std::ios_base::in|std::ios_base::out) override
Moves the stream's read/write pointer(s) to an absolute position.
size_t GetNumAvailableSamplesToReadTillEnd() const noexcept override
Determines the amount of samples which can be read from the stream's current get pointer position til...
void WriteSamples(const std::vector< T > &Samples)
Writes multiple samples to the stream's buffer StreamBuffer.
SampleT ReadSample()
Reads a single sample from the stream's buffer StreamBuffer.
std::streampos GetWritePosition() const noexcept override
Determines the current position of the stream's write (put) pointer in samples.
void WriteSample(const SampleT &Sample)
Writes a single sample to the stream's buffer StreamBuffer.
size_t NumSamplesWritten
Amount of samples which have been written to Stream in total.
std::streampos GetReadPosition() const noexcept override
Determines the current position of the stream's read (get) pointer in samples.
virtual size_t GetStreamSizeRead() const noexcept override
Determines the stream's read buffer size in samples.
virtual void ClearChild() override
Removes all samples from the stream's buffer.
size_t GetNumFreeSamplesToWrite() const noexcept override
Determines the amount of samples which can be written to the stream untill the stream's end is reache...
virtual size_t GetStreamSizeWrite() const noexcept override
Determines the stream's write buffer size in samples.
virtual void SetStreamSize(size_t BufferSizeInSamples) override
Sets the stream size in samples.
CircularDataStream(size_t BufferSizeInSamples)
Constructs a CircularDataStream instance.
virtual void ValidateSample(const SampleT &Sample) const
Checks whether a sample is considered valid. Derived classes can define rules to check the sample for...
constexpr auto GetBytesPerSample() noexcept
Determines the size of a single sample in bytes.
virtual bool SeekRel(signed long long OffsetInSamples, std::ios_base::seekdir SeekDir, std::ios_base::openmode Which=std::ios_base::in|std::ios_base::out) override
Moves the stream's read/write pointer(s) to a position relative to SeekDir.
virtual bool SeekEqual(std::ios_base::openmode Which=std::ios_base::in|std::ios_base::out) override
Moves the read/write pointer to the respective other one.
SampleT SampleType
Alias for SampleT.
virtual void SeekEnd(std::ios_base::openmode Which=std::ios_base::in|std::ios_base::out) override
Moves the read pointer to the last sample in the stream and/or moves the write pointer after the last...
virtual void SeekBeg(std::ios_base::openmode Which=std::ios_base::in|std::ios_base::out) override
Moves the read/write pointer to the first sample in the stream.
std::vector< SampleT > ReadSamples(size_t Count)
Reads multiple samples from the stream's buffer StreamBuffer.
virtual ~CircularDataStream()=default
void WriteSample(const std::chrono::duration< Rep, Period > &Sample)
Writes a single sample to the stream's buffer StreamBuffer by implicitly constructing the sample from...
Util::circularbuf StreamBuffer
Circular stream buffer.
std::iostream Stream
Stream to operate on StreamBuffer.
virtual size_t GetNumSamplesWritten() const noexcept override
Determines the number of samples which have been written to the stream in total. Before overflowing,...
Base class for all data streams compatible with the data stream instrument's data class DataStreamIns...
virtual void ClearChild()=0
Removes all samples from the stream's buffer.
void Clear()
Removes all samples from the stream's buffer.
virtual size_t GetStreamSizeWrite() const noexcept=0
Determines the stream's write buffer size in samples.
virtual ~DataStreamBase()=default
bool CanRead() const
Determines whether the stream contains at least one sample which can be read (i.e....
virtual void WriteBasicSampleChild(const BasicSample &Sample)
Writes a single basic sample to the stream.
BasicSampleListType ReadBasicSamples(size_t Count)
Reads a list of basic sample from the stream.
std::vector< BasicSample > BasicSampleListType
Type of a list containing data stream samples of type BasicSample.
BasicSample ReadBasicSample()
Reads a single basic sample from the stream.
virtual BasicSample ReadBasicSampleChild()
Reads a single basic sample from the stream.
virtual void SeekBeg(std::ios_base::openmode Which=std::ios_base::in|std::ios_base::out)=0
Moves the read/write pointer to the first sample in the stream.
virtual bool IsBasicSampleConvertible() const noexcept
Determines whether the data stream holds samples which are compatible to BasicSample.
void WriteBasicSamples(const BasicSampleListType &Samples)
Writes a list of basic sample to the stream.
virtual bool IsBasicSampleTimeUsed() const noexcept
Determines whether the data stream holds basic samples (IsBasicSampleConvertible() returns true) whic...
virtual bool SeekEqual(std::ios_base::openmode Which=std::ios_base::in|std::ios_base::out)=0
Moves the read/write pointer to the respective other one.
void WriteBasicSample(const BasicSample &Sample)
Writes a single basic sample to the stream.
virtual void SeekEnd(std::ios_base::openmode Which=std::ios_base::in|std::ios_base::out)=0
Moves the read pointer to the last sample in the stream and/or moves the write pointer after the last...
virtual size_t GetStreamSizeRead() const noexcept=0
Determines the stream's read buffer size in samples.
virtual void SetStreamSize(size_t BufferSizeInSamples)=0
Sets the stream size in samples.
virtual size_t GetNumSamplesWritten() const noexcept=0
Determines the number of samples which have been written to the stream in total. Before overflowing,...
Configurator class for DataStreamInstrument.
DataStreamInstrumentConfigurator()=default
Data class for DataStreamInstrument.
virtual void ResetImpl(dispatch_tag< DataStreamInstrumentData >)
UnitType
Units which can be used for data stream instruments.
auto GetCastSampleStream() const
Casts the data stream instrument's sample stream to a derived data stream type.
virtual ~DataStreamInstrumentData()=default
ValueType GetHardwareMaxValue() const noexcept
Returns HardwareMaxValue.
ValueType HardwareMaxValue
Maximal possible value to read/write from/to the hardware adapter.
void SetHardwareMaxValue(ValueType Value) noexcept
Sets HardwareMaxValue.
double ValueType
Data type to represent hardware limits on the sample values to write to the hardware adapter assigned...
UnitType ValueUnit
Unit type of the values to be read/written from/to the hardware adapter.
static const char * UnitTypeToStr(const UnitType &Unit)
Returns a descriptive string of a respective unit to be e.g. used in plots.
DataStreamBasePtrType::element_type * GetSampleStream() const noexcept
Getter for the data stream instrument's sample stream. Logical const-ness: always returns a non-const...
const DataStreamBasePtrType SampleStream
Refer to DynExp::InstrumentDataBase::Reset(). Using tag dispatch mechanism to ensure that ResetImpl()...
void SetHardwareMinValue(ValueType Value) noexcept
Sets HardwareMinValue.
UnitType GetValueUnit() const noexcept
Returns ValueUnit.
void SetValueUnit(UnitType Unit) noexcept
Sets ValueUnit.
ValueType GetHardwareMinValue() const noexcept
Returns HardwareMinValue.
ValueType HardwareMinValue
Minimal possible value to read/write from/to the hardware adapter.
Parameter class for DataStreamInstrument.
virtual const char * GetParamClassTag() const noexcept override
This function is intended to be overridden once in each derived class returning the name of the respe...
DataStreamInstrumentParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
Constructs the parameters for a DataStreamInstrument instance.
void ConfigureParamsImpl(dispatch_tag< InstrumentParamsBase >) override final
virtual void ConfigureParamsImpl(dispatch_tag< DataStreamInstrumentParams >)
Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to...
Defines a task for deinitializing an instrument within an instrument inheritance hierarchy....
void ExitFuncImpl(dispatch_tag< ExitTaskBase >, DynExp::InstrumentInstance &Instance) override final
virtual void ExitFuncImpl(dispatch_tag< ExitTask >, DynExp::InstrumentInstance &Instance)
Deinitializes the respective instrument within the instrument inheritance hierarchy....
Defines a task for initializing an instrument within an instrument inheritance hierarchy....
virtual void InitFuncImpl(dispatch_tag< InitTask >, DynExp::InstrumentInstance &Instance)
Initializes the respective instrument within the instrument inheritance hierarchy....
void InitFuncImpl(dispatch_tag< InitTaskBase >, DynExp::InstrumentInstance &Instance) override final
Task to set the size of the related data stream instrument's stream.
const size_t BufferSizeInSamples
New stream buffer size in samples.
virtual DynExp::TaskResultType RunChild(DynExp::InstrumentInstance &Instance) override
Runs the task. Override RunChild() to define a derived task's action(s). Any exception leaving RunChi...
SetStreamSizeTask(size_t BufferSizeInSamples, CallbackType CallbackFunc) noexcept
Constructs a SetStreamSizeTask instance.
Defines a task for updating an instrument within an instrument inheritance hierarchy....
virtual void UpdateFuncImpl(dispatch_tag< UpdateTask >, DynExp::InstrumentInstance &Instance)
Updates the respective instrument within the instrument inheritance hierarchy. Call UpdateFuncImpl() ...
void UpdateFuncImpl(dispatch_tag< UpdateTaskBase >, DynExp::InstrumentInstance &Instance) override final
Implementation of the data stream meta instrument, which is a base class for all instruments reading/...
virtual Util::OptionalBool HasFinished() const
Determines whether the underlying hardware adapter finished data acquisition or writing data.
virtual void ClearData(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
Enqueues a task to clear the underlying hardware adapter's buffer.
constexpr static auto Category() noexcept
Every derived class has to redefine this function.
virtual std::unique_ptr< DynExp::InitTaskBase > MakeInitTask() const override
Factory function for an init task (InitTaskBase). Override to define the desired initialization task ...
virtual void Start(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
Enqueues a task to make the underlying hardware adapter start data acquisition or writing data.
virtual std::unique_ptr< DynExp::UpdateTaskBase > MakeUpdateTask() const override
Factory function for an update task (UpdateTaskBase). Override to define the desired update task in d...
virtual DataStreamInstrumentData::UnitType GetValueUnit() const =0
Determines which unit corresponds to the values managed by this DataStreamInstrument instance....
virtual std::string GetCategory() const override
Returns the category of this Object type.
constexpr static auto Name() noexcept
Every derived class has to redefine this function.
DataStreamInstrument(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
Constructs an instrument instance.
virtual std::string GetName() const override
Returns the name of this Object type.
virtual void ResetImpl(dispatch_tag< DataStreamInstrument >)=0
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
virtual void Stop(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
Enqueues a task to make the underlying hardware adapter stop data acquisition or writing data.
virtual void ResetStreamSize(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
Enqueues a task to reset the size of the instrument's sample stream to its default value.
const char * GetValueUnitStr() const noexcept
Builds and returns a descriptive string of the unit corresponding to the values managed by this DataS...
virtual std::unique_ptr< DynExp::ExitTaskBase > MakeExitTask() const override
Factory function for an exit task (ExitTaskBase). Override to define the desired deinitialization tas...
virtual Util::OptionalBool IsRunning() const
Determines whether the underlying hardware adapter is running a data acquisition or writing data.
Bundles parameters to describe a NumericSampleStream's sampling properties.
DynExp::ParamsBase::Param< ParamsConfigDialog::NumberType > SamplingRate
Sampling rate of the related DataStreamInstrument instance's sample stream in samples per second.
SamplingModeType
Type to determine how to record/play back to/from the stream.
DynExp::ParamsBase::Param< SamplingModeType > SamplingMode
Sampling mode of the related DataStreamInstrument instance's sample stream. Indicates whether reading...
ValueType Values() const
Creates and returns a ValueType instance containing the bundled parameters' values.
NumericSampleStreamParamsExtension(DynExp::ParamsBase &Owner)
Constructs a NumericSampleStreamParamsExtension instance.
Type containing the values of all the parameters belonging to NumericSampleStreamParamsExtension.
Implements a circular data stream based on Util::circularbuf using samples of an arithmetic type Samp...
NumericSampleStream(size_t BufferSizeInSamples, SampleT MinValue, SampleT MaxValue)
Constructs a NumericSampleStream instance setting the limits on the sample values to the the range [M...
NumericSampleStream(size_t BufferSizeInSamples)
Constructs a NumericSampleStream instance setting the limits on the sample values to the respective d...
auto GetMinValue() const noexcept
Getter for the minimal allowed sample value.
virtual ~NumericSampleStream()=default
auto GetMaxValue() const noexcept
Getter for the maximal allowed sample value.
virtual BasicSample ReadBasicSampleChild() override
Reads a single basic sample from the stream.
SampleT MaxValue
Maximal allowed sample value.
SampleT MinValue
Minimal allowed sample value.
virtual void ValidateSample(const SampleT &Sample) const override
Checks whether a sample is considered valid. Derived classes can define rules to check the sample for...
bool IsBasicSampleConvertible() const noexcept override final
Determines whether the data stream holds samples which are compatible to BasicSample.
void SetLimits(SampleT MinValue, SampleT MaxValue)
Sets new sample value limits.
virtual void WriteBasicSampleChild(const BasicSample &Sample) override
Writes a single basic sample to the stream.
Bundles parameters to describe a data stream's stream size.
ValueType Values() const
Creates and returns a ValueType instance containing the bundled parameters' values.
StreamSizeParamsExtension(DynExp::ParamsBase &Owner, ParamsConfigDialog::NumberType DefaultValue=DefaultStreamSize, ParamsConfigDialog::NumberType MinValue=1, ParamsConfigDialog::NumberType MaxValue=static_cast< double >(std::numeric_limits< size_t >::max()))
Constructs a StreamSizeParamsExtension instance.
DynExp::ParamsBase::Param< ParamsConfigDialog::NumberType > StreamSize
Stream size of the related DataStreamInstrument instance's sample stream in samples.
Type containing the values of all the parameters belonging to StreamSizeParamsExtension.
DynExp's core class acts as the interface between the user interface and DynExp's internal data like ...
Defines a task for deinitializing an instrument within an instrument inheritance hierarchy....
Refer to DynExp::ParamsBase::dispatch_tag.
Defines a task for initializing an instrument within an instrument inheritance hierarchy....
Refer to DynExp::ParamsBase::dispatch_tag.
Base class for instruments. Instruments comprise virtual devices (meta instruments) and physial devic...
Configurator class for InstrumentBase.
Data structure to contain data which is synchronized in between different threads....
Refer to ParamsBase::dispatch_tag.
Defines data for a thread belonging to a InstrumentBase instance. Refer to RunnableInstance.
Parameter class for InstrumentBase.
Refer to ParamsBase::dispatch_tag.
Dummy parameter which is to be owned once by parameter classes that do not contain any other paramete...
Abstract base class for object parameter classes. Each class derived from class Object must be accomp...
Tag for function dispatching mechanism within this class used when derived classes are not intended t...
Base class for all tasks being processed by instruments. The class must not contain public virtual fu...
std::function< void(const TaskBase &, ExceptionContainer &)> CallbackType
Type of a callback function which is invoked when a task has finished, failed or has been aborted....
TaskBase(CallbackType CallbackFunc=nullptr) noexcept
Constructs an instrument task.
const CallbackType CallbackFunc
This callback function is called after the task has finished (either successfully or not) with a refe...
Defines the return type of task functions.
Defines a task for updating an instrument within an instrument inheritance hierarchy....
Refer to DynExp::ParamsBase::dispatch_tag.
Defines the configuration dialog. The dialog must be displayed by calling ParamsConfigDialog::Display...
double NumberType
Number type used for numeric parameters (DynExp::ParamsBase::Param)
Data to operate on is invalid for a specific purpose. This indicates a corrupted data structure or fu...
Data type which stores an optional bool value (unknown, false, true). The type evaluates to bool whil...
Thrown when an attempt was made to convert two incompatible types into each other.
Circular stream buffer to be used with the standard library's stream classes. Reading from or writing...
@ Continuous
Run continuously disabling the trigger.
DynExp's instrument namespace contains the implementation of DynExp instruments which extend DynExp's...
DataStreamPtrType< AnalogSampleStream > AnalogSampleStreamPtrType
Alias for a pointer owning a AnalogSampleStream instance.
DataStreamPtrType< DigitalSampleStream > DigitalSampleStreamPtrType
Alias for a pointer owning a DigitalSampleStream instance.
DataStreamPtrType< DataStreamBase > DataStreamBasePtrType
Type of a pointer owning a DataStreamBase instance.
std::unique_ptr< T > DataStreamPtrType
Type of a pointer owning a data stream instance derived from DataStreamBase.
std::unique_ptr< ParamsBase > ParamsBasePtrType
Alias for a pointer to the parameter system base class ParamsBase.
size_t ItemIDType
ID type of objects/items managed by DynExp.
std::vector< std::pair< TextType, ValueType > > TextValueListType
Type of a list containing key-value pairs where key is a text of type Util::TextType.
Accumulates include statements to provide a precompiled header.
Defines a trivially-copyable basic sample as time (t)-value (f(t)) pairs (t, f(t)).
DataType Value
Value in a unit as specified by the class derived from DataStreamInstrument.
double DataType
Data type of time and value.
constexpr BasicSample() noexcept
Constructs a BasicSample instance setting Value and Time to zero.
DataType Time
Time in seconds.
constexpr BasicSample(DataType Value) noexcept
Constructs a BasicSample instance setting Time to zero.
constexpr BasicSample(DataType Value, DataType Time) noexcept
Constructs a BasicSample instance.