# 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
  properties:
    description:
      type: string
      description: A human readable description of the channel.

    payload:
      description: |
        Describes the type of information which is exchanged over the channel.
      type: string
      enum:
      - events
      - samples

    range:
      oneOf:
      - type: object
        description: Limits for numeric datatypes
        properties:
          min:
            type: number
          max:
            type: number

      - type: array
        description: A list of allowed string values for string datatype
        items:
          type: string

    rate:
      optional: true
      type: number
      description: |
        Expected refresh-rate in Hertz of this channel
        Does not apply channels which have event payloads.

- $ref: ../../signal.yaml
