18 class SwabianInstrumentsPulseStreamer;
20 namespace SwabianInstrumentsPulseStreamerTasks
187 virtual const char*
GetParamClassTag() const noexcept
override {
return "SwabianInstrumentsPulseStreamerParams"; }
190 "HardwareAdapter",
"Device hardware adapter",
"Underlying Swabian Instruments Pulse Streamer device used by this pulse streamer channel instrument",
194 "OutputChannel",
"Output channel",
"Output channel of the pulse streamer this instrument uses.",
195 true, DynExpHardware::SIPulseStreamerHardwareAdapterParams::OutputChannelType::DO0 };
225 constexpr
static auto Name() noexcept {
return "Swabian Instruments Pulse Streamer"; }
232 virtual std::chrono::milliseconds
GetTaskQueueDelay()
const override {
return std::chrono::milliseconds(100); }
236 virtual
void WriteData(
DynExp::TaskBase::CallbackType CallbackFunc)
const override { MakeAndEnqueueTask<SwabianInstrumentsPulseStreamerTasks::WriteTask>(CallbackFunc); }
252 void ResetImpl(dispatch_tag<FunctionGenerator>)
override final;
264 virtual std::unique_ptr<DynExp::InitTaskBase>
MakeInitTask()
const override {
return DynExp::MakeTask<SwabianInstrumentsPulseStreamerTasks::InitTask>(); }
265 virtual std::unique_ptr<DynExp::ExitTaskBase>
MakeExitTask()
const override {
return DynExp::MakeTask<SwabianInstrumentsPulseStreamerTasks::ExitTask>(); }
266 virtual std::unique_ptr<DynExp::UpdateTaskBase>
MakeUpdateTask()
const override {
return DynExp::MakeTask<SwabianInstrumentsPulseStreamerTasks::UpdateTask>(); }
Defines DynExp's core module as an interface between the UI and DynExp objects.
Implementation of a function generator meta instrument to generate waveforms.
Implementation of a hardware adapter to control Swabian Instruments Pulse Streamer 8/2 hardware.
static Util::TextValueListType< OutputChannelType > OutputChannelTypeStrList()
Implements a circular data stream based on Util::circularbuf using samples of type BasicSample.
UnitType
Units which can be used for data stream instruments.
Configurator class for FunctionGenerator.
Data class for FunctionGenerator.
Parameter class for FunctionGenerator.
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....
Function generator meta instrument based on the data stream meta instrument to generate waveforms by ...
@ UserDefined
Arbitrary waveform.
@ CanForce
Triggering can be forced (executed by the software).
@ CanConfigure
Trigger settings can be adjusted by the software.
Bundles parameters to describe a data stream's stream size.
virtual ~SwabianInstrumentsPulseStreamerConfigurator()=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...
SwabianInstrumentsPulseStreamerConfigurator()=default
DynExp::LinkedObjectWrapperContainer< DynExpHardware::SIPulseStreamerHardwareAdapter > HardwareAdapter
virtual ~SwabianInstrumentsPulseStreamerData()=default
virtual void ResetImpl(dispatch_tag< SwabianInstrumentsPulseStreamerData >)
size_t NumFailedStatusUpdateAttempts
bool HasFinished() const noexcept
DynExpHardware::SIPulseStreamerHardwareAdapterParams::OutputChannelType Channel
bool IsDigitalChannel() const noexcept
bool IsStreaming() const noexcept
auto GetChannel() const noexcept
void ResetImpl(dispatch_tag< FunctionGeneratorData >) override final
SwabianInstrumentsPulseStreamerData(size_t BufferSizeInSamples=0)
Param< DynExpHardware::SIPulseStreamerHardwareAdapterParams::OutputChannelType > Channel
virtual void ConfigureParamsImpl(dispatch_tag< SwabianInstrumentsPulseStreamerParams >)
StreamSizeParamsExtension StreamSizeParams
SwabianInstrumentsPulseStreamerParams(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...
void ConfigureParamsImpl(dispatch_tag< FunctionGeneratorParams >) override final
Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to...
virtual ~SwabianInstrumentsPulseStreamerParams()=default
Param< DynExp::ObjectLink< DynExpHardware::SIPulseStreamerHardwareAdapter > > HardwareAdapter
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
void ExitFuncImpl(dispatch_tag< FunctionGeneratorTasks::ExitTask >, DynExp::InstrumentInstance &Instance) override final
Deinitializes the respective instrument within the instrument inheritance hierarchy....
virtual void ExitFuncImpl(dispatch_tag< ExitTask >, DynExp::InstrumentInstance &Instance)
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...
ForceFinalSampleTask(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...
ForceTriggerTask(CallbackType CallbackFunc) noexcept
virtual void InitFuncImpl(dispatch_tag< InitTask >, DynExp::InstrumentInstance &Instance)
void InitFuncImpl(dispatch_tag< FunctionGeneratorTasks::InitTask >, DynExp::InstrumentInstance &Instance) override final
Initializes the respective instrument within the instrument inheritance hierarchy....
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...
ResetBufferSizeTask(CallbackType CallbackFunc) noexcept
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...
DynExpHardware::SIPulseStreamerHardwareAdapter::PulseType Pulse
SetConstantOutputTask(const DynExpHardware::SIPulseStreamerHardwareAdapter::PulseType &Pulse, 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...
SetNumRunsTask(int64_t NumRuns, CallbackType CallbackFunc) noexcept
FunctionGeneratorDefs::TriggerDescType TriggerDesc
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...
SetTriggerTask(const FunctionGeneratorDefs::TriggerDescType &TriggerDesc, 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...
StopTask(CallbackType CallbackFunc) noexcept
void UpdateFuncImpl(dispatch_tag< FunctionGeneratorTasks::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...
virtual FunctionGeneratorDefs::FunctionDescType GetMaxCapsChild() const override
Returns the maximal values assignable to a description of a generic periodic function.
virtual Util::OptionalBool IsRunning() const override
Determines whether the underlying hardware adapter is running a data acquisition or writing data.
virtual void ResetStreamSize(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Enqueues a task to reset the size of the instrument's sample stream to its default value.
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 std::string GetName() const override
Returns the name 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 void ClearData(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Enqueues a task to clear the underlying hardware adapter's buffer.
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 Util::FeatureTester< TriggerCapsType > GetTriggerCapsChild() const override
Returns the trigger features the function generator is capable of.
virtual std::unique_ptr< DynExp::InitTaskBase > MakeInitTask() const override
Factory function for an init task (InitTaskBase). Override to define the desired initialization task ...
virtual FunctionGeneratorDefs::FunctionDescType GetParamDefaultsChild() const override
Returns the default values to assign to a description of a generic periodic function.
virtual void SetTriggerChild(const FunctionGeneratorDefs::TriggerDescType &TriggerDesc, bool PersistParams, DynExp::TaskBase::CallbackType CallbackFunc) const override
SetTrigger() configures the function generator's trigger, which determines when the waveform generati...
virtual FunctionGeneratorDefs::FunctionDescType GetMinCapsChild() const override
Returns the minimal values assignable to a description of a generic periodic function.
virtual void SetConstantOutput(const DynExpHardware::SIPulseStreamerHardwareAdapter::PulseType &Pulse, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
virtual void SetNumRuns(int64_t NumRuns, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
virtual DataStreamInstrumentData::UnitType GetValueUnit() const noexcept override
Determines which unit corresponds to the values managed by this DataStreamInstrument instance....
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::chrono::milliseconds GetTaskQueueDelay() const override
Specifies in which time intervals the instrument's task queue runs to handle pending tasks.
constexpr static auto Name() noexcept
virtual Util::OptionalBool HasFinished() const override
Determines whether the underlying hardware adapter finished data acquisition or writing data.
virtual void WriteData(DynExp::TaskBase::CallbackType CallbackFunc) const override
Enqueues a task to write data from the data stream to the hardware.
virtual Util::FeatureTester< WaveformCapsType > GetWaveformCapsChild() const override
Returns the waveform types the function generator is able to produce.
virtual void ForceFinalSample(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
SwabianInstrumentsPulseStreamer(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
void ResetImpl(dispatch_tag< FunctionGenerator >) override final
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
virtual void ResetImpl(dispatch_tag< SwabianInstrumentsPulseStreamer >)
virtual ~SwabianInstrumentsPulseStreamer()
virtual void ForceTrigger(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const override
Forces the generation of the waveform ignoring the trigger.
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.
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
DynExp's main namespace contains the implementation of DynExp including classes to manage resources (...
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.
Swabian Instruments Pulse Streamer 8/2's internal representation of a single pulse.
Type describing a generic periodic function.
Type describing trigger parameters determining when the waveform is generated.