The event generator class.
More...
#include <InRegionEventSource.hh>
Inherits EventSource.
|
| InRegionEventSource (transport::PublisherPtr _pub, physics::WorldPtr _world, const std::map< std::string, RegionPtr > &_regions) |
| Constructor.
|
|
void | Emit (const std::string &_data) const |
| emit an event with data to the internal publisher (and using the internal type)
|
|
void | Info () const |
| Prints data about the event source to the log (useful for debug)
|
|
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) |
| Loads the full name of the model and the region from the world file.
|
|
void | Update () |
| Called every simulation step.
|
|
The event generator class.
◆ InRegionEventSource()
Constructor.
- Parameters
-
[in] | _pub | the publisher for the SimEvents |
[in] | _world | Pointer to the world. |
[in] | _regions | dictionary of regions in the world |
◆ Emit()
void Emit |
( |
const std::string & | _data | ) |
const |
|
inherited |
emit an event with data to the internal publisher (and using the internal type)
- Parameters
-
[in] | _data | the JSON data related to this event. |
◆ Info()
Prints data about the event source to the log (useful for debug)
◆ Init()
◆ IsActive()
virtual bool IsActive |
( |
| ) |
const |
|
virtualinherited |
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 |
Loads the full name of the model and the region from the world file.
- Parameters
-
Reimplemented from EventSource.
◆ Update()
Called every simulation step.
◆ 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: