Syntax No. of bits ----------------------------------------------------- service_descriptor_section() { table_id 8 uimsbf section_syntax_indicator 1 bslbf reserved_future_use 1 bslbf reserved 2 bslbf section_length 12 uimsbf transport_stream_id 16 uimsbf reserved 2 bslbf version_number 5 uimsbf current_next_indicator 1 bslbf section_number 8 uimsbf last_section_number 8 uimsbf original_network_id 16 reserved_future_use 8 for(i = 0;i < N;i++) { service_id 16 reserved_future_use 6 EIT_schedule_flag 1 EIT_present_following_flags 1 running_status 3 free_CA_mode 1 descriptors_loop_length 12 for(j = 0;j < N;j++) { descriptor() } } CRC_32 32 rpchof }
Syntax No. of bits ----------------------------------------------------- event_information_section() { table_id 8 uimsbf section_syntax_indicator 1 bslbf reserved_future_use 1 bslbf reserved 2 bslbf section_length 12 uimsbf service_id 16 uimsbf reserved 2 bslbf version_number 5 uimsbf current_next_indicator 1 bslbf section_number 8 uimsbf last_section_number 8 uimsbf transport_stream_id 16 original_network_id 16 segment_last_section_number 8 last_table_id 8 for(i = 0;i < N;i++) { event_id 16 start_time 40 duration 24 running_status 3 free_CA_mode 1 descriptors_loop_length 12 for(j = 0;j < N;j++) { descriptor() } } CRC_32 32 rpchof
Syntax No. of bits ----------------------------------------------------- service_descriptor() { descriptor_tag 8 /* = 0x48 */ descriptor_length 8 service_type 8 /* = 0x0C : data broadcast */ service_provider_name_length 8 for(i = 0;i < service_provider_name_length;i++) { text_char 8 } service_name_length 8 for(i = 0;i < service_name_length;i++) { text_char 8 } }
Syntax No. of bits ----------------------------------------------------- data_broadcast_descriptor() { descriptor_tag 8 /* = 0x64 */ descriptor_length 8 data_broadcast_id 16 /* = 0x0006 : data carousel */ component_tag 8 selector_length 8 /* = 0x10 */ { carousel_typ_id 2 /* = 0x02 : two layer carousel */ reserved 6 /* = 0x3F */ transaction_id 32 time_out_value_DSI 32 /* milliseconds */ time_out_value_DII 32 /* milliseconds */ reserved 2 /* 0x03 */ leak_rate 22 } ISO_639_language_code 24 text_length 8 for(i = 0;i < text_length;i++) { text_char 8 } }
data_broadcast_id값 | 설명 | |
0x0000 | reserved for future use | |
0x0001 | bit pipe | |
0x0002 | asynchronous data stream | |
0x0003 | synchronous data stream | |
0x0004 | synchronized data stream | |
0x0005 | multiprotocol encapsulation | |
0x0006 | data carousel | |
0x0007 | object carousel | |
0x0008 | DVB ATM streams | |
0x0009~0x00EF | reserved for future use by DVB | |
0x000A | system software update service | |
0x00F0~0x00FF | reserved for DVB MHP | |
0x0100~0xFFFE | reserved for registration | |
0xFFFF | reserved for future use |
carousel_typ_id값 | 설명 |
0x01 | one layer carousel |
0x02 | two layer carousel |
Syntax No. of bits ----------------------------------------------------- compatibilityDescriptor() { compatibilityDescriptorLength 16 descriptorCount 16 for(i = 0;i < descriptorCount;i++) { descriptorType 8 descriptorLength 8 specifierType 8 /* = 0x01 : IEEE OUI */ specifierData 24 model 16 version 16 subDescriptorCount 8 for(j = 0;j < subDescriptorCount;j++) { subDescriptor() } } } subDescriptor() { subDescriptorType 8 subDescriptorLength 8 for(k = 0;k < subDescriptorLength;k++) { additionalInformation 8 } }
descriptorType 값 | 설명 |
0x00 | Pad descriptor |
0x01 | System Hardware Descriptor |
0x02 | System Software Descriptor |
0x03~0x3F | ISO/IEC 13818-6 예약 |
0x40~0x7F | DVB에서 예약 |
0x80~0xFF | 사용자 정의 |
specifierType 값 | 설명 |
0x00 | ISO/IEC 13818-6 예약 |
0x01 | IEEE OUI |
0x02~0x7F | ISO/IEC 13818-6 예약 |
0x80~0xFF | 사용자 정의 |
downloadControlMessage() { dsmccMessageHeader() controlMessagePayload() }
downloadDataMessage() { dsmccDownloadDataHeader() dataMessagePayload() }
Syntax No. of bits ----------------------------------------------------- dsmccMessageHeader() { protocolDiscriminator 8 /* = 0x11 */ dsmccType 8 /* = 0x03 */ messageId 16 transactionId 32 reserved 8 /* = 0xFF */ adaptationLength 8 messageLength 16 if(adaptationLength > 0) { dsmccAdaptationHeader() } }
dsmccType 값 | 설명 |
0x00 | ISO/IEC 13818-6 예약 |
0x01 | User-to-Network configuration message |
0x02 | User-to-Network session message |
0x03 | Download message |
0x04 | SDB Channel Change Protocol message |
0x05 | User-to-Network pass-thru message |
0x06~0x7F | ISO/IEC 13818-6 예약 |
0x80~0xFF | 사용자 정의 message |
originator 값 | 설명 |
0x00 | transactionId는 Client에 의해서 할당 |
0x01 | transactionId는 Server에 의해서 할당 |
0x02 | transactionId는 Network에 의해서 할당 |
0x03 | ISO/IEC 13818-6에 의해 예약 |
Syntax No. of bits ----------------------------------------------------- dsmccAdaptationHeader() { adaptationType 8 for(i = 0;i < (adaptationLength - 1);i++) { adaptationDataByte 8 } }
adaptationType 값 | 설명 |
0x00 | ISO/IEC 13818-6 예약 |
0x01 | DSM-CC Conditional Access adaptation format |
0x02 | DSM-CC UserID adaptation format |
0x03~0x7F | ISO/IEC 13818-6 예약 |
0x80~0xFF | 사용자 정의 adaptationType |
Syntax No. of bits ----------------------------------------------------- dsmccConditionalAccess() { reserved 8 caSystemId 16 conditionalAccessLength 16 for(i = 0;i < conditionalAccessLength;i++) { conditionalAccessDataByte 8 } }
Syntax No. of bits ----------------------------------------------------- dsmccUserID() { reserved 8 userID 20 * 8 }
Syntax No. of bits ----------------------------------------------------- dsmccDownloadDataHeader() { protocolDiscriminator 8 /* = 0x11 */ dsmccType 8 /* = 0x03 */ messageId 16 downloadId 32 reserved 8 /* = 0xFF */ adaptationLength 8 messageLength 16 if(adaptationLength > 0) { dsmccAdaptationHeader() } }
Message name | messageId 값 | 설명 |
DownloadInfoRequest | 0x1001 | Client requests download parameters |
DownloadInfoResponse, DownloadInfoIndication | 0x1002 | Download Server provides download parameters |
DownloadDataBlock | 0x1003 | Download Server sends one download data block |
DownloadDataRequest | 0x1004 | Client acknowledges downloaded data blocks |
DownloadCancel | 0x1005 | Client or Download Server aborts the download scenario in progress |
DownloadServerInitiate | 0x1006 | Download Server requests Client to initiate a download |
Syntax No. of bits ----------------------------------------------------- DownloadInfoRequest() { dsmccMessageHeader() bufferSize 32 maximumBlockSize 16 compatibilityDescriptor() privateDataLength 16 for(i = 0;i < privateDataLength;i++) { privateDataByte 8 } }
Syntax No. of bits ----------------------------------------------------- DownloadInfoResponse(), DownloadInfoIndication() { dsmccMessageHeader() downloadId 32 blockSize 16 windowSize 8 ackPeriod 8 tCDownloadWindow 32 tCDownloadScenario 32 compatibilityDescriptor() numberOfModules 16 for(i = 0;i < numberOfModules;i++) { moduleId 16 moduleSize 32 moduleVersion 8 moduleInfoLength 8 for(i = 0;i < moduleInfoLength;i++) { moduleInfoByte 8 } } privateDataLength 16 for(i = 0;i < privateDataLength;i++) { privateDataByte 8 } }
Syntax No. of bits ----------------------------------------------------- DownloadDataBlock() { dsmccDownloadDataHeader() moduleId 16 moduleVersion 8 reserved 8 /* = 0xFF */ blockNumber 16 /* = 0 ~ 255 */ for(i = 0;i < N;i++) { blockDataByte 8 } }
Syntax No. of bits ----------------------------------------------------- DownloadDataRequest() { dsmccDownloadDataHeader() moduleId 16 blockNumber 16 downloadReason 8
Syntax No. of bits ----------------------------------------------------- DownloadCancel() { dsmccMessageHeader() downloadId 32 moduleId 16 blockNumber 16 downloadCancelReason 8 reserved 8 /* = 0xFF */ privateDataLength 16 for(i = 0;i < privateDataLength;i++) { privateDataByte 8 } }
Syntax No. of bits ----------------------------------------------------- DownloadServerInitiate() { dsmccMessageHeader() serverId 20 * 8 /* [0~20] = 0xFF */ compatibilityDescriptor() privateDataLength 16 for(i = 0;i < privateDataLength;i++) { privateDataByte 8 } }
Syntax No. of bits ----------------------------------------------------- GroupInfoIndication() { numberOfGroups 16 /* 최대 150 */ for(i = 0;i < numberOfGroups;i++) { groupId 32 groupSize 32 groupCompatibility() groupInfoLength 16 for(i = 0;i < N;i++) { groupInfoByte 8 } } privateDataLength 16 for(i = 0;i < privateDataLength;i++) { privateDataByte 8 } }
Descriptor name | Tag값 | DII의 moduleInfo에 사용가능유무 | DSI의 groupInfo에 사용가능유무 | 설명 |
reserved | 0x00 | |||
Type | 0x01 | M | M | type descriptor of data |
Name | 0x02 | R | R | name descriptor of data |
Info | 0x03 | O | O | textual description |
module_link | 0x04 | R | concatenated data module | |
CRC32 | 0x05 | M | Cyclic Redundancy Code (CRC) | |
Location | 0x06 | R | R | location of data |
est_download_time | 0x07 | O | O | estimated download time |
group_link | 0x08 | R | links DII messages descripting a group | |
compressed_module | 0x09 | M | indicates compression structure | |
SSU_module_type | 0x0A | O | DVB SSU | |
subgroup_association | 0x0B | O | DVB SSU |
Syntax No. of bits ----------------------------------------------------- type_descriptor() { /* moduleInfoByte(MANDATORY), groupInfoByte(MANDATORY) */ descriptor_tag 8 /* = 0x01 */ descriptor_length 8 for(i = 0;i < N;i++) { text_char 8 } }
Syntax No. of bits ----------------------------------------------------- name_descriptor() { /* moduleInfoByte(RECOMMENDED), groupInfoByte(RECOMMENDED) */ descriptor_tag 8 /* = 0x02 */ descriptor_length 8 for(i = 0;i < N;i++) { text_char 8 }
Syntax No. of bits ----------------------------------------------------- info_descriptor() { /* moduleInfoByte, groupInfoByte */ descriptor_tag 8 /* = 0x03 */ descriptor_length 8 ISO_639_language_code 24 for(i = 0;i < N;i++) { text_char 8 }
Syntax No. of bits ----------------------------------------------------- module_link_descriptor() { /* moduleInfoByte(RECOMMENDED) */ descriptor_tag 8 /* = 0x04 */ descriptor_length 8 position 8 module_id 16
Syntax No. of bits ----------------------------------------------------- CRC32_descriptor() { /* moduleInfoByte(MANDATORY) */ descriptor_tag 8 /* = 0x05 */ descriptor_length 8 CRC32 32 /* CRC32 over all data's in one DDB */ }
Syntax No. of bits ----------------------------------------------------- location_descriptor() { /* moduleInfoByte(RECOMMENDED), groupInfoByte(RECOMMENDED) */ descriptor_tag 8 /* = 0x06 */ descriptor_length 8 location_tag 8
Syntax No. of bits ----------------------------------------------------- est_download_time_descriptor() { /* moduleInfoByte, groupInfoByte */ descriptor_tag 8 /* = 0x07 */ descriptor_length 8 est_download_time 32 /* seconds */
Syntax No. of bits ----------------------------------------------------- group_link_descriptor() { /* groupInfoByte(RECOMMENDED) */ descriptor_tag 8 /* = 0x08 */ descriptor_length 8 position 8 group_id 32
Syntax No. of bits ----------------------------------------------------- Compressed_module_descriptor() { /* moduleInfoByte(MANDATORY) */ descriptor_tag 8 /* = 0x09 */ descriptor_length 8 compression_method 8 original_size 32
Syntax No. of bits ----------------------------------------------------- DSM-CC section() { table_id 8 uimsbf section_syntax_indicator 1 bslbf private_indicator 1 bslbf reserved 2 bslbf dsmcc_section_length 12 uimsbf table_id_extension 16 uimsbf reserved 2 bslbf version_number 5 uimsbf current_next_indicator 1 bslbf section_number 8 uimsbf last_section_number 8 uimsbf if(table_id == 0x3A) { /* DSM-CC Sections containing multi-protocol encapsulated data */ LLCSNAP() } else if(table_id == 0x3B) { /* DSM-CC Sections containing U-N Messages, except Download Data Messages */ userNetworkMessage() } else if(table_id == 0x3C) { /* DSM-CC Sections containing Download Data Messages */ downloadDataMessage() } else if(table_id == 0x3D) { /* DSM-CC Sections containing Stream Descriptors */ DSMCC_descriptor_list() { for(i = 0;i < N;i++) { stream_descriptor() } } } else if(table_id == 0x3E) { /* DSM-CC Sections containing private data */ for(i = 0;i < (dsmcc_section_length - 9);i++) { private_data_byte } } if(section_syntax_indicator == '0') { checksum 32 uimsbf } else { CRC_32 32 rpchof } }
typedef unsigned char hwport_uint8_t; typedef unsigned int hwport_uint32_t; hwport_uint32_t hwport_crc32_section(hwport_uint32_t s_seed, const void *s_data, size_t s_size) { size_t s_offset; hwport_uint8_t s_byte; int s_bit; int s_select; s_offset = (size_t)0u; while(s_offset < s_size) { s_byte = *(((const hwport_uint8_t *)s_data) + s_offset); for(s_bit = 0;s_bit < 8;s_bit++) { s_select = ((int)((s_seed >> 31) & ((hwport_uint32_t)1u))) ^ ((int)((s_byte >> (7 - s_bit)) & ((hwport_uint8_t)1u))); s_seed <<= 1; if(s_select != 0) { s_seed ^= (hwport_uint32_t)0x04C11DB7u; } } s_offset++; } return(s_seed); }