DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Loading...
Searching...
No Matches
DummyDigitalIn.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 DummyDigitalIn;
17
38
40 {
41
42 public:
43 DummyDigitalInData() = default;
44 virtual ~DummyDigitalInData() = default;
45
46 private:
47 void ResetImpl(dispatch_tag<DigitalInData>) override final;
49 };
50
52 {
53 public:
55 virtual ~DummyDigitalInParams() = default;
56
57 virtual const char* GetParamClassTag() const noexcept override { return "DummyDigitalInParams"; }
58
59 private:
62
63 DummyParam Dummy = { *this };
64 };
65
67 {
68 public:
71
73 virtual ~DummyDigitalInConfigurator() = default;
74
75 private:
76 virtual DynExp::ParamsBasePtrType MakeParams(DynExp::ItemIDType ID, const DynExp::DynExpCore& Core) const override { return DynExp::MakeParams<DummyDigitalInConfigurator>(ID, Core); }
77 };
78
80 {
81 public:
85
86 constexpr static auto Name() noexcept { return "Dummy Digital In"; }
87
89 virtual ~DummyDigitalIn() {}
90
91 virtual std::string GetName() const override { return Name(); }
92
93 virtual Util::OptionalBool HasFinished() const override { return true; }
94
95 private:
96 void ResetImpl(dispatch_tag<DigitalIn>) override final;
98
99 virtual std::unique_ptr<DynExp::InitTaskBase> MakeInitTask() const override { return DynExp::MakeTask<DummyDigitalInTasks::InitTask>(); }
100 virtual std::unique_ptr<DynExp::ExitTaskBase> MakeExitTask() const override { return DynExp::MakeTask<DummyDigitalInTasks::ExitTask>(); }
101 virtual std::unique_ptr<DynExp::UpdateTaskBase> MakeUpdateTask() const override { return DynExp::MakeTask<DummyDigitalInTasks::UpdateTask>(); }
102 };
103}
Defines a meta instrument for a single digital input port to read a data stream consisting of digital...
Defines DynExp's core module as an interface between the UI and DynExp objects.
Configurator class for DigitalIn.
Definition DigitalIn.h:122
Data class for DigitalIn.
Definition DigitalIn.h:67
Parameter class for DigitalIn.
Definition DigitalIn.h:95
Defines a task for deinitializing an instrument within an instrument inheritance hierarchy....
Definition DigitalIn.h:40
Defines a task for initializing an instrument within an instrument inheritance hierarchy....
Definition DigitalIn.h:27
Defines a task for updating an instrument within an instrument inheritance hierarchy....
Definition DigitalIn.h:53
Meta instrument for a single digital input port based on the data stream and generic input port meta ...
Definition DigitalIn.h:136
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 void ResetImpl(dispatch_tag< DummyDigitalInData >)
void ResetImpl(dispatch_tag< DigitalInData >) override final
virtual ~DummyDigitalInData()=default
virtual ~DummyDigitalInParams()=default
virtual void ConfigureParamsImpl(dispatch_tag< DummyDigitalInParams >)
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...
DummyDigitalInParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
void ConfigureParamsImpl(dispatch_tag< DigitalInParams >) 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< DigitalInTasks::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< DigitalInTasks::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< DigitalInTasks::UpdateTask >, DynExp::InstrumentInstance &Instance) override final
Updates the respective instrument within the instrument inheritance hierarchy. Call UpdateFuncImpl() ...
virtual std::string GetName() const override
Returns the name of this Object type.
virtual void ResetImpl(dispatch_tag< DummyDigitalIn >)
virtual std::unique_ptr< DynExp::InitTaskBase > MakeInitTask() const override
Factory function for an init task (InitTaskBase). Override to define the desired initialization task ...
static constexpr auto Name() noexcept
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 HasFinished() const override
Determines whether the underlying hardware adapter finished data acquisition or writing data.
void ResetImpl(dispatch_tag< DigitalIn >) override final
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
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...
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
Refer to DynExp::ParamsBase::dispatch_tag.
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.