SMACC2
Public Member Functions | Public Attributes | List of all members
smacc2::FlashLightPluginPrivate Class Reference
Collaboration diagram for smacc2::FlashLightPluginPrivate:
Collaboration graph

Public Member Functions

std::shared_ptr< FlashLightSettingSettingByLightNameAndLinkName (const std::string &_lightName, const std::string &_linkName) const
 Find a setting by names. This is internally used to access an individual setting. If the link name is blank (""), the first match of the light name in the list will be returned. More...
 

Public Attributes

gazebo::physics::ModelPtr model
 pointer to the model. More...
 
gazebo::physics::WorldPtr world
 pointer to the world. More...
 
gazebo::transport::NodePtr node
 The pointer to node for communication. More...
 
gazebo::transport::PublisherPtr pubLight
 The pointer to publisher to send a command to the light. More...
 
std::vector< std::shared_ptr< FlashLightSetting > > listFlashLight
 The list of flashlight settings to control. More...
 
event::ConnectionPtr updateConnection
 pointer to the update even connection. More...
 

Detailed Description

Definition at line 131 of file FlashLightPlugin.cc.

Member Function Documentation

◆ SettingByLightNameAndLinkName()

std::shared_ptr< FlashLightSetting > smacc2::FlashLightPluginPrivate::SettingByLightNameAndLinkName ( const std::string &  _lightName,
const std::string &  _linkName 
) const
inline

Find a setting by names. This is internally used to access an individual setting. If the link name is blank (""), the first match of the light name in the list will be returned.

Parameters
[in]_lightNameThe name of the light.
[in]_linkNameThe name of the link holding the light.
Returns
A pointer to the specified setting or nullptr if not found.

Definition at line 141 of file FlashLightPlugin.cc.

143 {
144 for (auto &setting: this->listFlashLight)
145 {
146 if (setting->Name() == _lightName)
147 {
148 if (_linkName.length() == 0
149 || setting->Link()->GetName() == _linkName)
150 {
151 return setting;
152 }
153 }
154 }
155
156 return nullptr;
157 }
std::vector< std::shared_ptr< FlashLightSetting > > listFlashLight
The list of flashlight settings to control.

References listFlashLight.

Member Data Documentation

◆ listFlashLight

std::vector< std::shared_ptr<FlashLightSetting> > smacc2::FlashLightPluginPrivate::listFlashLight

The list of flashlight settings to control.

Definition at line 172 of file FlashLightPlugin.cc.

Referenced by SettingByLightNameAndLinkName().

◆ model

gazebo::physics::ModelPtr smacc2::FlashLightPluginPrivate::model

pointer to the model.

Definition at line 160 of file FlashLightPlugin.cc.

◆ node

gazebo::transport::NodePtr smacc2::FlashLightPluginPrivate::node

The pointer to node for communication.

Definition at line 166 of file FlashLightPlugin.cc.

◆ pubLight

gazebo::transport::PublisherPtr smacc2::FlashLightPluginPrivate::pubLight

The pointer to publisher to send a command to the light.

Definition at line 169 of file FlashLightPlugin.cc.

◆ updateConnection

event::ConnectionPtr smacc2::FlashLightPluginPrivate::updateConnection

pointer to the update even connection.

Definition at line 175 of file FlashLightPlugin.cc.

◆ world

gazebo::physics::WorldPtr smacc2::FlashLightPluginPrivate::world

pointer to the world.

Definition at line 163 of file FlashLightPlugin.cc.


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