- #ifndef KB_DC_VAR_H
- #define KB_DC_VAR_H
- #define DSMCC_NAME_DESCRIPTOR_TAG 2
- // dsmccMessageHeader structure
- typedef struct dsmccMessage{
- unsigned char protocalDisminator;
- unsigned char dsmccType;
- unsigned short messageId;
- unsigned int transactionId;
- unsigned char reserved;
- unsigned char adaptationLength;
- unsigned short messageLength;
- }DSMCCMessage;
- // DownloadInfoIndication() head structure
- typedef struct diiHead{
- unsigned int downloadId;
- unsigned short blockSize;
- unsigned char windowSize;
- unsigned char ackperiod;
- unsigned int tCDownloadWindow;
- unsigned int tCDownloadScenario;
- unsigned char*compatibilityDescriptor;
- unsigned short numberOfModules;
- }DIIHead;
- // dsmccModule attribures of DII
- typedef struct dsmccModuleInfo{
- unsigned short moduleId;
- unsigned int moduleSize;
- unsigned char moduleVersion;
- unsigned char moduleInfoLength;
- unsigned char*moduleInfoBytes;//descriptions bytes
- }ModuleInfo;
- typedef struct dsmccGroupInfo{
- unsigned int groupId;
- unsigned int groupSize;
- char*GroupCompatibility;
- unsigned short GroupInfoLength;
- unsigned char *GroupInfoBytes;//descriptions bytes
- }GroupInfo;
- // DSI head ,not include dsmccMessageHeader structure
- typedef struct dsmccDSIHead{
- unsigned char*serverid;
- unsigned char*compatibilityDescriptor;
- unsigned short privateDataLength;
- unsigned char*privateDataBytes;
- }DSIHead;
- //general descriptor
- typedef struct
- {
- int tag;
- int len;
- unsigned char *descriptor;
- }Descriptor;
- /*// transport packet structure
- typedef struct
- {
- unsigned char sync_byte;
- unsigned short transport_error_indicator:1;
- unsigned short payload_unit_start_indicator:1;
- unsigned short transport_priority:1;
- unsigned short pid:13;
- unsigned char transport_scrambling_control:2;
- unsigned char adaptation_field_control:2;
- unsigned char continuity_counter:4;
- unsigned char *pData_byte;
- }TSPacket;
- typedef struct _TSPacket_List
- {
- TSPacket tsPacket;
- struct _TSPacket_List *pNext;
- }TSPacket_List;*/
- // DSMCCDownloadDataHeader structure
- typedef struct
- {
- char protocolDiscriminator;
- char dsmccType;
- unsigned short messageId;
- unsigned long downloadId;
- int reserved;
- int adaptationLength;
- unsigned short messageLength;
- }DSMCCDownloadData;
- // DownloadDataBlock structure,but exclude the dsmccDownloadDataHeader() structure
- typedef struct
- {
- unsigned int moduleID;
- unsigned char moduleVersion;
- unsigned char reserved;
- unsigned int blockNumber;
- }DDBHead;
- #endif