Method: OpenC3::PacketParser.check_for_duplicate

Defined in:
lib/openc3/packets/parsers/packet_parser.rb

.check_for_duplicate(type, list, packet) ⇒ Object



106
107
108
109
110
111
112
113
114
115
# File 'lib/openc3/packets/parsers/packet_parser.rb', line 106

def self.check_for_duplicate(type, list, packet)
  msg = nil
  if list[packet.target_name]
    if list[packet.target_name][packet.packet_name]
      msg = "#{type} Packet #{packet.target_name} #{packet.packet_name} redefined."
      Logger.instance.warn msg
    end
  end
  msg
end