From 5202c1486950177f851ae4539ef7fb5a148a45f8 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Thu, 15 Sep 2022 10:13:57 -0500 Subject: [PATCH] Add example of spawning 100 servers using BBMD connection. --- bin/bacbbmd.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 bin/bacbbmd.sh diff --git a/bin/bacbbmd.sh b/bin/bacbbmd.sh new file mode 100755 index 00000000..99e9e8fa --- /dev/null +++ b/bin/bacbbmd.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Simulate BACnet servers connected with Foreign Device to BBMD + +# Launch the local BBMD +./bacserv 47808 BACServer-47808 & + +# spawn the servers +export BACNET_BBMD_ADDRESS=${1} +export BACNET_BBMD_PORT=${2} +echo "Spawn servers, register to BBMD" $BACNET_BBMD_ADDRESS:$BACNET_BBMD_PORT +# note: leaving port 47809 free for example bvlc.sh clients +for ((port=47810; port<=47910; port++)) +do + # note: is there a limit to the number of Foreign Device Registrations? + export BACNET_IP_PORT=$port ; \ + ./bacserv $port BACServer-$port & + # note: give some BBMD servers time between registrations + # sleep 1 +done +