Events Class Reference

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 boost::slot the the add entity signal. More...
 
template<typename T >
static ConnectionPtr ConnectBeforePhysicsUpdate (T _subscriber)
 Connect a boost::slot to the before physics update signal. More...
 
template<typename T >
static ConnectionPtr ConnectCreateEntity (T _subscriber)
 Connect a boost::slot the the add entity signal. More...
 
template<typename T >
static ConnectionPtr ConnectCreateSensor (T _subscriber)
 Connect to the create sensor signal. More...
 
template<typename T >
static ConnectionPtr ConnectDeleteEntity (T _subscriber)
 Connect a boost::slot the delete entity. More...
 
template<typename T >
static ConnectionPtr ConnectDiagTimerStart (T _subscriber)
 Connect a boost::slot the diagnostic timer start signal. More...
 
template<typename T >
static ConnectionPtr ConnectDiagTimerStop (T _subscriber)
 Connect a boost::slot the diagnostic timer stop signal. More...
 
template<typename T >
static ConnectionPtr ConnectPause (T _subscriber)
 Connect a boost::slot the the pause signal. More...
 
template<typename T >
static ConnectionPtr ConnectPostRender (T _subscriber)
 Connect a boost::slot the post render update signal. More...
 
template<typename T >
static ConnectionPtr ConnectPreRender (T _subscriber)
 Render start signal. More...
 
template<typename T >
static ConnectionPtr ConnectRemoveSensor (T _subscriber)
 Connect to the remove sensor signal. More...
 
template<typename T >
static ConnectionPtr ConnectRender (T _subscriber)
 Connect a boost::slot the render update signal. More...
 
template<typename T >
static ConnectionPtr ConnectSetSelectedEntity (T _subscriber)
 Connect a boost::slot the set selected entity. More...
 
template<typename T >
static ConnectionPtr ConnectSigInt (T _subscriber)
 Connect a boost::slot to the sigint event. More...
 
template<typename T >
static ConnectionPtr ConnectStep (T _subscriber)
 Connect a boost::slot the the step signal. More...
 
template<typename T >
static ConnectionPtr ConnectStop (T _subscriber)
 Connect a boost::slot the the stop signal. More...
 
template<typename T >
static ConnectionPtr ConnectTimeReset (T _subscriber)
 Connect to the time reset signal. More...
 
template<typename T >
static ConnectionPtr ConnectWorldCreated (T _subscriber)
 Connect a boost::slot the the world created signal. More...
 
template<typename T >
static ConnectionPtr ConnectWorldReset (T _subscriber)
 Connect to the the world reset signal. More...
 
template<typename T >
static ConnectionPtr ConnectWorldUpdateBegin (T _subscriber)
 Connect a boost::slot the the world update start signal. More...
 
template<typename T >
static ConnectionPtr ConnectWorldUpdateEnd (T _subscriber)
 Connect a boost::slot the the world update end signal. More...
 
static void DisconnectAddEntity (ConnectionPtr _subscriber)
 Disconnect a boost::slot the the add entity signal. More...
 
static void DisconnectBeforePhysicsUpdate (ConnectionPtr _subscriber)
 Disconnect a boost::slot from the before physics update signal. More...
 
static void DisconnectCreateEntity (ConnectionPtr _subscriber)
 Disconnect a boost::slot the the add entity signal. More...
 
static void DisconnectCreateSensor (ConnectionPtr _subscriber)
 Disconnect from the create sensor signal. More...
 
static void DisconnectDeleteEntity (ConnectionPtr _subscriber)
 Disconnect a boost::slot the delete entity. More...
 
static void DisconnectDiagTimerStart (ConnectionPtr _subscriber)
 Disconnect a boost::slot the diagnostic timer start signal. More...
 
static void DisconnectDiagTimerStop (ConnectionPtr _subscriber)
 Disconnect a boost::slot the diagnostic timer stop signal. More...
 
static void DisconnectPause (ConnectionPtr _subscriber)
 Disconnect a boost::slot the the pause signal. More...
 
static void DisconnectPostRender (ConnectionPtr _subscriber)
 Disconnect a boost::slot the post render update signal. More...
 
static void DisconnectPreRender (ConnectionPtr _subscriber)
 Disconnect a render start signal. More...
 
static void DisconnectRemoveSensor (ConnectionPtr _subscriber)
 Disconnect from the remove sensor signal. More...
 
static void DisconnectRender (ConnectionPtr _subscriber)
 Disconnect a boost::slot the render update signal. More...
 
static void DisconnectSetSelectedEntity (ConnectionPtr _subscriber)
 Disconnect a boost::slot the set selected entity. More...
 
