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::[]
7
7
The OSI repository contains Python scripts for converting trace files from one format to another.
8
8
The formatting scripts are stored in `open-simulation-interface/format/`
9
9
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
-
32
10
**osi2read.py**
33
11
34
12
`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::[]
5
5
[#top-osi_trace_file_formats]
6
6
= OSI trace file formats
7
7
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.
9
9
10
10
*.osi::
11
11
Binary trace file.
12
12
Messages are separated by a length specification before each message.
13
13
The length is represented by a four-byte, little-endian, unsigned integer.
14
14
The length does not include the integer itself.
15
15
16
- *.txt::
17
- Plain-text trace file.
18
- Messages are separated by `$$__$$`.
19
-
20
16
*.txth::
21
17
Human-readable plain-text trace file.
22
18
Messages are separated by newlines.
Original file line number Diff line number Diff line change 1
1
"""
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.
3
3
4
4
Example usage:
5
5
python3 osi2read.py -d trace.osi -o myreadableosifile
6
- python3 osi2read.py -d trace.txt -f separated -o myreadableosifile
7
6
"""
8
7
9
8
from OSITrace import OSITrace
@@ -19,7 +18,7 @@ def command_line_arguments():
19
18
dir_path = os .path .dirname (os .path .dirname (os .path .realpath (__file__ )))
20
19
21
20
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." ,
23
22
prog = "osi2read converter" ,
24
23
)
25
24
parser .add_argument (
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments