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

Interface for objects that indicates system states somehow. More...

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

Inheritance diagram for trax::Indicator:

Public Types

enum class  Type : char {
  unknown = -1 , none = 0 , switch_mono , switch_multi ,
  velocity_control
}
enum class  Status {
  none = -1 , unknown = 0 , one = 1 , two = 2 ,
  three = 3 , four = 4 , five = 5 , six = 6 ,
  seven = 7 , eight = 8 , nine = 9 , ten = 10 ,
  eleven = 11 , twelve = 12 , thirteen = 13 , count ,
  toggle , change
}
 Possible Indicator states: More...

Public Member Functions

virtual const char * TypeName () const noexcept=0
virtual void SetFrame (const spat::Frame< Length, One > &frame)=0
 Set frame of reference.
virtual const spat::Frame< Length, One > & GetFrame () const =0
 Get frame of reference.
virtual void Get (spat::Frame< Length, One > &frame) const =0
 Gets the pose of the Indicator in global coordinates.
virtual void Toggle (bool pulse=true)=0
 Sets the indicator to the next setting.
virtual Status Set (Status status, bool pulse=true)=0
 Turns the indicator to the specified setting.
virtual Status Get () const =0
 Gets the setting of the indicator.
virtual bool IsValidState (Status status) const =0
virtual void RotateWithStatus (Status status, Real angle)=0
 Set an angle to rotate the indicator by with its status.
virtual Real RotateWithStatus (Status status) const =0
virtual JackJackOn (Status status)=0
 Gets a Jack that pulses its Plug if the specified Status is set.
virtual PlugPlugTo (Status status)=0
 Gets a Plug that switches to the specified Status.
virtual PlugPlugToToggle () noexcept=0
virtual JackJackOnChange () noexcept=0
virtual void RegisterSockets (SocketRegistry &registry)=0
 Registers all the Plugs with the module and supplies the Jacks with plug ids for connecting.
virtual void UnregisterSockets (SocketRegistry &registry)=0
 Removes all references to Plugs and Jacks from the module.
Public Member Functions inherited from trax::Identified< Indicator >
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< IndicatorMake (Type type) noexcept
 Makes a Indicator object.

Detailed Description

Interface for objects that indicates system states somehow.

Typically an Indicator would be represented by a semaphore in 3D space.

Member Enumeration Documentation

◆ Status

enum class trax::Indicator::Status
strong

Possible Indicator states:

Enumerator
none 

Invalid status.

unknown 

unknown status

count 

Number of valid status.

toggle 

status toggle

change 

status change

Member Function Documentation

◆ Get()

virtual void trax::Indicator::Get ( spat::Frame< Length, One > & frame) const
pure virtual

Gets the pose of the Indicator in global coordinates.

Parameters
frameFrame to receive the pose data.

◆ GetFrame()

virtual const spat::Frame< Length, One > & trax::Indicator::GetFrame ( ) const
pure virtual

Get frame of reference.

Returns
const reference to internal frame object.

◆ IsValidState()

virtual bool trax::Indicator::IsValidState ( Status status) const
pure virtual
Returns
true if the indicator state for status is a valid state for the indicator.

◆ JackOnChange()

virtual Jack & trax::Indicator::JackOnChange ( )
pure virtualnoexcept
Returns
A Jack that pulses its Plug if the indicator setting is changed.

◆ PlugToToggle()

virtual Plug & trax::Indicator::PlugToToggle ( )
pure virtualnoexcept
Returns
A Plug to trigger the toggle method.

◆ RotateWithStatus()

virtual Real trax::Indicator::RotateWithStatus ( Status status) const
pure virtual
Returns
the rotation angle for a status.

◆ Set()

virtual Status trax::Indicator::Set ( Status status,
bool pulse = true )
pure virtual

Turns the indicator to the specified setting.

Parameters
statusThe status to set the indicator to.
pulseIf true, the JackOnChange Jack will pulse.
Returns
The previous status of the indicator.

◆ SetFrame()

virtual void trax::Indicator::SetFrame ( const spat::Frame< Length, One > & frame)
pure virtual

Set frame of reference.

The frame sets the position and orientation relative to a parent object.

◆ Toggle()

virtual void trax::Indicator::Toggle ( bool pulse = true)
pure virtual

Sets the indicator to the next setting.

Parameters
pulseIf true, the JackOnChange Jack will pulse.

◆ TypeName()

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

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