asyncapi: 2.4.0
channels:
  /action:
    publish:
      description: |-
        The Vocal HMI uses this topic to tell the wheelchair what commands to
        execute.
      message:
        $ref: '#/components/messages/WheelchairAction'
  /trigger_mode:
    subscribe:
      description: |-
        The vocal HMI recevies on this topic all the commands from the Stream
        Deack Console. Each time a button on the Stream Deck Console is pressed
        a message is pubished on this topic and received by the vocal HMI
      message:
        $ref: '#/components/messages/StreamDeckCommands'
  /user_message:
    subscribe:
      description: |-
        Texatual messages received by the vocal HMI on this topic are played
        through the wheelchair speaker
      message:
        $ref: '#/components/messages/MessageToPlay'
components:
  messages:
    MessageToPlay:
      payload:
        properties:
          message:
            description: message to be played
            type: string
          priority:
            description: |-
              priority used to play the message. Messages with higher priority
              are played before.
            type: string
        type: object
    StreamDeckCommands:
      payload:
        description: Command to be executed by the vocal HMI
        enum:
          - speak
          - confirm
          - deny
          - cancel
          - profile
          - info
        type: string
    WheelchairAction:
      payload:
        properties:
          action:
            description: action to be executed by the wheelchair
            enum:
              - go_to_destination
            type: string
          data:
            description: |-
              additional information to detail the action to be taken by the
              wheelchair. For example the target destination for in the case of
              "go_to_destination" action.
            type: string
        type: object
info:
  description: |-
    This file is written from the point of view of the vocal HMI service running
    on the wheelchair
  title: vocal HMI service
  version: v0.1
servers:
  production:
    protocol: ROS2
    url: localhost
  testing:
    protocol: ROS2
    url: localhost
