| 검색 | ?

Difference between r1.2 and the current

@@ -1,4 +1,5 @@
#keywords dsmcc,mpeg2,transport,ts,broadcast,13818,data,stream,ota,nvram
#title DSM-CC (Digital Storage Media Command and Control)
[wiki:Home 대문] / [wiki:CategoryBroadcast 방송] / [wiki:DSMCC DSM-CC (Digital Storage Media Command and Control)]
----
== [wiki:DSMCC DSM-CC (Digital Storage Media Command and Control)] ==
@@ -8,8 +9,7 @@
* 고친과정
2010년 7월 5일 : 처음씀 (작성 진행중)

||[[TableOfContents]] ||
[[TableOfContents]]
=== 시작하기전에 ===
이 문서에서 다루는 내용은 ISO/IEC 13818에서 다루고 있는 Data broadcasting에 대한 주제이며 이것의 연장선에서 봤을때 DVB 및 여러 방송매체에서 다루는 여러 확장사항을 두서없이 열거하는식으로 서술합니다. 개인적인 해석관점에서 작성되었으므로 실제 사양과 불일치하는 부분도 있을수 있습니다. 틀린부분이나 기타 개선이 필요한 부분은 지적해주시면 감사하겠습니다.

@@ -19,7 +19,6 @@
* 비 휘발성 memory이고 수정도 가능하지만 주로 설정이나 임시적인 자료 및 수행중에 발생되는 정보를 담고 있는 용도로 사용되는 형태의 memory를 NV-RAM이라고 지칭하겠습니다.
* Transport stream을 해석하여 서비스를 제공하는 Client부분을 Terminal장치라고 부르겠습니다.
* 기타 대부분의 용어는 ISO/IEC 13818-1에서 참고할수 있거나 그에 준하는 용어를 사용하려고 노력하여 작성하겠습니다.
=== 개요 ===
* [wiki:DSMCC DSM-CC (Digital Storage Media Command and Control)]는 Client-Network-Server에 기초한 커뮤니티를 위해서 크게 두가지의 Protocol을 정의하고 있습니다. 여기서 Server와 Client를 모두 Network관점에서는 User라고 볼수 있다고 정의하여 분류하게 됩니다.
1. U-N (User-Network) : User와 Network은 Client와 SRM(Session and Resource Manager) 그리고 Server와 SRM(Session and Resource Manager)간의 message 흐름을 나타낼수 있으며 다음과 같은 message들로 나뉘어 집니다.
@@ -53,7 +52,6 @@
* Server User-to-User Entity
* Server User-to-Network Entity
* SRM User-to-Network Entity
=== Data carousel ===
|| [attachment:dsmcc_layer.png] ||
* Data carousel은 "One-layer data carousel"과 "Two-layer data carousel"로 나뉘어 정의됩니다.
@@ -84,7 +82,6 @@
1. "data broadcast descriptor"에 의해서 DownloadServerInitiate(DSI) message의 일치하는 transactionId를 찾습니다.
1. DownloadServerInitiate(DSI) message내의 GroupInfoIndication(GroupInfoByte)에서 일치하는 식별자를 찾은 경우 DownloadInfoIndication(DII) message의 transactionId가 GroupId와 같은 것을 찾습니다.
1. DownloadDataBlock(DDB)를 download합니다.
=== Service Descriptor Section (SDT) / Event Information Section (EIT) ===
{{{#!plain
Syntax No. of bits
@@ -212,7 +209,6 @@
||<bgcolor="gray"> carousel_typ_id값 ||<bgcolor="gray"> 설명 ||
||<bgcolor="yellow"> 0x01 ||one layer carousel ||
||<bgcolor="yellow"> 0x02 ||two layer carousel ||
=== compatibilityDescriptor ===
{{{#!plain
Syntax No. of bits
@@ -256,7 +252,6 @@
||<bgcolor="yellow"> 0x01 ||IEEE OUI ||
||<bgcolor="yellow"> 0x02~0x7F ||ISO/IEC 13818-6 예약 ||
||<bgcolor="yellow"> 0x80~0xFF ||사용자 정의 ||
=== [wiki:DSMCC DSM-CC (Digital Storage Media Command and Control)] Download Control Message ===
{{{#!plain
downloadControlMessage() {
@@ -264,7 +259,6 @@
controlMessagePayload()
}
}}}
=== [wiki:DSMCC DSM-CC (Digital Storage Media Command and Control)] Download Data Message ===
{{{#!plain
downloadDataMessage() {
@@ -272,7 +266,6 @@
dataMessagePayload()
}
}}}
=== [wiki:DSMCC DSM-CC (Digital Storage Media Command and Control)] Message Header ===
{{{#!plain
Syntax No. of bits
@@ -309,7 +302,6 @@
||<bgcolor="yellow"> 0x01 ||transactionId는 Server에 의해서 할당 ||
||<bgcolor="yellow"> 0x02 ||transactionId는 Network에 의해서 할당 ||
||<bgcolor="yellow"> 0x03 ||ISO/IEC 13818-6에 의해 예약 ||
=== [wiki:DSMCC DSM-CC (Digital Storage Media Command and Control)] Adaptation Header ===
{{{#!plain
Syntax No. of bits
@@ -349,7 +341,6 @@
userID 20 * 8
}
}}}
=== [wiki:DSMCC DSM-CC (Digital Storage Media Command and Control)] Download Data Header ===
{{{#!plain
Syntax No. of bits
@@ -367,7 +358,6 @@
}
}
}}}
=== [wiki:DSMCC DSM-CC (Digital Storage Media Command and Control)] Download messageId ===
||<bgcolor="gray"> Message name ||<bgcolor="gray"> messageId 값 ||<bgcolor="gray"> 설명 ||
||<bgcolor="yellow">DownloadInfoRequest ||0x1001 ||Client requests download parameters ||
@@ -504,7 +494,6 @@
}
}
}}}
=== moduleInfoByte, groupInfoByte (DownloadInfoIndication, DownloadServerInitiate descriptors) ===
||<bgcolor="gray"> Descriptor name ||<bgcolor="gray"> Tag값 ||<bgcolor="gray"> DII의 moduleInfo에 사용가능유무 ||<bgcolor="gray"> DSI의 groupInfo에 사용가능유무 ||<bgcolor="gray"> 설명 ||
||<bgcolor="yellow">reserved ||0x00 || || || ||
@@ -649,10 +638,9 @@
}
}
}}}
=== CRC32 (Cyclic Redundancy Code) Pseudo-code ===
* Section에 대한 CRC_32검사구간은 table_id부터 CRC_32를 제외한 나머지모두이며 아래의 함수에서 초기 s_seed값은 0FFFFFFFFH로 시작하여 계산과정을 진입하여야 합니다.
{{{#!plain
{{{#!enscript c
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)
@@ -680,7 +668,6 @@
return(s_seed);
}
}}}
=== 참고문헌 ===
* ISO/IEC 13818-1 (Generic coding of moving pictures and associated audio information; Part 1: Systems)
* ISO/IEC 18318-6 (Extensions for DSM-CC)
@@ -689,6 +676,5 @@
* ETSI TS 102 006 (Specification for System Software Update in DVB Systems)
* ETSI TR 101 202 (Implementation guidelines for Data Broadcasting)
* Technical Specification of a European Cable Modem (ECCA EuroModem Specification) Version 1.0





대문 / 방송 / DSM-CC (Digital Storage Media Command and Control)

DSM-CC (Digital Storage Media Command and Control)

1.1. 시작하기전에

이 문서에서 다루는 내용은 ISO/IEC 13818에서 다루고 있는 Data broadcasting에 대한 주제이며 이것의 연장선에서 봤을때 DVB 및 여러 방송매체에서 다루는 여러 확장사항을 두서없이 열거하는식으로 서술합니다. 개인적인 해석관점에서 작성되었으므로 실제 사양과 불일치하는 부분도 있을수 있습니다. 틀린부분이나 기타 개선이 필요한 부분은 지적해주시면 감사하겠습니다.

  • Software에 의해서 사용되는 휘발성 memory는 RAM이라고 지칭하겠습니다.
  • 비 휘발성 memory이고 수정이 가능한 형태의 memory를 FLASH라고 지칭하겠습니다.
  • 비 휘발성 memory이고 수정이 불가능한 형태의 memory를 ROM이라고 지칭하겠습니다.
  • 비 휘발성 memory이고 수정도 가능하지만 주로 설정이나 임시적인 자료 및 수행중에 발생되는 정보를 담고 있는 용도로 사용되는 형태의 memory를 NV-RAM이라고 지칭하겠습니다.
  • Transport stream을 해석하여 서비스를 제공하는 Client부분을 Terminal장치라고 부르겠습니다.
  • 기타 대부분의 용어는 ISO/IEC 13818-1에서 참고할수 있거나 그에 준하는 용어를 사용하려고 노력하여 작성하겠습니다.

1.2. 개요

  • DSM-CC (Digital Storage Media Command and Control)는 Client-Network-Server에 기초한 커뮤니티를 위해서 크게 두가지의 Protocol을 정의하고 있습니다. 여기서 Server와 Client를 모두 Network관점에서는 User라고 볼수 있다고 정의하여 분류하게 됩니다.
    1. U-N (User-Network) : User와 Network은 Client와 SRM(Session and Resource Manager) 그리고 Server와 SRM(Session and Resource Manager)간의 message 흐름을 나타낼수 있으며 다음과 같은 message들로 나뉘어 집니다.
      • DSM-CC Message Header
      • U-N Configuration messages
      • U-N Session messages and flow diagrams for Session and Resource management
      • U-N Download messages
      • U-N Switched Digital Broadcast Channel Change Protocol
      • U-N Pass Thru messages
      • The transport of DSM-CC U-N messages using ISO/IEC 13818-1
      • The transport of generic IP messages using DSM-CC sections and ISO/IEC 13818-1
    2. U-U (User-User) : Server와 Client간에 상호작용하도록 하는 User간 message이며 다음과 같은 message들로 나뉘어 집니다.
      • U-U Remote Procedure Call (RPC)
      • U-U Session interface
      • U-U Download interface
      • U-U Object Carousel interface
      • U-U Local Object interface
      • U-U Stream Descriptors
  • DSM-CC (Digital Storage Media Command and Control)는 Network에 대하여 Protocol stack상에서의 물리계층, 데이터링크계층, 전송계층, RPC계층을 정의하지는 않지만 이에 필요한 사항들은 정의하고 있습니다.
  • DSM-CC (Digital Storage Media Command and Control)는 Connection type으로 두가지는 지원합니다.
    1. Point-to-point
      • User-to-User application과 서비스교류문맥들이 이 Connection type에 실리게 됩니다.
    2. Point-to-multi-point (Broadcast)
      • 하나의 stream을 다수의 client로 전송할때 사용합니다.
      • 이 경우 하나가 아닌 client는 수신한 bit stream에 대한 제어를 하게 됩니다. (예를 들어서 일시정지나 빠른되감기를 위한 제어)
      • Network에서는 "Switched Digital Broadcast(SDB)"와 같이 stream을 전환하게 되는데 "SDB channel change protocol (SDB-CCP)"를 사용하여 Client들간의 전환을 제공합니다.
      • SDB-CCP의 경우 강력한 지불수단이나 보다 가까운 Video-on-demand같이 Application에 유용하게 사용될수 있습니다.
  • DSM-CC (Digital Storage Media Command and Control) System Reference Model에서는 그 환경을 세분화 하여 System, Subsystem, Entity, Sub-entity로 정의합니다. Subsystem은 하나의 Entity에 많은것이 포함될수 있고 그것은 다음과 같습니다. 여기서 DSM-CC의 신호는 항상 Subsystem entity들 사이에서 교환합니다.
    • Client User-to-User Entity
    • Client User-to-Network Entity
    • Server User-to-User Entity
    • Server User-to-Network Entity
    • SRM User-to-Network Entity

1.3. Data carousel

  • Data carousel은 "One-layer data carousel"과 "Two-layer data carousel"로 나뉘어 정의됩니다.
    • SDT/EIT내의 data_broadcast_descriptor에서 이를 구별할수 있습니다.
    • Software download는 Module 0의 download로부터 시작되며 Module 0은 하나의 DownloadDataBlock(DDB)으로 구성되어 지도록 권장합니다.
    • Module 0는 실행가능한 loader부분이 존재할수 있고 기타 여러 보안상의 이유로 RAM으로만 수신하도록 합니다. (즉, Module 0를 제외한 나머지 부분은 FLASH로 직접 저장될수 있는것을 허용한다는 뜻)
    • 하나의 DownloadDataBlock(DDB)크기는 최소 약 ~4KBytes에서 최대 약 1MBytes까지 될수 있습니다.
      • blockNumber는 0~255를 순환하는 값으로 Encoding하도록 정의되기 때문에 하나의 section내의 block크기는 4066bytes가 최대이고 256개의 block이 모여서 하나의 DDB를 이룰경우 최대 4066 * 256 = 약 1Mbytes 미만으로 그 크기에 제한이 생기게 됩니다.
    • moduleId 0xFFF0~0xFFFF은 DAVIC(Digital Audio VIsual Council) 계열 application에 의해서 예약되어 있습니다.
    • data carousel은 PMT에서 stream_type이 0x0B인것으로 찾을수 있습니다. Terminal 장치는 반드시 PMT의 stream_type을 확인하여야 하겠습니다.
    • DVB에서는 DownloadInfoIndication(DII) message가 변경이 일어나야 하는 경우에는 transactionId은 값이 증가하여 새로운 값으로 제시되어야 합니다. (이 사항은 "ETSI TR 101 202"의 "4.7.6.1 DownloadInfoIndication"절에서 명시되어 있습니다.)
  • One-layer data carousel
    • 단일 Group만을 서술하고 접근하는 carousel입니다.
    • DownloadInfoIndication(DII)의 transactionId는 0x0000~0x0001 사이의 값으로 사용합니다.
    • SDT/EIT에는 data_broadcast_descriptor가 실리며 이것으로부터 DownloadInfoIndication(DII) message를 찾을수 있는 정보를 제공받습니다.
    • 해석절차
      1. SDT/EIT를 분석합니다.
      2. SDT/EIT내에서 "data broadcast descriptor"를 찾습니다.
      3. "data broadcast descriptor"에 의해서 DownloadInfoIndication(DII) message의 일치하는 transactionId를 찾습니다.
      4. ... (이후 절차는 "Two-layer data crousel"의 해석절차 참조)
  • Two-layer data carousel
    • SuperGroup과 그에 대한 부분집합인 Group을 서술하고 접근하는 carousel입니다.
    • DownloadServerInitiate(DSI)의 transacrionId는 0x0000~0x0001 사이의 값으로 사용합니다.
    • DownloadInfoIndication(DII)의 transactionId는 0x0002~0xFFFF 사이의 값으로 사용합니다.
    • 해석절차
      1. SDT/EIT를 분석합니다.
      2. SDT/EIT내에서 "data broadcast descriptor"를 찾습니다.
      3. "data broadcast descriptor"에 의해서 DownloadServerInitiate(DSI) message의 일치하는 transactionId를 찾습니다.
      4. DownloadServerInitiate(DSI) message내의 GroupInfoIndication(GroupInfoByte)에서 일치하는 식별자를 찾은 경우 DownloadInfoIndication(DII) message의 transactionId가 GroupId와 같은 것을 찾습니다.
      5. DownloadDataBlock(DDB)를 download합니다.

1.4. Service Descriptor Section (SDT) / Event Information Section (EIT)

    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
    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
    carousel_typ_id값 설명
    0x01 one layer carousel
    0x02 two layer carousel

1.5. compatibilityDescriptor

    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
    descriptorType 값 설명
    0x00 Pad descriptor
    0x01 System Hardware Descriptor
    0x02 System Software Descriptor
    0x03~0x3F ISO/IEC 13818-6 예약
    0x40~0x7F DVB에서 예약
    0x80~0xFF 사용자 정의
  • specifierType
    specifierType 값 설명
    0x00 ISO/IEC 13818-6 예약
    0x01 IEEE OUI
    0x02~0x7F ISO/IEC 13818-6 예약
    0x80~0xFF 사용자 정의

1.6. DSM-CC (Digital Storage Media Command and Control) Download Control Message

downloadControlMessage() {
    dsmccMessageHeader()
    controlMessagePayload()
}

1.7. DSM-CC (Digital Storage Media Command and Control) Download Data Message

downloadDataMessage() {
    dsmccDownloadDataHeader()
    dataMessagePayload()
}

1.8. DSM-CC (Digital Storage Media Command and Control) Message Header

    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()
    }
}
  • protocolDiscriminator: 이 값은 항상 0x11 입니다.
  • dsmccType
    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
  • transactionId
    • bits 0~29 : Transaction Number
    • bits 20~31 : Transaction Id Originator
      originator 값 설명
      0x00 transactionId는 Client에 의해서 할당
      0x01 transactionId는 Server에 의해서 할당
      0x02 transactionId는 Network에 의해서 할당
      0x03 ISO/IEC 13818-6에 의해 예약

