21 namespace AnalogInTasks
106 virtual const char*
GetParamClassTag() const noexcept
override {
return "AnalogInParams"; }
151 constexpr
static auto Name() noexcept {
return "Analog In"; }
152 constexpr
static auto Category() noexcept {
return "I/O"; }
204 void ResetImpl(dispatch_tag<InputPort>)
override final;
207 virtual std::unique_ptr<DynExp::InitTaskBase>
MakeInitTask()
const override {
return DynExp::MakeTask<AnalogInTasks::InitTask>(); }
208 virtual std::unique_ptr<DynExp::ExitTaskBase>
MakeExitTask()
const override {
return DynExp::MakeTask<AnalogInTasks::ExitTask>(); }
209 virtual std::unique_ptr<DynExp::UpdateTaskBase>
MakeUpdateTask()
const override {
return DynExp::MakeTask<AnalogInTasks::UpdateTask>(); }
Configurator class for AnalogIn.
virtual ~AnalogInConfigurator()=0
AnalogInConfigurator()=default
AnalogInData(size_t BufferSizeInSamples=1)
Constructs a DataStreamInstrumentData instance.
void ResetImpl(dispatch_tag< InputPortData >) override final
AnalogInData(DataStreamBasePtrType &&SampleStream)
Constructs a DataStreamInstrumentData instance.
virtual ~AnalogInData()=default
virtual void ResetImpl(dispatch_tag< AnalogInData >)
Parameter class for AnalogIn.
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...
virtual ~AnalogInParams()=0
AnalogInParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
Constructs the parameters for a AnalogIn instance.
virtual void ConfigureParamsImpl(dispatch_tag< AnalogInParams >)
Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to...
DummyParam Dummy
Dummy parameter which is to be owned once by parameter classes that do not contain any other paramete...
void DisableUserEditable()
Calls DynExp::ParamsBase::DisableUserEditable() on all bundled parameters.
void ConfigureParamsImpl(dispatch_tag< InputPortParams >) 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< InputPortTasks::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....
void InitFuncImpl(dispatch_tag< InputPortTasks::InitTask >, DynExp::InstrumentInstance &Instance) override final
Initializes the respective instrument within the instrument inheritance hierarchy....
virtual void InitFuncImpl(dispatch_tag< InitTask >, DynExp::InstrumentInstance &Instance)
Initializes the respective instrument within the instrument inheritance hierarchy....
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< InputPortTasks::UpdateTask >, DynExp::InstrumentInstance &Instance) override final
Updates the respective instrument within the instrument inheritance hierarchy. Call UpdateFuncImpl() ...
Meta instrument for a single analog input port based on the data stream and generic input port meta i...
virtual AnalogInData::SampleStreamType::SampleType Get(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
Reads one sample from the sample stream. CallbackFunc gets called after the task DataStreamInstrument...
virtual DataStreamInstrumentData::UnitType GetValueUnit() const override
Determines which unit corresponds to the values managed by this DataStreamInstrument instance....
AnalogIn(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
Constructs an instrument instance.
virtual AnalogInData::SampleStreamType::SampleType GetSync() const
Synchronized version of Get(), which blocks until a DataStreamInstrument::ReadData() task getting enq...
virtual std::string GetName() const override
Returns the name of this Object type.
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 std::unique_ptr< DynExp::InitTaskBase > MakeInitTask() const override
Factory function for an init task (InitTaskBase). Override to define the desired initialization task ...
constexpr static auto Name() noexcept
Every derived class has to redefine this function.
virtual std::string GetCategory() const override
Returns the category of this Object type.
virtual std::unique_ptr< DynExp::ExitTaskBase > MakeExitTask() const override
Factory function for an exit task (ExitTaskBase). Override to define the desired deinitialization tas...
void ResetImpl(dispatch_tag< InputPort >) override final
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
virtual void ResetImpl(dispatch_tag< AnalogIn >)=0
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
virtual NumericSampleStreamParamsExtension::ValueType GetNumericSampleStreamParams() const
Retrieves sample stream settings of the instrument's data stream from the instrument's or from the un...
constexpr static auto Category() noexcept
Every derived class has to redefine this function.
SampleT SampleType
Alias for SampleT.
UnitType
Units which can be used for data stream instruments.
@ Volt
Voltage in Volt (V)
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...
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.
Dummy parameter which is to be owned once by parameter classes that do not contain any other paramete...
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.