Loading [MathJax]/extensions/tex2jax.js
ros2_control - rolling
All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Public Member Functions | Protected Attributes | List of all members
semantic_components::SemanticComponentCommandInterface< MessageInputType > Class Template Referenceabstract

Public Member Functions

 SemanticComponentCommandInterface (const std::string &name, const std::vector< std::string > &interface_names)
 
bool assign_loaned_command_interfaces (std::vector< hardware_interface::LoanedCommandInterface > &command_interfaces)
 Assign loaned command interfaces from the hardware.
 
void release_interfaces ()
 Release loaned command interfaces from the hardware.
 
const std::vector< std::string > & get_command_interface_names () const
 Definition of command interface names for the component.
 
bool set_values (const std::vector< double > &values)
 Return all values.
 
virtual bool set_values_from_message (const MessageInputType &)=0
 Set values from MessageInputType.
 

Protected Attributes

std::string name_
 
std::vector< std::string > interface_names_
 
std::vector< std::reference_wrapper< hardware_interface::LoanedCommandInterface > > command_interfaces_
 

Member Function Documentation

◆ assign_loaned_command_interfaces()

template<typename MessageInputType >
bool semantic_components::SemanticComponentCommandInterface< MessageInputType >::assign_loaned_command_interfaces ( std::vector< hardware_interface::LoanedCommandInterface > &  command_interfaces)
inline

Assign loaned command interfaces from the hardware.

Assign loaned command interfaces on the controller start.

Parameters
[in]command_interfacesvector of command interfaces provided by the controller.

◆ get_command_interface_names()

template<typename MessageInputType >
const std::vector< std::string > & semantic_components::SemanticComponentCommandInterface< MessageInputType >::get_command_interface_names ( ) const
inline

Definition of command interface names for the component.

The function should be used in "command_interface_configuration()" of a controller to provide standardized command interface names semantic component.

\default Default implementation defined command interfaces as "name/NR" where NR is number from 0 to size of values;

Returns
list of strings with command interface names for the semantic component.

◆ set_values()

template<typename MessageInputType >
bool semantic_components::SemanticComponentCommandInterface< MessageInputType >::set_values ( const std::vector< double > &  values)
inline

Return all values.

Returns
true if it gets all the values, else false (i.e., invalid size or if the method hardware_interface::LoanedCommandInterface::set_value fails).

◆ set_values_from_message()

template<typename MessageInputType >
virtual bool semantic_components::SemanticComponentCommandInterface< MessageInputType >::set_values_from_message ( const MessageInputType &  )
pure virtual

Set values from MessageInputType.

Returns
True if all values were set successfully, false otherwise.

Implemented in semantic_components::LedRgbDevice.


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