Method: OpenC3::Telemetry#update!

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

#update!(target_name, packet_name, packet_data) ⇒ Packet

Updates the specified packet with the given packet data. Raises an error if the packet could not be found.

Note: This affects all subsequent requests for the packet which is why the method is marked with a bang!

Parameters:

  • target_name (String)

    The target name

  • packet_name (String)

    The packet name. Must be a defined packet name and not ‘LATEST’.

Returns:

  • (Packet)

    The packet with its data set to the given packet_data buffer.



358
359
360
361
362
# File 'lib/openc3/packets/telemetry.rb', line 358

def update!(target_name, packet_name, packet_data)
  identified_packet = packet(target_name, packet_name)
  identified_packet.buffer = packet_data
  return identified_packet
end