added mscgen tool
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7182 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -86,6 +86,7 @@ function help()
|
||||
echo_error " -g, --gdb Run with GDB."
|
||||
echo_error " -h, --help Print this help."
|
||||
echo_error " -K, --itti-dump-file filename ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)"
|
||||
echo_error " -m, --mscgen directory Generate mscgen output files in a directory"
|
||||
echo_error " -V, --vcd Dump timings of processing in a GTKWave compliant file format."
|
||||
echo_error " -x, --xforms Run XFORMS scope windows."
|
||||
}
|
||||
@@ -98,9 +99,11 @@ function main()
|
||||
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
|
||||
|
||||
local -i run_gdb=0
|
||||
local -i run_mscgen=0
|
||||
local exe_arguments=""
|
||||
local DEFAULT_CONFIG_FILE_ENB=$OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_mme.conf
|
||||
local CONFIG_FILE_ENB=$DEFAULT_CONFIG_FILE_ENB
|
||||
local MSC_DIR="/tmp"
|
||||
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
@@ -145,6 +148,19 @@ function main()
|
||||
exe_arguments="$exe_arguments -K $ITTI_DUMP_FILE"
|
||||
;;
|
||||
|
||||
-m | --mscgen)
|
||||
MSC_DIR=$2
|
||||
# can omit file name if last arg on the line
|
||||
if [ -d "$MSC_DIR" ]; then
|
||||
echo "setting mscgen log files to dir: $MSC_DIR"
|
||||
run_mscgen=1
|
||||
shift 2;
|
||||
else
|
||||
echo_error "Mscgen log dir does not exist"
|
||||
exit -1
|
||||
fi
|
||||
;;
|
||||
|
||||
-V | --vcd)
|
||||
"setting gtk-wave output"
|
||||
exe_arguments="$exe_arguments -V /tmp/oai_gtk_wave.vcd"
|
||||
@@ -217,12 +233,12 @@ function main()
|
||||
$SUDO ip rule add fwmark 5 table lte
|
||||
$SUDO ip route add default dev oip1 table lte
|
||||
|
||||
exe_arguments="$exe_arguments -u1 -l9"
|
||||
exe_arguments="$exe_arguments -s15 -AAWGN -y1 -b1 -u1 -Q0"
|
||||
|
||||
cd $OPENAIR_DIR/targets/bin
|
||||
|
||||
if [ $run_gdb -eq 0 ]; then
|
||||
exec $OPENAIR_DIR/targets/bin/oaisim $exe_arguments
|
||||
exec $OPENAIR_DIR/targets/bin/oaisim $exe_arguments | tee /tmp/enb_ue_s1.log.txt
|
||||
else
|
||||
touch ~/.gdb_enb_ue_s1
|
||||
chmod 777 ~/.gdb_enb_ue_s1
|
||||
@@ -232,6 +248,21 @@ function main()
|
||||
cat ~/.gdb_enb_ue_s1
|
||||
gdb -n -x ~/.gdb_enb_ue_s1
|
||||
fi
|
||||
|
||||
if [ $run_mscgen -eq 1 ]; then
|
||||
cd $MSC_DIR
|
||||
last_created_file=`ls -t mscgen* | head -1 | tr -d ':'`
|
||||
$OPENAIR_DIR/targets/SCRIPTS/msc_gen.py
|
||||
sync
|
||||
last_created_file2=`ls -t mscgen* | head -1 | tr -d ':'`
|
||||
|
||||
if [ x"$last_created_file" != x"$last_created_file2" ]; then
|
||||
if [ -f ./$last_created_file2/oai_mscgen_page_0.png ]; then
|
||||
command -v eog 2>/dev/null && eog ./$last_created_file2/oai_mscgen_page_0.png
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
Reference in New Issue
Block a user