asyncapi: 2.4.0
channels:
  /device/{deviceId}/automatedNavigation/set:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    subscribe:
      bindings:
        $ref: '#/components/channelBindings/MQTTCommandBinding'
      message:
        $ref: '#/components/messages/automatedNavigationSet'
      tags:
        - name: wheelchair
  /device/{deviceId}/automatedNavigation/status:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    publish:
      bindings:
        $ref: '#/components/channelBindings/MQTTStatusBinding'
      message:
        $ref: '#/components/messages/automatedNavigationStatus'
      tags:
        - name: wheelchair
  /device/{deviceId}/battery/voltage:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    publish:
      bindings:
        $ref: '#/components/channelBindings/MQTTStatusBinding'
      message:
        $ref: '#/components/messages/batteryVoltage'
      tags:
        - name: wheelchair
  /device/{deviceId}/map/set:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    subscribe:
      bindings:
        $ref: '#/components/channelBindings/MQTTCommandBinding'
      message:
        $ref: '#/components/messages/mapSet'
      tags:
        - name: wheelchair
  /device/{deviceId}/map/status:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    publish:
      bindings:
        $ref: '#/components/channelBindings/MQTTStatusBinding'
      message:
        $ref: '#/components/messages/mapGet'
      tags:
        - name: wheelchair
  /device/{deviceId}/maxSpeed/set:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    subscribe:
      bindings:
        $ref: '#/components/channelBindings/MQTTCommandBinding'
      message:
        $ref: '#/components/messages/maxSpeedSet'
      tags:
        - name: wheelchair
  /device/{deviceId}/maxSpeed/status:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    publish:
      bindings:
        $ref: '#/components/channelBindings/MQTTStatusBinding'
      message:
        $ref: '#/components/messages/maxSpeedStatus'
      tags:
        - name: wheelchair
  /device/{deviceId}/mode/set:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    subscribe:
      bindings:
        $ref: '#/components/channelBindings/MQTTCommandBinding'
      message:
        $ref: '#/components/messages/modeSet'
      tags:
        - name: wheelchair
  /device/{deviceId}/mode/status:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    publish:
      bindings:
        $ref: '#/components/channelBindings/MQTTStatusBinding'
      message:
        $ref: '#/components/messages/modeStatus'
      tags:
        - name: wheelchair
  /device/{deviceId}/pose/status:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    publish:
      bindings:
        $ref: '#/components/channelBindings/MQTTStatusBinding'
      message:
        $ref: '#/components/messages/poseStatus'
      tags:
        - name: wheelchair
  /device/{deviceId}/resume:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    subscribe:
      bindings:
        $ref: '#/components/channelBindings/MQTTCommandBinding'
      message:
        $ref: '#/components/messages/resume'
      tags:
        - name: wheelchair
  /device/{deviceId}/route/get:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    publish:
      bindings:
        $ref: '#/components/channelBindings/MQTTStatusBinding'
      message:
        $ref: '#/components/messages/routeGet'
      tags:
        - name: wheelchair
  /device/{deviceId}/route/set:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    subscribe:
      bindings:
        $ref: '#/components/channelBindings/MQTTCommandBinding'
      message:
        $ref: '#/components/messages/routeSet'
      tags:
        - name: wheelchair
  /device/{deviceId}/route/status:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    publish:
      bindings:
        $ref: '#/components/channelBindings/MQTTStatusBinding'
      message:
        $ref: '#/components/messages/routeStatus'
      tags:
        - name: wheelchair
  /device/{deviceId}/stop:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    subscribe:
      bindings:
        $ref: '#/components/channelBindings/MQTTCommandBinding'
      message:
        $ref: '#/components/messages/stop'
      tags:
        - name: wheelchair
  /device/{deviceId}/target/delete:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    subscribe:
      bindings:
        $ref: '#/components/channelBindings/MQTTCommandBinding'
      message:
        $ref: '#/components/messages/targetDelete'
      tags:
        - name: wheelchair
  /device/{deviceId}/target/reached:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    publish:
      bindings:
        $ref: '#/components/channelBindings/MQTTStatusBinding'
      message:
        $ref: '#/components/messages/targetReached'
      tags:
        - name: wheelchair
  /device/{deviceId}/target/set:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    subscribe:
      bindings:
        $ref: '#/components/channelBindings/MQTTCommandBinding'
      message:
        $ref: '#/components/messages/targetSet'
      tags:
        - name: wheelchair
  /device/{deviceId}/target/status:
    parameters:
      deviceId:
        schema:
          $ref: shared.yaml#/components/schemas/deviceId
    publish:
      bindings:
        $ref: '#/components/channelBindings/MQTTStatusBinding'
      message:
        $ref: '#/components/messages/targetStatus'
      tags:
        - name: wheelchair
