What is it and why?

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 values of 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.


Relationship to Protocols

Data formats partly overlap protocol definitions in the sense that a protocol, or stack of protocols, must at some point define / clarify data formats or no understandable exchange can be had.

However, more is required.  The data exchange protocols we discuss fall into different categories, each requiring some more work on defining value exchange data formats:

  1. Protocol does not (yet) cover all variations of data exchange.
    1.  VISS / W3C Gen2 covers a lot of usage, but supports primarily fetching a single "latest value" measurements, or getting instant updates according to subscriptions, but the bigger picture would include also transferring a set of previously mentioned data.  We can benefit from adding transfer of historically measured data, or statistical data (get the average value over time), and more.  The intention of this work is to help protocols like W3C cover these bases.
  2. Protocol defines only a transport
    1. We discuss various protocols that define some of the mechanisms of exchange, such as pub/sub semantics, but they assume that any type of information can be transferred by the protocol, and does not define the format of the data or the data container.  Examples of some such protocols would be MQTT or WAMP
  3. Protocol defines transport, query semantics, and some rules for data formats, but are still too generic.
    1. GraphQL is a generic technology that is complemented by a schema that defines what types of queries can be made, and the datatypes that are expected to be returned.    For that purpose, it is required to agree on the definition of schemas and types.  It could be derived from this generic analysis.



Definitions

(proposal, open for discussion)

Signal:

Request:

Job:  

Record:  (or Measurement, or Observation)

*Some record types may need to specify the signal it is referring to but most do not (because they are delivered in a context where it is known which signal is being measured)

(question) Why not just use a single record type (superset of all functionality)?   The reason would be to optimize the performance and bandwidth.  In other words, don't transfer what is not needed for a certain case.  If a timestamp is not needed, make sure we support transferring data without providing timestamp, for example.


Subtypes:  PlainRecord, TimeStampedRecord, ToleranceTimeStampedRecord, ... *

+ Record types which specify the signal name inside:   SpecifiedPlainRecord, SpecifiedTimeStampedRecord, etc.

TODO: For Snapshot you need a Record Type that also includes the signal name.

Measurement, "Container" – naming of this? 

(i.e. the message that is in response to a Request)

=   A delivery of data sent at a particular time.

Might need to include some metadata regarding the request:

Discussion: What is the general metadata needed when measuring data?

Snapshot:

Bundle:

Stream:



Examples, in JSON


PlainRecord:

{
   "value" : " 100.54"
}

TimestampedRecord:

{
   "ts" : "20200319123245Z123456" # Zulu time ISO std + microsecond - to be clarified
   "value" : "42 "
}

SpecifiedRecord:

{
"signal" : "vehicle.Chassis.Axle2.WheelCount"
   "value" : "2"
}

SpecifiedTimestampedRecord:

{
"signal" : "vehicle.Body.ExteriorMirrors.Heating.Status"
   "ts" : "20200319123245Z123456"
   "value" : "false"
}

Bundle:


    "signal"  :  "vehicle.body.cabin.temperature"
"count" : "132" # Might be redundant information. Optional?
    "values" : {
        { 
   "ts" : "20200319123245Z123456"
   "value" : "42 "
     },
        { 
   "ts" : "20200320120101Z100000"
   "value" : "43"
     },
... 130 more records
}
}

Snapshot:


"timeperiod" {
"start" : "xxx",
"end" : "xxx"
},
"values" {
{
    "signal" : "vehicle.body.cabin.temperature",
     "value" : "22",
     "ts" : "20200320120101Z100000"
},
{
    "signal" : "vehicle.drivetrain.engine.rpm.average",
      "value" : "3200",
     "ts" : "20200320120101Z100000"
}
}