An Event class to get notifications for simulator events. More...

#include <common/common.hh>

Static Public Member Functions

template<typename T>
static ConnectionPtr ConnectAddEntity (T _subscriber)
 Connect a callback to the add entity signal.
 
template<typename T>
static ConnectionPtr ConnectBeforePhysicsUpdate (T _subscriber)
 Connect a callback to the before physics update signal.
 
template<typename T>
static ConnectionPtr ConnectCreateEntity (T _subscriber)
 Connect a callback to the add entity signal.
 
template<typename T>
static ConnectionPtr ConnectCreateSensor (T _subscriber)
 Connect to the create sensor signal.
 
template<typename T>
static ConnectionPtr ConnectDeleteEntity (T _subscriber)
 Connect a callback to the delete entity signal.
 
template<typename T>
static ConnectionPtr ConnectDiagTimerStart (T _subscriber)
 Connect a callback to the diagnostic timer start signal.
 
template<typename T>
static ConnectionPtr ConnectDiagTimerStop (T _subscriber)
 Connect a callback to the diagnostic timer stop signal.
 
template<typename T>
static ConnectionPtr ConnectPause (T _subscriber)
 Connect a callback to the pause signal.
 
template<typename T>
static ConnectionPtr ConnectPostRender (T _subscriber)
 Connect a callback to the post render update signal.
 
template<typename T>
static ConnectionPtr ConnectPreRender (T _subscriber)
 Render start signal.
 
template<typename T>
static ConnectionPtr ConnectRemoveSensor (T _subscriber)
 Connect to the remove sensor signal.
 
template<typename T>
static ConnectionPtr ConnectRender (T _subscriber)
 Connect a callback to the render update signal.
 
template<typename T>
static ConnectionPtr ConnectSetSelectedEntity (T _subscriber)
 Connect a callback to the set selected entity signal.
 
template<typename T>
static ConnectionPtr ConnectSigInt (T _subscriber)
 Connect a callback to the sigint event.
 
template<typename T>
static ConnectionPtr ConnectStep (T _subscriber)
 Connect a callback to the step signal.
 
template<typename T>
static ConnectionPtr ConnectStop (T _subscriber)
 Connect a callback to the stop signal.
 
template<typename T>
static ConnectionPtr ConnectTimeReset (T _subscriber)
 Connect to the time reset signal.
 
template<typename T>
static ConnectionPtr ConnectWorldCreated (T _subscriber)
 Connect a callback to the world created signal.
 
template<typename T>
static ConnectionPtr ConnectWorldReset (T _subscriber)
 Connect to the world reset signal.
 
template<typename T>
static ConnectionPtr ConnectWorldUpdateBegin (T _subscriber)
 Connect a callback to the world update start signal.
 
template<typename T>
static ConnectionPtr ConnectWorldUpdateEnd (T _subscriber)
 Connect a callback to the world update end signal.
 

Static Public Attributes

static EventT< void(std::string)> addEntity
 An entity has been added.
 
static EventT< void(const common::UpdateInfo &)> beforePhysicsUpdate
 Collision detection has been done, physics update not yet.
 
static EventT< void(sdf::ElementPtr, const std::string &, const std::string &, const uint32_t)> createSensor
 Create a sensor.
 
static EventT< void(std::string)> deleteEntity
 An entity has been deleted.
 
static EventT< void(std::string)> diagTimerStart
 Diagnostic timer start.
 
static EventT< void(std::string)> diagTimerStop
 Diagnostic timer stop.
 
static EventT< void(std::string)> entityCreated
 An entity has been created.
 
static EventT< void(bool)> pause
 Pause signal.
 
static EventT< void()> postRender
 Post-Render.
 
static EventT< void()> preRender
 Pre-render.
 
static EventT< void(std::string)> removeSensor
 Remove a sensor.
 
static EventT< void()> render
 Render.
 
static EventT< void(std::string, std::string)> setSelectedEntity
 An entity has been selected.
 
static EventT< void()> sigInt
 Simulation SIGINT/SIGTERM signal.
 
static EventT< void()> step
 Step the simulation once signal.
 
