#!/bin/bash

if [ ! -n "$1" ]
then
  echo "usage: `basename $0` portName"
  exit 1
fi  


#suspend the driver
$SIAM_HOME/utils/suspendPort //localhost/node $1

#start picocom session
$SIAM_HOME/bin/arm-linux/console $1 \
$SIAM_HOME/logs/cmds.txt $SIAM_HOME/logs/capture.txt

#resume the driver
$SIAM_HOME/utils/resumePort //localhost/node $1

#annotate the commands
$JAVA -cp $SIAM_CLASSPATH \
-Djava.security.policy=$SIAM_HOME/properties/policy \
moos.operations.AnnotateService //localhost/node $1 "-f" $SIAM_HOME/logs/cmds.txt



