|
QGroundControl
Ground Control Station for MAVLink Drones
|
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. | |
| void | setValidation (const bool validate) |
Listens on a UDP port for raw RTCM3 correction data and emits it for forwarding to connected vehicles via RTCMMavlink::RTCMDataUpdate().
Typical wiring:
The class accepts datagrams from any sender on the bound port. With validation disabled each datagram is emitted as-is; with validation enabled (see setValidation) datagrams are reframed through RTCMParser and only CRC-valid RTCM3 frames are forwarded — one signal per frame so each gets its own GPS_RTCM_DATA sequence. Downstream (RTCMMavlink) fragments as needed.
Definition at line 31 of file RTCMUdpInput.h.
|
explicit |
Definition at line 10 of file RTCMUdpInput.cc.
|
override |
Definition at line 12 of file RTCMUdpInput.cc.
References stop().
|
inline |
Definition at line 49 of file RTCMUdpInput.h.
|
inline |
Definition at line 51 of file RTCMUdpInput.h.
Referenced by setPort().
|
signal |
Emitted with RTCM payload to forward. With validation off: once per datagram. With validation on: once per CRC-valid RTCM3 frame. Connect directly to RTCMMavlink::RTCMDataUpdate (same thread).
| void RTCMUdpInput::setPort | ( | quint16 | port | ) |
Change the listen port. If already running, restarts automatically.
Definition at line 58 of file RTCMUdpInput.cc.
References port(), portChanged(), and start().
|
inline |
Enable/disable validation of RTCM data. With this enabled, only valid RTCM packets are converted to MAVLink.
Definition at line 58 of file RTCMUdpInput.h.
| bool RTCMUdpInput::start | ( | ) |
Bind the socket and begin accepting datagrams. Safe to call on an already-running instance — restarts with the current port. Port 0 binds an ephemeral port; port() then reports the bound port.
Definition at line 17 of file RTCMUdpInput.cc.
References portChanged(), RTCMParser::reset(), runningChanged(), and stop().
Referenced by setPort().
| void RTCMUdpInput::stop | ( | ) |
Unbind the socket and stop accepting datagrams.
Definition at line 42 of file RTCMUdpInput.cc.
References runningChanged().
Referenced by start(), and ~RTCMUdpInput().