Skip to content

Commit 66b5d2d

Browse files
authored
Add 'log_info' definition to metadata schema (#448)
1 parent 38b8521 commit 66b5d2d

File tree

6 files changed

+36
-4
lines changed

6 files changed

+36
-4
lines changed

docs/api-reference/xviz-metadata-builder.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ special and cannot be overwritten.
213213

214214
Special keys:
215215

216-
- `start_time`
217-
- `end_time`
216+
- `start_time` (Number) - Start time for the log data
217+
- `end_time` (Number) - End time for the log data
218218

219219
Parameters:
220220

docs/protocol-schema/session-protocol.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,12 @@ created.
146146

147147
**map_info** - currently unspecified
148148

149-
**log_info** - currently unspecified
149+
**log_info** - timing information
150+
151+
| Name | Type | Description |
152+
| ------------ | --------------------- | ------------------------------ |
153+
| `start_time` | `optional<timestamp>` | Starting timestamp for the log |
154+
| `end_time` | `optional<timestamp>` | Final timestamp for the log |
150155

151156
**vehicle_info** - currently unspecified
152157

modules/schema/examples/session/metadata/complete.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,9 @@
3737
],
3838
"config": ""
3939
}
40+
},
41+
"log_info": {
42+
"start_time": 1557530200.0,
43+
"end_time": 1557530300.0
4044
}
4145
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"id": "https://xviz.org/schema/session/log_info.json",
3+
"$schema": "http://json-schema.org/draft-04/schema#",
4+
"description": "XVIZ Metadata Log timing information",
5+
"type": "object",
6+
"properties": {
7+
"start_time": {
8+
"type": "number"
9+
},
10+
"end_time": {
11+
"type": "number"
12+
}
13+
},
14+
"additionalProperties": true
15+
}

modules/schema/schema/session/metadata.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
}
3333
},
3434
"log_info": {
35-
"type": "object"
35+
"$ref": "https://xviz.org/schema/session/log_info.json"
3636
},
3737
"map_info": {
3838
"type": "object"

xviz/v2/session.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ message Metadata {
9393
map<string, CameraInfo> cameras = 3;
9494
map<string, string> stream_aliases = 4;
9595
map<string, UIPanelInfo> ui_config = 5;
96+
LogInfo log_info = 6;
9697
}
9798

9899
message Error {
@@ -186,3 +187,10 @@ message UIPanelInfo {
186187
repeated string needed_streams = 2;
187188
string config = 3;
188189
}
190+
191+
message LogInfo
192+
{
193+
option (xviz_json_schema) = "session/log_info";
194+
double start_time = 1;
195+
double end_time = 2;
196+
}

0 commit comments

Comments
 (0)