SMACC2
|
Internal data class to hold individual LED light settings. More...
#include <LedPlugin.hh>
Public Member Functions | |
LedSetting (const sdf::ElementPtr &_sdf, const gazebo::physics::ModelPtr &_model, const gazebo::common::Time &_currentTime, gazebo_ros::Node::SharedPtr rosnode) | |
Constructor. More... | |
virtual | ~LedSetting () |
Destructor. More... | |
virtual void | InitPubVisual (const gazebo::transport::PublisherPtr &_pubVisual) final |
Set the publisher and send an initial visual command. More... | |
Public Member Functions inherited from smacc2::FlashLightSetting | |
FlashLightSetting (const sdf::ElementPtr &_sdf, const gazebo::physics::ModelPtr &_model, const gazebo::common::Time &_currentTime, gazebo_ros::Node::SharedPtr node) | |
Constructor. Initialize the setting by the data given to the base plugin. More... | |
virtual | ~FlashLightSetting () |
Destructor. More... | |
virtual void | InitPubLight (const gazebo::transport::PublisherPtr &_pubLight) final |
Set the publisher and send an initial light command. More... | |
virtual void | UpdateLightInEnv (const gazebo::common::Time &_currentTime) final |
Update the light based on the given time. More... | |
virtual const std::string | Name () const final |
Getter of name. More... | |
virtual const gazebo::physics::LinkPtr | Link () const final |
Getter of link. More... | |
virtual void | SwitchOn () final |
Switch on (enable the flashlight). More... | |
virtual void | SwitchOff () final |
Switch off (disable the flashlight). More... | |
virtual void | SetDuration (const double _duration, const int _index) final |
Set the duration time for the specified block. More... | |
virtual void | SetDuration (const double _duration) final |
Set the duration time for all the blocks. More... | |
virtual void | SetInterval (const double _interval, const int _index) final |
Set the interval time for the specified block. More... | |
virtual void | SetInterval (const double _interval) final |
Set the interval time for all the blocks. More... | |
virtual void | SetColor (const ignition::math::Color &_color, const int _index) final |
Set the color for the specified block. More... | |
virtual void | SetColor (const ignition::math::Color &_color) final |
Set the color for all the blocks. More... | |
virtual unsigned int | BlockCount () final |
Get the number of blocks. More... | |
virtual bool | RemoveBlock (const int _index) final |
Remove a specified block. More... | |
virtual void | InsertBlock (const double _duration, const double _interval, const ignition::math::Color &_color, const int _index) final |
Insert a block. Create a block with specified parameters. If the index is out of range, the block will be appended at the end of the list. More... | |
Protected Member Functions | |
virtual void | Flash () |
Flash the light This function is internally used to update the light in the environment. More... | |
virtual void | Dim () |
Dim the light This function is internally used to update the light in the environment. More... | |
Protected Member Functions inherited from smacc2::FlashLightSetting | |
virtual void | Flash () |
Flash the light This function is internally used to update the light in the environment. More... | |
virtual void | Dim () |
Dim the light This function is internally used to update the light in the environment. More... | |
virtual ignition::math::Color | CurrentColor () final |
Get the current color of the light. This is to be used by an inheriting class of FlashLightSetting class. More... | |
Private Attributes | |
std::unique_ptr< LedSettingPrivate > | dataPtr |
Pointer to private data. More... | |
Internal data class to hold individual LED light settings.
Definition at line 38 of file LedPlugin.hh.
smacc2::LedSetting::LedSetting | ( | const sdf::ElementPtr & | _sdf, |
const gazebo::physics::ModelPtr & | _model, | ||
const gazebo::common::Time & | _currentTime, | ||
gazebo_ros::Node::SharedPtr | rosnode | ||
) |
Constructor.
Definition at line 75 of file LedPlugin.cc.
References dataPtr, and smacc2::FlashLightSetting::Link().
|
virtual |
|
protectedvirtual |
Dim the light This function is internally used to update the light in the environment.
Reimplemented from smacc2::FlashLightSetting.
Definition at line 174 of file LedPlugin.cc.
References dataPtr, smacc2::FlashLightSetting::Dim(), and smacc2::FlashLightSetting::Link().
|
protectedvirtual |
Flash the light This function is internally used to update the light in the environment.
Reimplemented from smacc2::FlashLightSetting.
Definition at line 134 of file LedPlugin.cc.
References smacc2::FlashLightSetting::CurrentColor(), dataPtr, smacc2::FlashLightSetting::Flash(), and smacc2::FlashLightSetting::Link().
|
finalvirtual |
Set the publisher and send an initial visual command.
[in] | _pubVisual | The publisher to send a message |
Definition at line 116 of file LedPlugin.cc.
References dataPtr, smacc2::FlashLightSetting::Link(), and smacc2::FlashLightSetting::Name().
|
private |
Pointer to private data.
Definition at line 62 of file LedPlugin.hh.
Referenced by Dim(), Flash(), InitPubVisual(), and LedSetting().