libvisiontransfer  10.8.0
Classes | Public Types | Public Member Functions | List of all members
visiontransfer::param::Parameter Class Reference

Detailed Description

The main Parameter class. A variant-like type with current and default values and a lot of metadata. Parameter data is softly typed, the getters and setters accept a template parameter and are interoperable; with the notable exception of Tensor-type parameters, which have specific accessors.

If OpenCv is included ahead of including this file in your project, header-only TYPE_TENSOR<->OpenCv adapters for cv::Size and cv::Mat are made available.

Definition at line 71 of file parameter.h.

#include <visiontransfer/parameter.h>

Classes

class  Pimpl
 

Public Types

enum  GovernorType { GOVERNOR_NONE = 0, GOVERNOR_SHELL = 1, GOVERNOR_DBUS = 2 }
 
enum  ParameterAccessMode { ACCESS_NONE = 0, ACCESS_READONLY = 1, ACCESS_READWRITE = 2 }
 
enum  ParameterInteractionHint { INTERACTION_INVISIBLE = -1, INTERACTION_INACTIVE = 0, INTERACTION_ACTIVE = 1 }
 
enum  GovernorFunction { GOVERNOR_FN_CHANGE_VALUE = 0, GOVERNOR_FN_POLL = 1 }
 

Public Member Functions

VT_EXPORT Parameter ()
 
VT_EXPORT Parameter (const std::string &uid)
 
VT_EXPORT Parameter (const Parameter &other)
 
VT_EXPORT ~Parameter ()
 
VT_EXPORT Parameteroperator= (const Parameter &other)
 
VT_EXPORT std::string getUid () const
 
VT_EXPORT std::string getName () const
 
VT_EXPORT std::string getModuleName () const
 
VT_EXPORT std::string getCategoryName () const
 
VT_EXPORT std::string getDescription () const
 
VT_EXPORT std::string getUnit () const
 
VT_EXPORT ParameterValue::ParameterType getType () const
 
VT_EXPORT ParameterAccessMode getAccessForConfig () const
 
VT_EXPORT ParameterAccessMode getAccessForApi () const
 
VT_EXPORT ParametersetAccessForConfig (ParameterAccessMode mode)
 
VT_EXPORT ParametersetAccessForApi (ParameterAccessMode mode)
 
VT_EXPORT ParameterInteractionHint getInteractionHint () const
 
VT_EXPORT ParametersetInteractionHint (ParameterInteractionHint hint)
 
VT_EXPORT bool getIsModified () const
 
VT_EXPORT bool getIsPolled () const
 
VT_EXPORT ParametersetIsPolled (bool mod)
 
VT_EXPORT ParametersetIsModified (bool mod)
 
VT_EXPORT GovernorType getGovernorType () const
 
VT_EXPORT std::string getGovernorString () const
 
VT_EXPORT ParametersetGovernor (GovernorType govType, const std::string &govStr)
 
VT_EXPORT ParametersetGovernorPollString (const std::string &govStr)
 
VT_EXPORT bool getInvokeGovernorOnInit () const
 
VT_EXPORT ParametersetInvokeGovernorOnInit (bool invoke)
 
VT_EXPORT std::string interpolateCommandLine (const ParameterValue &newVal, GovernorFunction fn=GOVERNOR_FN_CHANGE_VALUE)
 
VT_EXPORT bool isTensor () const
 
VT_EXPORT bool isScalar () const
 
VT_EXPORT bool isCommand () const
 
VT_EXPORT unsigned int getTensorDimension () const
 
VT_EXPORT std::vector< unsigned int > getTensorShape () const
 
VT_EXPORT unsigned int getTensorNumElements () const
 
VT_EXPORT std::vector< double > getTensorData () const
 
VT_EXPORT std::vector< double > getTensorDefaultData () const
 
VT_EXPORT std::vector< double > & getTensorDataReference ()
 
VT_EXPORT std::vector< double > & getTensorDefaultDataReference ()
 
VT_EXPORT ParametersetTensorData (const std::vector< double > &data)
 
VT_EXPORT ParametersetTensorDefaultData (const std::vector< double > &data)
 
VT_EXPORT ParametersetName (const std::string &name)
 
VT_EXPORT ParametersetModuleName (const std::string &n)
 
