Control Libraries 6.3.4
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
py_parameter::ParameterContainer Class Reference
Inheritance diagram for py_parameter::ParameterContainer:
state_representation::ParameterInterface state_representation::State

Public Member Functions

 ParameterContainer (const std::string &name, const ParameterType &type, const StateType &parameter_state_type=StateType::NONE)
 
 ParameterContainer (const std::string &name, const py::object &value, const ParameterType &type, const StateType &parameter_state_type=StateType::NONE)
 
 ParameterContainer (const ParameterContainer &parameter)
 
void set_value (const py::object &value)
 
py::object get_value ()
 
- Public Member Functions inherited from state_representation::ParameterInterface
 ParameterInterface (const std::string &name, const ParameterType &type, const StateType &parameter_state_type=StateType::NONE)
 Constructor with parameter name and type. More...
 
 ParameterInterface (const ParameterInterface &parameter)
 Copy constructor. More...
 
virtual ~ParameterInterface ()=default
 Default virtual destructor.
 
ParameterInterfaceoperator= (const ParameterInterface &state)
 Copy assignment operator that has to be defined to the custom assignment operator. More...
 
template<typename T >
std::shared_ptr< Parameter< T > > get_parameter (bool validate_pointer=true) const
 Get a pointer to a derived Parameter instance from a ParameterInterface pointer. More...
 
template<typename T >
get_parameter_value () const
 Get the parameter value of a derived Parameter instance through the ParameterInterface pointer. More...
 
template<typename T >
void set_parameter_value (const T &value)
 Set the parameter value of a derived Parameter instance through the ParameterInterface pointer. More...
 
ParameterType get_parameter_type () const
 Get the parameter type. More...
 
StateType get_parameter_state_type () const
 Get the state type of the parameter. More...
 
- Public Member Functions inherited from state_representation::State
 State ()
 Empty constructor. More...
 
 State (const StateType &type)
 Constructor only specifying the type of the state from the StateType enumeration. More...
 
 State (const StateType &type, const std::string &name, const bool &empty=true)
 Constructor with name specification. More...
 
 State (const State &state)
 Copy constructor from another State. More...
 
virtual ~State ()=default
 Virtual destructor.
 
Stateoperator= (const State &state)
 Copy assignment operator that have to be defined to the custom assignment operator. More...
 
const StateTypeget_type () const
 Getter of the type attribute. More...
 
bool is_empty () const
 Getter of the empty attribute. More...
 
void set_empty (bool empty=true)
 Setter of the empty attribute. More...
 
void set_filled ()
 Setter of the empty attribute to false and also reset the timestamp. More...
 
const std::chrono::time_point< std::chrono::steady_clock > & get_timestamp () const
 Getter of the timestamp attribute. More...
 
void set_timestamp (const std::chrono::time_point< std::chrono::steady_clock > &timepoint)
 Setter of the timestamp attribute. More...
 
void reset_timestamp ()
 Reset the timestamp attribute to now. More...
 
const std::string & get_name () const
 Getter of the name as const reference. More...
 
virtual void set_name (const std::string &name)
 Setter of the name. More...
 
template<typename DurationT >
bool is_deprecated (const std::chrono::duration< int64_t, DurationT > &time_delay)
 Check if the state is deprecated given a certain time delay. More...
 
virtual bool is_compatible (const State &state) const
 Check if the state is compatible for operations with the state given as argument. More...
 
virtual void initialize ()
 Initialize the State to a zero value. More...
 
virtual void set_data (const Eigen::VectorXd &data)
 Set the data of the state from a single Eigen vector. More...
 
virtual void set_data (const std::vector< double > &data)
 Set the data of the state from a single std vector. More...
 
virtual void set_data (const Eigen::MatrixXd &data)
 Set the data of the state from an Eigen matrix. More...
 
 operator bool () const noexcept
 Boolean operator for the truthiness of a state. More...
 

Public Attributes

ParameterValues values
 

Additional Inherited Members

- Protected Member Functions inherited from state_representation::State
void set_type (const StateType &type)
 Override the state type. More...
 

Detailed Description

Definition at line 25 of file parameter_container.h.

Constructor & Destructor Documentation

◆ ParameterContainer() [1/3]

py_parameter::ParameterContainer::ParameterContainer ( const std::string &  name,
const ParameterType type,
const StateType parameter_state_type = StateType::NONE 
)

Definition at line 11 of file parameter_container.cpp.

◆ ParameterContainer() [2/3]

py_parameter::ParameterContainer::ParameterContainer ( const std::string &  name,
const py::object &  value,
const ParameterType type,
const StateType parameter_state_type = StateType::NONE 
)

Definition at line 38 of file parameter_container.cpp.

◆ ParameterContainer() [3/3]

py_parameter::ParameterContainer::ParameterContainer ( const ParameterContainer parameter)

Definition at line 44 of file parameter_container.cpp.

Member Function Documentation

◆ get_value()

py::object py_parameter::ParameterContainer::get_value ( )

Definition at line 108 of file parameter_container.cpp.

◆ set_value()

void py_parameter::ParameterContainer::set_value ( const py::object &  value)

Definition at line 48 of file parameter_container.cpp.

Member Data Documentation

◆ values

ParameterValues py_parameter::ParameterContainer::values

Definition at line 40 of file parameter_container.h.


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