4#include "moc_InputPortReader.cpp"
5#include "ui_InputPortReader.h"
11 : QModuleWidget(Owner, parent),
16 ui->AnalogInWidget->setVisible(
false);
17 ui->DigitalInWidget->setVisible(
false);
39 auto InstrData = DynExp::dynamic_InstrumentData_cast<DynExpInstr::InputPort>(
ModuleData->InputPort->GetInstrumentData());
41 if (InstrData->GetSampleStream()->CanRead())
42 ModuleData->Value = InstrData->GetSampleStream()->ReadBasicSample().Value;
64 auto Widget = std::make_unique<InputPortReaderWidget>(*
this);
71 auto Widget = GetWidget<InputPortReaderWidget>();
72 auto ModuleData = DynExp::dynamic_ModuleData_cast<InputPortReader>(ModuleDataGetter());
86 Widget->ui->ValueProgressBar->setMinimum(
ModuleData->InputPort->GetHardwareMinValue());
87 Widget->ui->ValueProgressBar->setMaximum(
ModuleData->InputPort->GetHardwareMaxValue());
93 Widget->ui->StateFrame->setStyleSheet(
ModuleData->Value ?
"background-color: lime;" :
"background-color: red;");
99 auto ModuleParams = DynExp::dynamic_Params_cast<InputPortReader>(Instance->
ParamsGetter());
const std::unique_ptr< ModuleDataType > ModuleData
Module data belonging to this ModuleBase instance.
Refer to ParamsBase::dispatch_tag.
Defines data for a thread belonging to a ModuleBase instance. Refer to RunnableInstance.
const ModuleBase::ModuleDataGetterType ModuleDataGetter
Getter for module's data. Refer to ModuleBase::ModuleDataGetterType.
Refer to ParamsBase::dispatch_tag.
QModuleWidget * Widget
User interface widget belonging to the module.
const Object::ParamsGetterType ParamsGetter
Invoke to obtain the parameters (derived from ParamsBase) of Owner.
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...
const auto & GetOwner() const noexcept
Returns Owner.
Thrown when an operation timed out before it could be completed, especially used for locking shared d...
DynExp's module namespace contains the implementation of DynExp modules which extend DynExp's core fu...
@ LogicLevel
Logic level (TTL) units (1 or 0)
const char * UnitTypeToStr(UnitType Unit)
Returns a descriptive string of the given unit's type (e.g. 'dBm').
DynExpErrorCodes
DynExp's error codes
Accumulates include statements to provide a precompiled header.