VT_EXPORT ParametersetCategoryName (const std::string &n)
 
VT_EXPORT ParametersetDescription (const std::string &d)
 
VT_EXPORT ParametersetUnit (const std::string &d)
 
VT_EXPORT ParametersetType (ParameterValue::ParameterType t)
 
VT_EXPORT ParametersetAsTensor (const std::vector< unsigned int > &shape)
 
template<typename T >
VT_EXPORT bool isValidNewValue (T t) const
 
VT_EXPORT bool ensureValidDefault ()
 
VT_EXPORT bool ensureValidCurrent ()
 
template<typename T >
VT_EXPORT T enforceIncrement (T t)
 
template<typename T >
VT_EXPORT ParametersetDefault (T t)
 
template<typename T >
VT_EXPORT ParametersetRange (T mn, T mx)
 
VT_EXPORT ParameterunsetRange ()
 
template<typename T >
VT_EXPORT ParametersetIncrement (T t)
 
template<typename T >
VT_EXPORT ParametersetCurrent (T t)
 
VT_EXPORT ParametersetCurrentFrom (const Parameter &from)
 
VT_EXPORT ParametersetCurrentFromDefault ()
 
template<typename T >
VT_EXPORT ParametersetOptions (const std::vector< T > &opts, const std::vector< std::string > &descriptions)
 
template<typename T >
VT_EXPORT ParametersetOptions (std::initializer_list< T > opts, std::initializer_list< std::string > descriptions)
 
template<typename T >
VT_EXPORT std::vector< T > getOptions () const
 
VT_EXPORT std::vector< std::string > getOptionDescriptions () const
 
VT_EXPORT ParameterValue getCurrentParameterValue ()
 
template<typename T >
VT_EXPORT T getCurrent () const
 
VT_EXPORT ParameterValue getDefaultParameterValue ()
 
template<typename T >
VT_EXPORT T getDefault () const
 
template<typename T >
VT_EXPORT T getMin () const
 
template<typename T >
VT_EXPORT T getMax () const
 
template<typename T >
VT_EXPORT T getIncrement () const
 
VT_EXPORT bool hasOptions () const
 
VT_EXPORT bool hasCurrent () const
 
VT_EXPORT bool hasDefault () const
 
VT_EXPORT bool hasRange () const
 
VT_EXPORT bool hasIncrement () const
 
VT_EXPORT double at (unsigned int x)
 
VT_EXPORT double at (unsigned int y, unsigned int x)
 
VT_EXPORT double at (unsigned int z, unsigned int y, unsigned int x)
 
VT_EXPORT ParametersetTensorFromCvSize (const cv::Size &cvSize)
 
VT_EXPORT void setCvSizeFromTensor (cv::Size &cvSize)
 
template<typename T >
VT_EXPORT ParametersetTensorFromCvMat (const cv::Mat_< T > &cvMat)
 
template<typename T >
VT_EXPORT void setCvMatFromTensor (cv::Mat_< T > &cvMat)
 
template<>
VT_EXPORT bool isValidNewValue (int t) const
 
template<>
VT_EXPORT bool isValidNewValue (bool t) const
 
template<>
VT_EXPORT bool isValidNewValue (double t) const
 
template<>
VT_EXPORT bool isValidNewValue (std::string t) const
 
template<>
VT_EXPORT int enforceIncrement (int t)
 
template<>
VT_EXPORT bool enforceIncrement (bool t)
 
template<>
VT_EXPORT double enforceIncrement (double t)
 
template<>
VT_EXPORT std::string enforceIncrement (std::string t)
 
template<>
VT_EXPORT ParametersetDefault (int t)
 
template<>
VT_EXPORT ParametersetDefault (bool t)
 
template<>
VT_EXPORT ParametersetDefault (double t)
 
template<>
VT_EXPORT ParametersetDefault (std::string t)
 
template<>
VT_EXPORT ParametersetRange (int mn, int mx)
 
template<>
VT_EXPORT ParametersetRange (bool mn, bool mx)
 
template<>
VT_EXPORT ParametersetRange (double mn, double mx)
 
template<>
VT_EXPORT ParametersetRange (std::string mn, std::string mx)
 
template<>
VT_EXPORT ParametersetIncrement (int t)
 
template<>
VT_EXPORT ParametersetIncrement (bool t)
 
