Class: Pocolog::BlockStream::BlockHeader

Inherits:
Struct
  • Object
show all
Defined in:
lib/pocolog/block_stream.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



160
161
162
# File 'lib/pocolog/block_stream.rb', line 160

def kind
  @kind
end

#payload_sizeObject

Returns the value of attribute payload_size

Returns:

  • (Object)

    the current value of payload_size



160
161
162
# File 'lib/pocolog/block_stream.rb', line 160

def payload_size
  @payload_size
end

#raw_dataObject

Returns the value of attribute raw_data

Returns:

  • (Object)

    the current value of raw_data



160
161
162
# File 'lib/pocolog/block_stream.rb', line 160

def raw_data
  @raw_data
end

#stream_indexObject

Returns the value of attribute stream_index

Returns:

  • (Object)

    the current value of stream_index



160
161
162
# File 'lib/pocolog/block_stream.rb', line 160

def stream_index
  @stream_index
end

Class Method Details

.parse(raw_header) ⇒ Object



161
162
163
164
# File 'lib/pocolog/block_stream.rb', line 161

def self.parse(raw_header)
    type, index, payload_size = raw_header.unpack('CxvV')
    new(type, index, payload_size, raw_header)
end