From c336c3eed2ade238ac572a310a1624381348040c Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 18 Jan 2021 16:35:03 +0000 Subject: [PATCH] added to_number() conversion of rrc_nr poll_byte --- lib/include/srslte/asn1/rrc_nr.h | 2 ++ lib/src/asn1/rrc_nr.cc | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/lib/include/srslte/asn1/rrc_nr.h b/lib/include/srslte/asn1/rrc_nr.h index b71ea9f06..393395355 100644 --- a/lib/include/srslte/asn1/rrc_nr.h +++ b/lib/include/srslte/asn1/rrc_nr.h @@ -20011,8 +20011,10 @@ struct poll_byte_opts { spare1, nulltype } value; + typedef int32_t number_type; std::string to_string() const; + int32_t to_number() const; }; typedef enumerated poll_byte_e; diff --git a/lib/src/asn1/rrc_nr.cc b/lib/src/asn1/rrc_nr.cc index 2499cdf64..95b9d3660 100644 --- a/lib/src/asn1/rrc_nr.cc +++ b/lib/src/asn1/rrc_nr.cc @@ -43495,6 +43495,14 @@ std::string poll_byte_opts::to_string() const "spare4", "spare3", "spare2", "spare1"}; return convert_enum_idx(options, 64, value, "poll_byte_e"); } +int32_t poll_byte_opts::to_number() const +{ + static const int32_t options[] = {1, 2, 5, 8, 10, 15, 25, 50, 75, 100, 125, + 250, 375, 500, 750, 1000, 1250, 1500, 2000, 3000, 4000, 4500, + 5000, 5500, 6000, 6500, 7000, 7500, 8000, 9000, 10000, 11000, 12000, + 13000, 14000, 15000, 16000, 17000, 18000, 20000, 25000, 30000, 40000, -1}; + return map_enum_number(options, 44, value, "poll_byte_e"); +} // PollPDU ::= ENUMERATED std::string poll_pdu_opts::to_string() const