Method: OpenC3::Telemetry#check_stale

Defined in:
lib/openc3/packets/telemetry.rb

#check_staleArray(Packet)

Iterates through all the telemetry packets and marks them stale if they haven’t been received for over the System.staleness_seconds value.

Returns:



376
377
378
379
380
381
382
383
384
385
386
387
388
# File 'lib/openc3/packets/telemetry.rb', line 376

def check_stale
  stale = []
  time = Time.now.sys
  @config.telemetry.each do |target_name, target_packets|
    target_packets.each do |packet_name, packet|
      if packet.received_time and (!packet.stale) and (time - packet.received_time > System.staleness_seconds)
        packet.set_stale
        stale << packet
      end
    end
  end
  stale
end