#include <SensorEventSource.h>
|
using | SourceBaseType = SensorEventSource< EventT, EventHandlerT, EventArgs... > |
|
using | SourceCallbackType = AZStd::function< void(EventArgs...)> |
|
using | AdaptedCallbackType = AZStd::function< void(float, EventArgs...)> |
|
using | SourceEventType = EventT< EventArgs... > |
|
using | SourceEventHandlerType = EventHandlerT< EventArgs... > |
|
using | AdaptedEventType = EventT< float, EventArgs... > |
|
using | AdaptedEventHandlerType = EventHandlerT< float, EventArgs... > |
|
|
SourceEventType | m_sourceEvent {} |
| This event should be signalled based on specific event source specialization.
|
|
template<template< typename... > class EventT, template< typename... > class EventHandlerT, typename... EventArgs>
class ROS2::SensorEventSource< EventT, EventHandlerT, EventArgs >
Base class template for sensor event sources (based e.g. on TickBus or engine physics callback). Developer that wants to implement new event source should derive from this class and signal m_sensorEvent based on chosen approach. Derived classes can be used directly as unconstrained source of frequency - e.g. TickBasedSource, when synchronization with draw calls is necessary. However, in most common case they will be used as source of events for sensors, through EventSourceAdapter object, where their m_sensorEvent will be additionally adapted to some sensor-specific frequency.
- See also
- ROS2::EventSourceAdapter
-
ROS2::TickBasedSource
-
ROS2::PhysicsBasedSource
◆ ConnectToSourceEvent()
template<template< typename... > class EventT, template< typename... > class EventHandlerT, typename... EventArgs>
void ROS2::SensorEventSource< EventT, EventHandlerT, EventArgs >::ConnectToSourceEvent |
( |
SourceEventHandlerType & |
sourceEventHandler | ) |
|
|
inline |
Connects given event handler to sensor source event. By design, source event is not restricted by frequency settings. This event should be signalled based on event source internal logic (e.g. on draw call). For more details check event source specializations.
- Parameters
-
sourceEventHandler | Event handler that will be connected to source event. |
◆ GetDeltaTime()
template<template< typename... > class EventT, template< typename... > class EventHandlerT, typename... EventArgs>
Returns delta time from set of source event parameters (passed as variadic up to some point). The purpose of this method is to give developers access to event source delta time, without additional variables or helpers.
- Parameters
-
args | Set of source event parameters. |
- Returns
- Delta time in seconds.
◆ Start()
template<template< typename... > class EventT, template< typename... > class EventHandlerT, typename... EventArgs>
Starts event source - see specific event source description for more details. After call to this method event source is supposed to start signalling source event.
Reimplemented in ROS2::TickBasedSource, and ROS2::PhysicsBasedSource.
◆ Stop()
template<template< typename... > class EventT, template< typename... > class EventHandlerT, typename... EventArgs>
Stops event source - see specific event source description for more details. After call to this method event source is supposed to stop signalling source event.
Reimplemented in ROS2::TickBasedSource, and ROS2::PhysicsBasedSource.
The documentation for this class was generated from the following file:
- Gems/ROS2/Code/Include/ROS2/Sensor/Events/SensorEventSource.h