template<>
VT_EXPORT ParametersetIncrement (double t)
 
template<>
VT_EXPORT ParametersetIncrement (std::string t)
 
template<>
VT_EXPORT ParametersetCurrent (int t)
 
template<>
VT_EXPORT ParametersetCurrent (bool t)
 
template<>
VT_EXPORT ParametersetCurrent (double t)
 
template<>
VT_EXPORT ParametersetCurrent (std::string t)
 
template<>
VT_EXPORT ParametersetOptions (const std::vector< int > &opts, const std::vector< std::string > &descriptions)
 
template<>
VT_EXPORT ParametersetOptions (const std::vector< bool > &opts, const std::vector< std::string > &descriptions)
 
template<>
VT_EXPORT ParametersetOptions (const std::vector< double > &opts, const std::vector< std::string > &descriptions)
 
template<>
VT_EXPORT ParametersetOptions (const std::vector< std::string > &opts, const std::vector< std::string > &descriptions)
 
template<>
VT_EXPORT ParametersetOptions (std::initializer_list< int > opts, std::initializer_list< std::string > descriptions)
 
template<>
VT_EXPORT ParametersetOptions (std::initializer_list< bool > opts, std::initializer_list< std::string > descriptions)
 
template<>
VT_EXPORT ParametersetOptions (std::initializer_list< double > opts, std::initializer_list< std::string > descriptions)
 
template<>
VT_EXPORT ParametersetOptions (std::initializer_list< std::string > opts, std::initializer_list< std::string > descriptions)
 
template<>
VT_EXPORT std::vector< int > getOptions () const
 
template<>
VT_EXPORT int getCurrent () const
 
template<>
VT_EXPORT int getDefault () const
 
template<>
VT_EXPORT int getMin () const
 
template<>
VT_EXPORT int getMax () const
 
template<>
VT_EXPORT int getIncrement () const
 

Constructor & Destructor Documentation

◆ Parameter() [1/3]

visiontransfer::param::Parameter::Parameter ( )

Generate a new Parameter for manual filling

Definition at line 716 of file parameter.cpp.

◆ Parameter() [2/3]

visiontransfer::param::Parameter::Parameter ( const std::string &  uid)

Generate a new Parameter with specified UID (preferred) for manual filling

Definition at line 719 of file parameter.cpp.

◆ Parameter() [3/3]

visiontransfer::param::Parameter::Parameter ( const Parameter other)

Generate a copy of a Parameter object

Definition at line 722 of file parameter.cpp.

◆ ~Parameter()

visiontransfer::param::Parameter::~Parameter ( )

Destructor

Definition at line 726 of file parameter.cpp.

Member Function Documentation

◆ at() [1/3]

double visiontransfer::param::Parameter::at ( unsigned int  x)

Returns the x-th element of a 1-d tensor (vector). Also extends to higher dimensional tensors by indexing the flat data (as if getTensorData() has been used)

Definition at line 1010 of file parameter.cpp.

◆ at() [2/3]

double visiontransfer::param::Parameter::at ( unsigned int  y,
unsigned int  x 
)

Returns the y-th row, x-th column data element for a 2-dimensional tensor. Fails for other shapes or types

Definition at line 1013 of file parameter.cpp.

◆ at() [3/3]

double visiontransfer::param::Parameter::at ( unsigned int  z,
unsigned int  y,
unsigned int  x 
)

Returns the z-th slice, y-th row, x-th column data element for a 3-dimensional tensor. Fails for other shapes or types

Definition at line 1016 of file parameter.cpp.

◆ enforceIncrement()

template<typename T >
VT_EXPORT T visiontransfer::param::Parameter::enforceIncrement ( t)

Returns value with any increment applied (starting at minimum, if specified)

◆ ensureValidCurrent()

bool visiontransfer::param::Parameter::ensureValidCurrent ( )

Ensures that the current value is in the valid options (if set) or range (if set). Returns whether value was revised.

Definition at line 885 of file parameter.cpp.

◆ ensureValidDefault()

bool visiontransfer::param::Parameter::ensureValidDefault ( )

Ensures that the default value is in the valid options (if set) or range (if set). Returns whether value was revised.

Definition at line 882 of file parameter.cpp.

◆ getAccessForApi()

