Method: OpenC3::Commands#packet
- Defined in:
- lib/openc3/packets/commands.rb
#packet(target_name, packet_name) ⇒ Packet
Returns The command packet for the given target and packet name.
76 77 78 79 80 81 82 |
# File 'lib/openc3/packets/commands.rb', line 76 def packet(target_name, packet_name) target_packets = packets(target_name) packet = target_packets[packet_name.to_s.upcase] raise "Command packet '#{target_name.to_s.upcase} #{packet_name.to_s.upcase}' does not exist" unless packet packet end |