Qt Virtual Chart Table (QVCT)
CDeviceDriver Class Reference

Device driver inventory and instantiation class. More...

#include <devices/drivers/CDeviceDriver.hpp>

Public Types

enum  EDriver { GPSD_GPS , GPSD_AIS , TCP_SBS1 , UNDEFINED }
 Driver ID. More...
 

Static Public Member Functions

static const QMap< EDriver, QString > & names ()
 Returns the list of supported human-readable device driver names. More...
 
static QString toName (EDriver _eDriver)
 Returns the human-readable name corresponding to the given device driver ID. More...
 
static EDriver fromName (const QString &_rqsName)
 Returns the device driver ID corresponding to the given human-readable name. More...
 
static const QMap< EDriver, QString > & codes ()
 Returns the list of supported machine-friendly device driver codes. More...
 
static QString toCode (EDriver _eDriver)
 Returns the machine-friendly code corresponding to the given device driver ID. More...
 
static EDriver fromCode (const QString &_rqsCode)
 Returns the device driver ID corresponding to the given machine-friendly code. More...
 
static CDevicecreateDevice (const QString &_rqsDeviceName, EDriver _eDriver)
 Create a new device based on the specified driver. More...
 

Static Private Attributes

static const CDeviceDriverNames oDeviceDriverNames
 Container for supported human-readable device driver names. More...
 
static const CDeviceDriverCodes oDeviceDriverCodes
 Container for supported machine-friendly device driver codes. More...
 

Detailed Description

Device driver inventory and instantiation class.

This class lists existing device drivers and allows to create corresponding devices.

Author
Cedric Dufour http://cedric.dufour.name

Definition at line 38 of file CDeviceDriver.hpp.

Member Enumeration Documentation

◆ EDriver

Driver ID.

Enumerator
GPSD_GPS 

GPSD daemon (GPS mode)

GPSD_AIS 

GPSD daemon (AIS mode)

TCP_SBS1 

TCP socket, SBS-1 protocol.

UNDEFINED 

Undefined driver.

Definition at line 47 of file CDeviceDriver.hpp.

Member Function Documentation

◆ names()

const QMap< CDeviceDriver::EDriver, QString > & CDeviceDriver::names ( )
static

Returns the list of supported human-readable device driver names.

Definition at line 38 of file CDeviceDriver.cpp.

◆ toName()

QString CDeviceDriver::toName ( CDeviceDriver::EDriver  _eDriver)
static

Returns the human-readable name corresponding to the given device driver ID.

Definition at line 43 of file CDeviceDriver.cpp.

◆ fromName()

CDeviceDriver::EDriver CDeviceDriver::fromName ( const QString &  _rqsName)
static

Returns the device driver ID corresponding to the given human-readable name.

Definition at line 48 of file CDeviceDriver.cpp.

◆ codes()

const QMap< CDeviceDriver::EDriver, QString > & CDeviceDriver::codes ( )
static

Returns the list of supported machine-friendly device driver codes.

Definition at line 53 of file CDeviceDriver.cpp.

◆ toCode()

QString CDeviceDriver::toCode ( CDeviceDriver::EDriver  _eDriver)
static

Returns the machine-friendly code corresponding to the given device driver ID.

Definition at line 58 of file CDeviceDriver.cpp.

◆ fromCode()

CDeviceDriver::EDriver CDeviceDriver::fromCode ( const QString &  _rqsCode)
static

Returns the device driver ID corresponding to the given machine-friendly code.

Definition at line 63 of file CDeviceDriver.cpp.

◆ createDevice()

CDevice * CDeviceDriver::createDevice ( const QString &  _rqsDeviceName,
CDeviceDriver::EDriver  _eDriver 
)
static

Create a new device based on the specified driver.

Definition at line 68 of file CDeviceDriver.cpp.

Member Data Documentation

◆ oDeviceDriverNames

const CDeviceDriverNames CDeviceDriver::oDeviceDriverNames
staticprivate

Container for supported human-readable device driver names.

Definition at line 57 of file CDeviceDriver.hpp.

◆ oDeviceDriverCodes

const CDeviceDriverCodes CDeviceDriver::oDeviceDriverCodes
staticprivate

Container for supported machine-friendly device driver codes.

Definition at line 59 of file CDeviceDriver.hpp.


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