static EventT< void()> stop
 Simulation stop signal.
 
static EventT< void()> timeReset
 Time reset signal.
 
static EventT< void(std::string)> worldCreated
 A world has been created.
 
static EventT< void()> worldReset
 World reset signal.
 
static EventT< void(const common::UpdateInfo &)> worldUpdateBegin
 World update has started.
 
static EventT< void()> worldUpdateEnd
 World update has ended.
 

Detailed Description

An Event class to get notifications for simulator events.

Member Function Documentation

◆ ConnectAddEntity()

template<typename T>
static ConnectionPtr ConnectAddEntity ( T _subscriber)
inlinestatic

Connect a callback to the add entity signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References addEntity.

◆ ConnectBeforePhysicsUpdate()

template<typename T>
static ConnectionPtr ConnectBeforePhysicsUpdate ( T _subscriber)
inlinestatic

Connect a callback to the before physics update signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

The signal is called after collision detection has finished and before the physics update step. So you can e.g. change some forces depending on the collisions that have occured.

References beforePhysicsUpdate.

◆ ConnectCreateEntity()

template<typename T>
static ConnectionPtr ConnectCreateEntity ( T _subscriber)
inlinestatic

Connect a callback to the add entity signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References entityCreated.

◆ ConnectCreateSensor()

template<typename T>
static ConnectionPtr ConnectCreateSensor ( T _subscriber)
inlinestatic

Connect to the create sensor signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References createSensor.

◆ ConnectDeleteEntity()

template<typename T>
static ConnectionPtr ConnectDeleteEntity ( T _subscriber)
inlinestatic

Connect a callback to the delete entity signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References deleteEntity.

◆ ConnectDiagTimerStart()

template<typename T>
static ConnectionPtr ConnectDiagTimerStart ( T _subscriber)
inlinestatic

Connect a callback to the diagnostic timer start signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References diagTimerStart.

◆ ConnectDiagTimerStop()

template<typename T>
static ConnectionPtr ConnectDiagTimerStop ( T _subscriber)
inlinestatic

Connect a callback to the diagnostic timer stop signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References diagTimerStop.

◆ ConnectPause()

template<typename T>
static ConnectionPtr ConnectPause ( T _subscriber)
inlinestatic

Connect a callback to the pause signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References pause.

◆ ConnectPostRender()

template<typename T>
static ConnectionPtr ConnectPostRender ( T _subscriber)
inlinestatic

Connect a callback to the post render update signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References postRender.

◆ ConnectPreRender()

template<typename T>
static ConnectionPtr ConnectPreRender ( T _subscriber)
inlinestatic

Render start signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References preRender.

◆ ConnectRemoveSensor()

template<typename T>
static ConnectionPtr ConnectRemoveSensor ( T _subscriber)
inlinestatic

Connect to the remove sensor signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References removeSensor.

◆ ConnectRender()

template<typename T>
static ConnectionPtr ConnectRender ( T _subscriber)
inlinestatic

Connect a callback to the render update signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References render.

◆ ConnectSetSelectedEntity()

template<typename T>
static ConnectionPtr ConnectSetSelectedEntity ( T _subscriber)
inlinestatic

Connect a callback to the set selected entity signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References setSelectedEntity.

◆ ConnectSigInt()

template<typename T>
static ConnectionPtr ConnectSigInt ( T _subscriber)
inlinestatic

Connect a callback to the sigint event.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References sigInt.

◆ ConnectStep()

template<typename T>
static ConnectionPtr ConnectStep ( T _subscriber)
inlinestatic

Connect a callback to the step signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References step.

◆ ConnectStop()

template<typename T>
static ConnectionPtr ConnectStop ( T _subscriber)
inlinestatic

Connect a callback to the stop signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References stop.

◆ ConnectTimeReset()

template<typename T>
static ConnectionPtr ConnectTimeReset ( T _subscriber)
inlinestatic

Connect to the time reset signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References timeReset.

◆ ConnectWorldCreated()

template<typename T>
static ConnectionPtr ConnectWorldCreated ( T _subscriber)
inlinestatic

