Integration Manual
Mandala variables
Autopilot algorithms
shiva
Comm ports
vcp
Controls mixer
controls
Core modules
mod
Data Broker
mdb
GPIO ports
controls.gpio
Inertial Navigation
ahrs
Node modules tree
node
PHY Multiplexer
ifc.mux
Protocols
protocols
Telemetry streamer
telemetry
Vehicle Identity
identity
Vehicle limits
vehicle
WASM engine
script
Comm ports
Nodes:nav
com
ifc
| Module:ports.vcp
| Parameters:ports
This feature provides physical serial ports mapping to Virtual Comm Ports (VCP). All VCP ports are accessible by other modules and addressed by id
number.
Usage examples
- Protocols module can use VCP to communicate to the physical device;
- WASM script can use VCP to receive and transmit data;
- VCP port can be forwarded to GCS to provide transparent serial connection with some payload physical serial port;
- VCP port can be used to provide C2/telemetry communication with the GCS via user specific serial modem/datalink;
- RS485 driver can be used to provide SBUS signal for servos, generated by protocol;
Configuration parameters
-
ports
The VCP module defines various serial ports configurations in this group.
-
mode
Interface modeoption
[off,NODE,LAN,NMT,BUS,TELEMETRY]
off
: the PHY is powered off;- Addressable VCP modes. In the following modes the port will act as
normal VCP data port, addressable via
id
:NODE
: VCP port received data is not broadcasted to other nodes in network, although it is available to all node resources;LAN
: VCP port received data is broadcasted to other nodes in network and is available to all nodes and their modules;
- Network interface modes. The special port modes can be used to configure the PHY as standard APX bus
network interface. Any received data packet is decoded by the node and forwarded
to other nodes by
hub
module:NMT
: forward and decode NMT packets of the network, i.e. acts exactly likeCAN
bus interface, but filters everything except NMT packets;BUS
: network gate interface, forwards everything from the network;TELEMETRY
: C2/telemetry serial link, i.e. transmits telemetry data only;
-
name
Descriptionstring
Used as user comment only.
-
id
Port idbyte
When the port is configured as VCP, this parameter holds its address.
-
baud
Serial baud ratedword
-
parity
Parity bitoption
[off,odd,even]
-
bits
Stop bitsoption
[1,2]
-
line
Serial line modeoption
[RXTX,RX,TX]
-
codec
Vcp packet codecoption
[off,COBS]
COBS
can be used to wrap packets and protect data integrity, i.e. all received or transmitted data will be decoded/encoded with the codec. See the source code for implementation details.
-