Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
QH::Header Struct Reference

The Header struct 32 bytes. More...

#include <header.h>

Collaboration diagram for QH::Header:
Collaboration graph

Public Member Functions

 Header ()
 Header default constructor.
 
 ~Header ()=default
 
bool isValid () const
 isValid This method check header size and compare commands.
 
void reset ()
 reset This method reset all data and set for header invalid status.
 
QString toString () const
 toString This method return string of header of package.
 

Public Attributes

unsigned short command = 0
 command of package for more information see the AbstractData::toPackage method.
 
const unsigned char headerVersion = 1
 headerVersion This is version of the header struct
 
unsigned int size = 0
 size This is size of package data (exclude header size).
 
unsigned int hash = 0
 hash This is unique id of a package. id calc with CRC32 function for Qt implementation.
 
unsigned int triggerHash = 0
 triggerHash This is hash of request package that package has been responded. The server should write to which command it responds.
 
unsigned long long unusedSpace1 = 0
 unusedSpace This is unused space for changes of the header struct in the future.
 
unsigned long long unusedSpace2 = 0
 
unsigned char unusedSpace3 = 0
 

Detailed Description

The Header struct 32 bytes.

Definition at line 19 of file header.h.

Constructor & Destructor Documentation

◆ Header()

QH::Header::Header ( )

Header default constructor.

Definition at line 14 of file header.cpp.

Here is the call graph for this function:

◆ ~Header()

QH::Header::~Header ( )
default

Member Function Documentation

◆ isValid()

bool QH::Header::isValid ( ) const

isValid This method check header size and compare commands.

Returns
true if header is valid.

Definition at line 18 of file header.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void QH::Header::reset ( )

reset This method reset all data and set for header invalid status.

Definition at line 25 of file header.cpp.

Here is the caller graph for this function:

◆ toString()

QString QH::Header::toString ( ) const

toString This method return string of header of package.

Returns
string value.

Definition at line 36 of file header.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ command

unsigned short QH::Header::command = 0

command of package for more information see the AbstractData::toPackage method.

Definition at line 23 of file header.h.

◆ hash

unsigned int QH::Header::hash = 0

hash This is unique id of a package. id calc with CRC32 function for Qt implementation.

Definition at line 38 of file header.h.

◆ headerVersion

const unsigned char QH::Header::headerVersion = 1

headerVersion This is version of the header struct

Definition at line 28 of file header.h.

◆ size

unsigned int QH::Header::size = 0

size This is size of package data (exclude header size).

Definition at line 33 of file header.h.

◆ triggerHash

unsigned int QH::Header::triggerHash = 0

triggerHash This is hash of request package that package has been responded. The server should write to which command it responds.

Definition at line 44 of file header.h.

◆ unusedSpace1

unsigned long long QH::Header::unusedSpace1 = 0

unusedSpace This is unused space for changes of the header struct in the future.

Definition at line 49 of file header.h.

◆ unusedSpace2

unsigned long long QH::Header::unusedSpace2 = 0

Definition at line 50 of file header.h.

◆ unusedSpace3

unsigned char QH::Header::unusedSpace3 = 0

Definition at line 51 of file header.h.


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