Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
HubConnection Class Reference

The connection to the sensor hub: parses packets and announces them. More...

Inheritance diagram for HubConnection:

Public Member Functions

 HubConnection (quint16 port, QObject *parent=nullptr)
 Connects to the hub at 127.0.0.1:port, retrying until it answers.
int packetsReceived () const
 Packets handled so far.
int lastSequence () const
 The "seq" of the last packet handled.
bool isConnected () const
 Whether the hub is connected.
void readPending ()
 Handles data from the hub.
void packetReceived (const QVariantMap &packet)
 A packet was handled: {seq, ts, sensor, value}.
void connectedChanged ()
 The connection was made or lost.

Private Attributes

quint16 m_port
 Hub port.
QTcpSocket m_socket
 Connection to the hub.
int m_packets = 0
 Packets handled.
int m_lastSequence = 0
 Last "seq" handled.

Detailed Description

The connection to the sensor hub: parses packets and announces them.


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