Qt Virtual Chart Table (QVCT)
CDeviceTcpSbs1 Class Reference

SBS-1 protocol (TCP socket) navigation device. More...

#include <devices/drivers/TcpSbs1/CDeviceTcpSbs1.hpp>

Inheritance diagram for CDeviceTcpSbs1:
CDevice COverlayItem COverlayObject

Classes

class  CCallsign
 Callsign dictionary entry. More...
 

Public Member Functions

 CDeviceTcpSbs1 (const QString &_rqsName)
 
virtual ~CDeviceTcpSbs1 ()
 
QVCT::EStatus setOperatingMode (CDevice::EOperatingMode _eOperatingMode)
 Sets the device's operating mode. More...
 
virtual CDeviceDriver::EDriver getDriver () const
 Returns the device's driver ID. More...
 
virtual int getCapabilities () const
 Returns the device's capabilities. More...
 
virtual void showDetail ()
 Displays the device's details (in the appropriate widget/view) More...
 
virtual void showEdit ()
 Displays the device's edit (configuration) widget/view. More...
 
void parseQVCT (const QDomElement &_rqDomElement)
 Retrieves the device's configuration from the given QVCT source (file) More...
 
void dumpQVCT (QXmlStreamWriter &_rqXmlStreamWriter) const
 Stores the device's configuration to the given QVCT destination (file) More...
 
void setHost (const QString &_rqsHost)
 
void setPort (int _iPort)
 
void setTimeZone (CUnitTimeZone::EUnit _eTimeZone)
 
void setCallsignLookup (bool _bCallsignLookup)
 
void setGroundTraffic (bool _bGroundTraffic)
 
QString getHost ()
 
int getPort ()
 
CUnitTimeZone::EUnit getTimeZone ()
 
bool isCallsignLookup ()
 
bool isGroundTraffic ()
 
- Public Member Functions inherited from CDevice
virtual ~CDevice ()
 
virtual COverlayuseOverlay ()
 Returns this object's (base) overlay. More...
 
virtual EOperatingMode getOperatingMode ()
 Returns the device's operating mode. More...
 
- Public Member Functions inherited from COverlayItem
void setMultiSelected (bool _bMultiSelected)
 Sets this item's selection status. More...
 
bool isMultiSelected () const
 Returns this item's selection status. More...
 
- Public Member Functions inherited from COverlayObject
void setName (const QString &_rqsName)
 Sets this object's name. More...
 
QString getName () const
 Returns this object's name. More...
 
QString newChildName (const QString &_rqsName, int _iZeroPrefix=0, bool _bForceSuffix=false) const
 Returns a valid (non-duplicate) name for a new sibling of this object. More...
 
QString newChildName (const QString &_rqsName, int _iZeroPrefix, int _iSuffix) const
 Returns a suffixed (potentially duplicate) name for a new sibling of this object. More...
 

Private Slots

void slotTcpConnected ()
 Slots to report TCP connection. More...
 
void slotTcpError (QAbstractSocket::SocketError _qSocketError)
 Slots to report TCP error. More...
 
void slotProcessData ()
 Slots to process device data. More...
 

Private Member Functions

QVCT::EStatus stop ()
 Start the device. More...
 
QVCT::EStatus pause ()
 Pause the device. More...
 
QVCT::EStatus start ()
 Stop the device. More...
 
CDevice::EOperatingMode status ()
 Returns the device's status (operating mode) More...
 

Private Attributes

QString qsHost
 Network host. More...
 
int iPort
 Network port. More...
 
CUnitTimeZone::EUnit eTimeZone
 Time zone. More...
 
bool bCallsignLookup
 Callsign lookup. More...
 
bool bGroundTraffic
 Ground traffic (inclusion/track) More...
 
QTcpSocket * pqTcpSocket
 TCP socket. More...
 
bool bStarted
 Start status. More...
 
bool bPaused
 Pause status. More...
 
QHash< QString, CCallsignqHashCallsign
 Callsign dictionary. More...
 
double fdCallsignCleanupTimestamp
 Callsign dictionary cleanup timestamp. More...
 

Additional Inherited Members

- Public Types inherited from CDevice
enum  ECapability { FIX = 1 , SKYVIEW = 2 }
 Device capabilities. More...
 
enum  EOperatingMode { UNDEFINED , STOP , PAUSE , START }
 Device operating mode (stop, start, pause) More...
 
- Public Types inherited from COverlayObject
enum  EType {
  OVERLAY = 1001 , CONTAINER = 1010 , SUBCONTAINER = 1011 , ITEM = 1100 ,
  SUBITEM1 = 1101 , SUBITEM2 = 1102
}
 Overlay object type. More...
 
