rrc_nr: fix linker error in setup_release_c

move implementation to cc file to avoid

[build] /bin/ld: CMakeFiles/rrc_nr_asn1_test.dir/rrc_nr_test.cc.o: in function `asn1::rrc_nr::setup_release_c<asn1::rrc_nr::pdcch_serving_cell_cfg_s>::set_setup()':
[build] /home/anpu/src/srsLTE/lib/include/srsran/asn1/rrc_nr.h:2276: undefined reference to `asn1::rrc_nr::setup_release_c<asn1::rrc_nr::pdcch_serving_cell_cfg_s>::set(asn1::rrc_nr::setup_release_c<asn1::rrc_nr::pdcch_serving_cell_cfg_s>::types_opts::options)'
[build] clang: error: linker command failed with exit code 1 (use -v to see invocation)
master
Andre Puschmann 3 years ago
parent 4379c20eb9
commit fa461f0129

@ -2254,11 +2254,8 @@ struct setup_release_c {
// choice methods // choice methods
setup_release_c() = default; setup_release_c() = default;
void set(typename types::options e = types::nulltype);
types type() const { return type_; } types type() const { return type_; }
SRSASN_CODE pack(bit_ref& bref) const;
SRSASN_CODE unpack(cbit_ref& bref);
void to_json(json_writer& j) const;
// getters // getters
elem_type_paramT_& setup() elem_type_paramT_& setup()
{ {
@ -2271,6 +2268,57 @@ struct setup_release_c {
return c; return c;
} }
void set_release() { set(types::release); } void set_release() { set(types::release); }
void set(typename types::options e) { type_ = e; }
void to_json(json_writer& j) const
{
j.start_obj();
switch (type_) {
case types::release:
break;
case types::setup:
break;
default:
log_invalid_choice_id(type_, "setup_release_c");
}
j.end_obj();
}
SRSASN_CODE pack(bit_ref& bref) const
{
type_.pack(bref);
switch (type_) {
case types::release:
break;
case types::setup:
HANDLE_CODE(c.pack(bref));
break;
default:
log_invalid_choice_id(type_, "setup_release_c");
return SRSASN_ERROR_ENCODE_FAIL;
}
return SRSASN_SUCCESS;
}
SRSASN_CODE unpack(cbit_ref& bref)
{
types e;
e.unpack(bref);
set(e);
switch (type_) {
case types::release:
break;
case types::setup:
HANDLE_CODE(c.unpack(bref));
break;
default:
log_invalid_choice_id(type_, "setup_release_c");
return SRSASN_ERROR_DECODE_FAIL;
}
return SRSASN_SUCCESS;
}
elem_type_paramT_& set_setup() elem_type_paramT_& set_setup()
{ {
set(types::setup); set(types::setup);

@ -4484,61 +4484,6 @@ uint8_t sib_type_info_s::type_opts::to_number() const
return map_enum_number(options, 8, value, "sib_type_info_s::type_e_"); return map_enum_number(options, 8, value, "sib_type_info_s::type_e_");
} }
// SetupRelease{ElementTypeParam} ::= CHOICE
template <class elem_type_paramT_>
void setup_release_c<elem_type_paramT_>::set(typename types::options e)
{
type_ = e;
}
template <class elem_type_paramT_>
void setup_release_c<elem_type_paramT_>::to_json(json_writer& j) const
{
j.start_obj();
switch (type_) {
case types::release:
break;
case types::setup:
break;
default:
log_invalid_choice_id(type_, "setup_release_c");
}
j.end_obj();
}
template <class elem_type_paramT_>
SRSASN_CODE setup_release_c<elem_type_paramT_>::pack(bit_ref& bref) const
{
type_.pack(bref);
switch (type_) {
case types::release:
break;
case types::setup:
HANDLE_CODE(c.pack(bref));
break;
default:
log_invalid_choice_id(type_, "setup_release_c");
return SRSASN_ERROR_ENCODE_FAIL;
}
return SRSASN_SUCCESS;
}
template <class elem_type_paramT_>
SRSASN_CODE setup_release_c<elem_type_paramT_>::unpack(cbit_ref& bref)
{
types e;
e.unpack(bref);
set(e);
switch (type_) {
case types::release:
break;
case types::setup:
HANDLE_CODE(c.unpack(bref));
break;
default:
log_invalid_choice_id(type_, "setup_release_c");
return SRSASN_ERROR_DECODE_FAIL;
}
return SRSASN_SUCCESS;
}
// UAC-BarringPerCat ::= SEQUENCE // UAC-BarringPerCat ::= SEQUENCE
SRSASN_CODE uac_barr_per_cat_s::pack(bit_ref& bref) const SRSASN_CODE uac_barr_per_cat_s::pack(bit_ref& bref) const
{ {

Loading…
Cancel
Save