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



143
144
145
# File 'lib/pocolog/block_stream.rb', line 143

def kind
  @kind
end

#payload_sizeObject

Returns the value of attribute payload_size

Returns:

  • (Object)

    the current value of payload_size



143
144
145
# File 'lib/pocolog/block_stream.rb', line 143

def payload_size
  @payload_size
end

#raw_dataObject

Returns the value of attribute raw_data

Returns:

  • (Object)

    the current value of raw_data



143
144
145
# File 'lib/pocolog/block_stream.rb', line 143

def raw_data
  @raw_data
end

#stream_indexObject

Returns the value of attribute stream_index

Returns:

  • (Object)

    the current value of stream_index



143
144
145
# File 'lib/pocolog/block_stream.rb', line 143

def stream_index
  @stream_index
end

Class Method Details

.parse(raw_header) ⇒ Object



144
145
146
147
# File 'lib/pocolog/block_stream.rb', line 144

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