Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor: Fixed broken link

...

The VSS Taxonomy defines what data "entities" (Signals and Attributes) we can deal with, and are used in the protocol(s) defined by W3C Automotive Working group, as well as other initiatives inside and outside the vehicle.

But in addition to VSS itself, we need to define the data-exchange formats for measured valuesof those Signals.  This starts by defining terms, but quickly develops into defining one or several variants of the actual message content format, whether in JSON or other.

...

Following input given in the W3C data TF:

  • Signal Observation metadata
      Quality
    • Sampling/Compression methods
    • Transmission method
    • Consent requirements
    • Retention time

  • Signal Usage metadata
    • Data sensitivitySensitivity
    • Retention timeQuality
    • Consent requirementsUnit


...

Record:

  • A container to represent one single measured data value
  • Subtypes (Record Types) indicate which Signal has been measured.
  • Records are used to represent data with associated metadata, which are different depending on the Record Type, as needed for different cases
  • Example of possible record types:
    • Just the value.
    • The value plus a timestamp
    • The value plus a timestamp plus a timestamp accuracy information
    • The value plus additional qualitative information
    • The value plus a timestamp plus the location (e.g. GNSS position) where a measurement was performed.
  • All of the above may also specify the signal name, or not:  Some record types may need to specify the signal it is referring to, but others might not, because the record is delivered in a context where it is known which signal is being measured.

...

+ Record types which specify the signal name inside: 

  • SpecifiedPlainRecordSpecifiedRecord
  • SpecifiedTimeStampedRecord, etc.

...

  • Continuous delivery of data points according to a predefined agreement
  • This is not to be seen as a different container type.  It is more a definition of the delivery method (constant stream compared to atomic message)
  • A stream does not have a fixed start/end time
  • It delivers a stream of Records (or Bundles, although Snapshot is the most likely subtype.  A stream of TimeSeries is likely redundant, and might often just be a stream of Records instead)
    • It might also deliver side-band information (e.g. Job information)
  • It is related to a delivery of a Subscription for protocols that support subscriptions.




...

Examples,

...

using JSON


(Plain) Record:

{
   "value" : " 100.54"
}

...


    "signal"  :  "vehicle.body.cabin.temperature"
"count" : "132" # Might be redundant information, optional.
    "values" : {
        { 
   "ts" : "2020-01-10T02:59:43.491751"
   "value" : "42.5"
     },
        { 
   "ts" : "2020-01-10T02:59:43.491751"
   "value" : "43.0"
     },
... 130 more records
  }
}AVRO-schema example (not complete, and of course the "#comments" are not allowed to be there)
# Simple SpecifiedTimestampedRecord (note, no array support in this one yet)
{
"type": "record",
"name": "SpecifiedTimeStampedRecord",
"fields" : [
{ "name" : "signal_identifier", "type" : "string" },
{ "name" : "ts", "type" : "long" },
 { "name" : "value", "type" : [ "int", "long", "float", "double", "string", "boolean" ] }
]
}

More AVRO example work here: vss-tools (serializations branch)

Snapshot:


Snapshot:


"timeperiod" {
"start" : "2020-01-10T02:00:00Z",
"end" : "2020-01-11T01:59:59Z"
},
"values" : {
{
    "signal" : "vehicle.body.cabin.temperature",
     "value" : "22.0",
     "ts" : "2020-01-10T02:59:43.491751"
},
{
    "signal" : "vehicle.drivetrain.engine.rpm.average",
      "value" : "3200",
     "ts"
"timeperiod" {
"start" : "2020-01-10T02:0059:00Z",
"end" : "2020-01-11T01:59:59Z"
},
"values" : {
{
    "signal" : "vehicle.body.cabin.temperature",
     "value" : "22.0",
     "ts" : "2020-01-10T02:59:43.491751"
},
{
    "signal" : "vehicle.drivetrain.engine.rpm.average",
      "value" : "3200",
     "ts" : "2020-01-10T02:59:44.100403"
}
}44.100403"
}
}

todo: Examples of Derived/Statistics Records

Other example representations


Above we used a simple JSON encoding for the data (as an example). A more space-efficient binary format is also possible, and here we can reuse existing technologies (AVRO, Protobuf, Thrift, CBOR, ...)

Note that the AVRO schemas are also written in JSON, so unlike the examples above this is not an example of the data content →  JSON is used here to describe how data will  be structured. 
The data content is stored/transferred by AVRO implementations according to the schema.  It uses an efficient binary encoding for the values.

AVRO-schema example

{
  "type" : "record",
  "name" : "SpecifiedTimeStampedRecord",
  "fields" : [
    { "name" : "signal_identifier", "type" : "string" },
    { "name" : "ts", "type" : "long" },
    { "name" : "value", "type" : "Value" }
  ]

... where Value is a union of all the possible VSS types.
This is a little convoluted because values can be any plain data type, or an Array of such datatypes:

{
  "type" : "record",
  "name" : "Value",
  "fields" : [
    { "name" : "item", "type" : [
      "int", "long", "float", "double", "string", "boolean",
        { "type" : "array",
          "items" : [ "int", "long", "float", "double", "string", "boolean" ]
        }
      ]
    }
  ]
}

More AVRO encoding here: vss-tools (serializations branch)todo: Examples of Derived/Statistics Records