Class: Cosmos::NewPacketLogProcessor

Inherits:
Processor show all
Defined in:
lib/cosmos/processors/new_packet_log_processor.rb

Instance Attribute Summary

Attributes inherited from Processor

#name, #results, #value_type

Instance Method Summary collapse

Methods inherited from Processor

#clone, #reset, #to_s

Constructor Details

#initialize(packet_log_writer_name = 'ALL') ⇒ NewPacketLogProcessor

Returns a new instance of NewPacketLogProcessor.

Parameters:

  • packet_log_writer_name (String) (defaults to: 'ALL')

    Name of the packet log writer to start new logs on



18
19
20
21
# File 'lib/cosmos/processors/new_packet_log_processor.rb', line 18

def initialize(packet_log_writer_name = 'ALL')
  super()
  @packet_log_writer_name = packet_log_writer_name
end

Instance Method Details

#call(packet, buffer) ⇒ Object

Create a new log file

See Processor#call



26
27
28
29
30
# File 'lib/cosmos/processors/new_packet_log_processor.rb', line 26

def call(packet, buffer)
  if CmdTlmServer.instance and $0 !~ /Replay/
    CmdTlmServer.instance.start_logging(@packet_log_writer_name)
  end
end