static void DisconnectSigInt (ConnectionPtr _subscriber)
 Disconnect a boost::slot to the sigint event. More...
 
static void DisconnectStep (ConnectionPtr _subscriber)
 Disconnect a boost::slot the the step signal. More...
 
static void DisconnectStop (ConnectionPtr _subscriber)
 Disconnect a boost::slot the the stop signal. More...
 
static void DisconnectTimeReset (ConnectionPtr _subscriber)
 Disconnect from the time reset signal. More...
 
static void DisconnectWorldCreated (ConnectionPtr _subscriber)
 Disconnect a boost::slot the the world created signal. More...
 
static void DisconnectWorldReset (ConnectionPtr _subscriber)
 Disconnect from the world reset signal. More...
 
static void DisconnectWorldUpdateBegin (ConnectionPtr _subscriber)
 Disconnect a boost::slot the the world update start signal. More...
 
static void DisconnectWorldUpdateEnd (ConnectionPtr _subscriber)
 Disconnect a boost::slot the the world update end signal. More...
 

Static Public Attributes

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

Detailed Description

An Event class to get notifications for simulator events.

Member Function Documentation

§ ConnectAddEntity()

static ConnectionPtr ConnectAddEntity ( _subscriber)
inlinestatic

Connect a boost::slot the the add entity signal.

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

References Events::addEntity, and EventT< T >::Connect().

§ ConnectBeforePhysicsUpdate()

static ConnectionPtr ConnectBeforePhysicsUpdate ( _subscriber)
inlinestatic

Connect a boost::slot 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 Events::beforePhysicsUpdate, and EventT< T >::Connect().

§ ConnectCreateEntity()

static ConnectionPtr ConnectCreateEntity ( _subscriber)
inlinestatic

Connect a boost::slot the the add entity signal.

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

References EventT< T >::Connect(), and Events::entityCreated.

§ ConnectCreateSensor()

static ConnectionPtr ConnectCreateSensor ( _subscriber)
inlinestatic

Connect to the create sensor signal.

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

References EventT< T >::Connect(), and Events::createSensor.

§ ConnectDeleteEntity()

static ConnectionPtr ConnectDeleteEntity ( _subscriber)
inlinestatic

Connect a boost::slot the delete entity.

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

References EventT< T >::Connect(), and Events::deleteEntity.

§ ConnectDiagTimerStart()

static ConnectionPtr ConnectDiagTimerStart ( _subscriber)
inlinestatic

Connect a boost::slot the diagnostic timer start signal.

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

References EventT< T >::Connect(), and Events::diagTimerStart.

§ ConnectDiagTimerStop()

static ConnectionPtr ConnectDiagTimerStop ( _subscriber)
inlinestatic

Connect a boost::slot the diagnostic timer stop signal.

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

References EventT< T >::Connect(), and Events::diagTimerStop.

§ ConnectPause()

static ConnectionPtr ConnectPause ( _subscriber)
inlinestatic

Connect a boost::slot the the pause signal.

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

References EventT< T >::Connect(), and Events::pause.

§ ConnectPostRender()

static ConnectionPtr ConnectPostRender ( _subscriber)
inlinestatic

Connect a boost::slot the post render update signal.

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

References EventT< T >::Connect(), and Events::postRender.

§ ConnectPreRender()

static ConnectionPtr ConnectPreRender ( _subscriber)
inlinestatic

Render start signal.

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

References EventT< T >::Connect(), and Events::preRender.

§ ConnectRemoveSensor()

static ConnectionPtr ConnectRemoveSensor ( _subscriber)
inlinestatic

Connect to the remove sensor signal.

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

References EventT< T >::Connect(), and Events::removeSensor.

§ ConnectRender()

static ConnectionPtr ConnectRender ( _subscriber)
inlinestatic

Connect a boost::slot the render update signal.

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

References EventT< T >::Connect(), and Events::render.

§ ConnectSetSelectedEntity()

static ConnectionPtr ConnectSetSelectedEntity ( _subscriber)
inlinestatic

Connect a boost::slot the set selected entity.

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

References EventT< T >::Connect(), and Events::setSelectedEntity.

§ ConnectSigInt()

static ConnectionPtr ConnectSigInt ( _subscriber)
inlinestatic

Connect a boost::slot to the sigint event.

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

References EventT< T >::Connect(), and Events::sigInt.

§ ConnectStep()

static ConnectionPtr ConnectStep ( _subscriber)
inlinestatic

Connect a boost::slot the the step signal.

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

