SimEvent that fires when the simulation is paused/resumed.
More...
#include <SimStateEventSource.hh>
Inherits EventSource.
SimEvent that fires when the simulation is paused/resumed.
◆ SimStateEventSource()
Constructor.
- Parameters
-
[in] | _pub | publisher for the SimEvents |
[in] | _world | pointer to the world. |
◆ ~SimStateEventSource()
◆ 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. |
◆ 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 |
Load the name of the event from the world file.
- Parameters
-
[in] | _sdf | the event element in the world file |
Reimplemented from EventSource.
◆ OnPause()
Callback for the pause event.
- Parameters
-
[in] | _p | true if the sim has been paused |
◆ OnUpdate()
Update for every time step.
- Parameters
-
[in] | _info | Update information provided by the server. |
◆ 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: