Template Class SemanticComponentInterface

Class Documentation

template<typename MessageReturnType>
class SemanticComponentInterface

Public Functions

inline explicit SemanticComponentInterface(const std::string &name, size_t size = 0)
~SemanticComponentInterface() = default
inline bool assign_loaned_state_interfaces(std::vector<hardware_interface::LoanedStateInterface> &state_interfaces)

Assign loaned state interfaces from the hardware.

Assign loaned state interfaces on the controller start.

Parameters:

state_interfaces[in] vector of interfaces provided by the controller.

inline void release_interfaces()

Release loaned interfaces from the hardware.

inline virtual std::vector<std::string> get_state_interface_names()

Definition of state interface names for the component.

The function should be used in “state_interface_configuration()” of a controller to provide standardized interface names semantic component.

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

Returns:

list of strings with state interface names for the semantic component.

inline bool get_values(std::vector<double> &values) const

Return all values.

Returns:

true if it gets all the values, else false

inline bool get_values_as_message(MessageReturnType&)

Return values as MessageReturnType.

Returns:

false by default

Protected Attributes

std::string name_
std::vector<std::string> interface_names_
std::vector<std::reference_wrapper<hardware_interface::LoanedStateInterface>> state_interfaces_