Parameter::ParameterAccessMode visiontransfer::param::Parameter::getAccessForApi ( ) const

Return the visibility / access mode for the external API bridge

Definition at line 758 of file parameter.cpp.

◆ getAccessForConfig()

Parameter::ParameterAccessMode visiontransfer::param::Parameter::getAccessForConfig ( ) const

Return the visibility / access mode for the configuration web interface

Definition at line 755 of file parameter.cpp.

◆ getCategoryName()

std::string visiontransfer::param::Parameter::getCategoryName ( ) const

Return the finer-grained category name within a module

Definition at line 743 of file parameter.cpp.

◆ getCurrent()

template<typename T >
VT_EXPORT T visiontransfer::param::Parameter::getCurrent ( ) const

Returns the current value for the Parameter. Not supported for tensors (use getTensorData() instead).

◆ getCurrentParameterValue()

ParameterValue visiontransfer::param::Parameter::getCurrentParameterValue ( )

Returns the ParameterValue representing the Parameters current or default value

Definition at line 961 of file parameter.cpp.

◆ getDefault()

template<typename T >
VT_EXPORT T visiontransfer::param::Parameter::getDefault ( ) const

Returns the default value for the Parameter. Not supported for tensors.

◆ getDescription()

std::string visiontransfer::param::Parameter::getDescription ( ) const

Return the parameter description (explanatory comment string)

Definition at line 746 of file parameter.cpp.

◆ getGovernorString()

std::string visiontransfer::param::Parameter::getGovernorString ( ) const

Return the governor string, i.e. the specific script cmdline or the controlling D-Bus name

Definition at line 794 of file parameter.cpp.

◆ getGovernorType()

Parameter::GovernorType visiontransfer::param::Parameter::getGovernorType ( ) const

Return the governor type (whether setting the parameter is controlled by a script, D-Bus, or nothing yet)

Definition at line 791 of file parameter.cpp.

◆ getIncrement()

template<typename T >
VT_EXPORT T visiontransfer::param::Parameter::getIncrement ( ) const

Returns the increment (granularity) for the Parameter (or the smallest possible value for the inferred template type if unset). Not supported for tensors.

◆ getInteractionHint()

Parameter::ParameterInteractionHint visiontransfer::param::Parameter::getInteractionHint ( ) const

Gets the interaction UI hint (invisible / inactive / active)

Definition at line 770 of file parameter.cpp.

◆ getInvokeGovernorOnInit()

bool visiontransfer::param::Parameter::getInvokeGovernorOnInit ( ) const

Gets the oninit action (after first load). False = do nothing; true = perform the same action as on change. Used for calling governor scripts immediately when the parameter daemon initializes.

Definition at line 805 of file parameter.cpp.

◆ getIsModified()

bool visiontransfer::param::Parameter::getIsModified ( ) const

Returns whether the Parameter has unsaved (and unreverted) run-time modifications to its previously saved value, according to the parameter server.

Definition at line 777 of file parameter.cpp.

◆ getIsPolled()

bool visiontransfer::param::Parameter::getIsPolled ( ) const

Returns true iff the tensor is only updated when polled. Such parameters are not synchronized in the background and must be polled (in the backend outside this class) to obtain their up-to-date values.

Definition at line 780 of file parameter.cpp.

◆ getMax()

template<typename T >
VT_EXPORT T visiontransfer::param::Parameter::getMax ( ) const

Returns the maximum value for the Parameter (or the highest possible value for the inferred template type if unset). Not supported for tensors.

◆ getMin()

template<typename T >
VT_EXPORT T visiontransfer::param::Parameter::getMin ( ) const

Returns the minimum value for the Parameter (or the lowest representable value for the inferred template type if unset). Not supported for tensors.

◆ getModuleName()

std::string visiontransfer::param::Parameter::getModuleName ( ) const

Return the overarching module name (abstract categorization for GUI etc.)

Definition at line 740 of file parameter.cpp.

◆ getName()

std::string visiontransfer::param::Parameter::getName ( ) const

Return the current human-readable name

Definition at line 737 of file parameter.cpp.

◆ getOptionDescriptions()

std::vector< std::string > visiontransfer::param::Parameter::getOptionDescriptions ( ) const

Returns the list of option descriptions for an enum-style Parameter (or an empty list for non-enums).

