2.3.1.1 DownloadServerInitiate(DSI)消息
DownloadServerInitiate消息用来建立超组,描述超组内组的内容,表???是它的语法定义。
表 2 数据滚动的DownloadServerInitiate语法定义
语 法 | 字节数 | 系统赋值 (AVIT赋值) |
DownloadServerInitiate() { |
|
|
DsmccMessageHeader() { |
|
|
ProtocolDiscriminator | 1 | 0x11 |
DsmccType | 1 | 0x03 |
MessageId | 2 | 0x1006 |
TransactionId | 4 | 变化 |
Reserved | 1 | 0xFF |
AdaptationLength | 1 | 0x00(无适配域) |
MessageLength | 2 |
|
if(adaptationLength>0) { DSMCCAdaptationHeader() } |
| 无 |
} |
|
|
ServerId | 20 | 0xFF(共20Byte) |
CompatibilityDescriptor() | 2 | 0x0000 |
PrivateDataLength | 2 |
|
GroupInfoIndication() { |
|
|
NumberOfGroups | 2 |
|
for(i=0; i<numberOfGroups; i++) { |
|
|
GroupId | 4 |
|
GroupSize | 4 |
|
GroupCompatibility() | 2 | 0x0000 |
GroupInfoLength | 2 |
|
for(i=0; i<N; i++) { GroupInfoByte } |
1 |
|
} |
|
|
PrivateDataLength | 2 |
|
for(i=0; i<privateDataLength; i++) { privateDataByte } |
1 |
|
} |
|
|
} |
|
|
说明:
l serverId: this field shall be set to 20 bytes with the value of 0xFF.
l compatibilityDescriptor(): this structureshall only contain the compatibilityDescriptorLength field of the compatibilityDescriptor() as defined inDSM-CC (see ISO/IEC 13818-6 [5]). It shall be set to the value of 0x0000.
l PrivateDataLength:GroupInfoIndication结构的字节数。
l numberOfGroups: 定义组的个数。
l groupId: 一个组的16-bit编号,应该等于DownloadInfoIndication消息中描述该组的TransactionId。注意,其值应符合非顶层控制消息的TransactionId取值规定。
l groupSize: 32-bit数定义一个组中所有模块字节数的累加值,可多达4GB。
l groupCompatibility: theGroupCompatibility structure is equal to the CompatibilityDescriptor structureofDSM-CC (see ISO/IEC 13818-6 [5]).
l groupInfoLength: 16-bit的组信息的字节数。
l groupInfoByte: 一组描述该组特性的描述字,可能的几中描述字在下一节中解释。
l privateDataLength: 定义接下来的私有数据字节数。
l privateDataByte: 标准以外我们自己可定义的数据。
2.3.1.2 DownloadInfoIndication(DII)消息
DownloadInfoIndication消息用来建立组,描述组内模块的内容,表???是它的语法定义。
句 法 | 字节数 | 系统赋值 (AVIT赋值) | |||
DownloadInfoIndication() { |
|
| |||
| DsmccMessageHeader() { |
|
| ||
| ProtocolDiscriminator | 1 | 0x11 | ||
| DsmccType | 1 | 0x03 | ||
| MessageId | 2 | 0x1002 | ||
| TransactionId | 4 | 变化 | ||
| Reserved | 1 | 0xFF | ||
| AdaptationLength | 1 | 0x00(无适配域) | ||
| MessageLength | 2 |
| ||
| if(adaptationLength>0) { DSMCCAdaptationHeader() } |
| 无 | ||
| } |
|
| ||
DownloadId | 4 |
| |||
BlockSize(每个数据块的大小) | 2 |
| |||
WindowSize???thh | 1 | 0x0 | |||
AckPeriod | 1 | 0x0 | |||
TCDownloadWindow | 4 | 0x00000000 | |||
TCDownloadScenario | 4 |
| |||
CompatibilityDescriptor() | 2 | 0x0000 | |||
NumberOfModules | 2 |
| |||
for(i=0;I<numberOfModules;i++) { |
|
| |||
ModuleId | 2 |
| |||
ModuleSize | 4 |
| |||
ModuleVersion | 1 |
| |||
ModuleInfoLength | 1 |
| |||
for(i=0; i<moduleInfoLength; i++) { moduleInfoByte } |
1 |
| |||
} |
|
| |||
PrivateDataLength | 2 |
| |||
for(i=0;I<privateDataLength;i++) { privateDataByte } |
1 |
| |||
} |
|
|
表 3 数据滚动的DownloadInfoIndication语法定义
说明:
¨ DsmccMessageHeader()的语法解释与DSI中的相似。但应注意当DII为顶层控制消息时,其TransactionId的取值符合顶层控制消息的规定;否则,其TransactionId的取值应符合非顶层控制消息的规定,且其值等于上层DSI中相应组的group_id。
¨ downloadId:是此消息的代号,对于Data Carousel在网络范围内是唯一的。这个代号也应该在DownloadDataBlock消息中使用。
¨ BlockSize:规定了DownloadDataBlock消息中除最后数据块的每个数据块字节长度, 最后一个数据块的长度小于blockSize。
¨ WindowSize: is the number of blocks in thesliding window.
滑动窗口的数据大小。
A value of 0 means that the windowis the size of the entire image and that no acknowledgments are to be sent bythe Client.
当直为0时表示窗口是整个图象的大小,并且客户端没有发送任何承认书(标志)。
A window size of 0 may only be used in adownloadInfoResponse if the Client set the bufferSize to 0 in theDownloadInfoRequest message.
如果客户端DownloadInfoRequest message中的bufferSize=0,那么window size=0仅仅用在一个downloadInfoResponse中。
This field is unused fornon-flow-controlled download and data carousel scenarios and shall be set to 0in these scenarios.
在没有流的下载控制和data carousel scenarios时不可用并设为0。
¨ AckPeriod:
Is the number ofblocks the Client would normally be required to receive before sending apositive acknowledgment.
The ackPerioddoes not limit when a negative acknowledgment can be sent.
The Client shallsend a positive acknowledgment after successfully storing the last block in theimage.
This field isunused for non-flow-controlled download and data carousel scenarios and shallbe set to 0 in these scenarios.
¨ TCDownloadWindow:
field indicates the time out period in microseconds for eachacknowledgment.
This field is unused for non-flow-controlled download and datacarousel scenarios and shall be set to 0 in these scenarios.
¨ TCDownloadScenario: 表示整个下载过程的超时时间长度,以毫秒为单位。
¨ NumberOfModules:模块的数量,2字节最多可以表示65536个不同值。
¨ ModuleId:是模块的代号,在downloadId范围内内是唯一的。
¨ ModuleSize:模块的字节数。
¨ ModuleVersion:描述模块的版本号,模块发生更新时它增1,到255后回到0,然后再如此循环。
¨ ModuleInfoLength:描述模块信息的字节数。.
¨ ModuleInfoByte:包含一列描述字,每个描述字定义该模块的一个或多个特性。注意当moduleId是在0xFFF0到0xFFFF范围内时,这个地方包含的是由DAVIC定义的ModuleInfo结构。
¨ PrivateDataLength:定义紧接着的私有数据的字节数。
¨ PrivateDataByte:由用户定义。
2.3.1.3 DownloadDataBlock消息
DownloadDataBlock消息用来携带模块的有效数据,表???是它的语法定义。
表 4 数据滚动的DownloadDataBlock语法定义
句 法 | 字节数 | 系统赋值 (AVIT赋值) |
| |||
DownloadDataBlock() { |
|
|
| |||
DsmccDownloadDataHeader() { |
|
|
| |||
| ProtocolDiscriminator | 1 | 0x11 | |||
| DsmccType | 1 | 0x03 | |||
| MessageId | 2 | 0x1006 | |||
| DownloadId | 4 |
| |||
| Reserved | 1 | 0xFF | |||
| AdaptationLength | 1 | 0x00(无适配域) | |||
| MessageLength | 2 |
| |||
| for(adaptationLength>0) { DSMCCAdaptationHeader() } |
| 无 | |||
| } |
|
| |||
ModuleId | 2 |
|
| |||
ModuleVersion | 1 |
|
| |||
Reserved | 1 | 0xFF |
| |||
BlockNumber | 2 |
|
| |||
for(i=0;I<N;I++) { blockDataByte } |
1 |
|
| |||
} |
|
|
|
说明:
l DownloadId:用来联系一个具体下载过程中下载数据消息和下载控制消息的代号。
¨ MessageLength:消息在此以下的字节数。
¨ moduleId: 指示数据块所属的模块代码。//同一个文件的DDB的这个属性都相同。
¨ ModuleVersion:表示所属模块的版本号。
¨ BlockNumber:数据块在模块中的位置,从0开始连续递增计数。
¨ BlockDataByte:包含当前数据块的数据内容。
2.3.1.4 DSM-CC消息在MPEG-2 Section中的封装
当DSM-CC下载消息以遵循DSMCC_section语法作封装,DSMCC_section再遵循MPEG-2 TS流语法被打包。
DSMCC_section的结构实际上都是从ISO/IEC 13818-1中的Private_section继承而来,只是在DSMCC_section 头结构中特别字域的编码上赋予了特殊语意。它的结构是与private_section语法兼容的,因此可以使用MPEG-2系统解码器处理DSMCC_section。DSMCC_section 到MPEG-2传输流包的转换以及DSMCC_section 的最大长度均由ISO/IEC 13818‑1定义的Private_sections确定。
可以参考ISO/IEC 13818-1 2.4.4节PSI关于private_sections的结构和定义,包括payload_unit_start_indicator的设置,传输包payload中pointer_field的使用,以及包的填充字节的讨论。系统仅规定DSM-CC表的table_id,对PID值不作规定。
表???是DSM-CC的Section语法定义。
表 5 数据滚动的DSMCC_Section语法定义
句 法 | 比特数 | 系统赋值 (AVIT赋值) | 表达方式 |
DSMCC_section() { |
|
|
|
table_id | 8 | 0x3B(DSI或DII) 或0x3C(DDB) | Uimsbf |
section_syntax_indicator | 1 | 0x1 | Bslbf |
private_indicator | 1 | 0x1 | Bslbf |
Reserved | 2 | 0x3 | Bslbf |
DSMCC_section_length | 12 |
| Uimsbf |
table_id_extension | 16 | DDB中的ModuleId /DSI,DII中的transaction_ | Uimsbf |
Reserved | 2 | 0x3 | Bslbf |
version_number | 5 |
| Uimsbf |
current_next_indicator | 1 | ‘1’或‘0’ | Bslbf |
section_number | 8 |
| Uimsbf |
last_section_number | 8 | 0xFFFFFFFF | Uimsbf |
else if (table_id == 0x3B) { |
| 0xFFFFFFFF |
|
DSI() 或DII() |
| 0x3 |
|
} |
|
|
|
else if (table_id == 0x3C) { |
|
|
|
DDB () |
|
|
|
} |
|
|
|
CRC_32 | 32 |
| Rpchof |
} |
|
|
|
为方便快速硬件过滤的实现,DVB数据滚动对其下载消息的部分特征字段进行了提取,对应到DSMCC_section的前几个字节。DSMCC_section的相关字段定义如表???所示:
表 6 数据滚动的DSMCC_section字段定义
消息 | table_id | table_id_extension | version_number | section_number | last_section_number |
DSI | 0x3B | DSI中transaction_id的最低两个字节 | 0x00 | 0x00 | 0x00 |
DII | 0X3B | DII中transaction_id的最低两个字节 | 0x00 | 0x00 | 0x00 |
DDB | 0X3C | ModuleId | ModuleVersion%32 | BlockNumber%256 | 为原section含义,表示最大的section_number |
可见,描述一个超组的DSI和一个组的DII都只能用section表示;而DDB可用多个section表示,每个section表示一个数据块(block)。