4 #include "moc_InputPortReader.cpp"
13 ui.AnalogInWidget->setVisible(
false);
14 ui.DigitalInWidget->setVisible(
false);
36 auto InstrData = DynExp::dynamic_InstrumentData_cast<DynExpInstr::InputPort>(
ModuleData->InputPort->GetInstrumentData());
38 if (InstrData->GetSampleStream()->CanRead())
39 ModuleData->Value = InstrData->GetSampleStream()->ReadBasicSample().Value;
61 auto Widget = std::make_unique<InputPortReaderWidget>(*
this);
68 auto Widget = GetWidget<InputPortReaderWidget>();
69 auto ModuleData = DynExp::dynamic_ModuleData_cast<InputPortReader>(ModuleDataGetter());
83 Widget->ui.ValueProgressBar->setMinimum(
ModuleData->InputPort->GetHardwareMinValue());
84 Widget->ui.ValueProgressBar->setMaximum(
ModuleData->InputPort->GetHardwareMaxValue());
90 Widget->ui.StateFrame->setStyleSheet(
ModuleData->Value ?
"background-color: lime;" :
"background-color: red;");
96 auto ModuleParams = DynExp::dynamic_Params_cast<InputPortReader>(Instance->
ParamsGetter());
@ LogicLevel
Logic level (TTL) units (1 or 0)
static const char * UnitTypeToStr(const UnitType &Unit)
Returns a descriptive string of a respective unit to be e.g. used in plots.
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...
DynExpErrorCodes
DynExp's error codes
Accumulates include statements to provide a precompiled header.