function tm_get_sdr_rssi_cfg(buffer, pinfo, tree, sdr_rssi_cfg, offset) -- Define ProtoFields for the structure local f_valid_rssi_cnt = ProtoField.uint8("sdr_rssi_cfg.valid_rssi_cnt", "Valid RSSI Count", base.DEC) local f_inv_rssi_cnt = ProtoField.uint8("sdr_rssi_cfg.inv_rssi_cnt", "Invalid RSSI Count", base.DEC) local f_rssi_min = ProtoField.float("sdr_rssi_cfg.rssi_min", "RSSI Min", base.DEC) local f_rssi_typ = ProtoField.float("sdr_rssi_cfg.rssi_typ", "RSSI Typ", base.DEC) local f_rssi_prd_tmr = ProtoField.uint32("sdr_rssi_cfg.rssi_prd_tmr", "RSSI Period Timer", base.DEC) local f_short_rx_on_tmr = ProtoField.uint32("sdr_rssi_cfg.short_rx_on_tmr", "Short RX On Timer", base.DEC) local f_long_rx_on_tmr = ProtoField.uint32("sdr_rssi_cfg.long_rx_on_tmr", "Long RX On Timer", base.DEC) -- Add fields to the protocol sdr_rssi_cfg.fields = { f_valid_rssi_cnt, f_inv_rssi_cnt, f_rssi_min, f_rssi_typ, f_rssi_prd_tmr, f_short_rx_on_tmr, f_long_rx_on_tmr } -- Add a subtree for the structure local subtree = tree:add(sdr_rssi_cfg, buffer(), "TM GET SDR RX RSSI CNFG") -- Dissect each field -- Valid RSSI Count (1 byte) local valid_rssi_cnt = buffer(offset, 1):uint() subtree:add(f_valid_rssi_cnt, buffer(offset, 1)):set_text(string.format("Valid RSSI Count: %d", valid_rssi_cnt)) offset = offset + 1 -- Invalid RSSI Count (1 byte) local inv_rssi_cnt = buffer(offset, 1):uint() subtree:add(f_inv_rssi_cnt, buffer(offset, 1)):set_text(string.format("Invalid RSSI Count: %d", inv_rssi_cnt)) offset = offset + 1 -- RSSI Min (4 bytes, float) local rssi_min = buffer(offset, 4):le_float() subtree:add(f_rssi_min, buffer(offset, 4)):set_text(string.format("RSSI Min: %.6f", rssi_min)) offset = offset + 4 -- RSSI Typ (4 bytes, float) local rssi_typ = buffer(offset, 4):le_float() subtree:add(f_rssi_typ, buffer(offset, 4)):set_text(string.format("RSSI Typ: %.6f", rssi_typ)) offset = offset + 4 -- RSSI Period Timer (4 bytes, uint32) local rssi_prd_tmr = buffer(offset, 4):le_uint() subtree:add(f_rssi_prd_tmr, buffer(offset, 4)):set_text(string.format("RSSI Period Timer: %d", rssi_prd_tmr)) offset = offset + 4 -- Short RX On Timer (4 bytes, uint32) local short_rx_on_tmr = buffer(offset, 4):le_uint() subtree:add(f_short_rx_on_tmr, buffer(offset, 4)):set_text(string.format("Short RX On Timer: %d", short_rx_on_tmr)) offset = offset + 4 -- Long RX On Timer (4 bytes, uint32) local long_rx_on_tmr = buffer(offset, 4):le_uint() subtree:add(f_long_rx_on_tmr, buffer(offset, 4)):set_text(string.format("Long RX On Timer: %d", long_rx_on_tmr)) offset = offset + 4 end