◆ LedRgbDevice()
semantic_components::LedRgbDevice::LedRgbDevice |
( |
const std::string & |
name, |
|
|
const std::string & |
interface_r, |
|
|
const std::string & |
interface_g, |
|
|
const std::string & |
interface_b |
|
) |
| |
|
inlineexplicit |
Constructor for a LED RGB device with interface names set based on device name. The constructor sets the command interface names to "<name>/interface_r", "<name>/interface_g", "<name>/interface_b".
- Parameters
-
[in] | name | name of the LED device, used as a prefix for the command interface names |
[in] | interface_r | name of the command interface for the red channel |
[in] | interface_g | name of the command interface for the green channel |
[in] | interface_b | name of the command interface for the blue channel |
◆ set_values_from_message()
bool semantic_components::LedRgbDevice::set_values_from_message |
( |
const std_msgs::msg::ColorRGBA & |
message | ) |
|
|
inlineoverridevirtual |
Set LED states from ColorRGBA message.
Set the values of the LED RGB device from a ColorRGBA message.
Sets the values of the red, green, and blue channels from the message. If any of the values are out of the range [0, 1], the function fails and returns false.
- Parameters
-
[in] | message | ColorRGBA message |
- Returns
- true if all values were set, false otherwise
Implements semantic_components::SemanticComponentCommandInterface< std_msgs::msg::ColorRGBA >.
The documentation for this class was generated from the following file: