Logo Search packages:      
Sourcecode: qlandkartegt version File versions

CDeviceTBDOE Class Reference

#include <CDeviceTBDOE.h>

Inheritance diagram for CDeviceTBDOE:

List of all members.


Detailed Description

device layer for QLandkarte M devices

Protocol specification:

QLandkarte M := host; QLandkarte GT := client

Each transaction is initiated by the client. A packet sent to the host is achnowledeged by a packet from the host. The client has to wait for each packet to get achnowledeged. The host and client will operate the socket as a QDataStream. Thus all objects sent will get serialized according to Trolltech's spec.

The format of a packet is:

qint32 type, qint32 size, QByteArray data

The type will be an enumeration of type packet_e. The size value is needed by the receiving socket to wait for the reception of all packet data.

Definition at line 47 of file CDeviceTBDOE.h.


Public Types

enum  packet_e {
  eNone, eError, eAck, eC2HAlive,
  eH2CAlive, eC2HWpt, eH2CWptQuery, eH2CWpt,
  eH2CTrkQuery, eH2CTrk, eC2HTrk
}

Signals

void sigLiveLog (const CLiveLog &log)

Public Member Functions

 CDeviceTBDOE (const QString &ipaddr, quint16 port, QObject *parent)
virtual void downloadAll ()
virtual void downloadRoutes (QList< CRoute * > &rtes)=0
void downloadTracks (QList< CTrack * > &trks)
void downloadWpts (QList< CWpt * > &wpts)
virtual const QString getDevKey ()
virtual bool liveLog ()
virtual void setLiveLog (bool on)
virtual void uploadAll ()
void uploadMap (const QList< IMapSelection * > &mss)
virtual void uploadRoutes (const QList< CRoute * > &rtes)=0
void uploadTracks (const QList< CTrack * > &trks)
void uploadWpts (const QList< CWpt * > &wpts)

Static Public Attributes

static bool m_DownloadAllRte = true
static bool m_DownloadAllTrk = true
static bool m_DownloadAllWpt = true
static bool m_UploadAllRte = true
static bool m_UploadAllTrk = true
static bool m_UploadAllWpt = true

Protected Member Functions

void createProgress (const QString &title, const QString &text, int max)

Protected Attributes

QString devkey
CLiveLog log
QPointer< QProgressDialog > progress

Private Member Functions

bool acquire (const QString &operation, int max)
bool exchange (packet_e &type, QByteArray &data)
bool recv (packet_e &type, QByteArray &data)
void release ()
void send (const packet_e type, const QByteArray &data)

Private Attributes

QString ipaddr
quint16 port
QTcpSocket socket
const int timeout

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

Generated by  Doxygen 1.6.0   Back to index