Public Member Functions | List of all members
gazebo::ExistenceEventSource Class Reference

#include <ExistenceEventSource.hh>

Inheritance diagram for gazebo::ExistenceEventSource:
Inheritance graph
[legend]

Public Member Functions

 ExistenceEventSource (transport::PublisherPtr _pub, physics::WorldPtr _world)
 Constructor. More...
 
virtual void Load (const sdf::ElementPtr _sdf)
 Reads the model filter and event name. More...
 
void OnExistence (const std::string &_model, bool _alive)
 callback for gazebo event More...
 
- Public Member Functions inherited from gazebo::EventSource
 EventSource (transport::PublisherPtr _pub, const std::string &_type, physics::WorldPtr _world)
 Constructor. More...
 
virtual ~EventSource ()
 Destructor. More...
 
void Emit (const std::string &_data) const
 emit an event with data to the internal publisher (and using the internal type) More...
 
virtual void Init ()
 Initialize the event. More...
 
virtual bool IsActive () const
 An event source can be used to enable other events. More...
 

Additional Inherited Members

- Protected Attributes inherited from gazebo::EventSource
bool active
 True if the event source is active. More...
 
std::string name
 Name of the event. More...
 
transport::PublisherPtr pub
 a way to send messages to the other topics (to the REST) More...
 
std::string type
 Type of event. More...
 
physics::WorldPtr world
 Pointer to the world. More...
 

Constructor & Destructor Documentation

gazebo::ExistenceEventSource::ExistenceEventSource ( transport::PublisherPtr  _pub,
physics::WorldPtr  _world 
)

Constructor.

Parameters
[in]_pubthe publisher for SimEvents
[in]_worldthe word

Member Function Documentation

virtual void gazebo::ExistenceEventSource::Load ( const sdf::ElementPtr  _sdf)
virtual

Reads the model filter and event name.

Parameters
[in]_sdfthe element for this event source

Reimplemented from gazebo::EventSource.

void gazebo::ExistenceEventSource::OnExistence ( const std::string &  _model,
bool  _alive 
)

callback for gazebo event

Parameters
[in]_modelthe name of the model
[in]_alivetrue for spawn, false for delete

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