Method: OpenC3::PacketLogReader#open
- Defined in:
- lib/openc3/logs/packet_log_reader.rb
#open(filename) ⇒ Boolean, Exception
Returns true if successfully changed to configuration specified in log, otherwise returns false and potentially an Exception class if an error occurred. If no error occurred false indicates that the requested configuration was simply not found.
91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/openc3/logs/packet_log_reader.rb', line 91 def open(filename) close() reset() @filename = filename @file = BufferedFile.open(@filename, 'rb') @max_read_size = @file.size @max_read_size = MAX_READ_SIZE if @max_read_size > MAX_READ_SIZE return read_file_header() rescue => err close() raise err end |