{
  "$defs": {
    "AindManipulatorCalibration": {
      "description": "AindManipulator calibration class",
      "properties": {
        "description": {
          "const": "AindManipulator calibration and settings",
          "default": "AindManipulator calibration and settings",
          "title": "Description",
          "type": "string"
        },
        "full_step_to_mm": {
          "$ref": "#/$defs/ManipulatorPosition",
          "default": {
            "x": 0.01,
            "y1": 0.01,
            "y2": 0.01,
            "z": 0.01
          },
          "title": "Full step to mm. Used to convert steps to SI Units"
        },
        "axis_configuration": {
          "default": [
            {
              "axis": 2,
              "step_acceleration_interval": 100,
              "step_interval": 100,
              "microstep_resolution": 0,
              "maximum_step_interval": 2000,
              "motor_operation_mode": 0,
              "max_limit": 25.0,
              "min_limit": -0.01
            },
            {
              "axis": 3,
              "step_acceleration_interval": 100,
              "step_interval": 100,
              "microstep_resolution": 0,
              "maximum_step_interval": 2000,
              "motor_operation_mode": 0,
              "max_limit": 25.0,
              "min_limit": -0.01
            },
            {
              "axis": 1,
              "step_acceleration_interval": 100,
              "step_interval": 100,
              "microstep_resolution": 0,
              "maximum_step_interval": 2000,
              "motor_operation_mode": 0,
              "max_limit": 25.0,
              "min_limit": -0.01
            },
            {
              "axis": 4,
              "step_acceleration_interval": 100,
              "step_interval": 100,
              "microstep_resolution": 0,
              "maximum_step_interval": 2000,
              "motor_operation_mode": 0,
              "max_limit": 25.0,
              "min_limit": -0.01
            }
          ],
          "items": {
            "$ref": "#/$defs/AxisConfiguration"
          },
          "title": "Axes configuration. Only the axes that are configured will be enabled.",
          "type": "array"
        },
        "homing_order": {
          "default": [
            2,
            3,
            1,
            4
          ],
          "items": {
            "$ref": "#/$defs/Axis"
          },
          "title": "Homing order",
          "type": "array"
        },
        "initial_position": {
          "$ref": "#/$defs/ManipulatorPosition",
          "default": {
            "x": 0.0,
            "y1": 0.0,
            "y2": 0.0,
            "z": 0.0
          }
        }
      },
      "title": "AindManipulatorCalibration",
      "type": "object",
      "x-sgen-typename": "AllenNeuralDynamics.AindManipulator.AindManipulatorCalibration"
    },
    "Axis": {
      "description": "Motor axis available",
      "enum": [
        0,
        1,
        2,
        3,
        4
      ],
      "title": "Axis",
      "type": "integer",
      "x-enumNames": [
        "None",
        "X",
        "Y1",
        "Y2",
        "Z"
      ],
      "x-sgen-typename": "AllenNeuralDynamics.AindManipulator.Axis"
    },
    "AxisConfiguration": {
      "description": "Axis configuration",
      "properties": {
        "axis": {
          "$ref": "#/$defs/Axis",
          "title": "Axis to be configured"
        },
        "step_acceleration_interval": {
          "default": 100,
          "description": "Acceleration of the step interval in microseconds",
          "maximum": 2000,
          "minimum": 2,
          "title": "Acceleration",
          "type": "integer"
        },
        "step_interval": {
          "default": 100,
          "description": "Step interval in microseconds.",
          "maximum": 20000,
          "minimum": 100,
          "title": "Step interval",
          "type": "integer"
        },
        "microstep_resolution": {
          "$ref": "#/$defs/MicrostepResolution",
          "default": 0,
          "title": "Microstep resolution"
        },
        "maximum_step_interval": {
          "default": 2000,
          "maximum": 20000,
          "minimum": 100,
          "title": "Configures the time between step motor pulses (us) used when starting or stopping a movement",
          "type": "integer"
        },
        "motor_operation_mode": {
          "$ref": "#/$defs/MotorOperationMode",
          "default": 0,
          "title": "Motor operation mode"
        },
        "max_limit": {
          "default": 25,
          "title": "Maximum limit in SI units. A value of 0 disables this limit.",
          "type": "number"
        },
        "min_limit": {
          "default": -0.01,
          "title": "Minimum limit in SI units. A value of 0 disables this limit.",
          "type": "number"
        }
      },
      "required": [
        "axis"
      ],
      "title": "AxisConfiguration",
      "type": "object",
      "x-sgen-typename": "AllenNeuralDynamics.AindManipulator.AxisConfiguration"
    },
    "ManipulatorPosition": {
      "description": "Represents a position in the manipulator coordinate system",
      "properties": {
        "x": {
          "title": "X coordinate",
          "type": "number"
        },
        "y1": {
          "title": "Y1 coordinate",
          "type": "number"
        },
        "y2": {
          "title": "Y2 coordinate",
          "type": "number"
        },
        "z": {
          "title": "Z coordinate",
          "type": "number"
        }
      },
      "required": [
        "x",
        "y1",
        "y2",
        "z"
      ],
      "title": "ManipulatorPosition",
      "type": "object",
      "x-sgen-typename": "AllenNeuralDynamics.AindManipulator.ManipulatorPosition"
    },
    "MicrostepResolution": {
      "description": "Microstep resolution available",
      "enum": [
        0,
        1,
        2,
        3
      ],
      "title": "MicrostepResolution",
      "type": "integer",
      "x-enumNames": [
        "Microstep8",
        "Microstep16",
        "Microstep32",
        "Microstep64"
      ],
      "x-sgen-typename": "AllenNeuralDynamics.AindManipulator.MicrostepResolution"
    },
    "MotorOperationMode": {
      "description": "Motor operation mode",
      "enum": [
        0,
        1
      ],
      "title": "MotorOperationMode",
      "type": "integer",
      "x-enumNames": [
        "Quiet",
        "Dynamic"
      ],
      "x-sgen-typename": "AllenNeuralDynamics.AindManipulator.MotorOperationMode"
    }
  },
  "description": "AindManipulator device definition",
  "properties": {
    "device_type": {
      "const": "StepperDriver",
      "default": "StepperDriver",
      "title": "Device Type",
      "type": "string"
    },
    "calibration": {
      "$ref": "#/$defs/AindManipulatorCalibration",
      "default": {
        "description": "AindManipulator calibration and settings",
        "full_step_to_mm": {
          "x": 0.01,
          "y1": 0.01,
          "y2": 0.01,
          "z": 0.01
        },
        "axis_configuration": [
          {
            "axis": 2,
            "max_limit": 25.0,
            "maximum_step_interval": 2000,
            "microstep_resolution": 0,
            "min_limit": -0.01,
            "motor_operation_mode": 0,
            "step_acceleration_interval": 100,
            "step_interval": 100
          },
          {
            "axis": 3,
            "max_limit": 25.0,
            "maximum_step_interval": 2000,
            "microstep_resolution": 0,
            "min_limit": -0.01,
            "motor_operation_mode": 0,
            "step_acceleration_interval": 100,
            "step_interval": 100
          },
          {
            "axis": 1,
            "max_limit": 25.0,
            "maximum_step_interval": 2000,
            "microstep_resolution": 0,
            "min_limit": -0.01,
            "motor_operation_mode": 0,
            "step_acceleration_interval": 100,
            "step_interval": 100
          },
          {
            "axis": 4,
            "max_limit": 25.0,
            "maximum_step_interval": 2000,
            "microstep_resolution": 0,
            "min_limit": -0.01,
            "motor_operation_mode": 0,
            "step_acceleration_interval": 100,
            "step_interval": 100
          }
        ],
        "homing_order": [
          2,
          3,
          1,
          4
        ],
        "initial_position": {
          "x": 0.0,
          "y1": 0.0,
          "y2": 0.0,
          "z": 0.0
        }
      },
      "description": "Calibration for the device."
    },
    "who_am_i": {
      "const": 1130,
      "default": 1130,
      "title": "Who Am I",
      "type": "integer"
    },
    "serial_number": {
      "default": null,
      "description": "Device serial number",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Serial Number"
    },
    "port_name": {
      "description": "Device port name",
      "title": "Port Name",
      "type": "string"
    }
  },
  "required": [
    "port_name"
  ],
  "title": "AindManipulator",
  "type": "object",
  "x-sgen-typename": "AllenNeuralDynamics.AindManipulator.AindManipulator"
}