Method: OpenC3::UnixTimeConversion#initialize

Defined in:
lib/openc3/conversions/unix_time_conversion.rb

#initialize(seconds_item_name, microseconds_item_name = nil, seconds_type = 'RAW', microseconds_type = 'RAW') ⇒ UnixTimeConversion

Initializes the time item to grab from the packet

Parameters:

  • seconds_item_name (String)

    The telemetry item in the packet which represents the number of seconds since the UNIX time epoch

  • microseconds_item_name (String) (defaults to: nil)

    The telemetry item in the packet which represents microseconds



34
35
36
37
38
39
40
41
42
# File 'lib/openc3/conversions/unix_time_conversion.rb', line 34

def initialize(seconds_item_name, microseconds_item_name = nil, seconds_type = 'RAW', microseconds_type = 'RAW')
  super()
  @seconds_item_name = seconds_item_name
  @microseconds_item_name = microseconds_item_name
  @converted_type = :RUBY_TIME
  @converted_bit_size = 0
  @seconds_type = seconds_type.to_sym
  @microseconds_type = microseconds_type.to_sym
end