Sha256: 42284a96e0fb2cfe0abf21337243f1df322070ff9d724e0e00d6db028ec5190c

Contents?: true

Size: 927 Bytes

Versions: 2

Compression:

Stored size: 927 Bytes

Contents

# frozen_string_literal: true

module DjiMqttConnect
  module Thing::Product
    class HmsEventsMessage < EventsMessage
      attribute :_method, Types::String.enum("hms")

      attribute :data do
        attribute :list, Types::Array do
          # {"0":"Inform","1":"Notice","2":"Alarm"}
          attribute :level, Types::Integer.enum(0, 1, 2)

          # {"0":"flight mission","1":"device management","2":"media","3":"hms"}
          attribute :module, Types::Integer.enum(0, 1, 2, 3)

          # {"0":"on the ground","1":"in the sky"}
          attribute :in_the_sky, Types::Integer.enum(0, 1)

          attribute :code, Types::String

          # {"0":"No","1":"Yes"}
          attribute :imminent, Types::Integer.enum(0, 1)

          attribute :args do
            attribute :component_index, Types::Integer

            attribute :sensor_index, Types::Integer
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dji_mqtt_connect-0.1.4.1 lib/dji_mqtt_connect/messages/thing/product/hms_events_message.rb
dji_mqtt_connect-0.1.4 lib/dji_mqtt_connect/messages/thing/product/hms_events_message.rb