13 #include "../MetaInstruments/FunctionGenerator.h"
16 #include "ui_SignalDesigner.h"
21 class SignalDesignerData;
31 bool AllowResize() const noexcept override final {
return true; }
33 const auto&
GetUI() const noexcept {
return ui; }
40 Ui::SignalDesigner
ui;
113 virtual const char*
GetParamClassTag() const noexcept
override {
return "SignalDesignerParams"; }
116 "FunctionGenerator",
"Function generator(s)",
"Underlying function generator instrument(s) to be used to generate the designed waveform(s)",
DynExpUI::Icons::Instrument };
142 constexpr
static auto Name() noexcept {
return "Signal Designer"; }
143 constexpr
static auto Category() noexcept {
return "I/O"; }
155 void ResetImpl(dispatch_tag<QModuleBase>)
override final;
157 std::unique_ptr<DynExp::QModuleWidget>
MakeUIWidget() override final;
163 void OnInit(
DynExp::ModuleInstance* Instance) const override final;
164 void OnExit(
DynExp::ModuleInstance* Instance) const override final;
180 void OnStop(
DynExp::ModuleInstance* Instance,
bool) const;
Defines DynExp's core module as an interface between the UI and DynExp objects.
virtual DynExp::ParamsBasePtrType MakeParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core) const override final
Override to make derived classes call DynExp::MakeParams with the correct configurator type derived f...
virtual ~SignalDesignerConfigurator()=default
SignalDesignerConfigurator()=default
const auto & GetFuncGenLabels() const noexcept
DynExpInstr::FunctionGeneratorDefs::PulsesDescType CurrentPulses
DynExpInstr::FunctionGeneratorDefs::FunctionDescType MaxFuncDesc
bool CurrentPersistParameters
DynExpInstr::FunctionGeneratorDefs::TriggerDescType::TriggerEdgeType CurrentTriggerEdge
DynExpInstr::FunctionGeneratorDefs::TriggerDescType::TriggerModeType CurrentTriggerMode
Util::FeatureTester< DynExpInstr::FunctionGenerator::TriggerCapsType > TriggerCaps
DynExpInstr::FunctionGeneratorDefs::WaveformTypes CurrentWaveform
bool IsUIInitialized() const noexcept
void SetCurrentFuncGenIndex(int Index)
virtual ~SignalDesignerData()=default
void LockFunctionGenerators(DynExp::ModuleInstance *Instance, const DynExp::ParamsBase::ListParam< DynExp::ObjectLink< DynExpInstr::FunctionGenerator >> &FuncGenParam)
std::string_view GetFuncGenIconPath() const
DynExpInstr::FunctionGeneratorDefs::FunctionDescType MinFuncDesc
virtual void ResetImpl(dispatch_tag< SignalDesignerData >)
DynExpInstr::FunctionGeneratorDefs::FunctionDescType DefaultFuncDesc
void SetUIInitialized() noexcept
void UnlockFunctionGenerators(DynExp::ModuleInstance *Instance)
Util::FeatureTester< DynExpInstr::FunctionGenerator::WaveformCapsType > WaveformCaps
DynExp::LinkedObjectWrapperContainerList< DynExpInstr::FunctionGenerator > FunctionGenerator
void ResetImpl(dispatch_tag< QModuleDataBase >) override final
double CurrentFrequencyInHz
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...
ListParam< DynExp::ObjectLink< DynExpInstr::FunctionGenerator > > FunctionGenerator
virtual ~SignalDesignerParams()=default
void ConfigureParamsImpl(dispatch_tag< QModuleParamsBase >) override final
SignalDesignerParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
void OnPhaseChanged(DynExp::ModuleInstance *Instance, double Value) const
void UpdateUIChild(const ModuleBase::ModuleDataGetterType &ModuleDataGetter) override final
void OnForceTrigger(DynExp::ModuleInstance *Instance, bool) const
constexpr static auto Name() noexcept
void OnTriggerModeChanged(DynExp::ModuleInstance *Instance, QString Text) const
void OnSourceChanged(DynExp::ModuleInstance *Instance, int Index) const
void OnSignalTypeChanged(DynExp::ModuleInstance *Instance, QString Text) const
constexpr static auto Category() noexcept
void OnOffsetChanged(DynExp::ModuleInstance *Instance, double Value) const
Util::DynExpErrorCodes::DynExpErrorCodes ModuleMainLoop(DynExp::ModuleInstance &Instance) override final
Module main loop. The function is executed periodically by the module thread. Also refer to GetMainLo...
void OnTriggerEdgeChanged(DynExp::ModuleInstance *Instance, QString Text) const
void OnExit(DynExp::ModuleInstance *Instance) const override final
This event is triggered right before the module thread terminates (not due to an exception,...
virtual std::string GetName() const override
Returns the name of this Object type.
void ResetImpl(dispatch_tag< QModuleBase >) override final
void OnResetStreamSize(DynExp::ModuleInstance *Instance, bool) const
std::unique_ptr< DynExp::QModuleWidget > MakeUIWidget() override final
Used by InitUI() as a factory function for the module's user interface widget. Create the widget here...
SignalDesigner(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
void OnInit(DynExp::ModuleInstance *Instance) const override final
This event is triggered right before the module thread starts. Override it to lock instruments this m...
void OnAmplitudeChanged(DynExp::ModuleInstance *Instance, double Value) const
void OnPersistParametersClicked(DynExp::ModuleInstance *Instance, bool Value) const
void OnAutostartChanged(DynExp::ModuleInstance *Instance, int Value) const
virtual ~SignalDesigner()=default
void OnStreamSizeChanged(DynExp::ModuleInstance *Instance, int Value) const
void OnDutyCycleChanged(DynExp::ModuleInstance *Instance, double Value) const
void OnStop(DynExp::ModuleInstance *Instance, bool) const
void OnStart(DynExp::ModuleInstance *Instance, bool) const
void OnFrequencyChanged(DynExp::ModuleInstance *Instance, double Value) const
void OnPulsesChanged(DynExp::ModuleInstance *Instance) const
void UpdateWaveform(Util::SynchronizedPointer< SignalDesignerData > &ModuleData, bool Autostart=false) const
virtual std::string GetCategory() const override
Returns the category of this Object type.
DynExp's core class acts as the interface between the user interface and DynExp's internal data like ...
const auto & GetLabels() const noexcept
Returns ObjectLabels.
std::string_view GetIconPath() const
Returns IconPath.
Base class for modules. Modules implement programs on their own (e.g. measurement protocols or server...
Util::CallableMemberWrapper< ModuleBase, ModuleDataTypeSyncPtrType(ModuleBase::*)(const std::chrono::milliseconds)> ModuleDataGetterType
Invoking an instance of this alias is supposed to call ModuleBase::GetModuleData() of the instance th...
const std::unique_ptr< ModuleDataType > ModuleData
Module data belonging to this ModuleBase instance.
ModuleBase(const std::thread::id OwnerThreadID, ParamsBasePtrType &&Params)
Constructs a ModuleBase instance.
Configurator class for ModuleBase.
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 ModuleBase instance. Refer to RunnableInstance.
Parameter class for ModuleBase.
Type to define object link parameters as ParamsBase::Param< ObjectLink< ObjectT > > or to define obje...
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.
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 modules with a Qt-based user interface. Derive from this class to implement modules wi...
QModuleBase(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
Constructs a QModuleBase instance.
Configurator class for QModuleBase.
Data class for QModuleBase.
Parameter class for QModuleBase.
QModuleParamsBase(ItemIDType ID, const DynExpCore &Core)
Constructs the parameters for a QModuleBase instance.
void UnlockObject(LinkedObjectWrapperContainer< ObjectT > &ObjectWrapperContainer)
Unlocks an Object instance stored in the LinkedObjectWrapperContainer ObjectWrapperContainer....
void LockObject(const ParamsBase::Param< ObjectLink< ObjectT >> &LinkParam, LinkedObjectWrapperContainer< ObjectT > &ObjectWrapperContainer, std::chrono::milliseconds Timeout=ObjectLinkBase::LockObjectTimeoutDefault)
Locks an Object instance referenced by a parameter LinkParam of type ParamsBase::Param< ObjectLink< O...
Pointer to lock a class derived from ISynchronizedPointerLockable for synchronizing between threads....
WaveformTypes
Type to determine the waveform type.
DynExp's module namespace contains the implementation of DynExp modules which extend DynExp's core fu...
constexpr auto Instrument
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.
DynExpErrorCodes
DynExp's error codes
DynExp's Util namespace contains commonly used functions and templates as well as extensions to Qt an...
Accumulates include statements to provide a precompiled header.
Type describing a generic periodic function.
Type describing function consisting of a series of pulses.
TriggerEdgeType
Type to determine at which edge of a trigger signal to trigger. Not a strongly-typed enum to allow us...
TriggerModeType
Type to determine the trigger mode. Not a strongly-typed enum to allow using the enumeration in a Dyn...