Definition at line 957 of file parameter.cpp.

◆ getOptions()

template<typename T >
VT_EXPORT std::vector<T> visiontransfer::param::Parameter::getOptions ( ) const

Returns the list of possible values for an enum-style Parameter (or an empty list for non-enums).

◆ getTensorData()

std::vector< double > visiontransfer::param::Parameter::getTensorData ( ) const

Returns a flat copy of the tensor data as a vector<double>

Definition at line 833 of file parameter.cpp.

◆ getTensorDataReference()

std::vector< double > & visiontransfer::param::Parameter::getTensorDataReference ( )

Returns a reference to the tensor data (CAUTION)

Definition at line 839 of file parameter.cpp.

◆ getTensorDefaultData()

std::vector< double > visiontransfer::param::Parameter::getTensorDefaultData ( ) const

Returns a flat copy of the tensor default data as a vector<double> (mostly internal use)

Definition at line 836 of file parameter.cpp.

◆ getTensorDefaultDataReference()

std::vector< double > & visiontransfer::param::Parameter::getTensorDefaultDataReference ( )

Returns a reference to the tensor default data (CAUTION)

Definition at line 842 of file parameter.cpp.

◆ getTensorDimension()

unsigned int visiontransfer::param::Parameter::getTensorDimension ( ) const

Returns the tensor dimension, i.e. 1 for vectors, 2 for matrices etc.

Definition at line 824 of file parameter.cpp.

◆ getTensorNumElements()

unsigned int visiontransfer::param::Parameter::getTensorNumElements ( ) const

Returns the total number of elements in the Tensor (product of the sizes in all dimensions).

Definition at line 830 of file parameter.cpp.

◆ getTensorShape()

std::vector< unsigned int > visiontransfer::param::Parameter::getTensorShape ( ) const

Returns the tensor shape in all dimensions. This is {rows, columns} for matrices.

Definition at line 827 of file parameter.cpp.

◆ getType()

ParameterValue::ParameterType visiontransfer::param::Parameter::getType ( ) const

Return the type of the parameter values, one of the scalar, tensor, or command types from ParameterValue::ParameterType. Value assignments are subject to type compatibility checks.

Definition at line 752 of file parameter.cpp.

◆ getUid()

std::string visiontransfer::param::Parameter::getUid ( ) const

Return the current UID

Definition at line 734 of file parameter.cpp.

◆ getUnit()

std::string visiontransfer::param::Parameter::getUnit ( ) const

Return the reference unit for the values of the Parameter as a string (e.g. "cm", "µs" etc.)

Definition at line 749 of file parameter.cpp.

◆ hasCurrent()

bool visiontransfer::param::Parameter::hasCurrent ( ) const

Returns true iff the Parameter has a defined current value

Definition at line 997 of file parameter.cpp.

◆ hasDefault()

bool visiontransfer::param::Parameter::hasDefault ( ) const

Returns true iff the Parameter has a defined default value

Definition at line 1000 of file parameter.cpp.

◆ hasIncrement()

bool visiontransfer::param::Parameter::hasIncrement ( ) const

Returns true iff the Parameter has an increment (granularity) set, false otherwise

Definition at line 1006 of file parameter.cpp.

◆ hasOptions()

bool visiontransfer::param::Parameter::hasOptions ( ) const

Returns true for an enum-style Parameter (i.e. a list of valid options has been set), false otherwise.

Definition at line 994 of file parameter.cpp.

◆ hasRange()

bool visiontransfer::param::Parameter::hasRange ( ) const

Returns true iff the Parameter has a limited range set, false otherwise

Definition at line 1003 of file parameter.cpp.

◆ interpolateCommandLine()

std::string visiontransfer::param::Parameter::interpolateCommandLine ( const ParameterValue newVal,
Parameter::GovernorFunction  fn = GOVERNOR_FN_CHANGE_VALUE 
)

Perform a substition of %-initiated placeholders with correctly quoted parameter [meta-]data (for compiling shell commandlines).

Definition at line 812 of file parameter.cpp.

◆ isCommand()

bool visiontransfer::param::Parameter::isCommand ( ) const

Returns true iff the value type of the Parameter is COMMAND (a special string type that corresponds to single-shot actions such as buttons)

Definition at line 821 of file parameter.cpp.

◆ isScalar()

