Class: TSparser::TransportPacket

Inherits:
Object
  • Object
show all
Includes:
Parsing
Defined in:
lib/definition/transport_packet.rb

Overview

Define data-structure of transport packet. This is following

iso13818-1, 2.4.3.2, Table2-2 and 2.4.3.5, Table2-6 (adaptation field).

Instance Method Summary collapse

Methods included from Parsing

included, #initialize, #method_missing, #read, #rest_all

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TSparser::Parsing

Instance Method Details

#pidObject

Especial parsing of PID for fast calculation.



31
32
33
# File 'lib/definition/transport_packet.rb', line 31

def pid
  return @pid ||= (@binary.b(1, 0..4) << 8) + @binary.b(2)
end