{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://lzxindustries.net/eis/data/claim.schema.json",
 "title": "EIS claim file",
 "description": "One file per product: the conformance claim and everything EIS asks the product to publish. tools/claim.py --check validates it against the register.",
 "type": "object",
 "required": [
  "eis_edition",
  "product_type",
  "name",
  "maker"
 ],
 "properties": {
  "eis_edition": {
   "type": "string",
   "pattern": "^(v\\d+\\.\\d+\\.\\d+|draft)$",
   "description": "A released edition tag of the specification, or draft until one is tagged (clause 4.2)"
  },
  "product_type": {
   "type": "string",
   "enum": [
    "module",
    "enclosure",
    "bus board",
    "power supply",
    "cable"
   ]
  },
  "also_claims": {
   "type": "array",
   "items": {
    "type": "string",
    "enum": [
     "module",
     "enclosure",
     "bus board",
     "power supply",
     "cable"
    ]
   },
   "uniqueItems": true,
   "description": "Every other role the product plays beyond its product type, such as power supply and bus board for an enclosure with both built in; they join the claim line with +"
  },
  "todo": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Figures the claim still has to publish; the claim is INCOMPLETE while any remain"
  },
  "name": {
   "type": "string",
   "minLength": 1
  },
  "maker": {
   "type": "string",
   "minLength": 1
  },
  "documentation": {
   "type": "string",
   "description": "URL or path of the manual that carries these figures"
  },
  "module": {
   "$ref": "#/$defs/module"
  },
  "enclosure": {
   "$ref": "#/$defs/enclosure"
  },
  "bus_board": {
   "$ref": "#/$defs/bus_board"
  },
  "power_supply": {
   "$ref": "#/$defs/power_supply",
   "properties": {
    "mounted_on": {
     "type": "string",
     "description": "For a supply mounted on the one product it powers, that product or kind of product (SUP-008)"
    },
    "heat_w": {
     "type": "number",
     "minimum": 0,
     "description": "Heat dissipated at rated output, W (SUP-008)"
    },
    "depth_mm": {
     "type": "number",
     "minimum": 0,
     "description": "How far it extends behind the product it is mounted on, mm (SUP-008)"
    }
   }
  },
  "cable": {
   "$ref": "#/$defs/cable"
  },
  "dc_12": {
   "$ref": "#/$defs/dc_12"
  },
  "video_75": {
   "$ref": "#/$defs/video_75"
  },
  "power": {
   "$ref": "#/$defs/power"
  }
 },
 "$defs": {
  "rails_a": {
   "type": "object",
   "required": [
    "plus12_a",
    "minus12_a"
   ],
   "properties": {
    "plus12_a": {
     "type": "number",
     "minimum": 0
    },
    "minus12_a": {
     "type": "number",
     "minimum": 0
    },
    "plus5_a": {
     "type": "number",
     "minimum": 0
    }
   }
  },
  "ripple_mvpp": {
   "type": "object",
   "description": "Ripple and noise, mV peak-to-peak per rail, measured per clause 6.2 (SUP-001)",
   "required": [
    "plus12",
    "minus12"
   ],
   "properties": {
    "plus12": {
     "type": "number",
     "exclusiveMinimum": 0
    },
    "minus12": {
     "type": "number",
     "exclusiveMinimum": 0
    },
    "plus5": {
     "type": "number",
     "exclusiveMinimum": 0
    }
   }
  },
  "port": {
   "type": "object",
   "required": [
    "name",
    "class"
   ],
   "properties": {
    "name": {
     "type": "string"
    },
    "class": {
     "type": "string",
     "description": "A class from data/signals.json (a patch class, or an Annex C class such as VID-CVBS for a coaxial picture port), or unclassified"
    },
    "direction": {
     "type": "string",
     "enum": [
      "in",
      "out",
      "in_out"
     ],
     "description": "in, out, or in_out for a port that is both, such as a bidirectional expander link"
    },
    "formats": {
     "type": "array",
     "items": {
      "type": "string"
     },
     "description": "EIS format IDs from data/video_timings.json on a coaxial picture port (an Annex C VID- class), informative; a patch jack lists none (SIG-015)"
    },
    "note": {
     "type": "string"
    },
    "range": {
     "type": "string",
     "enum": [
      "B1",
      "U1",
      "B5",
      "U5",
      "B10",
      "U10"
     ],
     "description": "The range the port claims (7.2 Ranges, SIG-005); the class default applies when omitted"
    },
    "bandwidth_mhz": {
     "type": "number",
     "exclusiveMinimum": 0,
     "description": "−3 dB bandwidth of the linear or variable VIDEO path that ends at this output jack, from the input named in `from` (or the only input), measured as 7.3 states (SIG-016); recommended for a generator output. video.bandwidth_mhz covers every linear path not listed"
    },
    "delay_ns": {
     "type": "number",
     "minimum": 0,
     "description": "Delay of the VIDEO path that ends at this output jack, from the input named in `from` (or the only input), in ns (7.3, recommended)"
    },
    "phase_ns": {
     "oneOf": [
      {
       "type": "number"
      },
      {
       "type": "object",
       "additionalProperties": {
        "type": "number"
       }
      }
     ],
     "description": "Output offset after the video sync, horizontal, in ns: one figure, or a figure per format ID when it differs by format (8.3, recommended)"
    },
    "jack": {
     "type": "string",
     "enum": [
      "RCA",
      "BNC",
      "SMA"
     ],
     "description": "The jack of a coaxial picture port"
    },
    "from": {
     "type": "string",
     "description": "The input port the bandwidth_mhz and delay_ns figures are measured from, when the module has more than one"
    },
    "path": {
     "type": "string",
     "enum": [
      "linear",
      "shaped",
      "variable",
      "generator"
     ],
     "description": "The kind of VIDEO path behind this output (7.3, SIG-016): linear when the module has a VIDEO input and generator when it has none, unless stated"
    },
    "rise_ns": {
     "type": "number",
     "exclusiveMinimum": 0,
     "description": "10 % to 90 % rise time at this output jack, in ns; recommended for a shaped path (7.3)"
    },
    "input_pf": {
     "type": "number",
     "minimum": 0,
     "description": "Input capacitance of this VIDEO input, in pF (7.3, recommended, 30 pF or less); video.input_pf covers every input not listed"
    },
    "setting": {
     "type": "string",
     "description": "The control setting the figures were measured at, when it is not the default (7.3)"
    }
   }
  },
  "module": {
   "type": "object",
   "required": [
    "height_u",
    "width_hp",
    "depth_mm",
    "ports"
   ],
   "properties": {
    "height_u": {
     "type": "integer",
     "enum": [
      1,
      3
     ]
    },
    "width_hp": {
     "type": "integer",
     "minimum": 1
    },
    "depth_mm": {
     "type": "number",
     "minimum": 0,
     "description": "Behind the panel's back face, to the deepest point (PANEL-003)"
    },
    "panel": {
     "type": "object",
     "description": "The front panel's two choices (PANEL-015, clause 5.2.1)",
     "required": [
      "zero_v",
      "rails"
     ],
     "properties": {
      "zero_v": {
       "enum": [
        "insulated",
        "connected"
       ],
       "description": "insulated: nothing at the module's 0 V touches the panel; connected: jack sleeves or other parts put the panel at 0 V"
      },
      "rails": {
       "enum": [
        "bonded",
        "floating"
       ],
       "description": "bonded: bare metal or a finished land under the mounting-screw heads (6.3); floating: coated or masked up to the holes"
      },
      "material": {
       "type": "string",
       "description": "optional: the panel material and finish, such as 5052 powder coated with bare discs, or FR4 ENIG"
      }
     },
     "additionalProperties": false
    },
    "current_a": {
     "$ref": "#/$defs/rails_a",
     "description": "Earlier claim files; read for this edition and converted to power"
    },
    "power_headers": {
     "type": "integer",
     "minimum": 0,
     "default": 1,
     "description": "Earlier claim files; read for this edition and converted to power"
    },
    "ports": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/port"
     }
    },
    "other_power_entry": {
     "type": "string",
     "description": "A power entry outside the EIS power interfaces, named for the reader; such a module lists no EIS entry for it"
    },
    "video": {
     "type": "object",
     "description": "Figures shared by the module's VIDEO paths (7.3)",
     "properties": {
      "bandwidth_mhz": {
       "type": "number",
       "exclusiveMinimum": 0,
       "description": "A floor: every linear path not listed with its own figure has at least this −3 dB bandwidth, measured as 7.3 states (SIG-016)"
      },
      "input_pf": {
       "type": "number",
       "minimum": 0,
       "description": "Input capacitance of every VIDEO input not listed with its own, in pF (recommended)"
      },
      "measured_by": {
       "type": "string",
       "enum": [
        "A",
        "B",
        "C"
       ],
       "description": "The Annex A method the figures were measured by: A stepped sine, B step, C multiburst (recommended)"
      },
      "setting": {
       "type": "string",
       "description": "The control setting the figures were measured at, when it is not the default"
      }
     }
    },
    "no_power_entry": {
     "type": "boolean",
     "description": "true for a module with no power entry at all, such as a blank or a passive module (PWR-001)"
    }
   }
  },
  "enclosure": {
   "type": "object",
   "required": [
    "rows",
    "screw_length_mm"
   ],
   "properties": {
    "rack_mount": {
     "type": "boolean"
    },
    "rows": {
     "type": "array",
     "minItems": 1,
     "items": {
      "type": "object",
      "required": [
       "id",
       "height_u",
       "width_hp",
       "clear_depth_mm"
      ],
      "properties": {
       "id": {
        "type": "string"
       },
       "height_u": {
        "type": "integer",
        "enum": [
         1,
         3
        ]
       },
       "width_hp": {
        "type": "integer",
        "minimum": 1
       },
       "clear_depth_mm": {
        "type": "number",
        "exclusiveMinimum": 0
       }
      }
     }
    },
    "screw_length_mm": {
     "type": "number",
     "exclusiveMinimum": 0,
     "description": "RAIL-011; M3"
    },
    "built_in_supply": {
     "$ref": "#/$defs/power_supply"
    },
    "built_in_bus_board": {
     "$ref": "#/$defs/bus_board"
    },
    "bonding": {
     "type": "string",
     "description": "Which metal parts, rails, inserts, sides, rear, lid, are bonded to one another, and where the metalwork takes a bond to the row's 0 V (GND-005)"
    }
   }
  },
  "bus_board": {
   "type": "object",
   "required": [],
   "properties": {
    "header_count": {
     "type": "integer",
     "minimum": 1,
     "description": "Earlier claim files; read for this edition and converted to power"
    },
    "totals_a": {
     "$ref": "#/$defs/rails_a",
     "description": "Earlier claim files; read for this edition and converted to power"
    },
    "per_header_a": {
     "type": "number",
     "exclusiveMinimum": 0,
     "maximum": 2,
     "description": "Earlier claim files; read for this edition and converted to power"
    },
    "power": {
     "$ref": "#/$defs/power"
    }
   }
  },
  "power_supply": {
   "type": "object",
   "required": [],
   "properties": {
    "rating_a": {
     "$ref": "#/$defs/rails_a",
     "description": "Earlier claim files; read for this edition and converted to power"
    },
    "ripple_mvpp": {
     "$ref": "#/$defs/ripple_mvpp",
     "description": "Earlier claim files; read for this edition and converted to power"
    },
    "zero_v_to_earth": {
     "type": "string",
     "description": "Earlier claim files; read for this edition and converted to power"
    },
    "power": {
     "$ref": "#/$defs/power"
    }
   }
  },
  "cable": {
   "type": "object",
   "required": [],
   "properties": {
    "mates": {
     "type": "string",
     "enum": [
      "PWR-BUS",
      "VID-75",
      "PWR-DC12"
     ],
     "description": "The interface the cable mates: PWR-BUS for a power ribbon, VID-75 for a coaxial cable, or PWR-DC12"
    },
    "length_mm": {
     "type": "number",
     "exclusiveMinimum": 0
    },
    "conductor_awg": {
     "type": "integer"
    },
    "impedance_ohm": {
     "type": "number",
     "enum": [
      75,
      50
     ],
     "description": "A VID-75 cable's impedance: 75 Ω, or 50 Ω at 1.5 m or less (V75-004); 75 when not stated"
    }
   }
  },
  "video_75": {
   "type": "object",
   "required": [
    "ports"
   ],
   "properties": {
    "ports": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "name",
       "mode"
      ],
      "properties": {
       "name": {
        "type": "string"
       },
       "mode": {
        "type": "string",
        "enum": [
         "COAX-IN",
         "COAX-OUT",
         "COAX-THRU"
        ]
       },
       "thru": {
        "type": "string",
        "enum": [
         "buffered",
         "looped"
        ],
        "description": "On a COAX-THRU: buffered, driving one COAX-IN load, or looped, bridged to the COAX-IN jack with a termination switch marked TERM (V75-008, V75-009)"
       },
       "jack": {
        "type": "string",
        "enum": [
         "RCA",
         "BNC",
         "SMA"
        ]
       },
       "formats": {
        "type": "array",
        "items": {
         "type": "string"
        },
        "description": "EIS format IDs from data/video_timings.json on a COAX-IN or COAX-OUT video sync port (VID-001)"
       },
       "note": {
        "type": "string"
       },
       "signal": {
        "type": "string",
        "enum": [
         "video_sync"
        ],
        "description": "What the port carries: the video sync; a picture port is in module.ports with its Annex C class"
       }
      }
     }
    }
   },
   "description": "The video sync ports behind the panel (clause 8.2); a coaxial picture port on the front is in module.ports with an Annex C class"
  },
  "dc_12": {
   "type": "object",
   "required": [
    "entry",
    "max_current_a",
    "input_v"
   ],
   "properties": {
    "entry": {
     "type": "string",
     "enum": [
      "DC-BAR21",
      "DC-BAR25",
      "DC-VH2",
      "DC-DIN4",
      "DC-MF6",
      "DC-MF8",
      "DC-M4"
     ]
    },
    "max_current_a": {
     "type": "number",
     "exclusiveMinimum": 0,
     "description": "PWR-001"
    },
    "input_v": {
     "type": "object",
     "required": [
      "min",
      "max"
     ],
     "properties": {
      "min": {
       "type": "number"
      },
      "max": {
       "type": "number"
      }
     },
     "description": "DC-002"
    },
    "outputs": {
     "type": "array",
     "minItems": 1,
     "items": {
      "type": "string",
      "enum": [
       "DC-BAR21",
       "DC-VH2"
      ]
     },
     "description": "A DC distribution product's output connectors to modules (EIS-DC-009)"
    }
   },
   "description": "Earlier claim files; read for this edition and converted to power"
  },
  "rail_currents": {
   "type": "object",
   "description": "Current per rail in A, keyed by the rail names of data/power_interfaces.json: plus12, minus12, plus5 on the bus; v12 on PWR-DC12",
   "additionalProperties": {
    "type": "number",
    "minimum": 0
   }
  },
  "power_entry": {
   "type": "object",
   "required": [
    "interface",
    "connector",
    "current_a"
   ],
   "properties": {
    "interface": {
     "type": "string",
     "description": "A power interface id from data/power_interfaces.json"
    },
    "connector": {
     "type": "string",
     "description": "PWR-BUS: BUS-IDC10 or BUS-IDC16; PWR-DC12: a DC entry variant of 8.1 (DC-001), DC-M4 for a pair of M4 row wiring terminals (PWR-005), at most 30 A per pair (PWR-006)"
    },
    "count": {
     "type": "integer",
     "minimum": 1,
     "default": 1
    },
    "current_a": {
     "$ref": "#/$defs/rail_currents",
     "description": "Maximum current taken on each rail at nominal voltage, 0 for a rail not drawn (PWR-001)"
    },
    "input_v": {
     "type": "object",
     "required": [
      "min",
      "max"
     ],
     "properties": {
      "min": {
       "type": "number"
      },
      "max": {
       "type": "number"
      }
     },
     "description": "PWR-DC12: the DC input range (DC-002)"
    }
   }
  },
  "power_outlet": {
   "type": "object",
   "required": [
    "interface",
    "connector",
    "each_a"
   ],
   "properties": {
    "interface": {
     "type": "string"
    },
    "connector": {
     "type": "string",
     "description": "PWR-BUS: terminals, BUS-IDC10, or BUS-IDC16; PWR-DC12: terminals, M4 row wiring to a supply, a bus board, or a DC-M4 entry, the default (PWR-005), or DC-BAR21 or DC-VH2 to modules (DC-009)"
    },
    "count": {
     "type": "integer",
     "minimum": 1,
     "default": 1
    },
    "each_a": {
     "oneOf": [
      {
       "type": "number",
       "exclusiveMinimum": 0
      },
      {
       "$ref": "#/$defs/rail_currents"
      }
     ],
     "description": "Maximum current at each outlet of the group, per rail; one number when it is the same on every rail (PWR-002; a bus board header at most 1.5 A, BUS-012)"
    },
    "protection_a": {
     "type": "number",
     "exclusiveMinimum": 0,
     "description": "The current at which a PWR-DC12 outlet's protection acts (DC-012)"
    },
    "ripple_mvpp": {
     "type": "object",
     "additionalProperties": {
      "type": "number",
      "exclusiveMinimum": 0
     },
     "description": "A power supply's ripple and noise per rail, mV peak-to-peak, measured per clause 6.2 (SUP-001), below the limit of its power interface (SUP-007)"
    }
   }
  },
  "power": {
   "type": "object",
   "description": "Power entries and outlets by power interface (clause 6.1)",
   "properties": {
    "entries": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/power_entry"
     }
    },
    "outlets": {
     "type": "array",
     "items": {
      "$ref": "#/$defs/power_outlet"
     }
    },
    "total_a": {
     "type": "object",
     "additionalProperties": {
      "$ref": "#/$defs/rail_currents"
     },
     "description": "Per power interface, the maximum delivered in total on each rail, when it has more than one outlet (PWR-002)"
    },
    "terminals": {
     "type": "object",
     "description": "Its row wiring terminals, M4 (PWR-005), at its outputs and at a DC-M4 entry: the current each is rated for and the conductor sizes it accepts",
     "required": [
      "rated_a",
      "accepts_awg"
     ],
     "properties": {
      "rated_a": {
       "type": "number",
       "exclusiveMinimum": 0,
       "description": "The current each terminal is rated for"
      },
      "accepts_awg": {
       "type": "array",
       "minItems": 1,
       "items": {
        "enum": [
         18,
         16,
         14,
         12,
         10
        ]
       },
       "description": "The conductor sizes, in AWG, its terminals accept with an M4 ring terminal (PWR-005, PWR-006)"
      }
     },
     "additionalProperties": false
    },
    "zero_v_to_earth": {
     "type": "string",
     "description": "A power supply: floating, or where 0 V is bonded to protective earth (GND-003)"
    },
    "zero_v_to_chassis": {
     "type": "string",
     "description": "A product with a case DC entry: whether its 0 V is bonded to the chassis at the entry, and where (DC-014); for example 'bonded at the CHASSIS stud through a 0 R link' or 'floating'"
    }
   }
  }
 }
}
