class Pocolog::Logfiles::StreamInfo

Basic information about a stream, as saved in the index files

Constants

STREAM_INFO_VERSION

Attributes

declaration_block[RW]

Position of the declaration block as [raw_pos, io_index]. This information can directly be given to Pocolog::Logfiles#seek

index[RW]

The index data itself. This is a instance of StreamIndex

interval_io[RW]

The position of the first and last samples in the file set, as [[raw_pos, io_index], [raw_pos, io_index]]. It is empty for empty streams.

interval_lg[RW]

The logical time of the first and last samples of that stream [beginning, end]. It is empty for empty streams.

interval_rt[RW]

The real time of the first and last samples of that stream [beginning, end]. It is empty for empty streams.

size[RW]

The number of samples in this stream

version[RW]

the version of the StreamInfo class. This is only used to detect if an old index file is on the disk compared to the code

Public Class Methods

new() click to toggle source
# File lib/pocolog/file.rb, line 484
def initialize
    @version = STREAM_INFO_VERSION
    @interval_io = []
    @interval_lg = []
    @interval_rt = []
    @size        = 0
    @index       = StreamIndex.new()
end

Public Instance Methods

empty?() click to toggle source

True if this stream is empty

# File lib/pocolog/file.rb, line 482
def empty?; size == 0 end