@@ -7,65 +7,46 @@ terminal which has the following usage:
7
7
8
8
[source,bash]
9
9
----
10
- usage: osivalidator [-h] [ --data DATA] [--rules RULES] [--type {SensorView,GroundTruth,SensorData}] [--output OUTPUT] [--timesteps TIMESTEPS] [--debug] [--verbose] [--parallel] [--format {separated, None}]
10
+ usage: osivalidator [-h] --data DATA [--rules RULES] [--type {SensorView,GroundTruth,SensorData}] [--output OUTPUT] [--timesteps TIMESTEPS] [--debug] [--verbose] [--parallel] [--format {None}]
11
11
[--blast BLAST] [--buffer BUFFER]
12
12
13
13
Validate data defined at the input
14
14
15
+ mandatory arguments:
16
+ --data DATA Path to the file with OSI-serialized data.
17
+
15
18
optional arguments:
16
19
-h, --help show this help message and exit
17
- --data DATA Path to the file with OSI-serialized data.
18
20
--rules RULES, -r RULES
19
- Directory with text files containig rules.
21
+ Directory with text files containig rules.
20
22
--type {SensorView,GroundTruth,SensorData}, -t {SensorView,GroundTruth,SensorData}
21
- Name of the type used to serialize data.
23
+ Name of the type used to serialize data.
22
24
--output OUTPUT, -o OUTPUT
23
- Output folder of the log files.
25
+ Output folder of the log files.
24
26
--timesteps TIMESTEPS
25
- Number of timesteps to analyze. If -1, all.
27
+ Number of timesteps to analyze. If -1, all.
26
28
--debug Set the debug mode to ON.
27
29
--verbose, -v Set the verbose mode to ON.
28
- --parallel, -p Set parallel mode to ON.
29
- --format {separated, None}, -f {separated, None}
30
- Set the format type of the trace.
30
+ --parallel, -p (Ignored) Set parallel mode to ON.
31
+ --format {None}, -f {None}
32
+ (Ignored) Set the format type of the trace.
31
33
--blast BLAST, -bl BLAST
32
- Set the in-memory storage count of OSI messages during validation.
34
+ Set the maximum in-memory storage count of OSI messages during validation.
33
35
--buffer BUFFER, -bu BUFFER
34
- Set the buffer size to retrieve OSI messages from trace file. Set it to 0 if you do not want to use buffering at all.
36
+ (Ignored) Set the buffer size to retrieve OSI messages from trace file. Set it to 0 if you do not want to use buffering at all.
35
37
----
36
38
37
39
To run the validation first you need an OSI trace file which consists of
38
40
multiple OSI messages. In the directory `+data+` of the repository we
39
41
already provide an example trace file which is called
40
- `+20210818T150542Z_sv_312_50_one_moving_object.txt+`. Use the
41
- https://github.com/OpenSimulationInterface/open-simulation-interface/blob/master/format/txt2osi.py[txt2osi.py]
42
- of the OSI repo in the format directory to convert from `+*.txt+` to
43
- `+*.osi+` files. See usage below:
44
-
45
- [source,bash]
46
- ----
47
- usage: txt2osi converter [-h] [--file FILE]
48
- [--type {SensorView,GroundTruth,SensorData}]
49
- [--output OUTPUT] [--compress]
50
-
51
- Convert txt trace file to osi trace files.
52
-
53
- optional arguments:
54
- -h, --help show this help message and exit
55
- --file FILE, -f FILE Path to the file with serialized data.
56
- --type {SensorView,GroundTruth,SensorData}, -t {SensorView,GroundTruth,SensorData}
57
- Name of the type used to serialize data.
58
- --output OUTPUT, -o OUTPUT
59
- Output name of the file.
60
- ----
42
+ `+20210818T150542Z_sv_312_50_one_moving_object.osi+`.
61
43
62
44
To validate the trace files you simply call `+osivalidator+` and provide
63
45
the path to the trace:
64
46
65
47
[source,bash]
66
48
----
67
49
osivalidator --data data/20210818T150542Z_sv_312_50_one_moving_object.osi
68
- osivalidator --data data/20210818T150542Z_sv_312_50_one_moving_object.txt
69
50
----
70
51
71
52
You can also validate the traces in parallel to increase the speed of
@@ -84,7 +65,7 @@ need to generate them and then specify them:
84
65
[source,bash]
85
66
----
86
67
python rules2yml.py # Generates the rule directory
87
- osivalidator --data data/20210818T150542Z_sv_312_50_one_moving_object.txt --rules rules/ -p
68
+ osivalidator --data data/20210818T150542Z_sv_312_50_one_moving_object.osi --rules rules -p
88
69
----
89
70
90
71
After successfully running the validation the following output is
0 commit comments