How bluenviron/mavp2p works
mavp2p is a command-line MAVLink proxy that links serial, UDP, and TCP endpoints. The user supplies endpoint specifications and routing options; the program configures gomavlib, consumes its events, and forwards frames according to target IDs or broadcasts them to other channels. Optional behavior includes heartbeat and stream-request configuration, telemetry dumps, and parse-error reporting. The source shows the event dispatch and manager calls; endpoint transport and several documented capabilities are provided by gomavlib and are not implemented in sampled repository code.
Main entry points: main.go Program runtime · messageman/manager.go Remote node tracking · dumper.go Telemetry dumper · errorman/manager.go Parse error manager
Components 11
CLI and runtime
- Program runtime
main.go - Endpoint configuration
main.go
MAVLink transport
- MAVLink node
Message routing
- Frame routing
pkg/messageman/manager.go - Remote node tracking
pkg/messageman/manager.go
Logging and dumps
- Parse error manager
pkg/errorman/manager.go - Telemetry dumper
pkg/dumper/dumper.go - Telemetry dump files
- Tlog writer
Other components
- CLI user
- Serial and network peers
Connections 14
- CLI user → Program runtime: provides options
README.md - Program runtime → Endpoint configuration: parses endpoints
main.go - Program runtime → MAVLink node: configures and starts
main.go - Endpoint configuration → MAVLink node: supplies endpoints
main.go - Serial and network peers → MAVLink node: exchanges MAVLink
README.md - MAVLink node → Program runtime: emits events
main.go - Program runtime → Frame routing: dispatches frames
main.go - Frame routing → MAVLink node: forwards targeted or broadcast frames
pkg/messageman/manager.go - Program runtime → Remote node tracking: dispatches channel closes
main.go - Remote node tracking → Remote node tracking: expires inactive nodes
pkg/messageman/manager.go - Program runtime → Parse error manager: dispatches parse errors
main.go - Program runtime → Telemetry dumper: submits frames when enabled
main.go - Telemetry dumper → Tlog writer: writes entries
pkg/dumper/dumper.go - Tlog writer → Telemetry dump files: writes telemetry