asyncapi: 2.6.0
info:
  title: XBee API Mode
  version: S2C Zigbee firmware
  description: Digi XBee radio module binary command protocol, including an AT Command
    frame setting ATCH (the RF channel/frequency).
servers:
  serial_link:
    url: serial://tty/115200
    protocol: serial
    description: Physical UART Transport (115200 bps, 8N1.0)
    bindings:
      serial:
        baudRate: 115200
        dataBits: 8
        parity: none
        stopBits: 1.0
        framingType: binary
        integrity: sum8
channels:
  omniuart/cmd/SetChannelATCommand:
    publish:
      summary: 'Send command SetChannelATCommand (ID: 0x08)'
      description: 'Frame type 0x08: local AT Command. The AT command here is ''CH''
        (RF channel/frequency), one of 16 channels in the 2.4GHz band.'
      message:
        name: SetChannelATCommand_Message
        title: SetChannelATCommand Command
        payload:
          $ref: '#/components/schemas/SetChannelATCommand_Request'
  omniuart/cmd/TransmitRequest:
    publish:
      summary: 'Send command TransmitRequest (ID: 0x10)'
      description: 'Frame type 0x10: Transmit data packet to 64-bit destination address.'
      message:
        name: TransmitRequest_Message
        title: TransmitRequest Command
        payload:
          $ref: '#/components/schemas/TransmitRequest_Request'
  omniuart/cmd/RemoteATCommand:
    publish:
      summary: 'Send command RemoteATCommand (ID: 0x17)'
      description: 'Frame type 0x17: Issue AT Command to remote node in mesh network.'
      message:
        name: RemoteATCommand_Message
        title: RemoteATCommand Command
        payload:
          $ref: '#/components/schemas/RemoteATCommand_Request'
  omniuart/telemetry/ATCommandResponse:
    subscribe:
      summary: 'Unsolicited telemetry message ATCommandResponse (ID: 0x88)'
      description: 'Unsolicited telemetry message from device: ATCommandResponse'
      message:
        name: ATCommandResponse_Telemetry_Message
        title: ATCommandResponse Telemetry
        payload:
          $ref: '#/components/schemas/ATCommandResponse_Telemetry'
components:
  messages: {}
  schemas:
    SetChannelATCommand_Request:
      type: object
      properties:
        command_id:
          type: integer
          const: 8
          description: Opcode ID for SetChannelATCommand
        frameId:
          type: integer
        atCommand:
          type: string
          default: CH
        parameterValue:
          type: integer
      description: 'Frame type 0x08: local AT Command. The AT command here is ''CH''
        (RF channel/frequency), one of 16 channels in the 2.4GHz band.'
    TransmitRequest_Request:
      type: object
      properties:
        command_id:
          type: integer
          const: 16
          description: Opcode ID for TransmitRequest
        frameId:
          type: integer
        dest64:
          type: string
          contentEncoding: base64
        dest16:
          type: integer
        broadcastRadius:
          type: integer
        options:
          type: integer
        payload:
          type: string
          contentEncoding: base64
      description: 'Frame type 0x10: Transmit data packet to 64-bit destination address.'
    RemoteATCommand_Request:
      type: object
      properties:
        command_id:
          type: integer
          const: 23
          description: Opcode ID for RemoteATCommand
        frameId:
          type: integer
        dest64:
          type: string
          contentEncoding: base64
        dest16:
          type: integer
        applyOptions:
          type: integer
        atCommand:
          type: string
      description: 'Frame type 0x17: Issue AT Command to remote node in mesh network.'
    ATCommandResponse_Telemetry:
      type: object
      properties:
        frameId:
          type: integer
        atCommand:
          type: string
        commandStatus:
          type: integer
      description: Device-initiated telemetry payload for ATCommandResponse
