Class: DjiMqttConnect::Thing::Product::EventsMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/dji_mqtt_connect/messages/thing/product/events_message.rb

Instance Method Summary collapse

Methods inherited from Message

current_timestamp, generate_bid, generate_tid

Instance Method Details

#flight_idsObject

All the flight IDs in the message



34
35
36
# File 'lib/dji_mqtt_connect/messages/thing/product/events_message.rb', line 34

def flight_ids
  []
end

#humanized_summaryObject



25
26
27
# File 'lib/dji_mqtt_connect/messages/thing/product/events_message.rb', line 25

def humanized_summary
  Translations.thing_product_events_summary(_method, **humanized_summary_interpolation)
end

#humanized_summary_interpolationObject



29
30
31
# File 'lib/dji_mqtt_connect/messages/thing/product/events_message.rb', line 29

def humanized_summary_interpolation
  data.to_h.merge(method: _method, flight_ids: flight_ids.join(", "))
end

#need_reply?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/dji_mqtt_connect/messages/thing/product/events_message.rb', line 21

def need_reply?
  need_reply == 1
end

#to_sObject



38
39
40
41
# File 'lib/dji_mqtt_connect/messages/thing/product/events_message.rb', line 38

def to_s
  # Include data method for Generic messages
  instance_of?(EventsMessage) ? "#{super}[#{_method}]" : super
end