diff --git a/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf b/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf index b62018e882f..d1ab20a8d46 100644 --- a/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf +++ b/epan/dissectors/asn1/nr-rrc/nr-rrc.cnf @@ -1495,13 +1495,13 @@ SINR-RangeEUTRA DISPLAY=BASE_CUSTOM STRINGS=CF_FUNC(nr_rrc_SINR_RangeEUTRA_fmt) MsgA-PUSCH-Config-r16/msgA-DeltaPreamble-r16 DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_decibels #.TYPE_ATTR -MeasTriggerQuantityOffset/rsrp DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_dbm +MeasTriggerQuantityOffset/rsrp DISPLAY=BASE_CUSTOM STRINGS=CF_FUNC(nr_rrc_MeasTriggerQuantityOffset_fmt) #.TYPE_ATTR -MeasTriggerQuantityOffset/rsrq DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_decibels +MeasTriggerQuantityOffset/rsrq DISPLAY=BASE_CUSTOM STRINGS=CF_FUNC(nr_rrc_MeasTriggerQuantityOffset_fmt) #.TYPE_ATTR -MeasTriggerQuantityOffset/sinr DISPLAY=BASE_DEC|BASE_UNIT_STRING STRINGS=&units_decibels +MeasTriggerQuantityOffset/sinr DISPLAY=BASE_CUSTOM STRINGS=CF_FUNC(nr_rrc_MeasTriggerQuantityOffset_fmt) #.TYPE_ATTR ReselectionThreshold DISPLAY=BASE_CUSTOM STRINGS=CF_FUNC(nr_rrc_ReselectionThreshold_fmt) diff --git a/epan/dissectors/asn1/nr-rrc/packet-nr-rrc-template.c b/epan/dissectors/asn1/nr-rrc/packet-nr-rrc-template.c index 5f7df7c0883..90348cc4daf 100644 --- a/epan/dissectors/asn1/nr-rrc/packet-nr-rrc-template.c +++ b/epan/dissectors/asn1/nr-rrc/packet-nr-rrc-template.c @@ -520,6 +520,14 @@ nr_rrc_SRS_RSRP_r16_fmt(gchar *s, guint32 v) } } +static void +nr_rrc_MeasTriggerQuantityOffset_fmt(gchar *s, guint32 v) +{ + gint32 d = (gint32)v; + + g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", (float)d/2, d); +} + #include "packet-nr-rrc-fn.c" int diff --git a/epan/dissectors/packet-nr-rrc.c b/epan/dissectors/packet-nr-rrc.c index 9ae511358b4..4243ae083f6 100644 --- a/epan/dissectors/packet-nr-rrc.c +++ b/epan/dissectors/packet-nr-rrc.c @@ -9337,6 +9337,14 @@ nr_rrc_SRS_RSRP_r16_fmt(gchar *s, guint32 v) } } +static void +nr_rrc_MeasTriggerQuantityOffset_fmt(gchar *s, guint32 v) +{ + gint32 d = (gint32)v; + + g_snprintf(s, ITEM_LABEL_LENGTH, "%.1fdB (%d)", (float)d/2, d); +} + /*--- Included file: packet-nr-rrc-fn.c ---*/ #line 1 "./asn1/nr-rrc/packet-nr-rrc-fn.c" @@ -90318,7 +90326,7 @@ static int dissect_UE_NR_Capability_v15c0_PDU(tvbuff_t *tvb _U_, packet_info *pi /*--- End of included file: packet-nr-rrc-fn.c ---*/ -#line 524 "./asn1/nr-rrc/packet-nr-rrc-template.c" +#line 532 "./asn1/nr-rrc/packet-nr-rrc-template.c" int dissect_nr_rrc_nr_RLF_Report_r16_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { @@ -103755,15 +103763,15 @@ proto_register_nr_rrc(void) { "SINR_Range", HFILL }}, { &hf_nr_rrc_measTriggerQuantityOffset_rsrp, { "rsrp", "nr-rrc.measTriggerQuantityOffset.rsrp", - FT_INT32, BASE_DEC|BASE_UNIT_STRING, &units_dbm, 0, + FT_INT32, BASE_CUSTOM, CF_FUNC(nr_rrc_MeasTriggerQuantityOffset_fmt), 0, "INTEGER_M30_30", HFILL }}, { &hf_nr_rrc_measTriggerQuantityOffset_rsrq, { "rsrq", "nr-rrc.measTriggerQuantityOffset.rsrq", - FT_INT32, BASE_DEC|BASE_UNIT_STRING, &units_decibels, 0, + FT_INT32, BASE_CUSTOM, CF_FUNC(nr_rrc_MeasTriggerQuantityOffset_fmt), 0, "INTEGER_M30_30", HFILL }}, { &hf_nr_rrc_measTriggerQuantityOffset_sinr, { "sinr", "nr-rrc.measTriggerQuantityOffset.sinr", - FT_INT32, BASE_DEC|BASE_UNIT_STRING, &units_decibels, 0, + FT_INT32, BASE_CUSTOM, CF_FUNC(nr_rrc_MeasTriggerQuantityOffset_fmt), 0, "INTEGER_M30_30", HFILL }}, { &hf_nr_rrc_measReportQuantity_rsrp, { "rsrp", "nr-rrc.measReportQuantity.rsrp", @@ -114687,7 +114695,7 @@ proto_register_nr_rrc(void) { "T_sl_Rx_256QAM_r16_01", HFILL }}, /*--- End of included file: packet-nr-rrc-hfarr.c ---*/ -#line 556 "./asn1/nr-rrc/packet-nr-rrc-template.c" +#line 564 "./asn1/nr-rrc/packet-nr-rrc-template.c" { &hf_nr_rrc_serialNumber_gs, { "Geographical Scope", "nr-rrc.serialNumber.gs", @@ -117248,7 +117256,7 @@ proto_register_nr_rrc(void) { &ett_nr_rrc_T_csi_ReportSidelink_r16, /*--- End of included file: packet-nr-rrc-ettarr.c ---*/ -#line 694 "./asn1/nr-rrc/packet-nr-rrc-template.c" +#line 702 "./asn1/nr-rrc/packet-nr-rrc-template.c" &ett_nr_rrc_DedicatedNAS_Message, &ett_nr_rrc_targetRAT_MessageContainer, &ett_nr_rrc_nas_Container, @@ -117338,7 +117346,7 @@ proto_register_nr_rrc(void) { /*--- End of included file: packet-nr-rrc-dis-reg.c ---*/ -#line 763 "./asn1/nr-rrc/packet-nr-rrc-template.c" +#line 771 "./asn1/nr-rrc/packet-nr-rrc-template.c" nr_rrc_etws_cmas_dcs_hash = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), g_direct_hash, g_direct_equal);