DynExp
Highly flexible laboratory automation for dynamically changing experiments.
|
Parameter class for OutputPort
.
More...
Public Member Functions | |
OutputPortParams (DynExp::ItemIDType ID, const DynExp::DynExpCore &Core) | |
Constructs the parameters for a OutputPort instance. More... | |
virtual | ~OutputPortParams ()=0 |
virtual const char * | GetParamClassTag () const noexcept override |
This function is intended to be overridden once in each derived class returning the name of the respective class. Parameters defined in any class within the ParamsBase hierarchy will receive a 'this' pointer pointing to ParamsBase when their ParamBase constructors are called. The ParamBase constructors will register the respective parameter in ParamsBase::OwnedParams calling GetParamClassTag() on the given 'this' pointer. This allows the ParamBase constructor to obtain the name of the class where the respective parameter was declared in. The name is used as an XML tag containing related parameters in the project files. Here, it is fully intended that the virtual call to GetParamClassTag() leads only to a call of GetParamClassTag() of the current dynamic type of ParamsBase! More... | |
Public Member Functions inherited from DynExpInstr::FunctionGeneratorParams | |
FunctionGeneratorParams (DynExp::ItemIDType ID, const DynExp::DynExpCore &Core) | |
Constructs the parameters for a FunctionGenerator instance. More... | |
virtual | ~FunctionGeneratorParams ()=0 |
Public Member Functions inherited from DynExpInstr::DataStreamInstrumentParams | |
DataStreamInstrumentParams (DynExp::ItemIDType ID, const DynExp::DynExpCore &Core) | |
Constructs the parameters for a DataStreamInstrument instance. More... | |
virtual | ~DataStreamInstrumentParams ()=0 |
Public Member Functions inherited from DynExp::InstrumentParamsBase | |
InstrumentParamsBase (ItemIDType ID, const DynExpCore &Core) | |
Constructs the parameters for a InstrumentBase instance. More... | |
virtual | ~InstrumentParamsBase ()=0 |
Public Member Functions inherited from DynExp::RunnableObjectParams | |
RunnableObjectParams (ItemIDType ID, const DynExpCore &Core) | |
Constructs the base class of an object parameter class. More... | |
virtual | ~RunnableObjectParams ()=0 |
bool | ConfigureStartupType () const noexcept |
Determines whether the Startup parameter should be user-configurable in settings dialogs. Override ConfigureStartupTypeChild() in order to adjust. More... | |
Public Member Functions inherited from DynExp::ParamsBase | |
ParamsBase (ItemIDType ID, const DynExpCore &Core) | |
Constructs the base class of an object parameter class. More... | |
virtual | ~ParamsBase ()=0 |
QDomElement | ConfigToXML (QDomDocument &Document) const |
Creates an XML node with a tag name as determined by GetParamClassTag() containing all parameters belonging to this ParamsBase instance. More... | |
void | ConfigFromXML (const QDomElement &XMLElement) const |
Retrieves all parameters belonging to this ParamsBase instance from an XML node with a tag name as determined by GetParamClassTag() More... | |
void | ConfigFromDialog (ParamsConfigDialog &Dialog) |
Adds all parameters belonging to this ParamsBase instance to a settings dialog to let the user configure the parameter values. More... | |
bool | Validate () const |
Refer to ParamBase::Validate(). More... | |
ItemIDType | GetID () const noexcept |
Returns the ID of the Object this parameter class instance belongs to. More... | |
const auto & | GetCore () const noexcept |
Returns a reference to DynExp's core. More... | |
const auto & | GetObjectLinkParams () const noexcept |
Returns a list of all object link parameters owned by this parameter class instance. More... | |
bool | ConfigureUsageType () const noexcept |
Determines whether the Usage parameter should be configurable in the settings dialog. Override ConfigureUsageTypeChild() in order to adjust. More... | |
const NetworkParamsExtension * | GetNetworkAddressParams () const noexcept |
Returns the network address parameters of a derived gRPC instrument. Override GetNetworkAddressParamsChild() in order to adjust. More... | |
Public Member Functions inherited from Util::INonCopyable | |
INonCopyable (const INonCopyable &)=delete | |
INonCopyable & | operator= (const INonCopyable &)=delete |
Protected Member Functions | |
void | DisableUserEditable () |
Calls DynExp::ParamsBase::DisableUserEditable() on all bundled parameters. More... | |
Protected Member Functions inherited from Util::ISynchronizedPointerLockable | |
ISynchronizedPointerLockable () | |
~ISynchronizedPointerLockable () | |
Object should never be destroyed before completely unlocked. More... | |
Protected Member Functions inherited from Util::INonCopyable | |
constexpr | INonCopyable ()=default |
~INonCopyable ()=default | |
Private Member Functions | |
void | ConfigureParamsImpl (dispatch_tag< FunctionGeneratorParams >) override final |
Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to descend the inheritance hierarchy. Override to add functionality to ConfigureParams(). Refer to DynExp::ParamsBase::dispatch_tag. More... | |
virtual void | ConfigureParamsImpl (dispatch_tag< OutputPortParams >) |
Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to descend the inheritance hierarchy. Override to add functionality to ConfigureParams(). Refer to DynExp::ParamsBase::dispatch_tag. More... | |
Private Attributes | |
DummyParam | Dummy = { *this } |
Dummy parameter which is to be owned once by parameter classes that do not contain any other parameter. It ensures the presence of the respective level in the XML hierarchy. Parameter is skipped when saving/loading because of its empty name. More... | |
Additional Inherited Members | |
Public Types inherited from DynExp::RunnableObjectParams | |
enum | StartupType { OnCreation , Automatic , Manual } |
Determines when a RunnableObject instance is started. More... | |
Public Types inherited from DynExp::ParamsBase | |
enum | UsageType { Unique , Shared } |
Determines whether an Object can be linked to only one (unique) or multiple (shared) other objects. More... | |
using | ObjectLinkParamsType = std::vector< std::reference_wrapper< LinkBase > > |
Type of a list of all owned object link parameters. More... | |
using | EnumParamSignedIntegerType = intmax_t |
Parameter type to convert signed eumeration parameters to. More... | |
using | EnumParamUnsignedIntegerType = uintmax_t |
Parameter type to convert unsigned eumeration parameters to. More... | |
template<typename EnumType > | |
using | LargestEnumUnderlyingType = std::conditional_t< std::is_signed_v< std::underlying_type_t< EnumType > >, EnumParamSignedIntegerType, EnumParamUnsignedIntegerType > |
Type trait providing an integer type for enumeration types which allows to store the value of enumeration variables of that type in a file. More... | |
using | Text = Util::TextType |
String type of text-type parameters (DynExp::ParamsBase::Param) More... | |
template<typename ArithmeticType > | |
using | UnderlyingArithmeticParamType = TypedParamBase< ArithmeticType > |
using | UnderlyingTextParamType = TypedParamBase< Util::TextType > |
using | UnderlyingTextListParamType = TypedParamBase< Util::TextType > |
using | UnderlyingIndexedTextListParamType = TypedParamBase< Util::TextListIndexType > |
template<typename EnumType > | |
using | UnderlyingEnumParamType = TypedParamBase< LargestEnumUnderlyingType< EnumType > > |
If ParamType is an enum, then use largest signed/unsigned integral type as the underlying type since the enum's underlying type has to be integral. More... | |
using | UnderlyingLinkParamType = TypedParamBase< ItemIDType > |
template<typename ArithmeticType > | |
using | UnderlyingArithmeticListParamType = TypedListParamBase< ArithmeticType > |
using | UnderlyingLinkListParamType = TypedListParamBase< ItemIDType > |
Static Public Member Functions inherited from DynExp::RunnableObjectParams | |
static Util::TextValueListType< StartupType > | AvlblStartupTypeStrList () |
Maps description strings to the RunnableObjectParams::StartupType enum's items. More... | |
Static Public Member Functions inherited from DynExp::ParamsBase | |
static Util::TextValueListType< UsageType > | AvlblUsageTypeStrList () |
Maps description strings to the ParamsBase::UsageType enum's items. More... | |
static void | DisableUserEditable (ParamBase &Param) noexcept |
Sets the UserEditable property of the parameter Param to false. Refer to ParamBase::UserEditable. More... | |
Public Attributes inherited from DynExpInstr::FunctionGeneratorParams | |
Param< FunctionGeneratorDefs::WaveformTypes > | WaveformType = { *this, "WaveformTypes", FunctionGeneratorDefs::WaveformTypes::None } |
Parameter to store the waveform type. More... | |
Param< double > | FrequencyInHz |
Parameter to store waveform's frequency in Hz. Refer to FunctionGeneratorDefs::FunctionDescType::FrequencyInHz. More... | |
Param< double > | Amplitude |
Parameter to store waveform's amplitude. Refer to FunctionGeneratorDefs::FunctionDescType::Amplitude. More... | |
Param< double > | Offset |
Parameter to store waveform's offset to be added to each sample. Refer to FunctionGeneratorDefs::FunctionDescType::Offset. More... | |
Param< double > | PhaseInRad = { *this, "PhaseInRad", 0, 0, 2.0 * std::numbers::pi } |
Parameter to store waveform's phase in radians. Refer to FunctionGeneratorDefs::SineFunctionDescType::PhaseInRad, FunctionGeneratorDefs::RectFunctionDescType::PhaseInRad, and FunctionGeneratorDefs::RampFunctionDescType::PhaseInRad. More... | |
Param< double > | DutyCycle = { *this, "DutyCycle", .5, 0, 1 } |
Parameter to store waveform's duty cycle or rise/fall ratio. Refer to FunctionGeneratorDefs::RectFunctionDescType::DutyCycle and FunctionGeneratorDefs::RampFunctionDescType::RiseFallRatio. More... | |
ListParam< double > | PulseStarts = { *this, "PulseStarts", {}, 0} |
Parameter to store the start times of the waveform's pulse segments. Refer to FunctionGeneratorDefs::PulsesDescType::PulsesDescType(const std::vector<double>&, const std::vector<double>&, double). More... | |
ListParam< double > | PulseAmplitudes = { *this, "PulseAmplitudes", {} } |
Parameter to store the amplitudes of the waveform's pulse segments. Refer to FunctionGeneratorDefs::PulsesDescType::PulsesDescType(const std::vector<double>&, const std::vector<double>&, double). More... | |
Param< FunctionGeneratorDefs::TriggerDescType::TriggerModeType > | TriggerMode = { *this, "TriggerMode", FunctionGeneratorDefs::TriggerDescType::TriggerModeType::Continuous } |
Parameter to store the trigger mode. More... | |
Param< FunctionGeneratorDefs::TriggerDescType::TriggerEdgeType > | TriggerEdge = { *this, "TriggerEdge", FunctionGeneratorDefs::TriggerDescType::TriggerEdgeType::Rise } |
Parameter to store the edge type to trigger on. More... | |
Param< bool > | Autostart = { *this, "Autostart", false } |
Determines whether to directly make the underlying hardware device start generating the waveform after the instrument's initialization (true) or whether to await a trigger/start signal (false). More... | |
Public Attributes inherited from DynExp::RunnableObjectParams | |
Param< StartupType > | Startup |
Determines when the runnable object is started. Refer to RunnableObjectParams::StartupType. More... | |
Public Attributes inherited from DynExp::ParamsBase | |
Param< ParamsConfigDialog::TextType > | ObjectName = { *this, "ObjectName", "Name", "Name to identify this item", false } |
String set by the user to identify the object this parameter class instance belongs to. More... | |
Param< UsageType > | Usage |
Determines whether an object can be used by only one other ("unique") or by multiple other ("shared") objects. More... | |
Parameter class for OutputPort
.
Definition at line 115 of file OutputPort.h.
|
inline |
Constructs the parameters for a OutputPort
instance.
ID | ID of the Object this parameter class instance belongs to |
Core | Reference to DynExp's core |
Definition at line 122 of file OutputPort.h.
|
pure virtual |
Definition at line 45 of file OutputPort.cpp.
|
inlinefinaloverrideprivatevirtual |
Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to descend the inheritance hierarchy. Override to add functionality to ConfigureParams(). Refer to DynExp::ParamsBase::dispatch_tag.
Reimplemented from DynExpInstr::FunctionGeneratorParams.
Definition at line 133 of file OutputPort.h.
|
inlineprivatevirtual |
Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to descend the inheritance hierarchy. Override to add functionality to ConfigureParams(). Refer to DynExp::ParamsBase::dispatch_tag.
Reimplemented in DynExpInstr::DigitalOutParams, and DynExpInstr::AnalogOutParams.
Definition at line 134 of file OutputPort.h.
|
protected |
Calls DynExp::ParamsBase::DisableUserEditable() on all bundled parameters.
Definition at line 49 of file OutputPort.cpp.
|
inlineoverridevirtualnoexcept |
This function is intended to be overridden once in each derived class returning the name of the respective class. Parameters defined in any class within the ParamsBase hierarchy will receive a 'this' pointer pointing to ParamsBase when their ParamBase constructors are called. The ParamBase constructors will register the respective parameter in ParamsBase::OwnedParams calling GetParamClassTag() on the given 'this' pointer. This allows the ParamBase constructor to obtain the name of the class where the respective parameter was declared in. The name is used as an XML tag containing related parameters in the project files. Here, it is fully intended that the virtual call to GetParamClassTag() leads only to a call of GetParamClassTag() of the current dynamic type of ParamsBase!
Reimplemented from DynExpInstr::FunctionGeneratorParams.
Reimplemented in DynExpInstr::DigitalOutParams, DynExpInstr::AnalogOutParams, DynExpInstr::NIDAQDigitalOutParams, and DynExpInstr::NIDAQAnalogOutParams.
Definition at line 127 of file OutputPort.h.
|
private |
Dummy parameter which is to be owned once by parameter classes that do not contain any other parameter. It ensures the presence of the respective level in the XML hierarchy. Parameter is skipped when saving/loading because of its empty name.
Definition at line 136 of file OutputPort.h.