Connect a callback to the world created signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References worldCreated.

◆ ConnectWorldReset()

template<typename T>
static ConnectionPtr ConnectWorldReset ( T _subscriber)
inlinestatic

Connect to the world reset signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References worldReset.

◆ ConnectWorldUpdateBegin()

template<typename T>
static ConnectionPtr ConnectWorldUpdateBegin ( T _subscriber)
inlinestatic

Connect a callback to the world update start signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References worldUpdateBegin.

◆ ConnectWorldUpdateEnd()

template<typename T>
static ConnectionPtr ConnectWorldUpdateEnd ( T _subscriber)
inlinestatic

Connect a callback to the world update end signal.

Parameters
[in]_subscriberthe subscriber to this event
Returns
a connection

References worldUpdateEnd.

Member Data Documentation

◆ addEntity

EventT<void (std::string)> addEntity
static

An entity has been added.

Referenced by ConnectAddEntity().

◆ beforePhysicsUpdate

EventT<void (const common::UpdateInfo &)> beforePhysicsUpdate
static

Collision detection has been done, physics update not yet.

Referenced by ConnectBeforePhysicsUpdate().

◆ createSensor

EventT<void (sdf::ElementPtr, const std::string &, const std::string &, const uint32_t)> createSensor
static

Create a sensor.

  • Parameter 1 (sdf::ElementPtr): The SDF element that describes the sensor.
  • Parameter 2 (std::string): Name of the world in which to create the sensor.
  • Parameter 3 (std::string): The scoped parent name (model::link).
  • Parameter 4 (uint32_t): ID of the sensor

Referenced by ConnectCreateSensor().

◆ deleteEntity

EventT<void (std::string)> deleteEntity
static

An entity has been deleted.

Referenced by ConnectDeleteEntity().

◆ diagTimerStart

EventT<void (std::string)> diagTimerStart
static

Diagnostic timer start.

Referenced by ConnectDiagTimerStart().

◆ diagTimerStop

EventT<void (std::string)> diagTimerStop
static

Diagnostic timer stop.

Referenced by ConnectDiagTimerStop().

◆ entityCreated

EventT<void (std::string)> entityCreated
static

An entity has been created.

Referenced by ConnectCreateEntity().

◆ pause

EventT<void (bool)> pause
static

Pause signal.

Referenced by ConnectPause().

◆ postRender

EventT<void ()> postRender
static

Post-Render.

Referenced by ConnectPostRender().

◆ preRender

EventT<void ()> preRender
static

Pre-render.

Referenced by ConnectPreRender().

◆ removeSensor

EventT<void (std::string)> removeSensor
static

Remove a sensor.

  • Parameter 1 (string): Name of the sensor to remove.

Referenced by ConnectRemoveSensor().

◆ render

EventT<void ()> render
static

Render.

Referenced by ConnectRender().

◆ setSelectedEntity

EventT<void (std::string, std::string)> setSelectedEntity
static

An entity has been selected.

Referenced by ConnectSetSelectedEntity().

◆ sigInt

EventT<void ()> sigInt
static

Simulation SIGINT/SIGTERM signal.

Referenced by ConnectSigInt().

◆ step

EventT<void ()> step
static

Step the simulation once signal.

Referenced by ConnectStep().

◆ stop

EventT<void ()> stop
static

Simulation stop signal.

Referenced by ConnectStop().

◆ timeReset

EventT<void ()> timeReset
static

Time reset signal.

Referenced by ConnectTimeReset().

◆ worldCreated

EventT<void (std::string)> worldCreated
static

A world has been created.

Referenced by ConnectWorldCreated().

◆ worldReset

EventT<void ()> worldReset
static

World reset signal.

Referenced by ConnectWorldReset().

◆ worldUpdateBegin

EventT<void (const common::UpdateInfo &)> worldUpdateBegin
static

World update has started.

Referenced by ConnectWorldUpdateBegin().

◆ worldUpdateEnd

EventT<void ()> worldUpdateEnd
static

World update has ended.

Referenced by ConnectWorldUpdateEnd().


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