components:
  channelBindings:
    AuthenticatedWsBindings:
      ws:
        query:
          properties:
            token:
              type: string
          required:
            - token
          type: object
    MQTTCommandBinding:
      mqtt:
        qos: 2
        retain: false
    MQTTStatusBinding:
      mqtt:
        qos: 1
        retain: true
  messages:
    automatedNavigationSet:
      description: Set the automated navigation mode
      payload:
        $ref: shared.yaml#/components/schemas/automatedNavigationState
      tags:
        - name: wheelchair
    automatedNavigationStatus:
      description: |-
        This message will be sent from the device if the automated navigation state changed

          **Note**: Should only be allowed to be published by the device owners.
      payload:
        $ref: shared.yaml#/components/schemas/automatedNavigationState
      tags:
        - name: wheelchair
    batteryVoltage:
      description: |-
        This message will be sent regularly with the current voltage of the batteries.

        **Note**: Should only be allowed to be published by the device owners.
      payload:
        $ref: shared.yaml#/components/schemas/voltage
      tags:
        - name: wheelchair
    mapGet:
      description: The current map.
      payload:
        $ref: shared.yaml#/components/schemas/imagePgmBase64
      tags:
        - name: wheelchair
    mapSet:
      description: Set a new map.
      payload:
        $ref: shared.yaml#/components/schemas/imagePgmBase64
      tags:
        - name: wheelchair
    maxSpeedSet:
      description: Change the maximum speed of the device.
      payload:
        $ref: shared.yaml#/components/schemas/speed
      tags:
        - name: wheelchair
    maxSpeedStatus:
      description: |-
        This message will be sent from the device if the maximum speed has been changed.

        **Note**: Should only be allowed to be published by the device owners.
      payload:
        $ref: shared.yaml#/components/schemas/speed
      tags:
        - name: wheelchair
    modeSet:
      description: This message will change the driving mode
      payload:
        $ref: shared.yaml#/components/schemas/deviceMode
      tags:
        - name: wheelchair
    modeStatus:
      description: |-
        This message will be sent from the device if the mode has been changed.

        **Note**: Should only be allowed to be published by the device owners.
      payload:
        $ref: shared.yaml#/components/schemas/deviceMode
      tags:
        - name: wheelchair
    poseStatus:
      description: |-
        This message will be sent from the device if the pose has been changed.

        **Note**: Should only be allowed to be published by the device owners.
      payload:
        $ref: shared.yaml#/components/schemas/pose
      tags:
        - name: wheelchair
    resume:
      description: Resume the driving operation (used to cancel a stop command)
      tags:
        - name: wheelchair
    routeGet:
      description: |-
        This is used to ask the orchestrator for a route to a POI or Point on the map.
        The answer should be via routeSet.

        **Note**: Should only be allowed to be published by the device owners.
      payload:
        type: object
        properties:
          distance:
            type: number
            description: The approximate wanted distance in meter between the points sent
          target:
            oneOf:
              - $ref: shared.yaml#/components/schemas/pose
              - $ref: shared.yaml#/components/schemas/namedPose
      tags:
        - name: wheelchair
    routeSet:
      description: |-
        Set a new target route, where the last entry is the final target to reach
        and the previous describing the waypoints to cross on the way
      payload:
        $ref: shared.yaml#/components/schemas/route
      tags:
        - name: wheelchair
    routeStatus:
      description: |-
        This message will be sent from the device if the route has been changed.

        **Note**: Should only be allowed to be published by the device owners.
      payload:
        $ref: shared.yaml#/components/schemas/route
      tags:
        - name: wheelchair
    stop:
      description: Stop the device as fast as possible while still being safe
      payload:
        $ref: shared.yaml#/components/schemas/stop
      tags:
        - name: wheelchair
    targetDelete:
      description: Deletes the current target.
      tags:
        - name: wheelchair
        - name: drone
    targetReached:
      description: |-
        This message will be sent as soon as there is a change in the target reached state.
        This can be because we reached the target (true will be sent) or because we received a new navigation target (false will be sent)

        **Note**: Should only be allowed to be published by the device owners.
      payload:
        type: boolean
      tags:
        - name: wheelchair
    targetSet:
      description: Sets a new target for the device
      payload:
        oneOf:
          - $ref: shared.yaml#/components/schemas/pose
          - $ref: shared.yaml#/components/schemas/namedPose
      tags:
        - name: wheelchair
        - name: drone
    targetStatus:
      description: |-
        This message will be sent as soon as there is a change in the target.

        **Note**: Should only be allowed to be published by the device owners.
      payload:
        oneOf:
          - $ref: shared.yaml#/components/schemas/pose
          - $ref: shared.yaml#/components/schemas/namedPose
      tags:
        - name: wheelchair
info:
  contact:
    email: Jan.Janssen@dfki.de
    name: Jan Janssen
  description: |-
    # REXASI-PRO ASynchron API
    This document is written from the Point of View from the wheelchair.

    ## YAML specification

    You can find the newest openapi specification on [openapi.yaml](openapi.yaml).
    The human readable description of the openapi can be found [/openapi.html](openapi.html).

    You can find the newest asyncapi specification on [wheelchair-asyncapi.yaml](wheelchair-asyncapi.yaml).
    The human readable description of the asyncapi can be found [here](/asyncstudio.html?url=/wheelchair-asyncapi.yaml&readOnly=true).

    ***Orchestrator***:
    *ALL* /status messages should be cached and made available to other clients via the REST API

    **NOTE**: Commit: c2d59e1 Date: 2024.07.03_10:54:52
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: REXASI-PRO asyncApi
  version: v0.1
servers:
  production:
    protocol: MQTTS
    url: orchestrator.rexasi-pro.spindoxlabs.com:8883
  testing:
    protocol: MQTT
    url: localhost:1883
