Sha256: bf424d8b9307b38fedbd168ebd8e4c09fd1abf4feb83d897e83cf3bea6b0b9c1

Contents?: true

Size: 929 Bytes

Versions: 4

Compression:

Stored size: 929 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

4 entries across 4 versions & 1 rubygems

Version Path
dji_mqtt_connect-0.1.8 lib/dji_mqtt_connect/messages/thing/product/hms_events_message.rb
dji_mqtt_connect-0.1.7 lib/dji_mqtt_connect/messages/thing/product/hms_events_message.rb
dji_mqtt_connect-0.1.6 lib/dji_mqtt_connect/messages/thing/product/hms_events_message.rb
dji_mqtt_connect-0.1.5 lib/dji_mqtt_connect/messages/thing/product/hms_events_message.rb