- Signals inherited from CDevice
void signalOperatingMode (CDevice::EOperatingMode _eOperatingMode)
 Signal emitted by the device when its operating mode changed. More...
 
void signalActivity ()
 Signal emitted by the device when activity occures. More...
 
void signalDataFix (const CDeviceDataFix &_roDeviceDataFix)
 Signal emitted by the device when an updated fix is available. More...
 
void signalDataSkyView (const CDeviceDataSkyView &_roDeviceDataSkyView)
 Signal emitted by the device when an updated sky view is available. More...
 
void signalError (const QString &_rqsErrorMessage)
 Signal emitted by the device when an error occured. More...
 
- Protected Member Functions inherited from CDevice
 CDevice (const QString &_rqsName)
 
- Protected Member Functions inherited from COverlayItem
 COverlayItem (COverlayObject::EType _eType, const QString &_rqsName)
 
virtual ~COverlayItem ()
 
- Protected Member Functions inherited from COverlayObject
 COverlayObject (EType _eType, const QString &_rqsName)
 
virtual ~COverlayObject ()
 
- Protected Attributes inherited from COverlayItem
bool bMultiSelected
 Item's selection status. More...
 
- Protected Attributes inherited from COverlayObject
QString qsName
 Object name. More...
 

Detailed Description

SBS-1 protocol (TCP socket) navigation device.

This class allows to interface with a SBS-1 data provider (via the network) and use the data corresponding to GPS activity.

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

Definition at line 42 of file CDeviceTcpSbs1.hpp.

Constructor & Destructor Documentation

◆ CDeviceTcpSbs1()

CDeviceTcpSbs1::CDeviceTcpSbs1 ( const QString &  _rqsName)

Definition at line 45 of file CDeviceTcpSbs1.cpp.

◆ ~CDeviceTcpSbs1()

CDeviceTcpSbs1::~CDeviceTcpSbs1 ( )
virtual

Definition at line 63 of file CDeviceTcpSbs1.cpp.

Member Function Documentation

◆ setOperatingMode()

QVCT::EStatus CDeviceTcpSbs1::setOperatingMode ( CDevice::EOperatingMode  _eOperatingMode)
virtual

Sets the device's operating mode.

Implements CDevice.

Definition at line 73 of file CDeviceTcpSbs1.cpp.

◆ getDriver()

virtual CDeviceDriver::EDriver CDeviceTcpSbs1::getDriver ( ) const
inlinevirtual

Returns the device's driver ID.

Implements CDevice.

Definition at line 109 of file CDeviceTcpSbs1.hpp.

◆ getCapabilities()

virtual int CDeviceTcpSbs1::getCapabilities ( ) const
inlinevirtual

Returns the device's capabilities.

See also
ECapability

Implements CDevice.

Definition at line 110 of file CDeviceTcpSbs1.hpp.

◆ showDetail()

void CDeviceTcpSbs1::showDetail ( )
virtual

Displays the device's details (in the appropriate widget/view)

Implements CDevice.

Definition at line 100 of file CDeviceTcpSbs1.cpp.

◆ showEdit()

void CDeviceTcpSbs1::showEdit ( )
virtual

Displays the device's edit (configuration) widget/view.

Implements CDevice.

Definition at line 108 of file CDeviceTcpSbs1.cpp.

◆ parseQVCT()

void CDeviceTcpSbs1::parseQVCT ( const QDomElement &  _rqDomElement)
virtual

Retrieves the device's configuration from the given QVCT source (file)

Implements CDevice.

Definition at line 115 of file CDeviceTcpSbs1.cpp.

◆ dumpQVCT()

void CDeviceTcpSbs1::dumpQVCT ( QXmlStreamWriter &  _rqXmlStreamWriter) const
virtual

Stores the device's configuration to the given QVCT destination (file)

Implements CDevice.

Definition at line 126 of file CDeviceTcpSbs1.cpp.

◆ slotTcpConnected

void CDeviceTcpSbs1::slotTcpConnected ( )
privateslot

Slots to report TCP connection.

Definition at line 154 of file CDeviceTcpSbs1.cpp.

◆ slotTcpError

void CDeviceTcpSbs1::slotTcpError ( QAbstractSocket::SocketError  _qSocketError)
privateslot

Slots to report TCP error.

Definition at line 162 of file CDeviceTcpSbs1.cpp.

◆ slotProcessData

void CDeviceTcpSbs1::slotProcessData ( )
privateslot

Slots to process device data.

Definition at line 170 of file CDeviceTcpSbs1.cpp.

◆ setHost()

void CDeviceTcpSbs1::setHost ( const QString &  _rqsHost)
inline

