File tree Expand file tree Collapse file tree 4 files changed +3
-118
lines changed Expand file tree Collapse file tree 4 files changed +3
-118
lines changed Original file line number Diff line number Diff line change @@ -7,28 +7,6 @@ endif::[]
77The OSI repository contains Python scripts for converting trace files from one format to another.
88The formatting scripts are stored in `open-simulation-interface/format/`
99
10- **txt2osi.py**
11-
12- `txt2osi.py` converts plain-text trace files to binary `.osi` trace files.
13- This script takes the following parameters:
14-
15- `--data` , `-d` ::
16- String containing the path to the file with serialized data.
17-
18- `--type` , `-t` ::
19- Optional string describing the message type used to serialize data.
20- `'SensorView'` , `'GroundTruth'` , or `'SensorData'` are permitted values.
21- The default value is `'SensorView'` .
22-
23- `--output` , `-o` ::
24- Optional string containing the name of the output file.
25- The default value is `'converted.osi'` .
26-
27- `--compress` , `-c` ::
28- Optional Boolean controlling whether to compress the output to an lzma file.
29- `True` , or `False` are permitted values.
30- The default value is `False` .
31-
3210**osi2read.py**
3311
3412`osi2read.py` converts trace files to human-readable `.txth` trace files.
Original file line number Diff line number Diff line change @@ -5,18 +5,14 @@ endif::[]
55[#top-osi_trace_file_formats]
66= OSI trace file formats
77
8- There are multiple formats for storing multiple serialized OSI messages in one trace file.
8+ There are two formats for storing multiple serialized OSI messages in one trace file.
99
1010*.osi::
1111Binary trace file.
1212Messages are separated by a length specification before each message.
1313The length is represented by a four-byte, little-endian, unsigned integer.
1414The length does not include the integer itself.
1515
16- *.txt::
17- Plain-text trace file.
18- Messages are separated by `$$__$$`.
19-
2016*.txth::
2117Human-readable plain-text trace file.
2218Messages are separated by newlines.
Original file line number Diff line number Diff line change 11"""
2- This program converts serialized txt/ osi trace files into a human readable txth file.
2+ This program converts serialized osi trace files into a human readable txth file.
33
44Example usage:
55 python3 osi2read.py -d trace.osi -o myreadableosifile
6- python3 osi2read.py -d trace.txt -f separated -o myreadableosifile
76"""
87
98from OSITrace import OSITrace
@@ -19,7 +18,7 @@ def command_line_arguments():
1918 dir_path = os .path .dirname (os .path .dirname (os .path .realpath (__file__ )))
2019
2120 parser = argparse .ArgumentParser (
22- description = "Convert a serialized osi/txt trace file to a readable txth output." ,
21+ description = "Convert a serialized osi trace file to a readable txth output." ,
2322 prog = "osi2read converter" ,
2423 )
2524 parser .add_argument (
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments