Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
trax::Sensor Struct Referenceabstract

A Sensor can get attached to a track and be triggerd when a Location runs over it. More...

#include <C:/Trend/Development/Trax3/Code/trax/Sensor.h>

Inheritance diagram for trax::Sensor:

Public Member Functions

virtual const char * TypeName () const noexcept=0
virtual void Trigger (const Event &_event)=0
 Triggers this Sensor.
virtual TrackBuilderTrackAttached () const =0
virtual void Attach (TrackBuilder *pTrackBuilder)=0
 Attach the pointer to the track to the sensor.
virtual JackJackOnTrigger ()=0
 Gets a Jack that pulses its Plug if the sensor is triggering.
virtual void RegisterSockets (SocketRegistry &modul)=0
 Registers all the Plugs with the module and supplies the Jacks with plug ids for connecting.
virtual void UnregisterSockets (SocketRegistry &modul)=0
 Removes all references to Plugs and Jacks from the module.
Public Member Functions inherited from trax::Identified< Sensor >
virtual const std::string & Reference (const std::string &name) const=0
 Gets a reference that was set for this object by name.
virtual const std::vector< char const * > & ReferenceNames (const std::string &namePart) const=0
 Searches for all reference names that countain namePart as substring in the name.
virtual IDType ID () const noexcept=0
 Identified (const Identified &)=delete
Identified & operator= (const Identified &)=delete

Static Public Member Functions

static dclspc std::unique_ptr< SensorMake () noexcept
 Makes a Sensor object that triggers on all events.

Detailed Description

A Sensor can get attached to a track and be triggerd when a Location runs over it.

Member Function Documentation

◆ Attach()

virtual void trax::Sensor::Attach ( TrackBuilder * pTrackBuilder)
pure virtual

Attach the pointer to the track to the sensor.

This message is called during attachement and detachment of a sensor. Never call it directly; implement it for user sensors.

Implemented in trax::Sensor_Imp.

◆ JackOnTrigger()

virtual Jack & trax::Sensor::JackOnTrigger ( )
pure virtual

Gets a Jack that pulses its Plug if the sensor is triggering.

Implemented in trax::Sensor_Imp.

◆ RegisterSockets()

virtual void trax::Sensor::RegisterSockets ( SocketRegistry & modul)
pure virtual

Registers all the Plugs with the module and supplies the Jacks with plug ids for connecting.

Implemented in trax::Sensor_Imp.

◆ TrackAttached()

virtual TrackBuilder * trax::Sensor::TrackAttached ( ) const
pure virtual
Returns
Pointer to the track this Sensor is attached to, or nullptr, if not attached.

Implemented in trax::Sensor_Imp.

◆ Trigger()

virtual void trax::Sensor::Trigger ( const Event & _event)
pure virtual

Triggers this Sensor.

Triggering means to pulse a registered Socket if a match between the Event and the sensor's fiter settings is found.

Parameters
_eventAn Event object that is used to filter wether the sensor should actually trigger.

Implemented in trax::Sensor_Imp.

◆ TypeName()

virtual const char * trax::Sensor::TypeName ( ) const
pure virtualnoexcept
Returns
the name for the object type that implements this interface.

Implemented in trax::Sensor_Imp.

◆ UnregisterSockets()

virtual void trax::Sensor::UnregisterSockets ( SocketRegistry & modul)
pure virtual

Removes all references to Plugs and Jacks from the module.

Implemented in trax::Sensor_Imp.


The documentation for this struct was generated from the following file:
  • C:/Trend/Development/Trax3/Code/trax/Sensor.h