{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zh-ch/json-schema/zh-ch-vbv-data-schema.json",
  "title": "VbvData",
  "description": "Vehicle data received from protocol adapters.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zh-ch-traffic-counts-openapi.yml#/components/schemas/VbvData",
  "type": "object",
  "properties": {
    "effectiveTime": {
      "type": "string",
      "description": "Timestamp when data was persisted .Time in [ms] since unix epoche."
    },
    "protType": {
      "type": "string",
      "description": "Protocol type used to transfer this vehicle detection data."
    },
    "seqnum": {
      "type": "integer",
      "description": "Sequence number of vehicle detection.",
      "format": "int32"
    },
    "classType": {
      "type": "string",
      "description": "Vehicle class type of vehicle detected. Can be one of the following values \n            <ul><li>VAL: Value</li>\n            <li>NAV: Not a value</li>\n            <li>LT: Exclusive upper bound</li>\n            <li>LTE: Inclusive upper bound</li>\n            <li>GT: Exclusive lower bound</li>\n            <li>GTE: Inclusive lower bound</li>\n            <li>NVA: No value available</li></ul>"
    },
    "occupancy": {
      "type": "integer",
      "description": "Occupancy of detection unit during the vehicle detection in [ms]. (obsolete)",
      "format": "int32"
    },
    "headway": {
      "type": "integer",
      "description": "Headway with respect to previous vehicle detection in [ms].",
      "format": "int32"
    },
    "gap": {
      "type": "integer",
      "description": "Gap with respect to previous vehicle detection in [ms].",
      "format": "int32"
    },
    "length": {
      "type": "integer",
      "description": "Length of the vehicle detected in [10^-2 m].",
      "format": "int32"
    },
    "swiss10Class": {
      "type": "string",
      "description": "Swiss10 class of vehicle detected. Can be one of the following values \n            <ul><li>SWISS10_BUS: Bus</li>\n            <li>SWISS10_MR: Motorcycle</li>\n            <li>SWISS10_PW: Passenger car</li>\n            <li>SWISS10_PWA: Passenger car with trailer</li>\n            <li>SWISS10_LFW: Delivery van</li>\n            <li>SWISS10_LFWA: Delivery van with trailer</li>\n            <li>SWISS10_LFWAL: Delivery van with semitrailer</li>\n            <li>SWISS10_LKW: Truck</li>\n            <li>SWISS10_LZ: Lorry train </li>\n            <li>SWISS10_SZ: Semitrailer</li></ul>"
    },
    "seqnumType": {
      "type": "string",
      "description": "Sequence number type of vehicle detection. Can be one of the following values \n            <ul><li>VAL: Value</li>\n            <li>NAV: Not a value</li>\n            <li>LT: Exclusive upper bound</li>\n            <li>LTE: Inclusive upper bound</li>\n            <li>GT: Exclusive lower bound</li>\n            <li>GTE: Inclusive lower bound</li>\n            <li>NVA: No value available</li></ul>"
    },
    "status": {
      "type": "integer",
      "description": "Status of vehicle detection. Bit field that can have the following values \n            <ul><li>0: Ok</li>\n            <li>1: Invalid vehicle</li>\n            <li>8: Vehicle length less than the minimum</li>\n            <li>10: Lane has only one working loop</li>\n            <li>12: Straddling vehicle</li></ul>",
      "format": "int32"
    },
    "direction": {
      "type": "string",
      "description": "Driving direction  of vehicle detected.  \nCan be \"POSITIVE\" or \"NEGATIVE\" in relation to the expected driving direction (e.g. If the vehicle overtakes at the collecting point, it is on the opposite lane. Therefore a \"NEGATIVE\" direction is recorded)."
    },
    "occupancyType": {
      "type": "string",
      "description": "Occupancy type of detection unit during the vehicle detection. Can be one of the following values \n            <ul><li>VAL: Value</li>\n            <li>NAV: Not a value</li>\n            <li>LT: Exclusive upper bound</li>\n            <li>LTE: Inclusive upper bound</li>\n            <li>GT: Exclusive lower bound</li>\n            <li>GTE: Inclusive lower bound</li>\n            <li>NVA: No value available</li></ul>"
    },
    "headwayType": {
      "type": "string",
      "description": "Headway type with respect to previous vehicle detection."
    },
    "gapType": {
      "type": "string",
      "description": "Gap type with respect to previous vehicle detection. Can be one of the following values \n            <ul><li>VAL: Value</li>\n            <li>NAV: Not a value</li>\n            <li>LT: Exclusive upper bound</li>\n            <li>LTE: Inclusive upper bound</li>\n            <li>GT: Exclusive lower bound</li>\n            <li>GTE: Inclusive lower bound</li>\n            <li>NVA: No value available</li></ul>"
    },
    "lengthType": {
      "type": "string",
      "description": "Length type of the vehicle detected. Can be one of the following values \n            <ul><li>VAL: Value</li>\n            <li>NAV: Not a value</li>\n            <li>LT: Exclusive upper bound</li>\n            <li>LTE: Inclusive upper bound</li>\n            <li>GT: Exclusive lower bound</li>\n            <li>GTE: Inclusive lower bound</li>\n            <li>NVA: No value available</li></ul>"
    },
    "statusType": {
      "type": "string",
      "description": "Status type of vehicle detection. Can be one of the following values \n            <ul><li>VAL: Value</li>\n            <li>NAV: Not a value</li>\n            <li>LT: Exclusive upper bound</li>\n            <li>LTE: Inclusive upper bound</li>\n            <li>GT: Exclusive lower bound</li>\n            <li>GTE: Inclusive lower bound</li>\n            <li>NVA: No value available</li></ul>"
    },
    "directionType": {
      "type": "string",
      "description": "Driving direction type of vehicle detected. Can be one of the following values \n            <ul><li>VAL: Value</li>\n            <li>NAV: Not a value</li>\n            <li>LT: Exclusive upper bound</li>\n            <li>LTE: Inclusive upper bound</li>\n            <li>GT: Exclusive lower bound</li>\n            <li>GTE: Inclusive lower bound</li>\n            <li>NVA: No value available</li></ul>"
    },
    "subMsDiscriminator": {
      "type": "string",
      "description": "Value allowing a sub-ms destinction maintaining the order in time."
    },
    "clockID": {
      "type": "integer",
      "description": "Identifier of the clock used to determine effectiveTime.",
      "format": "int32"
    },
    "rcvTime": {
      "type": "string",
      "description": "The time when the external vehicle data message was received by protocol adapter. Time in [ms] since unix epoche."
    },
    "srcTime": {
      "type": "string",
      "description": "The time that has been reported together with this vehicle data by tdCollector. Time in [ms] since unix epoche."
    },
    "srcTimeUtcOffset": {
      "type": "integer",
      "description": "The timeOffset (including potential dst-offset) assumed to have been used by tdCollector when reporting srcTime. TimeOffset in [ms] with respect to UTC.",
      "format": "int32"
    },
    "uID": {
      "$ref": "#/$defs/UniqueId"
    }
  },
  "$defs": {
    "UniqueId": {
      "required": [
        "id"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Root id, e.g. collectors id"
        },
        "sub": {
          "$ref": "#/$defs/UniqueId"
        }
      },
      "description": "Recursive id of object."
    }
  }
}