module Pocosim
Base configuration class. If we are displaying samples, the work will be done by a DisplayConfig instance
Constants
- BLOCK_TYPES
- CONTROL_BLOCK
- CONTROL_SET_TIMEBASE
- CONTROL_SET_TIMEOFFSET
- DATA_BLOCK
- DATA_STREAM
- STREAM_BLOCK
- VERSION
Public Class Methods
big_endian?()
click to toggle source
true if this machine is big endian
# File lib/pocolog.rb, line 23 def self.big_endian? "LAAS".unpack('L').pack('N') == "LAAS" end
file_stream(file_name, stream_name)
click to toggle source
Returns the stream called stream_name from file
# File lib/pocolog/file.rb, line 982 def self.file_stream(file_name, stream_name) file = Logfiles.open(file_name) file.stream(stream_name) end
Public Instance Methods
create_aligner(s0_data, s1_data)
click to toggle source
# File test/test_stream_aligner.rb, line 172 def create_aligner(s0_data, s1_data) FileUtils.rm_f 'test.0.log' FileUtils.rm_f 'test.0.idx' logfile = Pocolog::Logfiles.create('test') s0 = logfile.stream('s0', 'double', true) s0_data.each do |v| s0.write(Time.at(v * 10), Time.at(v * 10), v) end s1 = logfile.stream('s1', 'double', true) s1_data.each do |v| s1.write(Time.at(v * 10), Time.at(v * 10), v) end logfile.close logfile = Pocolog::Logfiles.open('test.0.log') s0 = logfile.stream('s0') s1 = logfile.stream('s1') aligner = StreamAligner.new(false, s0, s1) return aligner, s0, s1 end