{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Charging device factsheet",
  "description": "The factsheet provides basic information about a charging device. This allows the charging device to describe itself.",
  "required": [
    "timestamp",
    "version",
    "manufacturer",
    "serialNumber",
    "chargingDeviceGeometry",
    "chargingPosition",
    "chargingDeviceId",
    "chargingDeviceRequests"
  ],
  "subtopic": "/factsheet",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp in ISO8601 format (YYYY-MM-DDTHH:mm:ss.sssZ). The timestamp defines the point in time at which the message was sent.",
      "examples": [
        "2015-10-21T16:29:00.000Z"
      ]
    },
    "version": {
      "type": "string",
      "description": "Version of the M2X protocol [Major].[Minor].[Patch] (e.g. 1.3.2).",
      "examples": [
        "2.0.0"
      ]
    },
    "manufacturer": {
      "type": "string",
      "description": "Manufacturer of the charging device."
    },
    "serialNumber": {
      "type": "string",
      "description": "Serial number of the charging device."
    },
    "chargingDeviceDescriptor": {
      "type": "string",
      "description": "Describes the charging device for human readability, e. g. vertical, above ground, underfloor charger."
    },
    "chargingDeviceGeometry": {
      "type": "object",
      "required": [
        "position",
        "chargingDeviceFootprint"
      ],
      "description": "These parameters generally specify the geometry of the charging device.",
      "properties": {
        "position": {
          "type": "object",
          "description": "Position of the charging device in the factory-coordinate system.",
          "required": [
            "x",
            "y",
            "z"
          ],
          "properties": {
            "x": {
              "type": "number",
              "description": "The x-position in factory-coordinate system.",
              "unit": "m"
            },
            "y": {
              "type": "number",
              "description": "The y-position in factory-coordinate system.",
              "unit": "m"
            },
            "z": {
              "type": "number",
              "description": "The z-position in factory-coordinate system.",
              "unit": "m"
            }
          }
        },
        "chargingDeviceFootprint": {
          "type": "object",
          "description": "Describes the footprint and orientation of the charging device in the factory-coordinate system.",
          "required": [
            "x-left",
            "x-right",
            "y-left",
            "y-right",
            "theta"
          ],
          "properties": {
            "x-left": {
              "type": "number",
              "description": "x-left offset of charging device.",
              "unit": "m"
            },
            "x-right": {
              "type": "number",
              "description": "x-right offset of charging device.",
              "unit": "m"
            },
            "y-left": {
              "type": "number",
              "description": "y-left offset of charging device.",
              "unit": "m"
            },
            "y-right": {
              "type": "number",
              "description": "y-right offset of charging device.",
              "unit": "m"
            },
            "theta": {
              "type": "number",
              "description": "Orientation of the charging device in factory-coordinate system.",
              "unit": "rad"
            }
          }
        }
      }
    },
    "chargingPosition": {
      "type": "object",
      "description": "Position of the area where the MR has to drive to be charged in the factory coordinate system.",
      "required": [
        "x",
        "y",
        "tolerance"
      ],
      "properties": {
        "x": {
          "type": "number",
          "description": "The x-position in factory coordinate system.",
          "unit": "m"
        },
        "y": {
          "type": "number",
          "description": "The y-position in factory coordinate system.",
          "unit": "m"
        },
        "z": {
          "type": "number",
          "description": "The z-position in factory coordinate system.",
          "unit": "m"
        },
        "tolerance": {
          "type": "object",
          "description": "Acceptable tolerance for the charging position.",
          "required": [
            "x-left",
            "x-right",
            "y-left",
            "y-right",
            "theta"
          ],
          "properties": {
            "x-left": {
              "type": "number",
              "description": "x-left offset of charging position.",
              "unit": "m"
            },
            "x-right": {
              "type": "number",
              "description": "x-right offset of charging position.",
              "unit": "m"
            },
            "y-left": {
              "type": "number",
              "description": "y-left offset of charging position.",
              "unit": "m"
            },
            "y-right": {
              "type": "number",
              "description": "y-right offset of charging position.",
              "unit": "m"
            },
            "theta": {
              "type": "number",
              "description": "Orientation of the charging position in factory-coordinate system.",
              "unit": "rad"
            }
          }
        }
      }
    },
    "chargingDeviceId": {
      "type": "string",
      "description": "ID number of the charging device."
    },
    "chargingDeviceRequests": {
      "type": "array",
      "description": "Simplified description of possible charging device requests.",
      "items": {
        "type": "string",
        "enum": [
          "requestAccess",
          "requestStartCharge",
          "requestStopCharge",
          "requestRelease",
          "requestFactsheet",
          "requestCancel"
        ]
      }
    },
    "maxChargingRate": {
      "type": "number",
      "description": "Maximum charging rate of the charging device.",
      "unit": "kW"
    },
    "mainsVoltage": {
      "type": "number",
      "description": "Mains voltage of the charging device.",
      "unit": "V"
    },
    "communicationType": {
      "type": "string",
      "description": "Used communication type at the charging device.",
      "enum": [
        "MQTT",
        "OPC_UA",
        "REST_API",
        "WEB_SOCKET"
      ]
    }
  }
}
