Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions util/tracing/Makefile
Comment thread
lhstrh marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Makefile for utilities that convert Lingua Franca trace files
# into other formats.
# @author: Edward A. Lee
REACTOR_C=../../
REACTOR_C=../..
CURRENT_PATH=$(shell pwd)
CC=gcc
CFLAGS= -I$(REACTOR_C)/include/core/ \
-I$(REACTOR_C)/include/core/modal_models \
Expand Down Expand Up @@ -30,7 +31,7 @@ install: trace_to_csv trace_to_chrome trace_to_influxdb
mv trace_to_csv $(INSTALL_PREFIX)
mv trace_to_chrome $(INSTALL_PREFIX)
mv trace_to_influxdb $(INSTALL_PREFIX)
ln -f -s launch-fedsd.sh $(INSTALL_PREFIX)/fedsd
ln -f -s $(CURRENT_PATH)/launch-fedsd.sh $(INSTALL_PREFIX)/fedsd
chmod +x launch-fedsd.sh

clean:
Expand Down
23 changes: 22 additions & 1 deletion util/tracing/launch-fedsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,27 @@ else
fatal_error "Unable to determine absolute path to $0."
fi

# Check if the INSTALL_PREFIX argument is provided
if [ -n "$1" ] && [[ "$1" == INSTALL_PREFIX=* ]]; then
INSTALL_PREFIX="${1#INSTALL_PREFIX=}"
shift
fi

# Echo INSTALL_PREFIX if provided
if [ -z "$INSTALL_PREFIX" ]; then
INSTALL_PREFIX="/usr/local/bin/"
fi

trace_to_csv=$INSTALL_PREFIX'trace_to_csv'

# Check if the provided path exists and trace_to_csv can be called
if [ -f "$trace_to_csv" ]; then
echo "$trace_to_csv found."
else
echo "Error: $trace_to_csv not found. Abort!"
exit 1
fi

# Get the lft files
lft_files_list=$@

Expand All @@ -75,7 +96,7 @@ rti_csv_file=''
for each_lft_file in $lft_files_list
do
# Tranform to csv
${base}/bin/trace_to_csv $each_lft_file
$trace_to_csv $each_lft_file
# Get the file name
csv=${each_lft_file%.*}
if [ $csv == 'rti' ]
Expand Down
4 changes: 4 additions & 0 deletions util/tracing/visualization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Once the federation stopped executing, run `fedsd` on all generated `.lft` files
```
$ fedsd *.lft
```
In case `trace_to_csv` executable is in a different location, other than `/usr/local/bin/`, then use the `INSTALL_PREFIX` flag, as follows:
```
fedsd INSTALL_PREFIX=~/.local/bin/ *.lft
```

The output is an html file named `trace_svg.html` (in the current directory) that contains the sequence of interactions
between the federates and the RTI.