Method: OpenC3::LimitsParser.parse

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

.parse(parser, packet, cmd_or_tlm, item, warnings) ⇒ Object

Parameters:

  • parser (ConfigParser)

    Configuration parser

  • packet (Packet)

    The current packet

  • cmd_or_tlm (String)

    Whether this is a command or telemetry packet

  • item (PacketItem)

    The packet item to create limits on

  • warnings (Array<String>)

    Array of string warnings which will be appended with any warnings found when parsing the limits



31
32
33
34
35
36
37
# File 'lib/openc3/packets/parsers/limits_parser.rb', line 31

def self.parse(parser, packet, cmd_or_tlm, item, warnings)
  raise parser.error("Items with STATE can't define LIMITS") if item.states

  parser = LimitsParser.new(parser)
  parser.verify_parameters(cmd_or_tlm)
  parser.create_limits(packet, item, warnings)
end