Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::ClientConnection Class Reference

Class handling the connection exchanging data using a QIODevice. More...

#include <ClientConnection.h>

Inheritance diagram for sf::ClientConnection:
Collaboration diagram for sf::ClientConnection:

Public Types

enum  EState {
  sError = -1 , sNone = 0 , sHeaderRead , sPayloadRead ,
  sPayloadProcess , sBufferWrite , sIdle , sWaitForRead ,
  sDisconnect
}
 

Public Member Functions

 ClientConnection (QIODevice *ioDevice, QObject *parent=nullptr)
 Constructor for passing a socket descriptor.
 
bool process ()
 Non blocking method which processes data incoming and outgoing data from the IO device.
 
void setState (EState state)
 

Additional Inherited Members

- Protected Types inherited from sf::InformationTypes
typedef unsigned long long id_type
 Type used for the identifying integer (64-bits).
 
typedef int32_t flags_type
 Type used for the flag integer.
 
typedef size_t size_type
 Type used for size of vectors.
 
typedef uint64_t data_type
 Type used for containing a single data element which is the largest integer.
 
typedef int64_t sdata_type
 Type used for containing a single data element which is the largest signed integer.
 
typedef TVector< id_typeIdVector
 Vector for lists of information ID's.
 
typedef TVector< InformationBase * > Vector
 Vector for containing different information base derived classes.
 
- Protected Member Functions inherited from sf::InformationTypes
template<typename T >
constexpr std::enable_if_t<(sizeof(T)<=sizeof(data_type)), data_typetoDataType (T value) const
 Casts any type to a data_type value.
 
template<typename T >
constexpr std::enable_if_t<(sizeof(T)<=sizeof(data_type)), T > fromDataType (data_type value) const
 Casts a data_type value to a given type.
 
- Static Protected Attributes inherited from sf::InformationTypes
static constexpr size_t npos = std::numeric_limits<size_type>::max()
 Unsigned size value indicating not found or no index.
 

Detailed Description

Class handling the connection exchanging data using a QIODevice.

Member Enumeration Documentation

◆ EState

Enumerator
sError 
sNone 
sHeaderRead 
sPayloadRead 
sPayloadProcess 
sBufferWrite 
sIdle 
sWaitForRead 
sDisconnect 

Constructor & Destructor Documentation

◆ ClientConnection()

sf::ClientConnection::ClientConnection ( QIODevice *  ioDevice,
QObject *  parent = nullptr 
)
explicit

Constructor for passing a socket descriptor.

Member Function Documentation

◆ process()

bool sf::ClientConnection::process ( )

Non blocking method which processes data incoming and outgoing data from the IO device.

Returns
True when it needs to be called again.

◆ setState()

void sf::ClientConnection::setState ( EState  state)

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