gramods
Classes | Public Member Functions | Static Public Attributes | List of all members
gramods::gmTrack::AnalogsMapper Class Reference

Analogs filter that re-maps analog indices to a standard order for application compatibility between tracker systems. More...

#include <AnalogsMapper.hh>

Inheritance diagram for gramods::gmTrack::AnalogsMapper:
Inheritance graph
[legend]
Collaboration diagram for gramods::gmTrack::AnalogsMapper:
Collaboration graph
[legend]

Classes

struct  AnalogIndex
 Standard analogs indices, for compatibility. More...
 

Public Member Functions

void setAnalogsTracker (std::shared_ptr< AnalogsTracker > bt)
 Sets the analogs tracker to re-map. More...
 
void addMapping (gmCore::size2 m)
 Adds a mapping in the form of two integer indices: from and to button index, respectively. More...
 
void setVerticalAnalog (int idx)
 Sets which analog to map to vertical analog, as an index starting at zero. More...
 
void setHorizontalAnalog (int idx)
 Sets which analog to map to horizontal analog, as an index starting at zero. More...
 
void setTriggerAnalog (int idx)
 Sets which analog to map to trigger analog, as an index starting at zero. More...
 
bool getAnalogs (AnalogsSample &p) override
 Replaces the contents of p with button data. More...
 
void traverse (Visitor *visitor) override
 Propagates the specified visitor. More...
 
- Public Member Functions inherited from gramods::gmTrack::AnalogsTracker
virtual std::string getDefaultKey () override
 Returns the default key, in Configuration, for the Object. More...
 
- Public Member Functions inherited from gramods::gmCore::Object
 Object ()
 Initializes internal data. More...
 
virtual ~Object ()
 Cleaning up internal data. More...
 
virtual void initialize ()
 Called to initialize the Object. More...
 
virtual void accept (Visitor *visitor)
 Calls the visitors apply method with this as argument. More...
 
bool isInitialized ()
 Returns true if the Object is initialized. More...
 

Static Public Attributes

static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 

Additional Inherited Members

- Public Types inherited from gramods::gmTrack::AnalogsTracker
typedef std::chrono::steady_clock clock
 

Detailed Description

Analogs filter that re-maps analog indices to a standard order for application compatibility between tracker systems.

Preferred order is vertical, horizontal and then trigger, followed by any other analog input.

Member Function Documentation

◆ addMapping()

void gramods::gmTrack::AnalogsMapper::addMapping ( gmCore::size2  m)

Adds a mapping in the form of two integer indices: from and to button index, respectively.

XML-attribute: mapping

◆ getAnalogs()

bool gramods::gmTrack::AnalogsMapper::getAnalogs ( AnalogsSample p)
overridevirtual

Replaces the contents of p with button data.

Returns true if data could be read, false otherwise. Use sample time to check if data are fresh.

Implements gramods::gmTrack::AnalogsTracker.

◆ setAnalogsTracker()

void gramods::gmTrack::AnalogsMapper::setAnalogsTracker ( std::shared_ptr< AnalogsTracker bt)

Sets the analogs tracker to re-map.

XML-attribute: analogsTracker

◆ setHorizontalAnalog()

void gramods::gmTrack::AnalogsMapper::setHorizontalAnalog ( int  idx)

Sets which analog to map to horizontal analog, as an index starting at zero.

XML-attribute: horizontalAnalog

◆ setTriggerAnalog()

void gramods::gmTrack::AnalogsMapper::setTriggerAnalog ( int  idx)

Sets which analog to map to trigger analog, as an index starting at zero.

XML-attribute: triggerAnalog

◆ setVerticalAnalog()

void gramods::gmTrack::AnalogsMapper::setVerticalAnalog ( int  idx)

Sets which analog to map to vertical analog, as an index starting at zero.

XML-attribute: verticalAnalog

◆ traverse()

void gramods::gmTrack::AnalogsMapper::traverse ( Visitor visitor)
overridevirtual

Propagates the specified visitor.

See also
Object::Visitor

Reimplemented from gramods::gmCore::Object.


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