# yaml-language-server: $schema=http://json-schema.org/draft-07/schema
# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
# SPDX-License-Identifier: Apache-2.0
---
allOf:
- type: object
  required:
  - sample_rate
  properties:

    interface_type:
      type: string
      enum:
      - usb
      - bluetooth
      - ethernet
      - any
      description: The interface to which the ADC is connected. Check manual for your device.

    device_id:
      type: string
      example: 10000
      description: The used device type. If empty it is auto detected.

    in:
      type: object
      description: Configuration for the ul201

      properties:

        signals:
          type: array
          items:
            $ref: ./signals/uldaq_signal.yaml

        sample_rate:
          type: integer
          min: 0
          example: 10000
          description: The default sampling rate of the input signals.

        range:
          type: string
          enum:
          - bipolar-60
          - bipolar-30
          - bipolar-15
          - bipolar-20
          - bipolar-10
          - bipolar-5
          - bipolar-4
          - bipolar-2.5
          - bipolar-2
          - bipolar-1.25
          - bipolar-1
          - bipolar-0.625
          - bipolar-0.5
          - bipolar-0.25
          - bipolar-0.125
          - bipolar-0.2
          - bipolar-0.1
          - bipolar-0.078
          - bipolar-0.05
          - bipolar-0.01
          - bipolar-0.005
          - unipolar-60
          - unipolar-30
          - unipolar-15
          - unipolar-20
          - unipolar-10
          - unipolar-5
          - unipolar-4
          - unipolar-2.5
          - unipolar-2
          - unipolar-1.25
          - unipolar-1
          - unipolar-0.625
          - unipolar-0.5
          - unipolar-0.25
          - unipolar-0.125
          - unipolar-0.2
          - unipolar-0.1
          - unipolar-0.078
          - unipolar-0.05
          - unipolar-0.01
          - unipolar-0.005

          description: |
            The default input range for signals. Check manual for your device.

            ## Supported ranges

            | Value            | Min     | Max    |
            | :--------------- | :------ | :----- |
            | `bipolar-60`     | -60.0   | +60.0  |
            | `bipolar-60`     | -60.0   | +60.0  |
            | `bipolar-30`     | -30.0   | +30.0  |
            | `bipolar-15`     | -15.0   | +15.0  |
            | `bipolar-20`     | -20.0   | +20.0  |
            | `bipolar-10`     | -10.0   | +10.0  |
            | `bipolar-5`      | -5.0    | +5.0   |
            | `bipolar-4`      | -4.0    | +4.0   |
            | `bipolar-2.5`    | -2.5    | +2.5   |
            | `bipolar-2`      | -2.0    | +2.0   |
            | `bipolar-1.25`   | -1.25   | +1.25  |
            | `bipolar-1`      | -1.0    | +1.0   |
            | `bipolar-0.625`  | -0.625  | +0.625 |
            | `bipolar-0.5`    | -0.5    | +0.5   |
            | `bipolar-0.25`   | -0.25   | +0.25  |
            | `bipolar-0.125`  | -0.125  | +0.125 |
            | `bipolar-0.2`    | -0.2    | +0.2   |
            | `bipolar-0.1`    | -0.1    | +0.1   |
            | `bipolar-0.078`  | -0.078  | +0.078 |
            | `bipolar-0.05`   | -0.05   | +0.05  |
            | `bipolar-0.01`   | -0.01   | +0.01  |
            | `bipolar-0.005`  | -0.005  | +0.005 |
            | `unipolar-60`    |  0.0    | +60.0  |
            | `unipolar-30`    |  0.0    | +30.0  |
            | `unipolar-15`    |  0.0    | +15.0  |
            | `unipolar-20`    |  0.0    | +20.0  |
            | `unipolar-10`    |  0.0    | +10.0  |
            | `unipolar-5`     |  0.0    | +5.0   |
            | `unipolar-4`     |  0.0    | +4.0   |
            | `unipolar-2.5`   |  0.0    | +2.5   |
            | `unipolar-2`     |  0.0    | +2.0   |
            | `unipolar-1.25`  |  0.0    | +1.25  |
            | `unipolar-1`     |  0.0    | +1.0   |
            | `unipolar-0.625` |  0.0    | +0.625 |
            | `unipolar-0.5`   |  0.0    | +0.5   |
            | `unipolar-0.25`  |  0.0    | +0.25  |
            | `unipolar-0.125` |  0.0    | +0.125 |
            | `unipolar-0.2`   |  0.0    | +0.2   |
            | `unipolar-0.1`   |  0.0    | +0.1   |
            | `unipolar-0.078` |  0.0    | +0.078 |
            | `unipolar-0.05`  |  0.0    | +0.05  |
            | `unipolar-0.01`  |  0.0    | +0.01  |
            | `unipolar-0.005` |  0.0    | +0.00  |

        input_mode:
          type: string
          enum:
          - differential
          - single-ended
          - pseudo-differential
          description: The default sampling type. Check manual for you device.

- $ref: ../node.yaml
