FlightGear next
FGLinuxInputDevice Class Reference

#include <FGLinuxEventInput.hxx>

Inherits FGInputDevice.

Public Member Functions

 FGLinuxInputDevice ()
 
 FGLinuxInputDevice (std::string aName, std::string aDevname, std::string aSerial, std::string aDevpath)
 
virtual ~FGLinuxInputDevice ()
 
bool Open () override
 
void Close () override
 
void Send (const char *eventName, double value) override
 
const char * TranslateEventName (FGEventData &eventData) override
 
void SetDevname (const std::string &name)
 
std::string GetDevFile () const
 
std::string GetDevPath () const
 
int GetFd ()
 
double Normalize (struct input_event &event)
 
- Public Member Functions inherited from FGInputDevice
 FGInputDevice ()
 
 FGInputDevice (std::string aName, std::string aSerial={})
 
virtual ~FGInputDevice ()
 
void Send (const std::string &eventName, double value)
 
virtual void SendFeatureReport (unsigned int reportId, const std::string &data)
 
void SetName (std::string name)
 
std::string & GetName ()
 
void SetUniqueName (const std::string &name)
 
const std::string GetUniqueName () const
 
void SetSerialNumber (std::string serial)
 
std::string & GetSerialNumber ()
 
void HandleEvent (FGEventData &eventData)
 
virtual void AddHandledEvent (FGInputEvent_ptr handledEvent)
 
virtual void Configure (SGPropertyNode_ptr deviceNode)
 
virtual void update (double dt)
 
bool GetDebugEvents () const
 
bool GetGrab () const
 
const std::string & GetNasalModule () const
 

Additional Inherited Members

- Public Attributes inherited from FGInputDevice
std::string class_id = "FGInputDevice"
 
- Protected Attributes inherited from FGInputDevice
std::map< std::string, FGInputEvent_ptrhandledEvents
 
std::string name
 
std::string serialNumber
 
bool debugEvents = false
 
bool grab = false
 
SGPropertyNode_ptr deviceNode
 
SGPropertyNode_ptr lastEventName
 
SGPropertyNode_ptr lastEventValue
 
std::string nasalModule
 
report_setting_list_t reportSettings
 
std::string _uniqueName
 name, but with suffix / serial appended.
 

Detailed Description

Definition at line 42 of file FGLinuxEventInput.hxx.

Constructor & Destructor Documentation

◆ FGLinuxInputDevice() [1/2]

FGLinuxInputDevice::FGLinuxInputDevice ( )

Definition at line 292 of file FGLinuxEventInput.cxx.

◆ FGLinuxInputDevice() [2/2]

FGLinuxInputDevice::FGLinuxInputDevice ( std::string aName,
std::string aDevname,
std::string aSerial,
std::string aDevpath )

Definition at line 273 of file FGLinuxEventInput.cxx.

◆ ~FGLinuxInputDevice()

FGLinuxInputDevice::~FGLinuxInputDevice ( )
virtual

Definition at line 283 of file FGLinuxEventInput.cxx.

Member Function Documentation

◆ Close()

void FGLinuxInputDevice::Close ( )
overridevirtual

Implements FGInputDevice.

Definition at line 408 of file FGLinuxEventInput.cxx.

◆ GetDevFile()

std::string FGLinuxInputDevice::GetDevFile ( ) const
inline

Definition at line 55 of file FGLinuxEventInput.hxx.

◆ GetDevPath()

std::string FGLinuxInputDevice::GetDevPath ( ) const
inline

Definition at line 56 of file FGLinuxEventInput.hxx.

◆ GetFd()

int FGLinuxInputDevice::GetFd ( )
inline

Definition at line 58 of file FGLinuxEventInput.hxx.

◆ Normalize()

double FGLinuxInputDevice::Normalize ( struct input_event & event)

Definition at line 396 of file FGLinuxEventInput.cxx.

◆ Open()

bool FGLinuxInputDevice::Open ( )
overridevirtual

Implements FGInputDevice.

Definition at line 302 of file FGLinuxEventInput.cxx.

◆ Send()

void FGLinuxInputDevice::Send ( const char * eventName,
double value )
overridevirtual

Implements FGInputDevice.

Definition at line 419 of file FGLinuxEventInput.cxx.

◆ SetDevname()

void FGLinuxInputDevice::SetDevname ( const std::string & name)

Definition at line 468 of file FGLinuxEventInput.cxx.

◆ TranslateEventName()

const char * FGLinuxInputDevice::TranslateEventName ( FGEventData & eventData)
overridevirtual

Implements FGInputDevice.

Definition at line 448 of file FGLinuxEventInput.cxx.


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