References EventT< T >::Connect(), and Events::step.

§ ConnectStop()

static ConnectionPtr ConnectStop ( _subscriber)
inlinestatic

Connect a boost::slot the the stop signal.

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

References EventT< T >::Connect(), and Events::stop.

§ ConnectTimeReset()

static ConnectionPtr ConnectTimeReset ( _subscriber)
inlinestatic

Connect to the time reset signal.

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

References EventT< T >::Connect(), and Events::timeReset.

§ ConnectWorldCreated()

static ConnectionPtr ConnectWorldCreated ( _subscriber)
inlinestatic

Connect a boost::slot the the world created signal.

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

References EventT< T >::Connect(), and Events::worldCreated.

§ ConnectWorldReset()

static ConnectionPtr ConnectWorldReset ( _subscriber)
inlinestatic

Connect to the the world reset signal.

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

References EventT< T >::Connect(), and Events::worldReset.

§ ConnectWorldUpdateBegin()

static ConnectionPtr ConnectWorldUpdateBegin ( _subscriber)
inlinestatic

Connect a boost::slot the the world update start signal.

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

References EventT< T >::Connect(), Events::DisconnectWorldUpdateBegin(), and Events::worldUpdateBegin.

§ ConnectWorldUpdateEnd()

static ConnectionPtr ConnectWorldUpdateEnd ( _subscriber)
inlinestatic

Connect a boost::slot the the world update end signal.

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

References EventT< T >::Connect(), and Events::worldUpdateEnd.

§ DisconnectAddEntity()

static void DisconnectAddEntity ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot the the add entity signal.

Parameters
[in]_subscriberthe subscriber to this event

References Events::addEntity, and EventT< T >::Disconnect().

§ DisconnectBeforePhysicsUpdate()

static void DisconnectBeforePhysicsUpdate ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot from the before physics update signal.

Parameters
[in]_subscriberthe subscriber to this event

References Events::beforePhysicsUpdate, and EventT< T >::Disconnect().

§ DisconnectCreateEntity()

static void DisconnectCreateEntity ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot the the add entity signal.

Parameters
[in]_subscriberthe subscriber to this event

References EventT< T >::Disconnect(), and Events::entityCreated.

§ DisconnectCreateSensor()

static void DisconnectCreateSensor ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect from the create sensor signal.

Parameters
[in]_subscriberthe subscriber to this event

References Events::createSensor, and EventT< T >::Disconnect().

§ DisconnectDeleteEntity()

static void DisconnectDeleteEntity ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot the delete entity.

Parameters
[in]_subscriberthe subscriber to this event

References Events::deleteEntity, and EventT< T >::Disconnect().

§ DisconnectDiagTimerStart()

static void DisconnectDiagTimerStart ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot the diagnostic timer start signal.

Parameters
[in]_subscriberthe subscriber to this event

References Events::diagTimerStart, and EventT< T >::Disconnect().

§ DisconnectDiagTimerStop()

static void DisconnectDiagTimerStop ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot the diagnostic timer stop signal.

Parameters
[in]_subscriberthe subscriber to this event

References Events::diagTimerStop, and EventT< T >::Disconnect().

§ DisconnectPause()

static void DisconnectPause ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot the the pause signal.

Parameters
[in]_subscriberthe subscriber to this event

References EventT< T >::Disconnect(), and Events::pause.

§ DisconnectPostRender()

static void DisconnectPostRender ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot the post render update signal.

Parameters
[in]_subscriberthe subscriber to this event

References EventT< T >::Disconnect(), and Events::postRender.

§ DisconnectPreRender()

static void DisconnectPreRender ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a render start signal.

Parameters
[in]_subscriberthe subscriber to this event

References EventT< T >::Disconnect(), and Events::preRender.

§ DisconnectRemoveSensor()

static void DisconnectRemoveSensor ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect from the remove sensor signal.

Parameters
[in]_subscriberthe subscriber to this event

References EventT< T >::Disconnect(), and Events::removeSensor.

§ DisconnectRender()

static void DisconnectRender ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot the render update signal.

Parameters
[in]_subscriberthe subscriber to this event

References EventT< T >::Disconnect(), and Events::render.

§ DisconnectSetSelectedEntity()

static void DisconnectSetSelectedEntity ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot the set selected entity.

Parameters
[in]_subscriberthe subscriber to this event

References EventT< T >::Disconnect(), and Events::setSelectedEntity.

§ DisconnectSigInt()

static void DisconnectSigInt ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot to the sigint event.

Parameters
[in]_subscriberthe subscriber to this event

