Method: OpenC3::Interface#read_interface_base

Defined in:
lib/openc3/interfaces/interface.rb

#read_interface_base(data) ⇒ String

Called to read data and manipulate it until enough data is returned. The definition of ‘enough data’ changes depending on the protocol used which is why this method exists. This method is also used to perform operations on the data before it can be interpreted as packet data such as decryption. After this method is called the post_read_data method is called. Subclasses must implement this method.

Returns:

  • (String)

    Raw packet data



450
451
452
453
454
455
# File 'lib/openc3/interfaces/interface.rb', line 450

def read_interface_base(data)
  @read_raw_data_time = Time.now
  @read_raw_data = data.clone
  @bytes_read += data.length
  @raw_logger_pair.read_logger.write(data) if @raw_logger_pair
end