Input Device#
-
class FGInputDevice : public SGReferenced#
TODO: document.
Subclassed by FGHIDDevice, FGLinuxInputDevice
-
class FGHIDDevice : public FGInputDevice#
TODO: document.
Public Functions
-
explicit FGHIDDevice(const std::string &name, const simgear::UInt8Vector &rawDescriptor = {})#
Test-only constructor: creates a device with a known raw HID descriptor without requiring access to physical hardware. If rawDescriptor is empty, the descriptor must be supplied later via Configure() before calling parseDescriptorForTesting().
-
bool parseDescriptorForTesting()#
Parse the raw descriptor that was either supplied at construction time or stored by Configure() via hid-raw-descriptor. Intended for use in unit tests where Open() cannot be called because there is no real hardware. Returns true on success.
-
const Item *findItem(const std::string &name) const#
Return a const pointer to the named item across all reports, or nullptr.
-
HID::ReportType reportTypeForItem(const std::string &name) const#
Return the report type (In / Out / Feature) of the named item, or Invalid.
-
uint8_t reportIdForItem(const std::string &name) const#
Return the report ID of the named item, or 0 if not found.
-
class Item#
TODO: document.
-
explicit FGHIDDevice(const std::string &name, const simgear::UInt8Vector &rawDescriptor = {})#
-
class FGLinuxInputDevice : public FGInputDevice#