. $OSPL_HOME/examples/functions

check_osplhome

startOSPL

echo "=== Launching Ownership "
./sac_ownership_sub > subResult.txt &
sleep 7

echo === starting publisher "pub1" with ownership strength 5
./sac_ownership_pub pub1 5 40 1 > pubResult_1.txt &	

echo === Waiting 2 seconds ...
sleep 2

echo === starting publisher "pub2" with ownership strength 10
./sac_ownership_pub pub2 10 5 0 > pubResult_2.txt &

echo === Waiting for processes to terminate
waitForProcessTermination sac_ownership_pub 30
waitForProcessTermination sac_ownership_sub 30

ownershipCheckResult

stopOSPL