References EventT< T >::Disconnect(), and Events::sigInt.

§ DisconnectStep()

static void DisconnectStep ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot the the step signal.

Parameters
[in]_subscriberthe subscriber to this event

References EventT< T >::Disconnect(), and Events::step.

§ DisconnectStop()

static void DisconnectStop ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot the the stop signal.

Parameters
[in]_subscriberthe subscriber to this event

References EventT< T >::Disconnect(), and Events::stop.

§ DisconnectTimeReset()

static void DisconnectTimeReset ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect from the time reset signal.

Parameters
[in]_subscriberthe subscriber to this event

References EventT< T >::Disconnect(), and Events::timeReset.

§ DisconnectWorldCreated()

static void DisconnectWorldCreated ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot the the world created signal.

References EventT< T >::Disconnect(), and Events::worldCreated.

§ DisconnectWorldReset()

static void DisconnectWorldReset ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect from the world reset signal.

Parameters
[in]_subscriberthe subscriber to this event

References EventT< T >::Disconnect(), and Events::worldReset.

§ DisconnectWorldUpdateBegin()

static void DisconnectWorldUpdateBegin ( ConnectionPtr  _subscriber)
static

Disconnect a boost::slot the the world update start signal.

Parameters
[in]_subscriberthe subscriber to this event

Referenced by Events::ConnectWorldUpdateBegin().

§ DisconnectWorldUpdateEnd()

static void DisconnectWorldUpdateEnd ( ConnectionPtr  _subscriber)
inlinestatic

Disconnect a boost::slot the the world update end signal.

Parameters
[in]_subscriberthe subscriber to this event

References EventT< T >::Disconnect(), and Events::worldUpdateEnd.

Member Data Documentation

§ addEntity

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

An entity has been added.

Referenced by Events::ConnectAddEntity(), and Events::DisconnectAddEntity().

§ beforePhysicsUpdate

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

Collision detection has been done, physics update not yet.

Referenced by Events::ConnectBeforePhysicsUpdate(), and Events::DisconnectBeforePhysicsUpdate().

§ 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 Events::ConnectCreateSensor(), and Events::DisconnectCreateSensor().

§ deleteEntity

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

An entity has been deleted.

Referenced by Events::ConnectDeleteEntity(), and Events::DisconnectDeleteEntity().

§ diagTimerStart

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

Diagnostic timer start.

Referenced by Events::ConnectDiagTimerStart(), and Events::DisconnectDiagTimerStart().

§ diagTimerStop

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

Diagnostic timer stop.

Referenced by Events::ConnectDiagTimerStop(), and Events::DisconnectDiagTimerStop().

§ entityCreated

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

An entity has been created.

Referenced by Events::ConnectCreateEntity(), and Events::DisconnectCreateEntity().

§ pause

EventT<void (bool)> pause
static

Pause signal.

Referenced by Events::ConnectPause(), and Events::DisconnectPause().

§ postRender

EventT<void ()> postRender
static

§ preRender

EventT<void ()> preRender
static

§ removeSensor

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

Remove a sensor.

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

Referenced by Events::ConnectRemoveSensor(), and Events::DisconnectRemoveSensor().

§ render

EventT<void ()> render
static

§ setSelectedEntity

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

An entity has been selected.

Referenced by Events::ConnectSetSelectedEntity(), and Events::DisconnectSetSelectedEntity().

§ sigInt

EventT<void ()> sigInt
static

Simulation stop signal.

Referenced by Events::ConnectSigInt(), and Events::DisconnectSigInt().

§ step

EventT<void ()> step
static

Step the simulation once signal.

Referenced by Events::ConnectStep(), and Events::DisconnectStep().

§ stop

EventT<void ()> stop
static

Simulation stop signal.

Referenced by Events::ConnectStop(), and Events::DisconnectStop().

§ timeReset

EventT<void ()> timeReset
static

Time reset signal.

Referenced by Events::ConnectTimeReset(), and Events::DisconnectTimeReset().

§ worldCreated

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

A world has been created.

Referenced by Events::ConnectWorldCreated(), and Events::DisconnectWorldCreated().

§ worldReset

EventT<void ()> worldReset
static

World reset signal.

Referenced by Events::ConnectWorldReset(), and Events::DisconnectWorldReset().

§ worldUpdateBegin

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

World update has started.

Referenced by Events::ConnectWorldUpdateBegin().

§ worldUpdateEnd

EventT<void ()> worldUpdateEnd
static

World update has ended.

Referenced by Events::ConnectWorldUpdateEnd(), and Events::DisconnectWorldUpdateEnd().


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