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

Listens on a UDP port for raw RTCM3 correction data and emits it for forwarding to connected vehicles via RTCMMavlink::RTCMDataUpdate(). More...

#include <RTCMUdpInput.h>

+ Inheritance diagram for RTCMUdpInput:
+ Collaboration diagram for RTCMUdpInput:

Signals

void rtcmDataReceived (const QByteArray &data)
 
void runningChanged ()
 
void portChanged ()
 

Public Member Functions

 RTCMUdpInput (quint16 port, QObject *parent=nullptr)
 
 ~RTCMUdpInput () override
 
bool start ()
 
void stop ()
 Unbind the socket and stop accepting datagrams.
 
bool isRunning () const
 
quint16 port () const
 
void setPort (quint16 port)
 Change the listen port. If already running, restarts automatically.
 

Detailed Description

Listens on a UDP port for raw RTCM3 correction data and emits it for forwarding to connected vehicles via RTCMMavlink::RTCMDataUpdate().

Typical wiring:

auto *udpInput = new RTCMUdpInput(13320, this);
connect(udpInput, &RTCMUdpInput::rtcmDataReceived,
_rtcmMavlink, &RTCMMavlink::RTCMDataUpdate);
udpInput->start();
Listens on a UDP port for raw RTCM3 correction data and emits it for forwarding to connected vehicles...
void rtcmDataReceived(const QByteArray &data)

The class accepts datagrams from any sender on the bound port. Each datagram is emitted as-is; no RTCM framing validation is performed here — that is the responsibility of the downstream consumer (RTCMMavlink fragments as needed).

Definition at line 26 of file RTCMUdpInput.h.

Constructor & Destructor Documentation

◆ RTCMUdpInput()

RTCMUdpInput::RTCMUdpInput ( quint16  port,
QObject *  parent = nullptr 
)
explicit

Definition at line 6 of file RTCMUdpInput.cc.

◆ ~RTCMUdpInput()

RTCMUdpInput::~RTCMUdpInput ( )
override

Definition at line 13 of file RTCMUdpInput.cc.

References stop().

Member Function Documentation

◆ isRunning()

bool RTCMUdpInput::isRunning ( ) const
inline

Definition at line 44 of file RTCMUdpInput.h.

◆ port()

quint16 RTCMUdpInput::port ( ) const
inline

Definition at line 45 of file RTCMUdpInput.h.

Referenced by setPort().

◆ portChanged

void RTCMUdpInput::portChanged ( )
signal

Referenced by setPort().

◆ rtcmDataReceived

void RTCMUdpInput::rtcmDataReceived ( const QByteArray &  data)
signal

Emitted once per received datagram with the raw RTCM payload. Connect directly to RTCMMavlink::RTCMDataUpdate (same thread).

Referenced by NTRIPManager::NTRIPManager().

◆ runningChanged

void RTCMUdpInput::runningChanged ( )
signal

Referenced by start(), and stop().

◆ setPort()

void RTCMUdpInput::setPort ( quint16  port)

Change the listen port. If already running, restarts automatically.

Definition at line 46 of file RTCMUdpInput.cc.

References port(), portChanged(), and start().

Referenced by NTRIPManager::NTRIPManager().

◆ start()

bool RTCMUdpInput::start ( )

Bind the socket and begin accepting datagrams. Safe to call on an already-running instance — restarts with the current port.

Definition at line 18 of file RTCMUdpInput.cc.

References runningChanged(), and stop().

Referenced by NTRIPManager::NTRIPManager(), and setPort().

◆ stop()

void RTCMUdpInput::stop ( )

Unbind the socket and stop accepting datagrams.

Definition at line 34 of file RTCMUdpInput.cc.

References runningChanged().

Referenced by NTRIPManager::NTRIPManager(), start(), and ~RTCMUdpInput().


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