21 namespace DigitalOutTasks
106 virtual const char*
GetParamClassTag() const noexcept
override {
return "DigitalOutParams"; }
113 "Value to be written to this output port after it has been initialized and before it is stopped.",
false, 0, 0, 1, 1, 0 };
156 constexpr
static auto Name() noexcept {
return "Digital Out"; }
157 constexpr
static auto Category() noexcept {
return "I/O"; }
223 void ResetImpl(dispatch_tag<OutputPort>)
override final;
226 virtual std::unique_ptr<DynExp::InitTaskBase>
MakeInitTask()
const override {
return DynExp::MakeTask<DigitalOutTasks::InitTask>(); }
227 virtual std::unique_ptr<DynExp::ExitTaskBase>
MakeExitTask()
const override {
return DynExp::MakeTask<DigitalOutTasks::ExitTask>(); }
228 virtual std::unique_ptr<DynExp::UpdateTaskBase>
MakeUpdateTask()
const override {
return DynExp::MakeTask<DigitalOutTasks::UpdateTask>(); }
Defines a generic output port meta instrument which is used to extract data from a data stream and to...
SampleT SampleType
Alias for SampleT.
UnitType
Units which can be used for data stream instruments.
@ LogicLevel
Logic level (TTL) units (1 or 0)
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()...
Configurator class for DigitalOut.
virtual ~DigitalOutConfigurator()=0
DigitalOutConfigurator()=default
Data class for DigitalOut.
DigitalOutData(DataStreamBasePtrType &&SampleStream)
Constructs a DataStreamInstrumentData instance.
virtual ~DigitalOutData()=default
void ResetImpl(dispatch_tag< OutputPortData >) override final
virtual void ResetImpl(dispatch_tag< DigitalOutData >)
DigitalOutData(size_t BufferSizeInSamples=1)
Constructs a DataStreamInstrumentData instance.
Parameter class for DigitalOut.
virtual void ConfigureParamsImpl(dispatch_tag< DigitalOutParams >)
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 > 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.
DigitalOutParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
Constructs the parameters for a DigitalOut instance.
virtual ~DigitalOutParams()=0
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....
void ExitFuncImpl(dispatch_tag< OutputPortTasks::ExitTask >, DynExp::InstrumentInstance &Instance) override final
Deinitializes the respective instrument within the instrument inheritance hierarchy....
virtual void ExitFuncImpl(dispatch_tag< ExitTask >, DynExp::InstrumentInstance &Instance)
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....
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 digital output port based on the data stream, function generator,...
constexpr static auto Name() noexcept
Every derived class has to redefine this function.
virtual void SetDefault(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
Writes DigitalOutParams::DefaultValue to the sample stream. CallbackFunc gets called after the task D...
virtual void OnPrepareExitChild() const override
This function enables derived classes to enqueue tasks to be executed directly before the final exit ...
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...
void ResetImpl(dispatch_tag< OutputPort >) override final
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
virtual DataStreamInstrumentData::UnitType GetValueUnit() const noexcept override final
Determines which unit corresponds to the values managed by this DataStreamInstrument instance....
virtual DataStreamInstrumentData::ValueType GetHardwareMinValue() const noexcept override final
Indicates the minimal value the underlying hardware can generate. Also refer to GetUserMinValue().
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 Set(DigitalOutData::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 GetUserMinValue() const override
Indicates the minimal allowed value to generate as defined by the user/software. This value should be...
virtual std::string GetName() const override
Returns the name of this Object type.
DigitalOut(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
Constructs an instrument instance.
virtual void ResetImpl(dispatch_tag< DigitalOut >)=0
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
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...
virtual std::unique_ptr< DynExp::InitTaskBase > MakeInitTask() const override
Factory function for an init task (InitTaskBase). Override to define the desired initialization task ...
virtual DataStreamInstrumentData::ValueType GetUserMaxValue() const override
Indicates the maximal allowed value to generate as defined by the user/software. This value should be...
virtual void SetSync(DigitalOutData::SampleStreamType::SampleType Sample) const
Synchronized version of Set(), which blocks until Sample has been written.
virtual DataStreamInstrumentData::ValueType GetHardwareMaxValue() const noexcept override final
Indicates the maximal value the underlying hardware can generate. Also refer to GetUserMaxValue().
virtual DataStreamInstrumentData::ValueType GetHardwareResolution() const noexcept override final
Indicates the value's resolution the underlying hardware can generate.
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< uint8_t > DigitalSampleStream
Alias for a numeric sample stream of uint8_t (single byte) 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.