Class: DjiMqttConnect::Thing::Product::FlightHubDockOsdMessage

Inherits:
OsdMessage
  • Object
show all
Defined in:
lib/dji_mqtt_connect/messages/thing/product/osd/flight_hub_dock.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OsdMessage

#humanized_summary_interpolation

Methods inherited from Message

current_timestamp, generate_bid, generate_tid, #to_s

Class Method Details

.matches?(parsed_message_data) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
10
11
12
# File 'lib/dji_mqtt_connect/messages/thing/product/osd/flight_hub_dock.rb', line 6

def self.matches?(parsed_message_data)
  parsed_message_data.key?("OrganizationUUID") &&
    parsed_message_data.dig("data", "host").is_a?(Hash) &&
    FlightHubDockOsdMessage::Data::Host.schema.keys.all? do |key|
      key.required? ? parsed_message_data.dig("data", "host").key?(key.name.to_s) : true
    end
end

Instance Method Details

#humanized_summaryObject



289
290
291
# File 'lib/dji_mqtt_connect/messages/thing/product/osd/flight_hub_dock.rb', line 289

def humanized_summary
  Translations.thing_product_flight_hub_dock_osd_summary(**humanized_summary_interpolation)
end