added extra operators and remove rrc_asn1 in some cmake targets

master
Francisco Paisana 6 years ago committed by Andre Puschmann
parent b936629221
commit c5509caece

@ -52,6 +52,7 @@ struct plmn_id_t {
int from_number(uint16_t mcc_num, uint16_t mnc_num); int from_number(uint16_t mcc_num, uint16_t mnc_num);
int from_string(const std::string& plmn_str); int from_string(const std::string& plmn_str);
std::string to_string() const; std::string to_string() const;
bool operator==(const plmn_id_t& other);
}; };
struct s_tmsi_t { struct s_tmsi_t {

@ -110,6 +110,12 @@ std::string plmn_id_t::to_string() const
return mcc_str + mnc_str; return mcc_str + mnc_str;
} }
bool plmn_id_t::operator==(const plmn_id_t& other)
{
return std::equal(&mcc[0], &mcc[3], &other.mcc[0]) and nof_mnc_digits == other.nof_mnc_digits and
std::equal(&mnc[0], &mnc[nof_mnc_digits], &other.mnc[0]);
}
s_tmsi_t::s_tmsi_t(const asn1::rrc::s_tmsi_s& asn1_type) s_tmsi_t::s_tmsi_t(const asn1::rrc::s_tmsi_s& asn1_type)
{ {
from_asn1(asn1_type); from_asn1(asn1_type);

@ -27,11 +27,11 @@ target_link_libraries(rlc_am_control_test srslte_upper srslte_phy)
add_test(rlc_am_control_test rlc_am_control_test) add_test(rlc_am_control_test rlc_am_control_test)
add_executable(rlc_am_test rlc_am_test.cc) add_executable(rlc_am_test rlc_am_test.cc)
target_link_libraries(rlc_am_test srslte_upper srslte_phy srslte_common rrc_asn1) target_link_libraries(rlc_am_test srslte_upper srslte_phy srslte_common)
add_test(rlc_am_test rlc_am_test) add_test(rlc_am_test rlc_am_test)
add_executable(rlc_stress_test rlc_stress_test.cc) add_executable(rlc_stress_test rlc_stress_test.cc)
target_link_libraries(rlc_stress_test srslte_upper srslte_phy srslte_common rrc_asn1 ${Boost_LIBRARIES}) target_link_libraries(rlc_stress_test srslte_upper srslte_phy srslte_common ${Boost_LIBRARIES})
add_test(rlc_am_stress_test rlc_stress_test --mode=AM --loglevel 1 --sdu_gen_delay 250) add_test(rlc_am_stress_test rlc_stress_test --mode=AM --loglevel 1 --sdu_gen_delay 250)
add_test(rlc_um_stress_test rlc_stress_test --mode=UM --loglevel 1) add_test(rlc_um_stress_test rlc_stress_test --mode=UM --loglevel 1)
add_test(rlc_tm_stress_test rlc_stress_test --mode=TM --loglevel 1 --random_opp=false) add_test(rlc_tm_stress_test rlc_stress_test --mode=TM --loglevel 1 --random_opp=false)
@ -44,7 +44,7 @@ target_link_libraries(rlc_um_data_test srslte_upper srslte_phy srslte_common)
add_test(rlc_um_data_test rlc_um_data_test) add_test(rlc_um_data_test rlc_um_data_test)
add_executable(rlc_um_test rlc_um_test.cc) add_executable(rlc_um_test rlc_um_test.cc)
target_link_libraries(rlc_um_test srslte_upper srslte_phy rrc_asn1) target_link_libraries(rlc_um_test srslte_upper srslte_phy)
add_test(rlc_um_test rlc_um_test) add_test(rlc_um_test rlc_um_test)
######################################################################## ########################################################################

Loading…
Cancel
Save