# frozen_string_literal: true module DjiMqttConnect module Thing::Product class OsdMessage < DjiMqttConnect::Message attribute :tid, Types::UUID attribute :bid, Types::UUID attribute :timestamp, Types::Timestamp # Can be determined from the topic, but included for convenience attribute :gateway, Types::SerialNumber # Backup of received data attribute :_data, Types::Hash attribute :data, Types::Hash.default({}.freeze) def humanized_summary Translations.thing_product_osd_summary(**humanized_summary_interpolation) end def humanized_summary_interpolation data.to_h end end end end