transport_packet() { |
|
sync_byte |
(8) |
transport_error_indicator |
(1) |
transport_unit_start_indicator |
(1) |
transport_priority |
(1) |
PID |
(13) |
transport_scrambling_control |
(2) |
adaptation_field_control |
(2) |
continuity_counter |
(4) |
if(adaptation_field_control == '10' || adaptation_field_control == '11') { |
|
adaptation_field() |
|
} |
|
if(adaptation_field_control == '01' || adaptation_field_control == 11') { |
|
for(i = 0; i < N; i++) { |
|
data_byte |
|
} |
|
|
|
|
|
|
|
sync_byte (8)
the sync_byte is a fixed 8-bit field whose value is '0100 0111'(0x47). Sync_byte emulation in the choice of values for other regularly occurring fields, such as
PID, should be avoided.