21 namespace AnalogOutTasks
118 virtual const char*
GetParamClassTag() const noexcept
override {
return "AnalogOutParams"; }
125 "Value to be written to this output port after it has been initialized and before it is stopped.",
false,
126 0, std::numeric_limits<ParamsConfigDialog::NumberType>::lowest(), std::numeric_limits<ParamsConfigDialog::NumberType>::max(), 1, 3 };
136 "Lower limit the values written to this output port must not exceed.",
true,
137 -5, std::numeric_limits<ParamsConfigDialog::NumberType>::lowest(), std::numeric_limits<ParamsConfigDialog::NumberType>::max(), 1, 3 };
147 "Upper limit the values written to this output port must not exceed.",
true,
148 5, std::numeric_limits<ParamsConfigDialog::NumberType>::lowest(), std::numeric_limits<ParamsConfigDialog::NumberType>::max(), 1, 3 };
191 constexpr
static auto Name() noexcept {
return "Analog Out"; }
192 constexpr
static auto Category() noexcept {
return "I/O"; }
255 void ResetImpl(dispatch_tag<OutputPort>)
override final;
258 virtual std::unique_ptr<DynExp::InitTaskBase>
MakeInitTask()
const override {
return DynExp::MakeTask<AnalogOutTasks::InitTask>(); }
259 virtual std::unique_ptr<DynExp::ExitTaskBase>
MakeExitTask()
const override {
return DynExp::MakeTask<AnalogOutTasks::ExitTask>(); }
260 virtual std::unique_ptr<DynExp::UpdateTaskBase>
MakeUpdateTask()
const override {
return DynExp::MakeTask<AnalogOutTasks::UpdateTask>(); }
Defines a generic output port meta instrument which is used to extract data from a data stream and to...
Configurator class for AnalogOut.
AnalogOutConfigurator()=default
virtual ~AnalogOutConfigurator()=0
Data class for AnalogOut.
virtual void ResetImpl(dispatch_tag< AnalogOutData >)
virtual ~AnalogOutData()=default
AnalogOutData(DataStreamBasePtrType &&SampleStream)
Constructs a DataStreamInstrumentData instance.
AnalogOutData(size_t BufferSizeInSamples=1)
Constructs a DataStreamInstrumentData instance.
void ResetImpl(dispatch_tag< OutputPortData >) override final
Parameter class for AnalogOut.
virtual void ConfigureParamsImpl(dispatch_tag< AnalogOutParams >)
Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to...
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...
Param< ParamsConfigDialog::NumberType > MinValue
In contrast to the hardware limits (minimal value the underlying hardware can generate),...
virtual ~AnalogOutParams()=0
Param< ParamsConfigDialog::NumberType > MaxValue
In contrast to the hardware limits (maximal value the underlying hardware can generate),...
AnalogOutParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
Constructs the parameters for a AnalogOut instance.
Param< ParamsConfigDialog::NumberType > DefaultValue
Default value to be written to the output port after initialization and after termination of this ins...
void DisableUserEditable()
Calls DynExp::ParamsBase::DisableUserEditable() on all bundled parameters.
void ConfigureParamsImpl(dispatch_tag< OutputPortParams >) override final
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....
virtual void ExitFuncImpl(dispatch_tag< ExitTask >, DynExp::InstrumentInstance &Instance)
Deinitializes the respective instrument within the instrument inheritance hierarchy....
void ExitFuncImpl(dispatch_tag< OutputPortTasks::ExitTask >, DynExp::InstrumentInstance &Instance) override final
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< OutputPortTasks::InitTask >, DynExp::InstrumentInstance &Instance) override final
Initializes the respective instrument within the instrument inheritance hierarchy....
virtual bool ApplyLimits() const noexcept
Indicates whether value limits are to be applied to the data stream of the AnalogOut instrument.
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< OutputPortTasks::UpdateTask >, DynExp::InstrumentInstance &Instance) override final
Updates the respective instrument within the instrument inheritance hierarchy. Call UpdateFuncImpl() ...
Meta instrument for a single analog output port based on the data stream, function generator,...
virtual std::unique_ptr< DynExp::ExitTaskBase > MakeExitTask() const override
Factory function for an exit task (ExitTaskBase). Override to define the desired deinitialization tas...
virtual void SetDefault(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
Writes AnalogOutParams::DefaultValue to the sample stream. CallbackFunc gets called after the task Da...
virtual void OnPrepareExitChild() const override
This function enables derived classes to enqueue tasks to be executed directly before the final exit ...
virtual std::string GetName() const override
Returns the name of this Object type.
virtual std::string GetCategory() const override
Returns the category of this Object type.
void ResetImpl(dispatch_tag< OutputPort >) override final
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
virtual void Set(AnalogOutData::SampleStreamType::SampleType Sample, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
Writes one sample to the sample stream. CallbackFunc gets called after the task DataStreamInstrument:...
constexpr static auto Category() noexcept
Every derived class has to redefine this function.
virtual DataStreamInstrumentData::ValueType GetUserMaxValue() const override
Indicates the maximal allowed value to generate as defined by the user/software. This value should be...
constexpr static auto Name() noexcept
Every derived class has to redefine this function.
virtual DataStreamInstrumentData::ValueType GetUserMinValue() const override
Indicates the minimal allowed value to generate as defined by the user/software. This value should be...
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 override
Determines which unit corresponds to the values managed by this DataStreamInstrument instance....
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 SetSync(AnalogOutData::SampleStreamType::SampleType Sample) const
Synchronized version of Set(), which blocks until Sample has been written.
AnalogOut(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
Constructs an instrument instance.
virtual NumericSampleStreamParamsExtension::ValueType GetNumericSampleStreamParams() const
Retrieves sample stream settings of the instrument's data stream from the instrument's or from the un...
virtual void ResetImpl(dispatch_tag< AnalogOut >)=0
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
SampleT SampleType
Alias for SampleT.
UnitType
Units which can be used for data stream instruments.
@ Volt
Voltage in Volt (V)
double ValueType
Data type to represent hardware limits on the sample values to write to the hardware adapter assigned...
const DataStreamBasePtrType SampleStream
Refer to DynExp::InstrumentDataBase::Reset(). Using tag dispatch mechanism to ensure that ResetImpl()...
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...
Configurator class for OutputPort.
Data class for OutputPort.
Parameter class for OutputPort.
Defines a task for deinitializing an instrument within an instrument inheritance hierarchy....
Defines a task for initializing an instrument within an instrument inheritance hierarchy....
Defines a task for updating an instrument within an instrument inheritance hierarchy....
Generic output port meta instrument based on the data stream and function generator meta instruments ...
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.
const std::thread::id OwnerThreadID
Thread id of the thread which has constructed (and owns) this Object instance.
const ParamsBasePtrType Params
Pointer to the parameter class instance belonging to this Object instance.
Refer to ParamsBase::dispatch_tag.
const ItemIDType ID
ID of the Object this parameter class instance belongs to.
const DynExpCore & Core
Reference to DynExp's core.
Tag for function dispatching mechanism within this class used when derived classes are not intended t...
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....
Defines a task for updating an instrument within an instrument inheritance hierarchy....
Refer to DynExp::ParamsBase::dispatch_tag.
DynExp's instrument namespace contains the implementation of DynExp instruments which extend DynExp's...
NumericSampleStream< double > AnalogSampleStream
Alias for a numeric sample stream of double samples.
DataStreamPtrType< DataStreamBase > DataStreamBasePtrType
Type of a pointer owning a DataStreamBase instance.
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.
Accumulates include statements to provide a precompiled header.