Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
abstractdata.h File Reference
#include "distversion.h"
#include "humanreadableobject.h"
#include "package.h"
#include <QSharedPointer>
#include <streambase.h>
#include <crc/crchash.h>
Include dependency graph for abstractdata.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  QH::PKG::AbstractData
 The AbstractData class is provide base functions for transport data by network For create you own package you need to inherited from this class. Simple Example: More...
 

Namespaces

namespace  QH
 The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart library.
 
namespace  QH::PKG
 The PKG namesapce - this namespace contains all default packages of the Heart library. If you want create a pool request for Heart Library with own implemented packages you need to create a new package into a PKG namesapce.
 

Macros

#define PROTOCKOL_VERSION_COMMAND   0xFFFF
 PROTOCKOL_VERSION_COMMAND is command for exchange versions number betwin nodes.
 
#define PROTOCKOL_VERSION_RECEIVED_COMMAND   PROTOCKOL_VERSION_COMMAND - 1
 PROTOCKOL_VERSION_RECEIVED_COMMAND is command for check delivered version.
 
#define QH_PACKAGE(S)
 QH_PACKAGE This macross prepare data to send and create a global id for package. For get global id use the cmd method. For get quick access for global command use the ClassName::command() method. This method is static.
 

Macro Definition Documentation

◆ PROTOCKOL_VERSION_COMMAND

#define PROTOCKOL_VERSION_COMMAND   0xFFFF

PROTOCKOL_VERSION_COMMAND is command for exchange versions number betwin nodes.

Definition at line 20 of file abstractdata.h.

◆ PROTOCKOL_VERSION_RECEIVED_COMMAND

#define PROTOCKOL_VERSION_RECEIVED_COMMAND   PROTOCKOL_VERSION_COMMAND - 1

PROTOCKOL_VERSION_RECEIVED_COMMAND is command for check delivered version.

Definition at line 25 of file abstractdata.h.

◆ QH_PACKAGE

#define QH_PACKAGE (   S)
Value:
public: \
static unsigned short command(){\
QByteArray ba = QString(S).toLocal8Bit();\
return qa_common::hash16(ba.data(), ba.size());\
} \
static QString commandText(){return S;} \
unsigned short cmd() const override {return command();} \
\
QString cmdString() const override {return S;} \
private:

QH_PACKAGE This macross prepare data to send and create a global id for package. For get global id use the cmd method. For get quick access for global command use the ClassName::command() method. This method is static.

  • S This is unique id of the pacakge. Shold be some on all your network devices.

Definition at line 34 of file abstractdata.h.