bool visiontransfer::param::Parameter::isScalar ( ) const

Returns true iff the value type of the Parameter is scalar, i.e. neither TENSOR nor COMMAND

Definition at line 818 of file parameter.cpp.

◆ isTensor()

bool visiontransfer::param::Parameter::isTensor ( ) const

Returns true iff the value type of the Parameter is TENSOR

Definition at line 815 of file parameter.cpp.

◆ isValidNewValue()

template<typename T >
VT_EXPORT bool visiontransfer::param::Parameter::isValidNewValue ( t) const

Returns whether the specified value is acceptable for the current Parameter (if it is constrained by range or enum list)

◆ operator=()

Parameter & visiontransfer::param::Parameter::operator= ( const Parameter other)

Assignment copy operator

Definition at line 729 of file parameter.cpp.

◆ setAccessForApi()

Parameter & visiontransfer::param::Parameter::setAccessForApi ( Parameter::ParameterAccessMode  mode)

Sets the visibility / access mode for the external API bridge

Definition at line 766 of file parameter.cpp.

◆ setAccessForConfig()

Parameter & visiontransfer::param::Parameter::setAccessForConfig ( Parameter::ParameterAccessMode  mode)

Sets the visibility / access mode for the configuration web interface

Definition at line 762 of file parameter.cpp.

◆ setAsTensor()

Parameter & visiontransfer::param::Parameter::setAsTensor ( const std::vector< unsigned int > &  shape)

Sets a Parameter to be a tensor, specifying the shape at the same time

Definition at line 878 of file parameter.cpp.

◆ setCategoryName()

Parameter & visiontransfer::param::Parameter::setCategoryName ( const std::string &  n)

Sets the finer-grained category name within a module

Definition at line 862 of file parameter.cpp.

◆ setCurrent()

template<typename T >
VT_EXPORT Parameter& visiontransfer::param::Parameter::setCurrent ( t)

Sets or overwrites the current value of the Parameter. Type compatibility is enforced and std::runtime_error is thrown for violations.

◆ setCurrentFrom()

Parameter & visiontransfer::param::Parameter::setCurrentFrom ( const Parameter from)

Copies over the current value from the specified Parameter into the present one

Definition at line 930 of file parameter.cpp.

◆ setCurrentFromDefault()

Parameter & visiontransfer::param::Parameter::setCurrentFromDefault ( )

Copies over the current value from the default value, if specified

Definition at line 934 of file parameter.cpp.

◆ setCvMatFromTensor()

template<typename T >
VT_EXPORT void visiontransfer::param::Parameter::setCvMatFromTensor ( cv::Mat_< T > &  cvMat)
inline

Sets an OpenCV Mat object of arbitrary base type from a Tensor-type Parameter, which must be two-dimensional.

Definition at line 335 of file parameter.h.

◆ setCvSizeFromTensor()

VT_EXPORT void visiontransfer::param::Parameter::setCvSizeFromTensor ( cv::Size &  cvSize)
inline

Sets an OpenCV Size object from a Tensor-type Parameter, which must be of shape {2}.

Definition at line 305 of file parameter.h.

◆ setDefault()

template<typename T >
VT_EXPORT Parameter& visiontransfer::param::Parameter::setDefault ( t)

Sets the default value for the Parameter (Caveat: for scalars only)

◆ setDescription()

Parameter & visiontransfer::param::Parameter::setDescription ( const std::string &  d)

Sets the parameter description (explanatory comment string)

Definition at line 866 of file parameter.cpp.

◆ setGovernor()

Parameter & visiontransfer::param::Parameter::setGovernor ( Parameter::GovernorType  govType,
const std::string &  govStr 
)

Sets the parameter governor, a script or D-Bus name that controls setting the parameter

Definition at line 797 of file parameter.cpp.

◆ setGovernorPollString()

Parameter & visiontransfer::param::Parameter::setGovernorPollString ( const std::string &  govStr)

Sets the governor, a script or D-Bus name that controls setting the parameter

Definition at line 801 of file parameter.cpp.

◆ setIncrement()

template<typename T >
VT_EXPORT Parameter& visiontransfer::param::Parameter::setIncrement ( t)

Sets the uniform increment (granularity) for the Parameter (only checked for numerical scalars)

◆ setInteractionHint()

