Skip to content

Commit

Permalink
Add 'log_info' definition to metadata schema (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
twojtasz authored Jul 8, 2019
1 parent 38b8521 commit 66b5d2d
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/api-reference/xviz-metadata-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ special and cannot be overwritten.

Special keys:

- `start_time`
- `end_time`
- `start_time` (Number) - Start time for the log data
- `end_time` (Number) - End time for the log data

Parameters:

Expand Down
7 changes: 6 additions & 1 deletion docs/protocol-schema/session-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,12 @@ created.

**map_info** - currently unspecified

**log_info** - currently unspecified
**log_info** - timing information

| Name | Type | Description |
| ------------ | --------------------- | ------------------------------ |
| `start_time` | `optional<timestamp>` | Starting timestamp for the log |
| `end_time` | `optional<timestamp>` | Final timestamp for the log |

**vehicle_info** - currently unspecified

Expand Down
4 changes: 4 additions & 0 deletions modules/schema/examples/session/metadata/complete.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,9 @@
],
"config": ""
}
},
"log_info": {
"start_time": 1557530200.0,
"end_time": 1557530300.0
}
}
15 changes: 15 additions & 0 deletions modules/schema/schema/session/log_info.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"id": "https://xviz.org/schema/session/log_info.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "XVIZ Metadata Log timing information",
"type": "object",
"properties": {
"start_time": {
"type": "number"
},
"end_time": {
"type": "number"
}
},
"additionalProperties": true
}
2 changes: 1 addition & 1 deletion modules/schema/schema/session/metadata.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
},
"log_info": {
"type": "object"
"$ref": "https://xviz.org/schema/session/log_info.json"
},
"map_info": {
"type": "object"
Expand Down
8 changes: 8 additions & 0 deletions xviz/v2/session.proto
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ message Metadata {
map<string, CameraInfo> cameras = 3;
map<string, string> stream_aliases = 4;
map<string, UIPanelInfo> ui_config = 5;
LogInfo log_info = 6;
}

message Error {
Expand Down Expand Up @@ -186,3 +187,10 @@ message UIPanelInfo {
repeated string needed_streams = 2;
string config = 3;
}

message LogInfo
{
option (xviz_json_schema) = "session/log_info";
double start_time = 1;
double end_time = 2;
}

0 comments on commit 66b5d2d

Please sign in to comment.