1.9. DSM-CC (Digital Storage Media Command and Control) Adaptation Header

    Syntax                       No. of bits
-----------------------------------------------------
dsmccAdaptationHeader() {
    adaptationType               8
    for(i = 0;i < (adaptationLength - 1);i++) {
        adaptationDataByte       8
    }
}
  • adaptationType
    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
}

1.10. DSM-CC (Digital Storage Media Command and Control) Download Data Header

    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()
    }
}

1.11. DSM-CC (Digital Storage Media Command and Control) Download messageId

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
    }
}
  • DVB에서는 compatibilityDescriptorLength는 0x0000으로 권장하며 moduleInfo항목이 사용됩니다.
  • 각 항목의 수치관계
    • blockSize <= maximumBlockSize
    • windowSize * blockSize <= bufferSize
    • (windowSize - ackPeriod) < (ackLatency * transferRate / blockSize)
    • ackPeriod > (ackLatency * transferRate / blockSize)
    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
    }
}
  • blockDataByte는 4066bytes로 전송하는것이 빠른접근을 위해서 권장됩니다.
  • moduleVersion은 DownloadInfoIndication(DII)의 moduleInfo에서의 moduleVersion과 같은 값입니다.
  • moduleVersion은 0~31사이의 값으로 순환되어 Encoding되어야 합니다.
  • blockNumber가 0인 것은 첫번째 block을 의미합니다.
  • blockNumber는 0~255사이의 값으로 순환되어 Encoding되어야 합니다.
    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
    }
}
  • DVB에서는 serverId 는 모두 0xFF로 채웁니다.
  • DVB에서는 compatibilityDescriptorLength는 0x0000으로 권장하며 privateDataByte에 GroupInfoIndication 구조체가 사용됩니다.
    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
    }
}

1.12. moduleInfoByte, groupInfoByte (DownloadInfoIndication, DownloadServerInitiate descriptors)

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


1.13. DSM-CC (Digital Storage Media Command and Control) Section

    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
    }
}

1.14. CRC32 (Cyclic Redundancy Code) Pseudo-code

  • Section에 대한 CRC_32검사구간은 table_id부터 CRC_32를 제외한 나머지모두이며 아래의 함수에서 초기 s_seed값은 0FFFFFFFFH로 시작하여 계산과정을 진입하여야 합니다.
    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);
    }
    

1.15. 참고문헌

  • ISO/IEC 13818-1 (Generic coding of moving pictures and associated audio information; Part 1: Systems)
  • ISO/IEC 18318-6 (Extensions for DSM-CC)
  • ETSI EN 301 192 (DVB specification for data broadcasting)
    • "10장. Data carousels"
  • ETSI TS 102 006 (Specification for System Software Update in DVB Systems)
  • ETSI TR 101 202 (Implementation guidelines for Data Broadcasting)
  • Technical Specification of a European Cable Modem (ECCA EuroModem Specification) Version 1.0



Copyright ⓒ MINZKN.COM
All Rights Reserved.