123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- function tm_get_sband_dbg_cb(buffer, pinfo, tree, sband_dbg_cb, offset)
- -- Define ProtoFields
- local f_state = ProtoField.uint8("sband_dbg_cb.state", "State", base.DEC)
- local f_sch_gs_cont = ProtoField.uint8("sband_dbg_cb.sband_sch_gs_cont", "Scheduler Ground Station Contact", base.DEC)
- local f_gs_cont_valid = ProtoField.uint8("sband_dbg_cb.sband_gs_cont_valid", "Ground Station Contact Valid", base.DEC)
- local f_udp_rx_cnt = ProtoField.uint32("sband_dbg_cb.sband_udp_rx_cnt", "UDP RX Count", base.DEC)
- local f_udp_tx_cnt = ProtoField.uint32("sband_dbg_cb.sband_udp_tx_cnt", "UDP TX Count", base.DEC)
- local f_udp_rx_less_len_cnt = ProtoField.uint32("sband_dbg_cb.sband_udp_rx_less_len_cnt", "UDP RX Less Length Count", base.DEC)
- local f_udp_tx_send_fail_cnt = ProtoField.uint32("sband_dbg_cb.sband_udp_tx_send_fail_cnt", "UDP TX Send Fail Count", base.DEC)
- local f_udp_tx_pkt_drop_cnt = ProtoField.uint32("sband_dbg_cb.sband_udp_tx_pkt_drop_cnt", "UDP TX Packet Drop Count", base.DEC)
- local f_udp_tx_len_fail_cnt = ProtoField.uint32("sband_dbg_cb.sband_udp_tx_len_fail_cnt", "UDP TX Length Fail Count", base.DEC)
- local f_udp_tx_crc_fail_cnt = ProtoField.uint32("sband_dbg_cb.sband_udp_tx_crc_fail_cnt", "UDP TX CRC Fail Count", base.DEC)
- local f_udp_tx_busy_fail_cnt = ProtoField.uint32("sband_dbg_cb.sband_udp_tx_busy_fail_cnt", "UDP TX Busy Fail Count", base.DEC)
- local f_udp_tx_fifo_full_cnt = ProtoField.uint32("sband_dbg_cb.sband_udp_tx_fifo_full_cnt", "UDP TX FIFO Full Count", base.DEC)
- local f_tcp_read_fail_cnt = ProtoField.uint32("sband_dbg_cb.sband_tcp_read_fail_cnt", "TCP Read Fail Count", base.DEC)
- local f_tcp_conn_fail_cnt = ProtoField.uint32("sband_dbg_cb.sband_tcp_conn_fail_cnt", "TCP Connection Fail Count", base.DEC)
- local f_tcp_write_fail_cnt = ProtoField.uint32("sband_dbg_cb.sband_tcp_write_fail_cnt", "TCP Write Fail Count", base.DEC)
- local f_tcp_read_busy_cnt = ProtoField.uint32("sband_dbg_cb.sband_tcp_read_busy_cnt", "TCP Read Busy Count", base.DEC)
- local f_rx_swt_cnt = ProtoField.uint32("sband_dbg_cb.sband_rx_swt_cnt", "RX Switch Count", base.DEC)
- -- Register the fields in the protocol
- sband_dbg_cb.fields = {
- f_state,
- f_sch_gs_cont,
- f_gs_cont_valid,
- f_udp_rx_cnt,
- f_udp_tx_cnt,
- f_udp_rx_less_len_cnt,
- f_udp_tx_send_fail_cnt,
- f_udp_tx_pkt_drop_cnt,
- f_udp_tx_len_fail_cnt,
- f_udp_tx_crc_fail_cnt,
- f_udp_tx_busy_fail_cnt,
- f_udp_tx_fifo_full_cnt,
- f_tcp_read_fail_cnt,
- f_tcp_conn_fail_cnt,
- f_tcp_write_fail_cnt,
- f_tcp_read_busy_cnt,
- f_rx_swt_cnt
- }
- -- Create a subtree for the structure
- local subtree = tree:add(sband_dbg_cb, buffer(), "TM SBAND GET DBG CB INFO")
- -- Dissect the fields
- subtree:add_le(f_state, buffer(offset, 1):le_uint())
- offset = offset + 1
- subtree:add_le(f_sch_gs_cont, buffer(offset, 1):le_uint())
- offset = offset + 1
- subtree:add_le(f_gs_cont_valid, buffer(offset, 1):le_uint())
- offset = offset + 1
- subtree:add_le(f_udp_rx_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- subtree:add_le(f_udp_tx_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- subtree:add_le(f_udp_rx_less_len_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- subtree:add_le(f_udp_tx_send_fail_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- subtree:add_le(f_udp_tx_pkt_drop_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- subtree:add_le(f_udp_tx_len_fail_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- subtree:add_le(f_udp_tx_crc_fail_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- subtree:add_le(f_udp_tx_busy_fail_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- subtree:add_le(f_udp_tx_fifo_full_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- subtree:add_le(f_tcp_read_fail_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- subtree:add_le(f_tcp_conn_fail_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- subtree:add_le(f_tcp_write_fail_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- subtree:add_le(f_tcp_read_busy_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- subtree:add_le(f_rx_swt_cnt, buffer(offset, 4):le_uint())
- offset = offset + 4
- end
|