Definition at line 137 of file CDeviceTcpSbs1.hpp.

◆ setPort()

void CDeviceTcpSbs1::setPort ( int  _iPort)
inline

Definition at line 139 of file CDeviceTcpSbs1.hpp.

◆ setTimeZone()

void CDeviceTcpSbs1::setTimeZone ( CUnitTimeZone::EUnit  _eTimeZone)
inline

Definition at line 141 of file CDeviceTcpSbs1.hpp.

◆ setCallsignLookup()

void CDeviceTcpSbs1::setCallsignLookup ( bool  _bCallsignLookup)
inline

Definition at line 143 of file CDeviceTcpSbs1.hpp.

◆ setGroundTraffic()

void CDeviceTcpSbs1::setGroundTraffic ( bool  _bGroundTraffic)
inline

Definition at line 145 of file CDeviceTcpSbs1.hpp.

◆ getHost()

QString CDeviceTcpSbs1::getHost ( )
inline

Definition at line 150 of file CDeviceTcpSbs1.hpp.

◆ getPort()

int CDeviceTcpSbs1::getPort ( )
inline

Definition at line 152 of file CDeviceTcpSbs1.hpp.

◆ getTimeZone()

CUnitTimeZone::EUnit CDeviceTcpSbs1::getTimeZone ( )
inline

Definition at line 154 of file CDeviceTcpSbs1.hpp.

◆ isCallsignLookup()

bool CDeviceTcpSbs1::isCallsignLookup ( )
inline

Definition at line 156 of file CDeviceTcpSbs1.hpp.

◆ isGroundTraffic()

bool CDeviceTcpSbs1::isGroundTraffic ( )
inline

Definition at line 158 of file CDeviceTcpSbs1.hpp.

◆ stop()

QVCT::EStatus CDeviceTcpSbs1::stop ( )
private

Start the device.

Definition at line 336 of file CDeviceTcpSbs1.cpp.

◆ pause()

QVCT::EStatus CDeviceTcpSbs1::pause ( )
private

Pause the device.

Definition at line 350 of file CDeviceTcpSbs1.cpp.

◆ start()

QVCT::EStatus CDeviceTcpSbs1::start ( )
private

Stop the device.

Definition at line 361 of file CDeviceTcpSbs1.cpp.

◆ status()

CDevice::EOperatingMode CDeviceTcpSbs1::status ( )
private

Returns the device's status (operating mode)

Definition at line 371 of file CDeviceTcpSbs1.cpp.

Member Data Documentation

◆ qsHost

QString CDeviceTcpSbs1::qsHost
private

Network host.

See also
setHost(), getHost()

Definition at line 53 of file CDeviceTcpSbs1.hpp.

◆ iPort

int CDeviceTcpSbs1::iPort
private

Network port.

See also
setPort(), getPort()

Definition at line 56 of file CDeviceTcpSbs1.hpp.

◆ eTimeZone

CUnitTimeZone::EUnit CDeviceTcpSbs1::eTimeZone
private

Time zone.

See also
setTimeZone(), getTimeZone()

Definition at line 59 of file CDeviceTcpSbs1.hpp.

◆ bCallsignLookup

bool CDeviceTcpSbs1::bCallsignLookup
private

Callsign lookup.

See also
setCallsignLookup(), isCallsignLookup()

Definition at line 62 of file CDeviceTcpSbs1.hpp.

◆ bGroundTraffic

bool CDeviceTcpSbs1::bGroundTraffic
private

Ground traffic (inclusion/track)

See also
setGroundTraffic(), isGroundTraffic()

Definition at line 65 of file CDeviceTcpSbs1.hpp.

◆ pqTcpSocket

QTcpSocket* CDeviceTcpSbs1::pqTcpSocket
private

TCP socket.

Definition at line 67 of file CDeviceTcpSbs1.hpp.

◆ bStarted

bool CDeviceTcpSbs1::bStarted
private

Start status.

Definition at line 69 of file CDeviceTcpSbs1.hpp.

◆ bPaused

bool CDeviceTcpSbs1::bPaused
private

Pause status.

Definition at line 71 of file CDeviceTcpSbs1.hpp.

◆ qHashCallsign

QHash<QString,CCallsign> CDeviceTcpSbs1::qHashCallsign
private

Callsign dictionary.

Definition at line 88 of file CDeviceTcpSbs1.hpp.

◆ fdCallsignCleanupTimestamp

double CDeviceTcpSbs1::fdCallsignCleanupTimestamp
private

Callsign dictionary cleanup timestamp.

Definition at line 90 of file CDeviceTcpSbs1.hpp.


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