module RubyTDMS::Streaming
Public Instance Methods
read_bool()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 15 def read_bool read(1) != "\000" end
read_double()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 100 def read_double read(8).unpack('E')[0] end
read_double_be()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 105 def read_double_be read(8).unpack('G')[0] end
read_i16()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 60 def read_i16 read(2).unpack('s<')[0] end
read_i16_be()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 65 def read_i16_be read(2).unpack('s>')[0] end
read_i32()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 70 def read_i32 read(4).unpack('l<')[0] end
read_i32_be()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 75 def read_i32_be read(4).unpack('l>')[0] end
read_i64()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 80 def read_i64 read(8).unpack('q<')[0] end
read_i64_be()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 85 def read_i64_be read(8).unpack('q>')[0] end
read_i8()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 55 def read_i8 read(1).unpack('c')[0] end
read_property(big_endian)
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 6 def read_property(big_endian) name = read_utf8_string type_id = read_u32 data = DataTypes.find_by_id(type_id).read_from_stream self, big_endian Property.new name, data end
read_single()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 90 def read_single read(4).unpack('e')[0] end
read_single_be()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 95 def read_single_be read(4).unpack('g')[0] end
read_timestamp()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 116 def read_timestamp positive_fractions_of_second = read_u64 # ignored seconds_since_labview_epoch = read(8).unpack('q<')[0] labview_epoch = ::DateTime.new(1904, 1, 1) labview_epoch + Rational(seconds_since_labview_epoch, 86400) end
read_u16()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 25 def read_u16 read(2).unpack('S<')[0] end
read_u16_be()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 30 def read_u16_be read(2).unpack('S>')[0] end
read_u32()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 35 def read_u32 read(4).unpack('L<')[0] end
read_u32_be()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 40 def read_u32_be read(4).unpack('L>')[0] end
read_u64()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 45 def read_u64 read(8).unpack('Q<')[0] end
read_u64_be()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 50 def read_u64_be read(8).unpack('Q>')[0] end
read_u8()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 20 def read_u8 read(1).unpack('C')[0] end
read_utf8_string()
click to toggle source
# File lib/ruby_tdms/streaming.rb, line 110 def read_utf8_string length = read_u32 read length end