vc_pkt_fields = [ { "name": "版本号", "id": "Ver", "pos": 0, "length": 3, "type": "para", "content": "0", "dataTy": "INVAR" }, { "name": "类型", "id": "TM_Type", "pos": 3, "length": 1, "type": "para", "content": "0", "dataTy": "INVAR" }, { "name": "副导头标志", "id": "Vice_Head", "pos": 4, "length": 1, "type": "para", "dataTy": "RANDOM" }, { "name": "应用过程标识符", "id": "Proc_Sign", "pos": 5, "length": 11, "type": "para", "dataTy": "ENUM", "is_key": True }, { "name": "分组标志", "id": "Group_Sign", "pos": 16, "length": 2, "type": "para", "content": "3", "dataTy": "INVAR" }, { "name": "包序列计数", "id": "Package_Count", "pos": 18, "length": 14, "type": "para", "dataTy": "RANDOM" }, { "name": "包长", "id": "Pack_Len", "pos": 32, "length": 16, "type": "para", "content": "1Bytes/EPDU_Data.length - 1", "dataTy": "LEN" }, { "name": "服务", "id": "service", "pos": 48, "length": 8, "type": "para", "content": None, "dataTy": "ENUM", "is_key": True }, { "name": "子服务", "id": "subservice", "pos": 56, "length": 8, "type": "para", "content": None, "dataTy": "ENUM", "is_key": True }, { "name": "数据域", "id": "EPDU_DATA", "pos": 64, "length": "length-current", "type": "any", "children": [] } ] def get_tm_frame(data): return { "name": "遥测帧", "id": "TM_Frame", "type": "enc", "pos": 0, "length": 8192, "children": [ { "name": "同步头", "id": "Sync_Head", "type": "para", "pos": 0, "content": "0x1ACFFC1D", "dataTy": "INVAR", "length": 32 }, { "name": "VCDU", "id": "VCDU", "type": "enc", "pos": 32, "length": 8160, "content": "1", "children": [ { "name": "传输帧版本号", "id": "Ver_", "type": "para", "pos": 0, "length": 2, "content": "01B", "dataTy": "INVAR" }, { "name": "航天器标识符SCID", "id": "SCID", "type": "para", "pos": 2, "length": 8, "content": "0x01", "dataTy": "INVAR" }, { "name": "虚拟信道标识符VCID", "id": "VCID", "type": "para", "pos": 10, "length": 6, "content": data['vcidContent'], "dataTy": "ENUM" }, { "name": "VCDU计数", "id": "VCDUCnt", "type": "para", "pos": 16, "length": 24, "content": "0:16777215:1", "dataTy": "INCREASE" }, { "name": "回放标志", "id": "PlaybackFlag", "type": "para", "pos": 40, "length": 1, "content": "回放,1 不回放,0", "dataTy": "ENUM" }, { "name": "保留位", "id": "spare", "type": "para", "pos": 41, "length": 7, "content": "0", "dataTy": "INVAR" }, { "name": "插入域", "id": "InsertionDomain", "type": "linear", "pos": 48, "length": 640, "content": None, "children": data['insertDomain'] }, { "name": "传输帧数据域", "id": "DataDomain", "type": "enc", "pos": 688, "length": 7456 }, { "name": "传输帧尾", "id": "FrameTail", "type": "para", "pos": 8144, "length": 16, "content": "CRC_check;1;All;this.START+0;this.CURRENT-1", "dataTy": "CHECKSUM" } ] } ] } def get_bus_datas(pkts): return [ { "name": "传输消息类型", "id": "BMessageType", "type": "para", "pos": 0, "length": 8, "content": "广播BC/RT_传统,0x00 广播RT/RT_传统,0xFF BC/RT_传统,0x11 RT/RT_传统,0x12 时分复用模式的BC/RT,0x21", "dataTy": "ENUM", "is_key": True }, { "name": "消息传输格式及消息体", "id": "BMessagePro", "type": "enc", "pos": 8, "length": "length-current", "children": [ { "name": "BMessagePro", "id": "BMessagePro", "type": "enc", "pos": 0, "length": "length-current", "vals": "0x11/", "children": [ { "id": "BRT_Add", "name": "RT地址", "type": "para", "pos": 0, "content": "1,1 2,2 3,3 4,4 5,5 6,6 7,7 8,8 9,9 10,10 11,11 12,12 13,13 14,14 15,15 16,16 17,17 18,18 19,19 20,20 21,21 22,22 23,23 24,24 25,25 26,26 27,27 28,28 29,29 30,30 31,31", "length": 8, "dataTy": "ENUM", "is_key": True, }, { "id": "BSub_add", "name": "子地址", "type": "para", "pos": 8, "content": "1,1 2,2 3,3 4,4 5,5 6,6 7,7 8,8 9,9 10,10 11,11 12,12 13,13 14,14 15,15 16,16 17,17 18,18 19,19 20,20 21,21 22,22 23,23 24,24 25,25 26,26 27,27 28,28 29,29 30,30 31,31", "length": 8, "dataTy": "ENUM", "is_key": True, }, { "id": "BT_R_M", "name": "传输方向/方式代号", "type": "para", "pos": 16, "content": "RT2BC,0xAA BC2RT,0xBB 方式字,0xCC", "length": 8, "dataTy": "ENUM", "is_key": True }, { "id": "BFrame", "name": "帧号", "type": "para", "pos": 24, "content": "0:19:1", "length": 8, "dataTy": "INCREASE", "is_key": True }, { "id": "BusA_B", "name": "总线A/B", "type": "para", "pos": 32, "content": "A总线,1 B总线,0", "length": 8, "dataTy": "ENUM" }, { "id": "BErrorFlag", "name": "Error Flag(status word.bit12)", "type": "para", "pos": 40, "content": None, "length": 16, "dataTy": "RANDOM" }, { "id": "BControlWord", "name": "ControlWord", "type": "para", "pos": 56, "content": None, "length": 16, "dataTy": "RANDOM" }, { "id": "BCommandWord", "name": "CommandWord", "type": "para", "pos": 72, "content": None, "length": 16, "dataTy": "RANDOM" }, { "id": "BStatusWord", "name": "StatusWord", "type": "para", "pos": 88, "content": None, "length": 16, "dataTy": "RANDOM" }, { "id": "BTime", "name": "传输时间", "type": "para", "pos": 104, "content": None, "length": 64, "dataTy": "RANDOM" }, { "id": "SA7_258", "name": "综合数管单元数据块传输", "type": "any", "pos": 168, "length": "length-current", "children": pkts } ] } ] } ]