DynExp
Highly flexible laboratory automation for dynamically changing experiments.
|
Parameter class for HardwareAdapterSerialPort
.
More...
#include <HardwareAdapterSerialPort.h>
Public Member Functions | |
HardwareAdapterSerialPortParams (ItemIDType ID, const DynExpCore &Core) | |
Constructs the parameters for a HardwareAdapterSerialPort instance. | |
virtual | ~HardwareAdapterSerialPortParams ()=default |
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! | |
![]() | |
QSerialCommunicationHardwareAdapterParams (ItemIDType ID, const DynExpCore &Core) | |
Constructs the parameters for a QSerialCommunicationHardwareAdapter instance. | |
virtual | ~QSerialCommunicationHardwareAdapterParams ()=0 |
![]() | |
SerialCommunicationHardwareAdapterParams (ItemIDType ID, const DynExpCore &Core) | |
Constructs the parameters for a SerialCommunicationHardwareAdapter instance. | |
virtual | ~SerialCommunicationHardwareAdapterParams ()=0 |
![]() | |
HardwareAdapterParamsBase (ItemIDType ID, const DynExpCore &Core) | |
Constructs the parameters for a HardwareAdapterBase instance. | |
virtual | ~HardwareAdapterParamsBase ()=0 |
![]() | |
ParamsBase (ItemIDType ID, const DynExpCore &Core) | |
Constructs the base class of an object parameter class. | |
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. | |
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() | |
void | ConfigFromDialog (ParamsConfigDialog &Dialog) |
Adds all parameters belonging to this ParamsBase instance to a settings dialog to let the user configure the parameter values. | |
bool | Validate () const |
Refer to ParamBase::Validate(). | |
ItemIDType | GetID () const noexcept |
Returns the ID of the Object this parameter class instance belongs to. | |
const auto & | GetCore () const noexcept |
Returns a reference to DynExp's core. | |
const auto & | GetObjectLinkParams () const noexcept |
Returns a list of all object link parameters owned by this parameter class instance. | |
bool | ConfigureUsageType () const noexcept |
Determines whether the Usage parameter should be configurable in the settings dialog. Override ConfigureUsageTypeChild() in order to adjust. | |
const NetworkParamsExtension * | GetNetworkAddressParams () const noexcept |
Returns the network address parameters of a derived gRPC instrument. Override GetNetworkAddressParamsChild() in order to adjust. | |
![]() | |
INonCopyable (const INonCopyable &)=delete | |
INonCopyable & | operator= (const INonCopyable &)=delete |
Public Attributes | |
Param< TextList > | PortName |
COM port name. | |
Param< QSerialPort::BaudRate > | BaudRate |
Baud rate. | |
Param< QSerialPort::DataBits > | DataBits |
Amount of data bits. | |
Param< QSerialPort::StopBits > | StopBits |
Amount of stop bits. | |
Param< QSerialPort::Parity > | Parity |
Parity setting. | |
![]() | |
Param< LineEndingType > | LineEnding |
Parameter storing the line ending type for serial communication. | |
![]() | |
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. | |
Param< UsageType > | Usage |
Determines whether an object can be used by only one other ("unique") or by multiple other ("shared") objects. | |
Private Member Functions | |
void | ConfigureParamsImpl (dispatch_tag< QSerialCommunicationHardwareAdapterParams >) 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. | |
virtual void | ConfigureParamsImpl (dispatch_tag< HardwareAdapterSerialPortParams >) |
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. | |
Additional Inherited Members | |
![]() | |
enum | LineEndingType { None , Zero , LF , CRLF , CR } |
Possible line endings sent after writing a line and used to determine the end of a line while reading. More... | |
![]() | |
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. | |
using | EnumParamSignedIntegerType = intmax_t |
Parameter type to convert signed eumeration parameters to. | |
using | EnumParamUnsignedIntegerType = uintmax_t |
Parameter type to convert unsigned eumeration parameters to. | |
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. | |
using | Text = Util::TextType |
" String type of text-type parameters (DynExp::ParamsBase::Param) " | |
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. | |
using | UnderlyingLinkParamType = TypedParamBase< ItemIDType > |
template<typename ArithmeticType > | |
using | UnderlyingArithmeticListParamType = TypedListParamBase< ArithmeticType > |
using | UnderlyingLinkListParamType = TypedListParamBase< ItemIDType > |
![]() | |
static Util::TextValueListType< LineEndingType > | AvlblLineEndingsStrList () |
Assigns labels to the entries of LineEndingType . | |
![]() | |
static Util::TextValueListType< UsageType > | AvlblUsageTypeStrList () |
Maps description strings to the ParamsBase::UsageType enum's items. | |
static void | DisableUserEditable (ParamBase &Param) noexcept |
Sets the UserEditable property of the parameter Param to false. Refer to ParamBase::UserEditable. | |
![]() | |
ISynchronizedPointerLockable () | |
~ISynchronizedPointerLockable () | |
Object should never be destroyed before completely unlocked. | |
![]() | |
constexpr | INonCopyable ()=default |
~INonCopyable ()=default | |
Parameter class for HardwareAdapterSerialPort
.
Definition at line 43 of file HardwareAdapterSerialPort.h.
|
inline |
Constructs the parameters for a HardwareAdapterSerialPort
instance.
ID | ID of the Object this parameter class instance belongs to |
Core | Reference to DynExp's core |
Definition at line 50 of file HardwareAdapterSerialPort.h.
|
virtualdefault |
|
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.
Util::EmptyException | is thrown if there is no serial/COM port available on the system. |
Definition at line 74 of file HardwareAdapterSerialPort.h.
|
finaloverrideprivatevirtual |
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.
Util::EmptyException | is thrown if there is no serial/COM port available on the system. |
Reimplemented from DynExp::QSerialCommunicationHardwareAdapterParams.
Definition at line 20 of file HardwareAdapterSerialPort.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 DynExp::QSerialCommunicationHardwareAdapterParams.
Definition at line 54 of file HardwareAdapterSerialPort.h.
Param<QSerialPort::BaudRate> DynExp::HardwareAdapterSerialPortParams::BaudRate |
Baud rate.
Definition at line 58 of file HardwareAdapterSerialPort.h.
Param<QSerialPort::DataBits> DynExp::HardwareAdapterSerialPortParams::DataBits |
Amount of data bits.
Definition at line 60 of file HardwareAdapterSerialPort.h.
Param<QSerialPort::Parity> DynExp::HardwareAdapterSerialPortParams::Parity |
Parity setting.
Definition at line 64 of file HardwareAdapterSerialPort.h.
COM port name.
Definition at line 56 of file HardwareAdapterSerialPort.h.
Param<QSerialPort::StopBits> DynExp::HardwareAdapterSerialPortParams::StopBits |
Amount of stop bits.
Definition at line 62 of file HardwareAdapterSerialPort.h.