12#include "../GraphUtil.h"
13#include "../../MetaInstruments/DataStreamInstrument.h"
73 virtual const char*
GetParamClassTag() const noexcept
override {
return "SignalPlotterParams"; }
76 "DataStreamInstr",
"Data stream instrument(s)",
"Underlying data stream instrument(s) to be used as a data source(s)",
DynExpUI::Icons::Instrument };
105 constexpr static auto Name() noexcept {
return "Signal Plotter"; }
106 constexpr static auto Category() noexcept {
return "I/O"; }
115 std::chrono::milliseconds
GetMainLoopDelay() const override final {
return std::chrono::milliseconds(50); }
120 void ResetImpl(dispatch_tag<QMLModuleBase>)
override final;
123 QAnyStringView
GetModuleSourceUri() const noexcept override final {
return "Modules.SignalPlotter"; }
125 void UpdateUIChild(
const ModuleBase::ModuleDataGetterType& ModuleDataGetter)
override final;
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...
SignalPlotterConfigurator()=default
virtual ~SignalPlotterConfigurator()=default
void ResetImpl(dispatch_tag< QMLModuleDataBase >) override final
QList< QPointF > Samples
Data points of a single data series to plot.
virtual ~SignalPlotterData()=default
DynExp::LinkedObjectWrapperContainerList< DynExpInstr::DataStreamInstrument > DataStreamInstr
bool Visible
Determines whether this series should be processed and plotted.
auto GetDataStreamInstrCount() const noexcept
bool IsUIInitialized() const noexcept
auto & GetDataStreamInstr(size_t Index)
const auto & GetDataStreamInstrLabels() const noexcept
void UnlockInstruments(DynExp::ModuleInstance *Instance)
std::vector< SampleDataType > SampleDataList
virtual void ResetImpl(dispatch_tag< SignalPlotterData >)
std::string_view GetDataStreamInstrIconPath() const
void LockInstruments(DynExp::ModuleInstance *Instance, const DynExp::ParamsBase::ListParam< DynExp::ObjectLink< DynExpInstr::DataStreamInstrument > > &InstrParam)
Graph::LineGraphPlotInfo PlotInfo
void SetUIInitialized() noexcept
void ConfigureParamsImpl(dispatch_tag< QMLModuleParamsBase >) override final
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 ~SignalPlotterParams()=default
Param< bool > RollingView
ListParam< DynExp::ObjectLink< DynExpInstr::DataStreamInstrument > > DataStreamInstr
SignalPlotterParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
void OnRollingViewChanged(DynExp::ModuleInstance *Instance, bool State) const
static constexpr auto Name() noexcept
static constexpr auto Category() noexcept
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 OnExit(DynExp::ModuleInstance *Instance) const override final
This event is triggered right before the module thread terminates (not due to an exception,...
void OnAutoscaleChanged(DynExp::ModuleInstance *Instance, bool State) const
void OnRunningChanged(DynExp::ModuleInstance *Instance, bool State) const
std::atomic_bool IsSavingData
If data is currently being saved to file, do not update internal data.
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...
virtual std::string GetCategory() const override
Returns the category of this Object type.
void MakeConnections(QObject *Backend) override final
Use QModuleBase::Connect() to connect Qt QML signals to the module's event functions.
size_t NumFailedUpdateAttempts
QAnyStringView GetModuleSourceUri() const noexcept override final
Used by QModuleBase::MakeUIWidget to construct the module's user interface QML widget.
void FinishedSavingData() const noexcept
virtual std::string GetName() const override
Returns the name of this Object type.
std::chrono::milliseconds GetMainLoopDelay() const override final
Specifies in which time intervals the module's event queue runs to handle pending events.
QAnyStringView GetModuleSourceTypeName() const noexcept override final
Used by QModuleBase::MakeUIWidget to construct the module's user interface QML widget.
virtual ~SignalPlotter()=default
void UpdateUIChild(const ModuleBase::ModuleDataGetterType &ModuleDataGetter) override final
SignalPlotter(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
void ResetImpl(dispatch_tag< QMLModuleBase >) override final
QObject SignalContext
Does nothing but ensures that this module's Qt connections are disconnected when SignalContext is des...
void OnClearStream(DynExp::ModuleInstance *Instance) const
DynExp's core class acts as the interface between the user interface and DynExp's internal data like ...
This class defines a list of LinkedObjectWrapperContainer instances. The list owns the contained Link...
const auto & GetLabels() const noexcept
Returns ObjectLabels.
std::string_view GetIconPath() const
Returns IconPath.
const auto & GetList() const noexcept
Returns Containers.
Refer to ParamsBase::dispatch_tag.
Defines data for a thread belonging to a ModuleBase instance. Refer to RunnableInstance.
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 auto & GetCore() const noexcept
Returns a reference to DynExp's core.
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...
Base class for modules with a QML-based user interface. Derive from this class to implement modules w...
QMLModuleBase(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
Constructs a QMLModuleBase instance.
Configurator class for QMLModuleBase.
Data class for QMLModuleBase.
Parameter class for QMLModuleBase.
QMLModuleParamsBase(ItemIDType ID, const DynExpCore &Core)
Constructs the parameters for a QMLModuleBase 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...
Holds a CallableMemberWrapper and invokes its callable when being destroyed.
constexpr auto Instrument
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
Accumulates include statements to provide a precompiled header.