Skip to content

SimpleElement

template <typename ValueType> class SimpleElement : public LeafElement<SimpleElement<ValueType>, ValueType>

@brief The SimpleElement represents a leaf and can be of any (supported) type

Functions

Name Description
options The options method specifies values allowed for the parameter.
options The options method specifies values allowed for this parameter.
minInc The minInc method sets the lowest value accepted for this parameter.
maxInc The maxInc sets the highest value accepted for this parameter.
minExc The minExc sets the upper limit for this parameter.
maxExc The maxExc sets the lower limit for this parameter.
relativeError The relativeError sets the relative error of this parameter.
absoluteError the absoluteError sets the absolute error of this parameter Ideally, absoluteError >
hex The hex tells the GUI to interpret the numeric value as a hex string.
oct The oct tells the GUI to interpret the numeric value as a hex string.
bin The bin tells the GUI to interpret the numeric value as a bit string.
bin The bin tells the GUI to interpret the numeric value as a bit string.

Function Details

absoluteError

SimpleElement& absoluteError(double error)

the absoluteError sets the absolute error of this parameter Ideally, absoluteError > |x - x0| with x the measured value and x0 the real value

bin

SimpleElement& bin()

The bin tells the GUI to interpret the numeric value as a bit string.

Return : reference to the SimpleElement to use chaining

SimpleElement& bin(const std::string& meaning)

The bin tells the GUI to interpret the numeric value as a bit string.

meaning : A string which describes the meaning of each bit, the format is 0:isError,1:isMoving,31:isOff NOTE: bits can be described randomly (no need mentioning them all)

Return : reference to the SimpleElement to use chaining

hex

SimpleElement& hex()

The hex tells the GUI to interpret the numeric value as a hex string.

Return : reference to the SimpleElement to use chaining

maxExc

SimpleElement& maxExc(ValueType const& value)

The maxExc sets the lower limit for this parameter. Defines the right-open interval.

val : lower limit

Return : reference to the SimpleElement

maxInc

SimpleElement& maxInc(ValueType const& value)

The maxInc sets the highest value accepted for this parameter. Defines the right-closed interval.

val : maximum value

Return : reference to the SimpleElement

minExc

SimpleElement& minExc(ValueType const& value)

The minExc sets the upper limit for this parameter. Defines the left-open interval.

val : upper limit

Return : reference to the SimpleElement

minInc

SimpleElement& minInc(ValueType const& value)

The minInc method sets the lowest value accepted for this parameter. Defines the left-closed interval.

val : minimum value

Return : reference to the SimpleElement

oct

SimpleElement& oct()

The oct tells the GUI to interpret the numeric value as a hex string.

Return : reference to the SimpleElement to use chaining

options

SimpleElement& options(const std::string& opts, const std::string& sep = " ,;")

The options method specifies values allowed for the parameter.

opts : A string with space separated values. The values are casted to the proper type.

sep : A separator symbols. Default values are " ,;"

Return : reference to the SimpleElement

SimpleElement& options(const std::vector<ValueType>& opts)

The options method specifies values allowed for this parameter. Each value is an element of the vector. This function can be used when space cannot be used as a separator.

opts : vector of strings. The values are casted to the proper type.

Return : reference to the SimpleElement

relativeError

SimpleElement& relativeError(double error)

The relativeError sets the relative error of this parameter. Ideally, |x * relativeError| > |x - x0| with x the measured value and x0 the real value