[Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/timesync
motelist.txt, 1.2, 1.3 timesync, 1.4, 1.5
borndigerati
borndigerati at users.sourceforge.net
Wed Apr 5 03:28:30 PDT 2006
Update of /cvsroot/tinyos/tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/timesync
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15660/edu/wustl/mobilab/timesync
Modified Files:
timesync
Added Files:
motelist.txt
Log Message:
Changes to support clustering!
Index: timesync
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/timesync/timesync,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** timesync 28 Mar 2006 03:25:51 -0000 1.4
--- timesync 5 Apr 2006 10:28:25 -0000 1.5
***************
*** 2,18 ****
writeCom=0
writePort=0
# Get the ports to read from and write to
rm -f motelist.txt
motelist | awk 'BEGIN{port=9000; i = -1;}
! {if($1 != "M4A5L59G") {print("["i"]", $2, port); port++; i++;}}
END{}'| grep COM > motelist.txt
! readCom=`motelist | awk '{if($1 == "M4A5L59G") print $2}'`
# start the serial forwarders for all the ports
# serial forwarder for read port
echo "Creating serial forwarder on the read port"
! echo "java net.tinyos.sf.SerialForwarder -comm serial@$readCom:tmote &"
! java net.tinyos.sf.SerialForwarder -comm serial@$readCom:tmote &
# serial forwarder for write ports
--- 2,19 ----
writeCom=0
writePort=0
+ GW="M4A6J3UE"
# Get the ports to read from and write to
rm -f motelist.txt
motelist | awk 'BEGIN{port=9000; i = -1;}
! {if($1 != "'$GW'") {print("["i"]", $2, port); port++; i++;}}
END{}'| grep COM > motelist.txt
! readCom=`motelist | awk '{if($1 == "'$GW'") print $2}'`
# start the serial forwarders for all the ports
# serial forwarder for read port
echo "Creating serial forwarder on the read port"
! echo "java net.tinyos.sf.SerialForwarder -no-gui -quiet -comm serial@$readCom:tmote &"
! java net.tinyos.sf.SerialForwarder -no-gui -quiet -comm serial@$readCom:tmote &
# serial forwarder for write ports
***************
*** 24,29 ****
while [ $i -le $count ]
do
! if [ $i -eq 4 ]
! then
echo "--- Creating serial forwarder $i"
data=`grep "\[$i\]" motelist.txt`
--- 25,30 ----
while [ $i -le $count ]
do
! #if [ $i -eq 4 ]
! #then
echo "--- Creating serial forwarder $i"
data=`grep "\[$i\]" motelist.txt`
***************
*** 32,43 ****
writePort=`echo $data | awk '{print $3}'`
echo "java net.tinyos.sf.SerialForwarder -no-gui -quiet -comm serial@$writeCom:tmote -port $writePort &"
! java net.tinyos.sf.SerialForwarder -comm serial@$writeCom:tmote -port $writePort &
! arg=$writePort
! fi
i=`expr $i + 1`
done
# start the timesync program
! #arg=`cat motelist.txt | awk 'BEGIN{str=""}{str=$3 " " str}END{print str}'`
echo ""
echo "Starting TimeSync"
--- 33,44 ----
writePort=`echo $data | awk '{print $3}'`
echo "java net.tinyos.sf.SerialForwarder -no-gui -quiet -comm serial@$writeCom:tmote -port $writePort &"
! java net.tinyos.sf.SerialForwarder -no-gui -quiet -comm serial@$writeCom:tmote -port $writePort &
! #arg=$writePort
! #fi
i=`expr $i + 1`
done
# start the timesync program
! arg=`cat motelist.txt | awk 'BEGIN{str=""}{str=$3 " " str}END{print str}'`
echo ""
echo "Starting TimeSync"
More information about the Tinyos-contrib-commits
mailing list