content: {
    "$defs": {
      "genericTimeSource": {
        "properties": {
          "error": {
            "description": "estimated error in seconds, with arbitrary sub-second precision",
            "type": "number"
          },
          "offset": {
            "description": "measured offset in seconds, with arbitrary sub-second precision",
            "type": "number"
          },
          "state": {
            "description": "state of the source",
            "enum": [
              "best",
              "combined",
              "not_combined",
              "maybe_error",
              "unstable",
              "unusable"
            ],
            "type": "string"
          },
          "stratum": {
            "description": "stratum of the clock source",
            "minimum": 0,
            "type": "integer"
          },
          "type": {
            "description": "type of the time source",
            "enum": [
              "ntp",
              "pps",
              "nmea"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "stratum",
          "state",
          "offset",
          "error"
        ],
        "type": "object"
      },
      "nmeaTimeSource": {
        "allOf": [
          {
            "$ref": "#/$defs/genericTimeSource"
          },
          {
            "properties": {
              "stratum": {
                "const": 0
              },
              "type": {
                "const": "nmea"
              }
            },
            "type": "object"
          }
        ],
        "type": "object"
      },
      "ntpTimeSource": {
        "allOf": [
          {
            "$ref": "#/$defs/genericTimeSource"
          },
          {
            "properties": {
              "host": {
                "description": "IP or hostname of the NTP server",
                "type": "string"
              },
              "stratum": {
                "minimum": 1
              },
              "type": {
                "const": "ntp"
              }
            },
            "required": [
              "host"
            ],
            "type": "object"
          }
        ],
        "type": "object"
      },
      "ppsTimeSource": {
        "allOf": [
          {
            "$ref": "#/$defs/genericTimeSource"
          },
          {
            "properties": {
              "label": {
                "description": "PPS label/name",
                "type": "string"
              },
              "stratum": {
                "const": 0
              },
              "type": {
                "const": "pps"
              }
            },
            "required": [
              "label"
            ],
            "type": "object"
          }
        ],
        "type": "object"
      }
    },
    "$id": "https://Orange-OpenSource.github.io/its-client/schema/status",
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "description": "Status JSON schema",
    "properties": {
      "cellular": {
        "description": "cellular connections",
        "items": {
          "description": "cellular connection status",
          "properties": {
            "connection": {
              "description": "connection details",
              "properties": {
                "signal": {
                  "description": "signal quality metrics",
                  "properties": {
                    "ecio": {
                      "type": "number"
                    },
                    "io": {
                      "type": "number"
                    },
                    "rscp": {
                      "type": "number"
                    },
                    "rsrp": {
                      "type": "number"
                    },
                    "rsrq": {
                      "type": "number"
                    },
                    "rssi": {
                      "type": "number"
                    },
                    "sinr": {
                      "type": "number"
                    },
                    "snr": {
                      "type": "number"
                    }
                  },
                  "type": "object"
                },
                "technology": {
                  "examples": [
                    "gsm",
                    "cdma1x",
                    "evdo",
                    "umts",
                    "lte",
                    "5G"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            },
            "hardware": {
              "description": "hardware information",
              "properties": {
                "model": {
                  "type": "string"
                },
                "revision": {
                  "type": "string"
                },
                "vendor": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "operator": {
              "description": "cellular operator",
              "properties": {
                "code": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          "required": [
            "hardware"
          ],
          "type": "object"
        },
        "type": "array"
      },
      "gnss": {
        "$comment": "modelled after the gpsd protocol; references like {gpsd:XXX:YYY[:ZZZ...]} refer to gpsd object XXX, field YYY (sub-field ZZZ, etc...) as defined in the gpsd JSON protocol documentation: https://gpsd.io/gpsd_json.html",
        "description": "status of the GNSS subsystem",
        "properties": {
          "mode": {
            "$comment": "0: unkown; 1: none; 2: 2D-FIX; 3: 3D-FIX",
            "description": "FIX mode {gpsd:TPV:mode}",
            "enum": [
              0,
              1,
              2,
              3
            ],
            "type": "integer"
          },
          "model": {
            "$comment": "concatenation of the three fields: {gpsd:DEVICE:driver}, {gpsd:DEVICE:subtype}, and {gpsd:DEVICE:subtype1}",
            "description": "Brand and model of the GNSS device (free form)",
            "type": "string"
          },
          "nSat": {
            "description": "Number of satellites seen {gpsd:SKY:nSat}",
            "minimum": 1,
            "type": "integer"
          },
          "rate": {
            "$comment": "seconds with arbitrary sub-second precision",
            "description": "mesaurement rate {gpsd:DEVICE:cycle}",
            "exclusiveMinimum": 0.0,
            "type": "number"
          },
          "software": {
            "$comment": "typically: literal 'gpsd' followed by {gpsd:VERSION:release}",
            "description": "name and version of the gnss daemon (free form)",
            "type": "string"
          },
          "status": {
            "$comment": "2: DGPS; 3: RTK-fixed; 4: RTK-floating",
            "description": "FIX status {gpsd:TPV:status}",
            "enum": [
              2,
              3,
              4
            ],
            "type": "integer"
          },
          "uSat": {
            "description": "Number of satellites used in navigation solution {gpsd:SKY:uSat}",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "software",
          "model",
          "mode"
        ],
        "type": "object"
      },
      "id": {
        "description": "unique id all over the world for this device",
        "type": "string"
      },
      "system": {
        "additionalProperties": true,
        "description": "system low-level info",
        "properties": {
          "cpu_load": {
            "description": "CPU load, as a 3-tuple: [1min_load, 5min_load, 15min_load]",
            "items": {
              "minimum": 0.0,
              "type": "number"
            },
            "maxItems": 3,
            "minItems": 3,
            "type": "array"
          },
          "hardware": {
            "description": "type of hardware",
            "examples": [
              "vtc6221",
              "vtc7251",
              "rpi2"
            ],
            "type": "string"
          },
          "memory": {
            "description": "RAM usage, in bytes, as a 2-tuple: [total_ram, available_ram]",
            "items": {
              "type": "integer"
            },
            "maxItems": 2,
            "minItems": 2,
            "type": "array"
          },
          "os_release": {
            "$comment": "all keys of os-release are optional; see https://www.freedesktop.org/software/systemd/man/os-release.html",
            "additionalProperties": true,
            "description": "a key-value representation of the os-release of the running OS",
            "properties": {
              "ID": {
                "type": "string"
              },
              "NAME": {
                "type": "string"
              },
              "PRETTY_NAME": {
                "type": "string"
              },
              "VERSION": {
                "type": "string"
              },
              "VERSION_ID": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "storage": {
            "description": "writable storage for data, as a 2-tuple: [total_space, free_space]",
            "items": {
              "type": "integer"
            },
            "maxItems": 2,
            "minItems": 2,
            "type": "array"
          },
          "type": {
            "description": "type of device",
            "enum": [
              "obu",
              "other"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "hardware",
          "os_release",
          "memory",
          "storage",
          "cpu_load"
        ],
        "type": "object"
      },
      "time_sources": {
        "description": "status of time-keeping services",
        "items": {
          "oneOf": [
            {
              "$ref": "#/$defs/ntpTimeSource"
            },
            {
              "$ref": "#/$defs/ppsTimeSource"
            },
            {
              "$ref": "#/$defs/nmeaTimeSource"
            }
          ],
          "type": "object"
        },
        "type": "array"
      },
      "timestamp": {
        "description": "date the information was generated, in seconds since 1970-01-01 00:00:00 +00:00, with arbitrary sub-second precision",
        "minimum": 0.0,
        "type": "number"
      },
      "type": {
        "const": "status",
        "description": "type of the message",
        "type": "string"
      },
      "version": {
        "const": "1.1.0",
        "description": "version of the format of this JSON message",
        "type": "string"
      }
    },
    "required": [
      "version",
      "id",
      "type",
      "timestamp",
      "system",
      "time_sources",
      "cellular",
      "gnss"
    ],
    "type": "object"
  }