function tm_comms_uhf_dbg_cb(buffer, pinfo, tree, comms_uhf_dbg_cb, offset) -- Define ProtoFields local f_state = ProtoField.uint8("comms_uhf_dbg_cb.state", "UHF FSM State", base.DEC) local f_uhf_sch_gs_cont = ProtoField.uint8("comms_uhf_dbg_cb.uhf_sch_gs_cont", "UHF Scheduler Ground Contact Status", base.DEC) local f_uhf_gs_cont_valid = ProtoField.uint8("comms_uhf_dbg_cb.uhf_gs_cont_valid", "UHF Ground Contact Valid", base.DEC) local f_uhf_uart_cmd_rx_cnt = ProtoField.uint32("comms_uhf_dbg_cb.uhf_uart_cmd_rx_cnt", "UHF UART Command RX Count", base.DEC) local f_uhf_uart_cmd_tx_cnt = ProtoField.uint32("comms_uhf_dbg_cb.uhf_uart_cmd_tx_cnt", "UHF UART Command TX Count", base.DEC) local f_uhf_uart_data_rx_cnt = ProtoField.uint32("comms_uhf_dbg_cb.uhf_uart_data_rx_cnt", "UHF UART Data RX Count", base.DEC) local f_uhf_uart_data_tx_cnt = ProtoField.uint32("comms_uhf_dbg_cb.uhf_uart_data_tx_cnt", "UHF UART Data TX Count", base.DEC) local f_uhf_tm_tx_cnt = ProtoField.uint32("comms_uhf_dbg_cb.uhf_tm_tx_cnt", "UHF TM TX Count to CSP", base.DEC) local f_uhf_tc_rx_cnt = ProtoField.uint32("comms_uhf_dbg_cb.uhf_tc_rx_cnt", "UHF TC RX Count from CSP", base.DEC) local f_uhf_tm_tx_fail_cnt = ProtoField.uint32("comms_uhf_dbg_cb.uhf_tm_tx_fail_cnt", "UHF TM TX Fail Count in CSP", base.DEC) -- Register the fields in the protocol comms_uhf_dbg_cb.fields = { f_state, f_uhf_sch_gs_cont, f_uhf_gs_cont_valid, f_uhf_uart_cmd_rx_cnt, f_uhf_uart_cmd_tx_cnt, f_uhf_uart_data_rx_cnt, f_uhf_uart_data_tx_cnt, f_uhf_tm_tx_cnt, f_uhf_tc_rx_cnt, f_uhf_tm_tx_fail_cnt } -- Create a subtree for the structure local subtree = tree:add(comms_uhf_dbg_cb, buffer(), "TM COMMS UHF GET DBG CB INFO") -- Parse each field subtree:add(f_state, buffer(offset, 1):le_uint()) offset = offset + 1 subtree:add(f_uhf_sch_gs_cont, buffer(offset, 1):le_uint()) offset = offset + 1 subtree:add(f_uhf_gs_cont_valid, buffer(offset, 1):le_uint()) offset = offset + 1 -- Padding (if necessary) --offset = offset + 1 subtree:add_le(f_uhf_uart_cmd_rx_cnt, buffer(offset, 4):le_uint()) offset = offset + 4 subtree:add_le(f_uhf_uart_cmd_tx_cnt, buffer(offset, 4):le_uint()) offset = offset + 4 subtree:add_le(f_uhf_uart_data_rx_cnt, buffer(offset, 4):le_uint()) offset = offset + 4 subtree:add_le(f_uhf_uart_data_tx_cnt, buffer(offset, 4):le_uint()) offset = offset + 4 subtree:add_le(f_uhf_tm_tx_cnt, buffer(offset, 4):le_uint()) offset = offset + 4 subtree:add_le(f_uhf_tc_rx_cnt, buffer(offset, 4):le_uint()) offset = offset + 4 subtree:add_le(f_uhf_tm_tx_fail_cnt, buffer(offset, 4):le_uint()) offset = offset + 4 end