|
@@ -0,0 +1,452 @@
|
|
|
+-- Define the protocol
|
|
|
+function tm_sband_get_device_conf(buffer, pinfo, tree, tm_sband_get_device_conf, offset)
|
|
|
+
|
|
|
+-- Define ProtoFields with three arguments
|
|
|
+local f_rfe_rx0_on = ProtoField.uint32("tm_sband_get_device_conf.RfeRx0On", "RFE RX0 On", base.HEX)
|
|
|
+local f_rfe_tx0_on = ProtoField.uint32("tm_sband_get_device_conf.RfeTx0On", "RFE TX0 On", base.HEX)
|
|
|
+local f_rfe_pa0_on = ProtoField.uint32("tm_sband_get_device_conf.RfePa0On", "RFE PA0 On", base.HEX)
|
|
|
+local f_rfe_rx_tx0 = ProtoField.uint32("tm_sband_get_device_conf.RfeRxTx0", "RFE RX TX0", base.HEX)
|
|
|
+local f_rfe_rx1_on = ProtoField.uint32("tm_sband_get_device_conf.RfeRx1On", "RFE RX1 On", base.HEX)
|
|
|
+local f_rfe_tx1_on = ProtoField.uint32("tm_sband_get_device_conf.RfeTx1On", "RFE TX1 On", base.HEX)
|
|
|
+local f_rfe_pa1_on = ProtoField.uint32("tm_sband_get_device_conf.RfePa1On", "RFE PA1 On", base.HEX)
|
|
|
+local f_rfe_rx_tx1 = ProtoField.uint32("tm_sband_get_device_conf.RfeRxTx1", "RFE RX TX1", base.HEX)
|
|
|
+local f_rfe_out_en = ProtoField.uint32("tm_sband_get_device_conf.RfeOutEn", "RFE Out Enable", base.HEX)
|
|
|
+local f_rfe_gpio0 = ProtoField.uint32("tm_sband_get_device_conf.RfeGpio0", "RFE GPIO0", base.HEX)
|
|
|
+local f_rfe_loop_det = ProtoField.uint32("tm_sband_get_device_conf.RfeLoopDet", "RFE Loop Detect", base.HEX)
|
|
|
+local f_rfe_lo_mux = ProtoField.uint32("tm_sband_get_device_conf.RfeLoMux", "RFE LO Mux", base.HEX)
|
|
|
+local f_rfe_pow_on = ProtoField.uint32("tm_sband_get_device_conf.RfePowOn", "RFE Power On", base.HEX)
|
|
|
+local f_rfe_da = ProtoField.uint32("tm_sband_get_device_conf.RfeDA", "RFE DA", base.HEX)
|
|
|
+local f_rfe_cl = ProtoField.uint32("tm_sband_get_device_conf.RfeCL", "RFE CL", base.HEX)
|
|
|
+local f_rfe_en_ad5304 = ProtoField.uint32("tm_sband_get_device_conf.RfeEnAD5304", "RFE Enable AD5304", base.HEX)
|
|
|
+local f_rfe_en_synth = ProtoField.uint32("tm_sband_get_device_conf.RfeEnSynth", "RFE Enable Synthesizer", base.HEX)
|
|
|
+local f_rfe_en3 = ProtoField.uint32("tm_sband_get_device_conf.RfeEn3", "RFE Enable 3", base.HEX)
|
|
|
+local f_rfe_en4 = ProtoField.uint32("tm_sband_get_device_conf.RfeEn4", "RFE Enable 4", base.HEX)
|
|
|
+local f_rfe_en5 = ProtoField.uint32("tm_sband_get_device_conf.RfeEn5", "RFE Enable 5", base.HEX)
|
|
|
+local f_rfe_7v0_en = ProtoField.uint32("tm_sband_get_device_conf.Rfe7V0En", "RFE 7V0 Enable", base.HEX)
|
|
|
+local f_rfe_rsv_uint32 = ProtoField.uint32("tm_sband_get_device_conf.RfeRsvuint32", "Reserved Bits", base.HEX)
|
|
|
+
|
|
|
+local f_rxmix_ch0 = ProtoField.int32("tm_sband_get_device_conf.rxmix_ch0", "receive DownConversionFrequency channel 0", base.DEC)
|
|
|
+local f_rxmix_ch1 = ProtoField.int32("tm_sband_get_device_conf.rxmix_ch1", "receive DownConversionFrequency channel 1", base.DEC)
|
|
|
+
|
|
|
+local f_txmix_ch0 = ProtoField.int32("tm_sband_get_device_conf.txmix_ch0", "transmit UpConversionFrequency channel 0", base.DEC)
|
|
|
+local f_txmix_ch1 = ProtoField.int32("tm_sband_get_device_conf.txmix_ch1", "transmit UpConversionFrequency channel 1", base.DEC)
|
|
|
+
|
|
|
+local f_rxfreq_ch0 = ProtoField.int32("tm_sband_get_device_conf.rxfreq_ch0", "receive Frequency Channel0 :", base.DEC)
|
|
|
+local f_rxfreq_ch1 = ProtoField.int32("tm_sband_get_device_conf.rxfreq_ch1", "receive Frequency Channel1 :", base.DEC)
|
|
|
+
|
|
|
+local f_txfreq_ch0 = ProtoField.int32("tm_sband_get_device_conf.txfreq_ch0", "transmit Frequency Channel0 :", base.DEC)
|
|
|
+local f_txfreq_ch1 = ProtoField.int32("tm_sband_get_device_conf.txfreq_ch1", "transmit Frequency Channel1 :", base.DEC)
|
|
|
+
|
|
|
+local f_rxlow_ch0 = ProtoField.int32("tm_sband_get_device_conf.rxlow_ch0", "Rcv lowest possible frequency Channel0 : ", base.DEC)
|
|
|
+local f_rxlow_ch1 = ProtoField.int32("tm_sband_get_device_conf.rxlow_ch1", "Rcv lowest possible frequency Channel1 :", base.DEC)
|
|
|
+
|
|
|
+local f_rxhigh_ch0 = ProtoField.int32("tm_sband_get_device_conf.rxhigh_ch0", "Rcv highest possible frequency Channel0 : ", base.DEC)
|
|
|
+local f_rxhigh_ch1 = ProtoField.int32("tm_sband_get_device_conf.rxhigh_ch1", "Rcv highest possible frequency Channel0 : ", base.DEC)
|
|
|
+
|
|
|
+local f_txlow_ch0 = ProtoField.int32("tm_sband_get_device_conf.txlow_ch0", "Xmt lowest possible frequency Channel0 : ", base.DEC)
|
|
|
+local f_txlow_ch1 = ProtoField.int32("tm_sband_get_device_conf.txlow_ch1", "Xmt lowest possible frequency Channel1 : ", base.DEC)
|
|
|
+
|
|
|
+local f_txhigh_ch0 = ProtoField.int32("tm_sband_get_device_conf.txhigh_ch0", "Xmt highest possible frequency Channel0 : ", base.DEC)
|
|
|
+local f_txhigh_ch1 = ProtoField.int32("tm_sband_get_device_conf.txhigh_ch1", "Xmt highest possible frequency Channel1 : ", base.DEC)
|
|
|
+
|
|
|
+local f_2rx2tx = ProtoField.uint32("tm_sband_get_device_conf._2rx2tx", "Flag for use 2Rx2Tx mode : ", base.DEC) -- 1 bit
|
|
|
+local f_txlevel_0 = ProtoField.uint32("tm_sband_get_device_conf.txlevel_0", "Tx Level for XmtChannel 0 ", base.DEC) -- 11 bits
|
|
|
+local f_txlevel_1 = ProtoField.uint32("tm_sband_get_device_conf.txlevel_1", "Tx Level for XmtChannel 1 ", base.DEC) -- 11 bits
|
|
|
+local f_refclk = ProtoField.uint32("tm_sband_get_device_conf.refclk", "AD9361 reference clock in MHz : ", base.DEC) -- 8 bits
|
|
|
+local f_reserve = ProtoField.uint32("tm_sband_get_device_conf.reserve", "Reserve", base.DEC) -- 1 bit
|
|
|
+
|
|
|
+local f_modulat_0 = ProtoField.uint32("tm_sband_get_device_conf.modulat_0", "Xmt Modulation Channel_0 :", base.DEC) -- 3 bits
|
|
|
+local f_mode_0 = ProtoField.uint32("tm_sband_get_device_conf.mode_0", "Xmt Mode Channel_0:", base.DEC) -- 4 bits
|
|
|
+local f_fec_0 = ProtoField.uint32("tm_sband_get_device_conf.fec_0", "Fec 0", base.DEC) -- 3 bits
|
|
|
+local f_chen_0 = ProtoField.uint32("tm_sband_get_device_conf.chen_0", "ChEn 0", base.DEC) -- 1 bit
|
|
|
+local f_prnd_0 = ProtoField.uint32("tm_sband_get_device_conf.prnd_0", "PRnd 0", base.DEC) -- 1 bit
|
|
|
+local f_asmstart_0 = ProtoField.uint32("tm_sband_get_device_conf.asmstart_0", "ASMStart 0", base.DEC) -- 1 bit
|
|
|
+local f_offsetmod_0 = ProtoField.uint32("tm_sband_get_device_conf.offsetmod_0", "OffsetMod 0", base.DEC) -- 1 bit
|
|
|
+local f_ch1_diff_ch2 = ProtoField.uint32("tm_sband_get_device_conf.ch1_diff_ch2", "Ch1_diff_Ch2", base.DEC) -- 1 bit
|
|
|
+local f_chswitchon_0 = ProtoField.uint32("tm_sband_get_device_conf.chswitchon_0", "ChSwitchOn 0", base.DEC) -- 1 bit
|
|
|
+
|
|
|
+local f_modulat_1 = ProtoField.uint32("tm_sband_get_device_conf.modulat_1", "Modulat 1", base.DEC) -- 3 bits
|
|
|
+local f_mode_1 = ProtoField.uint32("tm_sband_get_device_conf.mode_1", "Mode 1", base.DEC) -- 4 bits
|
|
|
+local f_fec_1 = ProtoField.uint32("tm_sband_get_device_conf.fec_1", "Fec 1", base.DEC) -- 3 bits
|
|
|
+local f_chen_1 = ProtoField.uint32("tm_sband_get_device_conf.chen_1", "ChEn 1", base.DEC) -- 1 bit
|
|
|
+local f_prnd_1 = ProtoField.uint32("tm_sband_get_device_conf.prnd_1", "PRnd 1", base.DEC) -- 1 bit
|
|
|
+local f_asmstart_1 = ProtoField.uint32("tm_sband_get_device_conf.asmstart_1", "ASMStart 1", base.DEC) -- 1 bit
|
|
|
+local f_offsetmod_1 = ProtoField.uint32("tm_sband_get_device_conf.offsetmod_1", "OffsetMod 1", base.DEC) -- 1 bit
|
|
|
+local f_chswitchon_1 = ProtoField.uint32("tm_sband_get_device_conf.chswitchon_1", "ChSwitchOn 1", base.DEC) -- 1 bit
|
|
|
+
|
|
|
+local f_offsetmodnormaly = ProtoField.uint32("tm_sband_get_device_conf.offsetmodnormaly", "OffsetModNormaly", base.DEC) -- 1 bit
|
|
|
+
|
|
|
+local f_atttxgain_0 = ProtoField.uint32("tm_sband_get_device_conf.atttxgain_0", "AttTxGain 0", base.DEC) -- 10 bits
|
|
|
+local f_atttxgain_1 = ProtoField.uint32("tm_sband_get_device_conf.atttxgain_1", "AttTxGain 1", base.DEC) -- 10 bits
|
|
|
+local f_trfrmsz = ProtoField.uint32("tm_sband_get_device_conf.trfrmsz", "TrFrmSz", base.DEC) -- 12 bits
|
|
|
+
|
|
|
+local f_phioffset16 = ProtoField.int32("tm_sband_get_device_conf.phioffset16", "PhiOffset16", base.DEC) -- 5 bits
|
|
|
+local f_y16 = ProtoField.uint32("tm_sband_get_device_conf.y16", "Y16", base.DEC) -- 13 bits
|
|
|
+local f_txsampfact = ProtoField.uint32("tm_sband_get_device_conf.txsampfact", "TxSampFact", base.DEC) -- 10 bits
|
|
|
+local f_rsmode = ProtoField.uint32("tm_sband_get_device_conf.rsmode", "RsMode", base.DEC) -- 4 bits
|
|
|
+
|
|
|
+local f_rxgainmax = ProtoField.uint32("tm_sband_get_device_conf.rxgainmax", "RxGainMax", base.HEX) -- 8 bits
|
|
|
+local f_chen = ProtoField.uint32("tm_sband_get_device_conf.chen", "ChEn", base.HEX) -- 1 bit
|
|
|
+local f_modulat = ProtoField.uint32("tm_sband_get_device_conf.modulat", "Modulat", base.HEX) -- 3 bits
|
|
|
+local f_msbfirst = ProtoField.uint32("tm_sband_get_device_conf.msbfirst", "MsbFirst", base.HEX) -- 1 bit
|
|
|
+local f_fec = ProtoField.uint32("tm_sband_get_device_conf.fec", "Fec", base.HEX) -- 3 bits
|
|
|
+local f_prnd = ProtoField.uint32("tm_sband_get_device_conf.prnd", "PRnd", base.HEX) -- 1 bit
|
|
|
+local f_bchdec = ProtoField.uint32("tm_sband_get_device_conf.bchdec", "BchDec", base.HEX) -- 1 bit
|
|
|
+local f_accbcherr = ProtoField.uint32("tm_sband_get_device_conf.accbcherr", "AccBchErr", base.HEX) -- 1 bit
|
|
|
+local f_bchcountmode = ProtoField.uint32("tm_sband_get_device_conf.bchcountmode", "BchCountMode", base.HEX) -- 1 bit
|
|
|
+local f_pwroff = ProtoField.uint32("tm_sband_get_device_conf.pwroff", "PwrOff", base.DEC) -- 6 bits
|
|
|
+local f_rcvcalib = ProtoField.int32("tm_sband_get_device_conf.rcvcalib", "RcvCalib", base.DEC) -- 6 bits
|
|
|
+
|
|
|
+local f_xmtsymbfreq = ProtoField.uint32("tm_sband_get_device_conf.xmtsymbfreq", "XmtSymbFreq", base.DEC) -- 16 bits
|
|
|
+local f_rcvsymbfreq = ProtoField.uint32("tm_sband_get_device_conf.rcvsymbfreq", "RcvSymbFreq", base.DEC) -- 16 bits
|
|
|
+
|
|
|
+local f_rcvmode = ProtoField.uint32("tm_sband_get_device_conf.rcvmode", "RcvMode", base.HEX) -- 4 bits
|
|
|
+local f_rcvchannel = ProtoField.uint32("tm_sband_get_device_conf.rcvchannel", "RcvChannel", base.HEX) -- 2 bits
|
|
|
+local f_chnswitchon_0 = ProtoField.uint32("tm_sband_get_device_conf.chnswitchon_0", "ChSwitchOn_0", base.HEX) -- 1 bit
|
|
|
+local f_chnswitchon_1 = ProtoField.uint32("tm_sband_get_device_conf.chnswitchon_1", "ChSwitchOn_1", base.HEX) -- 1 bit
|
|
|
+local f_dropsample = ProtoField.uint32("tm_sband_get_device_conf.dropsample", "DropSample", base.DEC) -- 12 bits
|
|
|
+local f_dtminus = ProtoField.uint32("tm_sband_get_device_conf.dtminus", "dT_minus", base.HEX) -- 1 bit
|
|
|
+local f_dtplus = ProtoField.uint32("tm_sband_get_device_conf.dtplus", "dT_plus", base.HEX) -- 1 bit
|
|
|
+local f_reserve1 = ProtoField.uint32("tm_sband_get_device_conf.reserve1", "Reserve", base.HEX) -- 10 bits
|
|
|
+
|
|
|
+-- Register fields with the protocol
|
|
|
+tm_sband_get_device_conf.fields = {
|
|
|
+ f_rfe_rx0_on, f_rfe_tx0_on, f_rfe_pa0_on, f_rfe_rx1_on, f_rfe_tx1_on, f_rfe_pa1_on,
|
|
|
+ f_rfe_rx_tx1, f_rfe_out_en, f_rfe_gpio0, f_rfe_loop_det, f_rfe_lo_mux, f_rfe_pow_on,
|
|
|
+ f_rfe_da, f_rfe_cl, f_rfe_en_ad5304, f_rfe_en_synth, f_rfe_en3, f_rfe_en4, f_rfe_en5,
|
|
|
+ f_rfe_7v0_en, f_rfe_rsv_uint32, f_rfe_rx_tx0, f_rxmix_ch0, f_rxmix_ch1,f_txmix_ch0,
|
|
|
+ f_txmix_ch1, f_rxfreq_ch0, f_rxfreq_ch1, f_txfreq_ch0, f_txfreq_ch1, f_rxlow_ch0, f_rxlow_ch1,
|
|
|
+ f_rxhigh_ch0, f_rxhigh_ch1, f_txlow_ch0, f_txlow_ch1, f_txhigh_ch0, f_txhigh_ch1,
|
|
|
+ f_2rx2tx, f_txlevel_0, f_txlevel_1, f_refclk, f_reserve, f_modulat_0, f_mode_0, f_fec_0,
|
|
|
+ f_chen_0, f_prnd_0, f_asmstart_0, f_offsetmod_0, f_ch1_diff_ch2, f_chswitchon_0,
|
|
|
+ f_modulat_1, f_mode_1, f_fec_1, f_chen_1, f_prnd_1, f_asmstart_1, f_offsetmod_1, f_chswitchon_1,
|
|
|
+ f_offsetmodnormaly, f_atttxgain_0, f_atttxgain_1, f_trfrmsz, f_phioffset16, f_y16, f_txsampfact, f_rsmode,
|
|
|
+ f_rxgainmax, f_chen, f_modulat, f_msbfirst, f_fec, f_prnd, f_bchdec, f_accbcherr,
|
|
|
+ f_bchcountmode, f_pwroff, f_rcvcalib, f_xmtsymbfreq, f_rcvsymbfreq,
|
|
|
+ f_rcvmode, f_rcvchannel, f_chnswitchon_0, f_chnswitchon_1, f_dropsample, f_dtminus, f_dtplus, f_reserve1
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+ -- Create a subtree for the protocol
|
|
|
+ local subtree = tree:add(tm_sband_get_device_conf, buffer(), "TM SBAND Get Device Configuration")
|
|
|
+ --offset = offset + 8
|
|
|
+
|
|
|
+ -- Parse and add fields to the subtree
|
|
|
+ local data = buffer(offset, 4):le_uint()
|
|
|
+ local value = (data & 1)
|
|
|
+ subtree:add(f_rfe_rx0_on, value)
|
|
|
+
|
|
|
+ value = (data >> 1) & 1
|
|
|
+ subtree:add(f_rfe_tx0_on, value)
|
|
|
+
|
|
|
+ value = (data >> 2) & 1
|
|
|
+ subtree:add(f_rfe_pa0_on, data)
|
|
|
+
|
|
|
+ value = (data >> 3) & 1
|
|
|
+ subtree:add(f_rfe_rx_tx0, data)
|
|
|
+
|
|
|
+ value = (data >> 4) & 1
|
|
|
+ subtree:add(f_rfe_rx1_on, data)
|
|
|
+
|
|
|
+ value = (data >> 5) & 1
|
|
|
+ subtree:add(f_rfe_tx1_on, data)
|
|
|
+
|
|
|
+ value = (data >> 6) & 1
|
|
|
+ subtree:add(f_rfe_pa1_on, data)
|
|
|
+
|
|
|
+ value = (data >> 7) & 1
|
|
|
+ subtree:add(f_rfe_rx_tx1, data)
|
|
|
+
|
|
|
+ value = (data >> 8) & 1
|
|
|
+ subtree:add(f_rfe_out_en, data)
|
|
|
+
|
|
|
+ value = (data >> 9) & 1
|
|
|
+ subtree:add(f_rfe_gpio0, data)
|
|
|
+
|
|
|
+ value = (data >> 10) & 1
|
|
|
+ subtree:add(f_rfe_loop_det, data)
|
|
|
+
|
|
|
+ value = (data >> 11) & 1
|
|
|
+ subtree:add(f_rfe_lo_mux, data)
|
|
|
+
|
|
|
+ value = (data >> 12) & 1
|
|
|
+ subtree:add(f_rfe_pow_on, data)
|
|
|
+
|
|
|
+ value = (data >> 13) & 1
|
|
|
+ subtree:add(f_rfe_da, data)
|
|
|
+
|
|
|
+ value = (data >> 14) & 1
|
|
|
+ subtree:add(f_rfe_cl, data)
|
|
|
+
|
|
|
+ value = (data >> 15) & 1
|
|
|
+ subtree:add(f_rfe_en_ad5304, data)
|
|
|
+
|
|
|
+ value = (data >> 16) & 1
|
|
|
+ subtree:add(f_rfe_en_synth, data)
|
|
|
+
|
|
|
+ value = (data >> 17) & 1
|
|
|
+ subtree:add(f_rfe_en3, data)
|
|
|
+
|
|
|
+ value = (data >> 18) & 1
|
|
|
+ subtree:add(f_rfe_en4, data)
|
|
|
+
|
|
|
+ value = (data >> 19) & 1
|
|
|
+ subtree:add(f_rfe_en5, data)
|
|
|
+
|
|
|
+ value = (data >> 20) & 1
|
|
|
+ subtree:add(f_rfe_7v0_en, data)
|
|
|
+
|
|
|
+ value = (data >> 21) & 0xfff3
|
|
|
+ subtree:add(f_rfe_rsv_uint32, data)
|
|
|
+
|
|
|
+
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_rxmix_ch0, buffer(offset, 4):le_uint()) -- First 4 bytes for RxMix Channel 0
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_rxmix_ch1, buffer(offset, 4):le_uint()) -- Next 4 bytes for RxMix Channel 1
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_txmix_ch0, buffer(offset, 4):le_uint()) -- Next 4 bytes for TxMix Channel 0
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_txmix_ch1, buffer(offset, 4):le_uint()) -- Next 4 bytes for TxMix Channel 1
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_rxfreq_ch0, buffer(offset, 4):le_uint()) -- Next 4 bytes for RxFreq Channel 0
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_rxfreq_ch1, buffer(offset, 4):le_uint()) -- Next 4 bytes for RxFreq Channel 1
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_txfreq_ch0, buffer(offset, 4):le_uint()) -- Next 4 bytes for TxFreq Channel 0
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_txfreq_ch1, buffer(offset, 4):le_uint()) -- Next 4 bytes for TxFreq Channel 1
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_rxlow_ch0, buffer(offset, 4):le_uint()) -- First 4 bytes for RxLow Channel 0
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_rxlow_ch1, buffer(offset, 4):le_uint()) -- Next 4 bytes for RxLow Channel 1
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_rxhigh_ch0, buffer(offset, 4):le_uint()) -- Next 4 bytes for RxHigh Channel 0
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_rxhigh_ch1, buffer(offset, 4):le_uint()) -- Next 4 bytes for RxHigh Channel 1
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_txlow_ch0, buffer(offset, 4):le_uint()) -- Next 4 bytes for TxLow Channel 0
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_txlow_ch1, buffer(offset, 4):le_uint()) -- Next 4 bytes for TxLow Channel 1
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_txhigh_ch0, buffer(offset, 4):le_uint()) -- Next 4 bytes for TxHigh Channel 0
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ subtree:add(f_txhigh_ch1, buffer(offset, 4):le_uint()) -- Next 4 bytes for TxHigh Channel 1
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ local data = buffer(offset , 4):le_uint()
|
|
|
+ local value = data & 1
|
|
|
+ subtree:add(f_2rx2tx, value) -- 2Rx2Tx (bit 31)
|
|
|
+
|
|
|
+ value = (data >> 1) & 0xff3
|
|
|
+ subtree:add(f_txlevel_0, value) -- TxLevel 0 (bits 20-30)
|
|
|
+
|
|
|
+ value = (data >> 12) & 0xff3
|
|
|
+ subtree:add(f_txlevel_1, value) -- TxLevel 1 (bits 10-20)
|
|
|
+
|
|
|
+ value = (data >> 23) & 0xff
|
|
|
+ subtree:add(f_refclk, value) -- RefClk (bits 2-9)
|
|
|
+
|
|
|
+ value = (data >> 31) & 1
|
|
|
+ subtree:add(f_reserve, value) -- Reserve (bit 0)
|
|
|
+
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ data = buffer(offset, 2):le_uint()
|
|
|
+ value = data & 0x7
|
|
|
+ subtree:add(f_modulat_0, value) -- 3 bits
|
|
|
+
|
|
|
+ value = (data >> 3) & 0xf
|
|
|
+ subtree:add(f_mode_0, value) -- 4 bits
|
|
|
+
|
|
|
+ value = (data >> 7) & 0x7
|
|
|
+ subtree:add(f_fec_0, value) -- 3 bits
|
|
|
+
|
|
|
+ value = (data >> 10) & 1
|
|
|
+ subtree:add(f_chen_0, value) -- 1 bit
|
|
|
+
|
|
|
+ value = (data >> 11) & 1
|
|
|
+ subtree:add(f_prnd_0, value) -- 1 bit
|
|
|
+
|
|
|
+ value = (data >> 12) & 1
|
|
|
+ subtree:add(f_asmstart_0, value) -- 1 bit
|
|
|
+
|
|
|
+ value = (data >> 13) & 1
|
|
|
+ subtree:add(f_offsetmod_0, value) -- 1 bit
|
|
|
+
|
|
|
+ value = (data >> 14) & 1
|
|
|
+ subtree:add(f_ch1_diff_ch2, value) -- 1 bit
|
|
|
+
|
|
|
+ value = (data >> 15) & 1
|
|
|
+ subtree:add(f_chswitchon_0, value) -- 1 bit
|
|
|
+
|
|
|
+ offset = offset + 2
|
|
|
+
|
|
|
+ data = buffer(offset , 2):le_uint()
|
|
|
+ value = data & 7
|
|
|
+ subtree:add(f_modulat_1, value) -- 3 bits
|
|
|
+
|
|
|
+ value = (data >> 3) & 0xf
|
|
|
+ subtree:add(f_mode_1, value) -- 4 bits
|
|
|
+
|
|
|
+ value = (data >> 7) & 0x7
|
|
|
+ subtree:add(f_fec_1, value) -- 3 bits
|
|
|
+
|
|
|
+ value = (data >> 10) & 0x1
|
|
|
+ subtree:add(f_chen_1, value) -- 1 bit
|
|
|
+
|
|
|
+ value = (data >> 11) & 0x1
|
|
|
+ subtree:add(f_prnd_1, value) -- 1 bit
|
|
|
+
|
|
|
+ value = (data >> 12) & 0x1
|
|
|
+ subtree:add(f_asmstart_1, value) -- 1 bit
|
|
|
+
|
|
|
+ value = (data >> 13) & 0x1
|
|
|
+ subtree:add(f_offsetmod_1, value) -- 1 bit
|
|
|
+
|
|
|
+ value = (data >> 14) & 0x1
|
|
|
+ subtree:add(f_chswitchon_1, value) -- 1 bit
|
|
|
+
|
|
|
+ value = (data >> 15) & 0x1
|
|
|
+ subtree:add(f_offsetmodnormaly, value) -- 1 bit
|
|
|
+ offset = offset + 2
|
|
|
+
|
|
|
+
|
|
|
+ data = buffer(offset , 4):le_uint()
|
|
|
+ value = data & 0x000003ff
|
|
|
+ subtree:add(f_atttxgain_0, value) -- AttTxGain_0 (bits 22–31)
|
|
|
+
|
|
|
+ value = (data >> 10) & 0x000003ff
|
|
|
+ subtree:add(f_atttxgain_1, value) -- AttTxGain_1 (bits 12–21)
|
|
|
+
|
|
|
+ value = (data >> 20) & 0x00000fff
|
|
|
+ subtree:add(f_trfrmsz, value) -- TrFrmSz (bits 0–11)
|
|
|
+
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ data = buffer(offset, 4):le_uint()
|
|
|
+ value = data & 0x1f
|
|
|
+ subtree:add(f_phioffset16, value) -- PhiOffset16 (bits 27–31)
|
|
|
+
|
|
|
+ value = (data >> 5) & 0x1fff
|
|
|
+ subtree:add(f_y16, value) -- Y16 (bits 14–26)
|
|
|
+
|
|
|
+ value = (data >> 18) & 0x3ff
|
|
|
+ subtree:add(f_txsampfact, value) -- TxSampFact (bits 2–11)
|
|
|
+
|
|
|
+ value = (data >> 28) & 0xf
|
|
|
+ subtree:add(f_rsmode, value) -- RsMode (bits 0–3)
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ data = buffer(offset , 2):le_uint()
|
|
|
+ value = data & 0xff
|
|
|
+ subtree:add(f_rxgainmax, value)
|
|
|
+
|
|
|
+ -- Add ChEn (bit 23)
|
|
|
+ value = (data >> 8) & 1
|
|
|
+ subtree:add(f_chen, value)
|
|
|
+
|
|
|
+ -- Add Modulat (bits 20–22)
|
|
|
+ value = (data >> 9) & 0x7
|
|
|
+ subtree:add(f_modulat, value)
|
|
|
+
|
|
|
+ -- Add MsbFirst (bit 19)
|
|
|
+ value = (data >> 12) & 0x1
|
|
|
+ subtree:add(f_msbfirst, value)
|
|
|
+
|
|
|
+ -- Add Fec (bits 16–18)
|
|
|
+ value = (data >> 13) & 0x7
|
|
|
+ subtree:add(f_fec, value)
|
|
|
+
|
|
|
+ offset = offset + 2
|
|
|
+
|
|
|
+ data = buffer(offset , 2):le_uint()
|
|
|
+ value = data & 0x1
|
|
|
+ -- Add PRnd (bit 15)
|
|
|
+ subtree:add(f_prnd, value)
|
|
|
+
|
|
|
+ -- Add BchDec (bit 14)
|
|
|
+ value = (data >> 1) & 0x1
|
|
|
+ subtree:add(f_bchdec, value)
|
|
|
+
|
|
|
+ -- Add AccBchErr (bit 13)
|
|
|
+ value = (data >> 2) & 0x1
|
|
|
+ subtree:add(f_accbcherr, value)
|
|
|
+
|
|
|
+ -- Add BchCountMode (bit 12)
|
|
|
+ value = (data >> 3) & 0x1
|
|
|
+ subtree:add(f_bchcountmode, value)
|
|
|
+
|
|
|
+ -- Add PwrOff (bits 6–11)
|
|
|
+ value = (data >> 4) & 0x003f
|
|
|
+ subtree:add(f_pwroff, value)
|
|
|
+
|
|
|
+ -- Add RcvCalib (bits 0–5)
|
|
|
+ value = (data >> 10) & 0x003f
|
|
|
+ subtree:add(f_rcvcalib, value)
|
|
|
+
|
|
|
+ offset = offset + 2
|
|
|
+
|
|
|
+ data = buffer(offset , 4):le_uint()
|
|
|
+ subtree:add("data : %d", data)
|
|
|
+ value = data & 0x0000ffff
|
|
|
+ subtree:add(f_xmtsymbfreq, value)
|
|
|
+
|
|
|
+ -- Add RcvSymbFreq (bits 0–15)
|
|
|
+ value = (data >> 16) & 0xffff
|
|
|
+ subtree:add(f_rcvsymbfreq, value)
|
|
|
+
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+ data = buffer(offset ,4):le_uint()
|
|
|
+ value = data & 0xf
|
|
|
+ subtree:add(f_rcvmode, value)
|
|
|
+
|
|
|
+ -- Add RcvChannel (bits 26–27)
|
|
|
+ value = (data >> 4) & 0x3
|
|
|
+ subtree:add(f_rcvchannel, value)
|
|
|
+
|
|
|
+ -- Add ChSwitchOn_0 (bit 25)
|
|
|
+ value = (data >> 6) & 0x1
|
|
|
+ subtree:add(f_chnswitchon_0, value)
|
|
|
+
|
|
|
+ -- Add ChSwitchOn_1 (bit 24)
|
|
|
+ value = (data >> 7) & 0x1
|
|
|
+ subtree:add(f_chnswitchon_1, value)
|
|
|
+
|
|
|
+ -- Add DropSample (bits 12–23)
|
|
|
+ value = (data >> 8) & 0xfff
|
|
|
+ subtree:add(f_dropsample, value)
|
|
|
+
|
|
|
+ -- Add dT_minus (bit 7)
|
|
|
+ value = (data >> 20) & 0x1
|
|
|
+ subtree:add(f_dtminus, value)
|
|
|
+
|
|
|
+ -- Add dT_plus (bit 6)
|
|
|
+ value = (data >> 21) & 0x1
|
|
|
+ subtree:add(f_dtplus, value)
|
|
|
+
|
|
|
+ -- Add Reserve (bits 0–9)
|
|
|
+ value = (data >> 22) & 0x3ff
|
|
|
+ subtree:add(f_reserve, value)
|
|
|
+ offset = offset + 4
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+end
|