Class: Cosmos::TelemetryTopic
- Defined in:
- lib/cosmos/topics/telemetry_topic.rb
Class Method Summary collapse
Methods inherited from Topic
clear_topics, initialize_streams, read_topics, topics
Class Method Details
.write_packet(packet, scope:) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/cosmos/topics/telemetry_topic.rb', line 24 def self.write_packet(packet, scope:) msg_hash = { :time => packet.received_time.to_nsec_from_epoch, :stored => packet.stored, :target_name => packet.target_name, :packet_name => packet.packet_name, :received_count => packet.received_count, :buffer => packet.buffer(false), } Store.write_topic("#{scope}__TELEMETRY__{#{packet.target_name}}__#{packet.packet_name}", msg_hash) end |