Putting It All Together

Now that we've seen most of the major parts of ATSC service information, there is still one part that is missing. In order to increase efficiency in the receiver, another table - the Master Guide Table (MGT) - contains references to all of the various tables that we have already seen.

The MGT provides a detailed description of all of the other tables in the system - which tables are present, the PIDs on which they are transmitted and the size in bytes of each table. This lets the receiver allocate memory appropriately before it actually starts parsing the tables (and also means that it knows which tables to look for). Why is this useful? As any experienced software developer will tell you, programming an embedded system can sometimes be a complicated matter of juggling memory - not allocating too much (which wastes memory that the rest of the system may need), but not allocating too little either (which then forces you to allocate more, and copy data around and generally waste time that could be spent doing more productive things).

By providing this information, the MGT gives the receiver a helping hand to parse the SI data as efficiently as possible. And as any software developer will tell you, that is always appreciated.

An example of the MGT looks like this:

An example of the Master Guide Table
Table type PID Version Size (bytes)
VCT 0x101 12 1424
EIT-0 0x102 2 6421
EIT-1 0x202 1 6403
EIT-2 0x203 5 6399
ETT 0x204 10 6314
RRT 0x301 4 233

As with the VCT and the RRT, the MGT is carried on PID number 0x1FFB - this lets the receiver decode these common tables in an efficient way, since only one PID needs to be monitored. The sections containing the MGT have the following structure:

Format of the Master Guide Table. Source: ATSC A/65b (PSIP Specification)
Syntax No. of bits Format
master_guide_table_section () {
table_id 8 0xC7
section_syntax_indicator 1 '1'
private_indicator 1 '1'
reserved 2 '11'
section_length 12 uimsbf
table_id_extension 16 0x0000
reserved 2 '11'
version_number 5 uimsbf
current_next_indicator 1 '1'
section_number 8 0x00
last_section_number 8 0x00
protocol_version 8 uimsbf
tables_defined 16 uimsbf
for (i = 0; i < tables_defined; i++) {
table_type 16 uimsbf
reserved 3 '111'
table_type_PID 13 uimsbf
reserved 3 '111'
table_version_number 5 uimsbf
number_bytes 32 uimsbf
reserved 4 '1111'
table_type_descriptors_length 12 uimsbf
for (k = 0; k < N; k++) {
descriptor()
}
}
reserved 4 '1111'
descriptors_length 12 uimsbf
for (l = 0; l < N; l++) {
descriptor()
}
CRC_32 32 rpchof
}

Telling the time correctly

Having all of this event information can be very useful, but it's only useful under the right circumstances: if the receiver doesn't know the correct time, having all of the information about when events start and finish is a bit pointless. To make sure that all of the receivers have the correct time, the network operator broadcasts a time reference. This is contained in the System Time Table (STT), and tells the receiver a number of things. The first, and most obvious one is the time - that's the whole point of the table, after all. This is broadcast as the number of GPS seconds since midnight on January 6th, 1980, and is measured as UTC (GMT) time. Since this is not always useful, the GPS_UTC_offset field tells the receiver what time zone it's currently in.

The STT also contains a structure telling the receiver whether daylight savings time should be applied. This tells the receiver three things: whether it is currently in daylight savings time or not, the day at which it should change its daylight savings setting, and the time at which it should do so. In the month that daylight settings time will start or end, the table contains this information to tell the receiver exactly when to change: at other times, these two fields are set to zero.

The full structure of the system time table is as follows:

Format of the System Time Table. Source: ATSC A/65b (PSIP Specification)
Syntax No. of bits Format
system_time_table_section () {
table_id 8 0xCD
section_syntax_indicator 1 '1'
private_indicator 1 '1'
reserved 2 '11'
section_length 12  
table_id_extension 16 0x0000
reserved 2 '11'
version_number 5 '00000'
current_next_indicator 1 '1'
section_number 8 0x00
last_section_number 8 0x00
protocol_version 8 uimsbf
system_time 32 uimsbf
GPS_UTC_offset 8 uimsbf
daylight_savings 16 uimsbf
for (i = 0; i < N; i++) {
descriptor()
}
CRC_32 32 rpchof
}