Class: DjiMqttConnect::Thing::Product::EventsMessage
- Inherits:
-
Message
- Object
- Dry::Struct
- Message
- DjiMqttConnect::Thing::Product::EventsMessage
show all
- Defined in:
- lib/dji_mqtt_connect/messages/thing/product/events_message.rb
Direct Known Subclasses
AirsenseWarningEventsMessage, CoverCloseEventsMessage, CoverOpenEventsMessage, DeviceExitHomingNotifyEventsMessage, DeviceLogEventsMessage, DeviceRebootEventsMessage, FileUploadCallbackEventsMessage, FileuploadProgressEventsMessage, FlightAreasDroneLocationEventsMessage, FlightAreasSyncProgressEventsMessage, FlighttaskProgressEventsMessage, FlighttaskReadyEventsMessage, HighestPriorityUploadFlighttaskMediaEventsMessage, HmsEventsMessage, OfflineMapSyncProgressEventsMessage, ReturnHomeInfoEventsMessage, StatusCodeEventsMessage, TakeoffToPointProgressEventsMessage, TrackEventsMessage
Instance Method Summary
collapse
Methods inherited from Message
current_timestamp, generate_bid, generate_tid
Instance Method Details
#flight_ids ⇒ Object
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_summary ⇒ Object
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_interpolation ⇒ Object
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
21
22
23
|
# File 'lib/dji_mqtt_connect/messages/thing/product/events_message.rb', line 21
def need_reply?
need_reply == 1
end
|
#to_s ⇒ Object
38
39
40
41
|
# File 'lib/dji_mqtt_connect/messages/thing/product/events_message.rb', line 38
def to_s
instance_of?(EventsMessage) ? "#{super}[#{_method}]" : super
end
|