20 namespace NIDAQAnalogOutTasks
96 void ResetImpl(dispatch_tag<AnalogOutData>)
override final;
107 virtual const char*
GetParamClassTag() const noexcept
override {
return "NIDAQAnalogOutParams"; }
112 "Path of the analog out channel to be used",
true,
"Dev1/ao0" };
141 constexpr
static auto Name() noexcept {
return "NIDAQ Analog Out"; }
170 void ResetImpl(dispatch_tag<AnalogOut>)
override final;
175 virtual std::unique_ptr<DynExp::InitTaskBase>
MakeInitTask()
const override {
return DynExp::MakeTask<NIDAQAnalogOutTasks::InitTask>(); }
176 virtual std::unique_ptr<DynExp::ExitTaskBase>
MakeExitTask()
const override {
return DynExp::MakeTask<NIDAQAnalogOutTasks::ExitTask>(); }
177 virtual std::unique_ptr<DynExp::UpdateTaskBase>
MakeUpdateTask()
const override {
return DynExp::MakeTask<NIDAQAnalogOutTasks::UpdateTask>(); }
Defines a meta instrument for a single analog output port to write a data stream consisting of analog...
Defines DynExp's core module as an interface between the UI and DynExp objects.
Implementation of a hardware adapter to control National Instruments NIDAQmx hardware.
NIDAQTask::ChannelHandleType ChannelHandleType
Configurator class for AnalogOut.
Data class for AnalogOut.
Parameter class for AnalogOut.
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....
Meta instrument for a single analog output port based on the data stream, function generator,...
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...
@ UserDefined
Arbitrary waveform.
virtual ~NIDAQAnalogOutConfigurator()=default
NIDAQAnalogOutConfigurator()=default
virtual DynExp::ParamsBasePtrType MakeParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core) const override
Override to make derived classes call DynExp::MakeParams with the correct configurator type derived f...
virtual ~NIDAQAnalogOutData()=default
DynExpHardware::NIDAQHardwareAdapter::ChannelHandleType ChannelHandle
void ResetImpl(dispatch_tag< AnalogOutData >) override final
DynExp::LinkedObjectWrapperContainer< DynExpHardware::NIDAQHardwareAdapter > HardwareAdapter
virtual void ResetImpl(dispatch_tag< NIDAQAnalogOutData >)
NIDAQAnalogOutData()=default
void ConfigureParamsImpl(dispatch_tag< AnalogOutParams >) override final
Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to...
DynExpHardware::NIDAQOutputPortParamsExtension NIDAQOutputPortParams
NIDAQAnalogOutParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
Param< ParamsConfigDialog::TextType > ChannelName
Param< DynExp::ObjectLink< DynExpHardware::NIDAQHardwareAdapter > > HardwareAdapter
virtual void ConfigureParamsImpl(dispatch_tag< NIDAQAnalogOutParams >)
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 ~NIDAQAnalogOutParams()=default
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...
ClearTask(CallbackType CallbackFunc) noexcept
virtual void ExitFuncImpl(dispatch_tag< ExitTask >, DynExp::InstrumentInstance &Instance)
void ExitFuncImpl(dispatch_tag< AnalogOutTasks::ExitTask >, DynExp::InstrumentInstance &Instance) override final
Deinitializes the respective instrument within the instrument inheritance hierarchy....
void InitFuncImpl(dispatch_tag< AnalogOutTasks::InitTask >, DynExp::InstrumentInstance &Instance) override final
Initializes the respective instrument within the instrument inheritance hierarchy....
virtual void InitFuncImpl(dispatch_tag< InitTask >, DynExp::InstrumentInstance &Instance)
RestartTask(CallbackType CallbackFunc) noexcept
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...
StartTask(CallbackType CallbackFunc) noexcept
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...
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...
StopTask(CallbackType CallbackFunc) noexcept
void UpdateFuncImpl(dispatch_tag< AnalogOutTasks::UpdateTask >, DynExp::InstrumentInstance &Instance) override final
Updates the respective instrument within the instrument inheritance hierarchy. Call UpdateFuncImpl() ...
virtual void UpdateFuncImpl(dispatch_tag< UpdateTask >, DynExp::InstrumentInstance &Instance)
WriteTask(CallbackType CallbackFunc) noexcept
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...
constexpr static DataStreamInstrumentData::ValueType HardwareMinValue() noexcept
virtual DataStreamInstrumentData::ValueType GetHardwareMaxValue() const noexcept override
Indicates the maximal value the underlying hardware can generate. Also refer to GetUserMaxValue().
void ResetImpl(dispatch_tag< AnalogOut >) override final
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
virtual void ClearData(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Enqueues a task to clear the underlying hardware adapter's buffer.
virtual NumericSampleStreamParamsExtension::ValueType GetNumericSampleStreamParams() const override
Retrieves sample stream settings of the instrument's data stream from the instrument's or from the un...
virtual DataStreamInstrumentData::UnitType GetValueUnit() const noexcept override
Determines which unit corresponds to the values managed by this DataStreamInstrument instance....
virtual void Stop(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Enqueues a task to make the underlying hardware adapter stop data acquisition or writing data.
virtual void SetDefault(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Writes AnalogOutParams::DefaultValue to the sample stream. CallbackFunc gets called after the task Da...
virtual DataStreamInstrumentData::ValueType GetHardwareMinValue() const noexcept override
Indicates the minimal value the underlying hardware can generate. Also refer to GetUserMinValue().
virtual void WriteData(DynExp::TaskBase::CallbackType CallbackFunc) const override
Enqueues a task to write data from the data stream to the hardware.
virtual void OnErrorChild() const override
Derived classes can perform critical shutdown actions after an error has occurred....
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::ValueType GetHardwareResolution() const noexcept override final
Indicates the value's resolution the underlying hardware can generate.
virtual Util::OptionalBool HasFinished() const override
Determines whether the underlying hardware adapter finished data acquisition or writing data.
virtual ~NIDAQAnalogOut()
constexpr static DataStreamInstrumentData::ValueType HardwareMaxValue() noexcept
virtual Util::FeatureTester< WaveformCapsType > GetWaveformCapsChild() const override
Returns the waveform types the function generator is able to produce.
NIDAQAnalogOut(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
virtual std::string GetName() const override
Returns the name of this Object type.
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 Restart(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Enqueues a task to make the underlying hardware adapter restart data acquisition or writing data....
virtual StreamSizeParamsExtension::ValueType GetStreamSizeParams() const override
Retrieves the size of the instrument's data stream from the instrument parameters....
constexpr static auto Name() noexcept
virtual void Start(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Enqueues a task to make the underlying hardware adapter start data acquisition or writing data.
virtual std::unique_ptr< DynExp::ExitTaskBase > MakeExitTask() const override
Factory function for an exit task (ExitTaskBase). Override to define the desired deinitialization tas...
constexpr static DataStreamInstrumentData::ValueType HardwareResolution() noexcept
virtual void ResetImpl(dispatch_tag< NIDAQAnalogOut >)
Type containing the values of all the parameters belonging to NumericSampleStreamParamsExtension.
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 ...
Refer to DynExp::ParamsBase::dispatch_tag.
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 auto & GetCore() const noexcept
Returns a reference to DynExp's core.
const DynExpCore & Core
Reference to DynExp's core.
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.
Refer to DynExp::ParamsBase::dispatch_tag.
Holds a bitset containing flags to indicate which features a certain instrument/ module etc....
Data type which stores an optional bool value (unknown, false, true). The type evaluates to bool whil...
DynExp's instrument namespace contains the implementation of DynExp instruments which extend DynExp's...
constexpr auto HardwareAdapter
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.