DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Loading...
Searching...
No Matches
DummyDigitalOut.h
Go to the documentation of this file.
1// This file is part of DynExp.
2
8#pragma once
9
10#include "stdafx.h"
11#include "DynExpCore.h"
13
14namespace DynExpInstr
15{
16 class DummyDigitalOut;
17
38
40 {
41
42 public:
44 virtual ~DummyDigitalOutData() = default;
45
46 private:
47 void ResetImpl(dispatch_tag<DigitalOutData>) override final;
49 };
50
52 {
53 public:
55 virtual ~DummyDigitalOutParams() = default;
56
57 virtual const char* GetParamClassTag() const noexcept override { return "DummyDigitalOutParams"; }
58
59 private:
62
63 DummyParam Dummy = { *this };
64 };
65
67 {
68 public:
71
73 virtual ~DummyDigitalOutConfigurator() = default;
74
75 private:
76 virtual DynExp::ParamsBasePtrType MakeParams(DynExp::ItemIDType ID, const DynExp::DynExpCore& Core) const override { return DynExp::MakeParams<DummyDigitalOutConfigurator>(ID, Core); }
77 };
78
80 {
81 public:
85
86 constexpr static auto Name() noexcept { return "Dummy Digital Out"; }
87
89 virtual ~DummyDigitalOut() {}
90
91 virtual std::string GetName() const override { return Name(); }
92
93 virtual void WriteData(DynExp::TaskBase::CallbackType CallbackFunc) const override {}
94 virtual Util::OptionalBool HasFinished() const override { return true; }
95
96 private:
97 void ResetImpl(dispatch_tag<DigitalOut>) override final;
99
101
102 virtual std::unique_ptr<DynExp::InitTaskBase> MakeInitTask() const override { return DynExp::MakeTask<DummyDigitalOutTasks::InitTask>(); }
103 virtual std::unique_ptr<DynExp::ExitTaskBase> MakeExitTask() const override { return DynExp::MakeTask<DummyDigitalOutTasks::ExitTask>(); }
104 virtual std::unique_ptr<DynExp::UpdateTaskBase> MakeUpdateTask() const override { return DynExp::MakeTask<DummyDigitalOutTasks::UpdateTask>(); }
105 };
106}
Defines a meta instrument for a single digital output port to write a data stream consisting of digit...
Defines DynExp's core module as an interface between the UI and DynExp objects.
Configurator class for DigitalOut.
Definition DigitalOut.h:127
Data class for DigitalOut.
Definition DigitalOut.h:67
Parameter class for DigitalOut.
Definition DigitalOut.h:95
Defines a task for deinitializing an instrument within an instrument inheritance hierarchy....
Definition DigitalOut.h:40
Defines a task for initializing an instrument within an instrument inheritance hierarchy....
Definition DigitalOut.h:27
Defines a task for updating an instrument within an instrument inheritance hierarchy....
Definition DigitalOut.h:53
Meta instrument for a single digital output port based on the data stream, function generator,...
Definition DigitalOut.h:141
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 ~DummyDigitalOutData()=default
void ResetImpl(dispatch_tag< DigitalOutData >) override final
virtual void ResetImpl(dispatch_tag< DummyDigitalOutData >)
DummyDigitalOutParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
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 void ConfigureParamsImpl(dispatch_tag< DummyDigitalOutParams >)
virtual ~DummyDigitalOutParams()=default
void ConfigureParamsImpl(dispatch_tag< DigitalOutParams >) override final
Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to...
virtual void ExitFuncImpl(dispatch_tag< ExitTask >, DynExp::InstrumentInstance &Instance)
void ExitFuncImpl(dispatch_tag< DigitalOutTasks::ExitTask >, DynExp::InstrumentInstance &Instance) override final
Deinitializes the respective instrument within the instrument inheritance hierarchy....
virtual void InitFuncImpl(dispatch_tag< InitTask >, DynExp::InstrumentInstance &Instance)
void InitFuncImpl(dispatch_tag< DigitalOutTasks::InitTask >, DynExp::InstrumentInstance &Instance) override final
Initializes the respective instrument within the instrument inheritance hierarchy....
virtual void UpdateFuncImpl(dispatch_tag< UpdateTask >, DynExp::InstrumentInstance &Instance)
void UpdateFuncImpl(dispatch_tag< DigitalOutTasks::UpdateTask >, DynExp::InstrumentInstance &Instance) override final
Updates the respective instrument within the instrument inheritance hierarchy. Call UpdateFuncImpl() ...
virtual void ResetImpl(dispatch_tag< DummyDigitalOut >)
virtual std::unique_ptr< DynExp::InitTaskBase > MakeInitTask() const override
Factory function for an init task (InitTaskBase). Override to define the desired initialization task ...
virtual Util::FeatureTester< WaveformCapsType > GetWaveformCapsChild() const override
Returns the waveform types the function generator is able to produce.
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 void WriteData(DynExp::TaskBase::CallbackType CallbackFunc) const override
Enqueues a task to write data from the data stream to the hardware.
void ResetImpl(dispatch_tag< DigitalOut >) override final
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
virtual std::unique_ptr< DynExp::ExitTaskBase > MakeExitTask() const override
Factory function for an exit task (ExitTaskBase). Override to define the desired deinitialization tas...
static constexpr auto Name() noexcept
virtual Util::OptionalBool HasFinished() const override
Determines whether the underlying hardware adapter finished data acquisition or writing data.
DynExp's core class acts as the interface between the user interface and DynExp's internal data like ...
Definition DynExpCore.h:127
Refer to DynExp::ParamsBase::dispatch_tag.
Refer to DynExp::ParamsBase::dispatch_tag.
Refer to ParamsBase::dispatch_tag.
Definition Instrument.h:146
Defines data for a thread belonging to a InstrumentBase instance. Refer to RunnableInstance.
Definition Instrument.h:813
const std::thread::id OwnerThreadID
Thread id of the thread which has constructed (and owns) this Object instance.
Definition Object.h:2302
const ParamsBasePtrType Params
Pointer to the parameter class instance belonging to this Object instance.
Definition Object.h:2303
Refer to ParamsBase::dispatch_tag.
Definition Object.h:2018
Dummy parameter which is to be owned once by parameter classes that do not contain any other paramete...
Definition Object.h:522
const ItemIDType ID
ID of the Object this parameter class instance belongs to.
Definition Object.h:1779
const DynExpCore & Core
Reference to DynExp's core.
Definition Object.h:1780
Tag for function dispatching mechanism within this class used when derived classes are not intended t...
Definition Object.h:349
Type owning a callback function which is invoked when a task has finished, failed,...
Definition Instrument.h:978
Refer to DynExp::ParamsBase::dispatch_tag.
Holds a bitset containing flags to indicate which features a certain instrument/ module etc....
Definition Util.h:1293
Data type which stores an optional bool value (unknown, false, true). The type evaluates to bool whil...
Definition Util.h:549
DynExp's instrument namespace contains the implementation of DynExp instruments which extend DynExp's...
std::unique_ptr< ParamsBase > ParamsBasePtrType
Alias for a pointer to the parameter system base class ParamsBase.
Definition Object.h:1807
size_t ItemIDType
ID type of objects/items managed by DynExp.
Accumulates include statements to provide a precompiled header.