Sha256: bfa9403d1d85936800104ec31b46d7eb101c25a379f045ba54b618dc30edc360

Contents?: true

Size: 1.13 KB

Versions: 2

Compression:

Stored size: 1.13 KB

Contents

# frozen_string_literal: true

module DjiMqttConnect
  module Thing::Product
    # https://developer.dji.com/doc/cloud-api-tutorial/en/faq.html#why-does-the-third-party-platform-experience-prolonged-wait-time-when-executing-one-key-takeoff-or-wayline-missions-on-the-dock
    class OfflineMapGetRequestsReplyMessage < Message
      def self.build_for(offline_map_get, result: 0)
        new(
          _method: offline_map_get._method,
          data: {
            result: result,
            output: {
              files: []
            }
          },
          tid: offline_map_get.tid,
          bid: offline_map_get.bid,
          timestamp: current_timestamp
        )
      end

      attribute :tid, Types::UUID
      attribute :bid, Types::UUID
      attribute :timestamp, Types::Timestamp

      attribute :_method, Types::String.enum("offline_map_get")
      attribute :data do
        include Mixins::ResultMessage

        attribute :result, Types::ResultCode

        # Debugging issues related to the offline map
        attribute :output do
          attribute :files, Types::Array.default([].freeze)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dji_mqtt_connect-0.1.24.1 lib/dji_mqtt_connect/messages/thing/product/requests_reply/offline_map_get.rb
dji_mqtt_connect-0.1.24 lib/dji_mqtt_connect/messages/thing/product/requests_reply/offline_map_get.rb