Parameter & visiontransfer::param::Parameter::setInteractionHint ( Parameter::ParameterInteractionHint  hint)

Sets the interaction UI hint (invisible / inactive / active)

Definition at line 773 of file parameter.cpp.

◆ setInvokeGovernorOnInit()

Parameter & visiontransfer::param::Parameter::setInvokeGovernorOnInit ( bool  invoke)

Sets the oninit action (see getInvokeGovernorOnInit).

Definition at line 808 of file parameter.cpp.

◆ setIsModified()

Parameter & visiontransfer::param::Parameter::setIsModified ( bool  mod)

Sets the runtime-modified flag. This is controlled by the device; changing it has no effect in client-side code.

Definition at line 787 of file parameter.cpp.

◆ setIsPolled()

Parameter & visiontransfer::param::Parameter::setIsPolled ( bool  mod)

Sets the polled-updates-only flag. This is controlled by the device; changing it has no effect in client-side code.

Definition at line 783 of file parameter.cpp.

◆ setModuleName()

Parameter & visiontransfer::param::Parameter::setModuleName ( const std::string &  n)

Sets the overarching module name (abstract categorization for GUI etc.)

Definition at line 858 of file parameter.cpp.

◆ setName()

Parameter & visiontransfer::param::Parameter::setName ( const std::string &  name)

Sets the human-readable name

Definition at line 854 of file parameter.cpp.

◆ setOptions() [1/2]

template<typename T >
VT_EXPORT Parameter& visiontransfer::param::Parameter::setOptions ( const std::vector< T > &  opts,
const std::vector< std::string > &  descriptions 
)

Specifies a vector of possible values and a vector of description strings, making the present Parameter an enum-style option list. Use zero-length arguments to remove an enum restriction.

◆ setOptions() [2/2]

template<typename T >
VT_EXPORT Parameter& visiontransfer::param::Parameter::setOptions ( std::initializer_list< T >  opts,
std::initializer_list< std::string >  descriptions 
)

Specifies an initializer_list of possible values and an initializer_list of description strings, making the present Parameter an enum-style option list

◆ setRange()

template<typename T >
VT_EXPORT Parameter& visiontransfer::param::Parameter::setRange ( mn,
mx 
)

Sets the valid value range for the Parameter (only checked for numerical scalars)

◆ setTensorData()

Parameter & visiontransfer::param::Parameter::setTensorData ( const std::vector< double > &  data)

Sets the tensor data from a flat representation

Definition at line 845 of file parameter.cpp.

◆ setTensorDefaultData()

Parameter & visiontransfer::param::Parameter::setTensorDefaultData ( const std::vector< double > &  data)

Sets the fallback tensor data

Definition at line 849 of file parameter.cpp.

◆ setTensorFromCvMat()

template<typename T >
VT_EXPORT Parameter& visiontransfer::param::Parameter::setTensorFromCvMat ( const cv::Mat_< T > &  cvMat)
inline

Sets a Tensor-type (or still undefined) Parameter from an OpenCV Mat object, yielding a two-dimensional tensor of identical shape

Definition at line 311 of file parameter.h.

◆ setTensorFromCvSize()

VT_EXPORT Parameter& visiontransfer::param::Parameter::setTensorFromCvSize ( const cv::Size &  cvSize)
inline

Sets a Tensor-type (or still undefined) Parameter from an OpenCV Size object, yielding a tensor of shape {2}

Definition at line 288 of file parameter.h.

◆ setType()

Parameter & visiontransfer::param::Parameter::setType ( ParameterValue::ParameterType  t)

Sets the type of the parameter values, one of the scalar, tensor, or command types from ParameterValue::ParameterType. Value assignments are subject to type compatibility checks.

Definition at line 874 of file parameter.cpp.

◆ setUnit()

Parameter & visiontransfer::param::Parameter::setUnit ( const std::string &  d)

Sets the reference unit for the values of the Parameter as a string (e.g. "cm", "µs" etc.)

Definition at line 870 of file parameter.cpp.

◆ unsetRange()

Parameter & visiontransfer::param::Parameter::unsetRange ( )

Unsets the valid value range for the Parameter; i.e. removes min and max bounds

Definition at line 913 of file parameter.cpp.


The documentation for this class was generated from the following files:
Allied Vision