DAQ  1.0.0
Data Acquisition System (basic demo)
Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Client Class Reference

#include <client.h>

Inheritance diagram for Client:
Inheritance graph
[legend]
Collaboration diagram for Client:
Collaboration graph
[legend]

Signals

void valuesReceived (const std::vector< VarValue > &vals)
 
void variablesReceived (const std::vector< Variable > &vals)
 
void responseReceived (message::MessageType *prev_msg, message::ResponseStatus status, QString response)
 
void connected ()
 

Public Member Functions

 Client (const QString &host, std::uint16_t port, QObject *parent=nullptr)
 
void connect ()
 
void send_var (const Variable &var)
 
void send_var_val (const QString &var_name, double value)
 
void request_vars ()
 
void request_var_values (const QString &var_name)
 
void request_var_values (const QString &var_name, const std::chrono::system_clock::time_point &start, const std::chrono::system_clock::time_point &end)
 
 ~Client ()
 

Private Slots

void onReadyRead ()
 

Private Member Functions

bool is_connected () const
 
void do_request (const message::GetVariables &gv)
 
void do_request (const message::GetValues &gv)
 

Private Attributes

QTcpSocket socket_
 
const QString host_
 
std::uint16_t port_
 

Static Private Attributes

static constexpr size_t max_values_ammount {120}
 

Constructor & Destructor Documentation

Client::Client ( const QString &  host,
std::uint16_t  port,
QObject parent = nullptr 
)
Client::~Client ( )
inline

Member Function Documentation

void Client::connect ( )
void Client::connected ( )
signal
void Client::do_request ( const message::GetVariables &  gv)
private
void Client::do_request ( const message::GetValues &  gv)
private
bool Client::is_connected ( ) const
private
void Client::onReadyRead ( )
privateslot
void Client::request_var_values ( const QString &  var_name)
void Client::request_var_values ( const QString &  var_name,
const std::chrono::system_clock::time_point &  start,
const std::chrono::system_clock::time_point &  end 
)
void Client::request_vars ( )
void Client::responseReceived ( message::MessageType *  prev_msg,
message::ResponseStatus  status,
QString  response 
)
signal
void Client::send_var ( const Variable var)
void Client::send_var_val ( const QString &  var_name,
double  value 
)
void Client::valuesReceived ( const std::vector< VarValue > &  vals)
signal
void Client::variablesReceived ( const std::vector< Variable > &  vals)
signal

Member Data Documentation

const QString Client::host_
private
constexpr size_t Client::max_values_ammount {120}
staticprivate
std::uint16_t Client::port_
private
QTcpSocket Client::socket_
private

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