The base class for emitting SimEvents.
More...
#include <EventSource.hh>
Inherited by ExistenceEventSource, InRegionEventSource, JointEventSource, OccupiedEventSource, and SimStateEventSource.
|
| | EventSource (transport::PublisherPtr _pub, const std::string &_type, physics::WorldPtr _world) |
| | Constructor.
|
| virtual | ~EventSource () |
| | Destructor.
|
| void | Emit (const std::string &_data) const |
| | emit an event with data to the internal publisher (and using the internal type)
|
| virtual void | Init () |
| | Initialize the event.
|
| virtual bool | IsActive () const |
| | An event source can be used to enable other events.
|
| virtual void | Load (const sdf::ElementPtr _sdf) |
| | Load from an sdf element (with possible configuration data)
|
The base class for emitting SimEvents.
◆ EventSource()
Constructor.
- Parameters
-
| [in] | _pub | the publisher where the events are emitted |
| [in] | _type | the type of event |
| [in] | _world | Pointer to the world (in order to get model refs, etc) |
◆ ~EventSource()
◆ Emit()
| void Emit |
( |
const std::string & | _data | ) |
const |
emit an event with data to the internal publisher (and using the internal type)
- Parameters
-
| [in] | _data | the JSON data related to this event. |
◆ Init()
◆ IsActive()
| virtual bool IsActive |
( |
| ) |
const |
|
virtual |
An event source can be used to enable other events.
Inactive events do not generate an message when Emit is called.
- Returns
- true if the event is active
◆ Load()
| virtual void Load |
( |
const sdf::ElementPtr | _sdf | ) |
|
|
virtual |
◆ active
True if the event source is active.
Inactive event sources do not emit events
◆ name
◆ pub
a way to send messages to the other topics (to the REST)
◆ type
◆ world
The documentation for this class was generated from the following file: