Class: OpenC3::TelemetryReducedDayTopic

Inherits:
Topic show all
Defined in:
lib/openc3/topics/telemetry_reduced_topics.rb

Class Method Summary collapse

Methods inherited from Topic

clear_topics, get_cnt, method_missing

Class Method Details

.write(target_name:, packet_name:, stored:, time:, data:, id: nil, scope:) ⇒ Object



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/openc3/topics/telemetry_reduced_topics.rb', line 64

def self.write(target_name:, packet_name:, stored:, time:, data:, id: nil, scope:)
  OpenC3.in_span("write") do
    # Write to stream
    msg_hash = {
      :time => time,
      :stored => stored.to_s,
      :target_name => target_name,
      :packet_name => packet_name,
      :json_data => data,
    }
    topic = "#{scope}__REDUCED_DAY__{#{target_name}}__#{packet_name}"
    offset = Topic.write_topic(topic, msg_hash, id)
    return topic, offset
  end
end