Method: OpenC3::Telemetry#identify!
- Defined in:
- lib/openc3/packets/telemetry.rb
#identify!(packet_data, target_names = nil) ⇒ Packet
Identifies an unknown buffer of data as a defined packet and sets the packet’s data to the given buffer. Identifying a packet uses the fields marked as ID_ITEM to identify if the buffer passed represents the packet defined. Incorrectly sized buffers are still processed but an error is logged.
Note: This affects all subsequent requests for the packet (for example using packet) which is why the method is marked with a bang!
267 268 269 270 271 |
# File 'lib/openc3/packets/telemetry.rb', line 267 def identify!(packet_data, target_names = nil) identified_packet = identify(packet_data, target_names) identified_packet.buffer = packet_data if identified_packet return identified_packet end |