|
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. Downstream (RTCMMavlink) fragments as needed.
Definition at line 30 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 47 of file RTCMUdpInput.h.
|
inline |
Definition at line 49 of file RTCMUdpInput.h.
Referenced by setPort().
|
signal |
Referenced by setPort().
|
signal |
Emitted once per received datagram with the raw RTCM payload. Connect directly to RTCMMavlink::RTCMDataUpdate (same thread).
| void RTCMUdpInput::setPort | ( | quint16 | port | ) |
Change the listen port. If already running, restarts automatically.
Definition at line 53 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 56 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.
Definition at line 17 of file RTCMUdpInput.cc.
References RTCMParser::reset(), runningChanged(), and stop().
Referenced by setPort().
| void RTCMUdpInput::stop | ( | ) |
Unbind the socket and stop accepting datagrams.
Definition at line 37 of file RTCMUdpInput.cc.
References runningChanged().
Referenced by start(), and ~RTCMUdpInput().