Internal data class to hold individual flash light settings.
More...
#include <FlashLightPlugin.hh>
Inherited by LedSetting.
|
virtual ignition::math::Color | CurrentColor () final |
| Get the current color of the light. More...
|
|
virtual void | Dim () |
| Dim the light This function is internally used to update the light in the environment. More...
|
|
virtual void | Flash () |
| Flash the light This function is internally used to update the light in the environment. More...
|
|
Internal data class to hold individual flash light settings.
A setting for each flash light is separately stored in a FlashLightSetting class, which takes care of dynamic specifications such as duration and interval.
◆ FlashLightSetting()
Constructor.
Initialize the setting by the data given to the base plugin.
- Parameters
-
[in] | _sdf | SDF data for the setting. |
[in] | _model | The Model pointer holding the light to control. |
[in] | _currentTime | The current time point. |
◆ ~FlashLightSetting()
◆ BlockCount()
virtual unsigned int BlockCount |
( |
| ) |
|
|
finalvirtual |
Get the number of blocks.
- Returns
- The number of blocks the object currently has.
◆ CurrentColor()
virtual ignition::math::Color CurrentColor |
( |
| ) |
|
|
finalprotectedvirtual |
Get the current color of the light.
This is to be used by an inheriting class of FlashLightSetting class.
- Returns
- the color for the current block which the object is using. It returns Black if there is no update about color.
◆ Dim()
Dim the light This function is internally used to update the light in the environment.
Reimplemented in LedSetting.
◆ Flash()
Flash the light This function is internally used to update the light in the environment.
Reimplemented in LedSetting.
◆ InitPubLight()
Set the publisher and send an initial light command.
- Parameters
-
[in] | _pubLight | The publisher to send a message |
◆ InsertBlock()
virtual void InsertBlock |
( |
const double |
_duration, |
|
|
const double |
_interval, |
|
|
const ignition::math::Color & |
_color, |
|
|
const int |
_index |
|
) |
| |
|
finalvirtual |
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.
- Parameters
-
[in] | _duration | The duration for the block. |
[in] | _interval | The interval for the block. |
[in] | _color | The color for the block. |
[in] | _index | The index of the block to be inserted into the list. |
◆ Link()
Getter of link.
- Returns
- A pointer to the link element.
◆ Name()
virtual const std::string Name |
( |
| ) |
const |
|
finalvirtual |
Getter of name.
- Returns
- The name of the light element.
◆ RemoveBlock()
virtual bool RemoveBlock |
( |
const int |
_index | ) |
|
|
finalvirtual |
Remove a specified block.
- Parameters
-
[in] | _index | Index to the block to remove |
- Returns
- True if the block exists and it was removed.
◆ SetColor() [1/2]
virtual void SetColor |
( |
const ignition::math::Color & |
_color, |
|
|
const int |
_index |
|
) |
| |
|
finalvirtual |
Set the color for the specified block.
- Parameters
-
[in] | _color | New color to set. |
[in] | _index | The index to the block to update. |
◆ SetColor() [2/2]
virtual void SetColor |
( |
const ignition::math::Color & |
_color | ) |
|
|
finalvirtual |
Set the color for all the blocks.
- Parameters
-
[in] | _color | New color to set. |
◆ SetDuration() [1/2]
virtual void SetDuration |
( |
const double |
_duration, |
|
|
const int |
_index |
|
) |
| |
|
finalvirtual |
Set the duration time for the specified block.
- Parameters
-
[in] | _duration | New duration time to set. |
[in] | _index | The index to the block to update. |
◆ SetDuration() [2/2]
virtual void SetDuration |
( |
const double |
_duration | ) |
|
|
finalvirtual |
Set the duration time for all the blocks.
- Parameters
-
[in] | _duration | New duration time to set. |
◆ SetInterval() [1/2]
virtual void SetInterval |
( |
const double |
_interval, |
|
|
const int |
_index |
|
) |
| |
|
finalvirtual |
Set the interval time for the specified block.
- Parameters
-
[in] | _interval | New interval time to set. |
[in] | _index | The index to the block to update. |
◆ SetInterval() [2/2]
virtual void SetInterval |
( |
const double |
_interval | ) |
|
|
finalvirtual |
Set the interval time for all the blocks.
- Parameters
-
[in] | _interval | New interval time to set. |
◆ SwitchOff()
virtual void SwitchOff |
( |
| ) |
|
|
finalvirtual |
Switch off (disable the flashlight).
◆ SwitchOn()
virtual void SwitchOn |
( |
| ) |
|
|
finalvirtual |
Switch on (enable the flashlight).
◆ UpdateLightInEnv()
virtual void UpdateLightInEnv |
( |
const common::Time & |
_currentTime | ) |
|
|
finalvirtual |
Update the light based on the given time.
- Parameters
-
[in] | _currentTime | The current point of time to update the lights. |
The documentation for this class was generated from the following file: