QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
NTRIPConnectionStats Class Reference

#include <NTRIPConnectionStats.h>

+ Inheritance diagram for NTRIPConnectionStats:
+ Collaboration diagram for NTRIPConnectionStats:

Signals

void statsChanged ()
 

Public Member Functions

 NTRIPConnectionStats (std::chrono::milliseconds staleAfter, QObject *parent=nullptr, RuntimeScheduler *scheduler=nullptr)
 The stream counts as stale once no message has arrived for staleAfter.
 
void start ()
 
void stop ()
 
void recordMessage (int bytes, int messageId, qint64 receivedAtMs)
 Count every message; health uses the newest valid receipt on the scheduler's clock.
 
void reset ()
 
quint64 bytesReceived () const
 
quint32 messagesReceived () const
 
double dataRateBytesPerSec () const
 
double correctionAgeSec () const
 
bool dataStale () const
 
bool dataUsageHigh () const
 
QList< RTCMMessageCount > messageCountsById () const
 

Static Public Attributes

static constexpr quint64 DATA_USAGE_WARNING_BYTES = 50 * 1024 * 1024
 More than DATA_USAGE_WARNING_BYTES received, which may cost money on metered connections.
 

Detailed Description

Statistics of the current NTRIP stream for display. Every property notifies through statsChanged(), which follows each change of the stream's lifecycle and, while it runs, every second.

Definition at line 17 of file NTRIPConnectionStats.h.

Constructor & Destructor Documentation

◆ NTRIPConnectionStats()

NTRIPConnectionStats::NTRIPConnectionStats ( std::chrono::milliseconds  staleAfter,
QObject *  parent = nullptr,
RuntimeScheduler *  scheduler = nullptr 
)
explicit

The stream counts as stale once no message has arrived for staleAfter.

Definition at line 12 of file NTRIPConnectionStats.cc.

Member Function Documentation

◆ bytesReceived()

quint64 NTRIPConnectionStats::bytesReceived ( ) const
inline

Definition at line 46 of file NTRIPConnectionStats.h.

References DataRateTracker::totalBytes().

Referenced by dataUsageHigh().

◆ correctionAgeSec()

double NTRIPConnectionStats::correctionAgeSec ( ) const

Definition at line 44 of file NTRIPConnectionStats.cc.

References MonotonicClock::age(), and RuntimeScheduler::nowMs().

◆ dataRateBytesPerSec()

double NTRIPConnectionStats::dataRateBytesPerSec ( ) const
inline

Definition at line 50 of file NTRIPConnectionStats.h.

References DataRateTracker::bytesPerSec().

◆ dataStale()

bool NTRIPConnectionStats::dataStale ( ) const
inline

Definition at line 54 of file NTRIPConnectionStats.h.

◆ dataUsageHigh()

bool NTRIPConnectionStats::dataUsageHigh ( ) const
inline

Definition at line 56 of file NTRIPConnectionStats.h.

References bytesReceived(), and DATA_USAGE_WARNING_BYTES.

◆ messageCountsById()

QList< RTCMMessageCount > NTRIPConnectionStats::messageCountsById ( ) const

Definition at line 90 of file NTRIPConnectionStats.cc.

References RTCMMessageCount::messageId.

◆ messagesReceived()

quint32 NTRIPConnectionStats::messagesReceived ( ) const
inline

Definition at line 48 of file NTRIPConnectionStats.h.

◆ recordMessage()

void NTRIPConnectionStats::recordMessage ( int  bytes,
int  messageId,
qint64  receivedAtMs 
)

Count every message; health uses the newest valid receipt on the scheduler's clock.

Definition at line 58 of file NTRIPConnectionStats.cc.

References DataRateTracker::recordBytes(), and statsChanged().

◆ reset()

void NTRIPConnectionStats::reset ( )

Definition at line 79 of file NTRIPConnectionStats.cc.

References DataRateTracker::reset(), and statsChanged().

◆ start()

void NTRIPConnectionStats::start ( )

◆ statsChanged

void NTRIPConnectionStats::statsChanged ( )
signal

Referenced by recordMessage(), reset(), start(), and stop().

◆ stop()

void NTRIPConnectionStats::stop ( )

Member Data Documentation

◆ DATA_USAGE_WARNING_BYTES

constexpr quint64 NTRIPConnectionStats::DATA_USAGE_WARNING_BYTES = 50 * 1024 * 1024
staticconstexpr

More than DATA_USAGE_WARNING_BYTES received, which may cost money on metered connections.

Per-RTCM-message-ID counts since the current connection started, ascending by ID so the QML chips need no sorting.

Definition at line 34 of file NTRIPConnectionStats.h.

Referenced by dataUsageHigh().


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