Sha256: 16d5057b6de7fb57fa5528787e40d621cf38be6aa6e204352a66c24a7ed8f852

Contents?: true

Size: 479 Bytes

Versions: 2

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true

require "json"

module DjiMqttConnect
  module Sys::Product
    class StatusReplyMarshal < MessageMarshal
      include Utils::MessageDumping

      # Converts a message for transmission via MQTT
      def dump(message)
        # Fix up the hash representation
        transformed_message = convert_message_to_hash(message)

        # Convert the transformed message into JSON
        JSON.generate(transformed_message)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dji_mqtt_connect-0.1.25.1 lib/dji_mqtt_connect/marshals/sys/product/status_reply_marshal.rb
dji_mqtt_connect-0.1.25 lib/dji_mqtt_connect/marshals/sys/product/status_reply_marshal.rb