microdds_client: add XRCE_DDS_KEY parameter

Multiple agents can connect to the same client

For sitl builds, if the intance number is different from zero,
  XRCE_DDS_KEY is set to the instance number and
  the microdds_client is automatically started
    with namespace
      px4_"instance_number"
    and udp port 8888
If the instance number is equal to zero
  XRCE_DDS_KEY is left untouched and
  the microdds_client is automatically started
    without namespace
    and udp port 8888

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@phd.unipd.it>
This commit is contained in:
Beniamino Pozzan
2022-10-26 20:50:23 -07:00
committed by Daniel Agar
parent a92897fb58
commit 5a2e41c4e4
4 changed files with 28 additions and 3 deletions
+7 -1
View File
@@ -260,7 +260,13 @@ fi
navigator start
# Try to start the microdds_client with UDP transport if module exists
microdds_client start -t udp -p "$((px4_instance+8888))" -n "px4_${px4_instance}"
if [ $px4_instance -eq 0 ]
then
microdds_client start -t udp -p 8888
else
param set XRCE_DDS_KEY ${px4_instance}
microdds_client start -t udp -p 8888 -n "px4_$px4_instance"
fi
if param greater -s MNT_MODE_IN -1
then