Class: DjiMqttConnect::Message

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/dji_mqtt_connect/message.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.current_timestampObject



10
11
12
# File 'lib/dji_mqtt_connect/message.rb', line 10

def self.current_timestamp
  Integer(Time.now.strftime("%s%L"))
end

.generate_bidObject



14
15
16
# File 'lib/dji_mqtt_connect/message.rb', line 14

def self.generate_bid
  SecureRandom.uuid
end

.generate_tidObject



18
19
20
# File 'lib/dji_mqtt_connect/message.rb', line 18

def self.generate_tid
  SecureRandom.uuid
end

Instance Method Details

#to_sObject



22
23
24
# File 'lib/dji_mqtt_connect/message.rb', line 22

def to_s
  self.class.name
end