mirror of https://github.com/PentHertz/srsLTE.git
s1ap - set s1 handover cause as s1 intra system handover triggered
This commit is contained in:
parent
8c7aed1f81
commit
90bba3b85e
|
@ -23,11 +23,9 @@
|
|||
#include <inttypes.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h> //for close(), sleep()
|
||||
|
||||
using srsran::s1ap_mccmnc_to_plmn;
|
||||
using srsran::uint32_to_uint8;
|
||||
|
@ -1705,8 +1703,7 @@ bool s1ap::ue::send_ho_required(uint32_t target_eci,
|
|||
container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id;
|
||||
container.direct_forwarding_path_availability_present = false; // NOTE: X2 for fwd path not supported
|
||||
container.handov_type.value.value = handov_type_opts::intralte; // NOTE: only intra-LTE HO supported
|
||||
container.cause.value.set_radio_network().value = cause_radio_network_opts::unspecified;
|
||||
// LIBLTE_S1AP_CAUSERADIONETWORK_S1_INTRA_SYSTEM_HANDOVER_TRIGGERED;
|
||||
container.cause.value.set_radio_network().value = cause_radio_network_opts::s1_intra_sys_ho_triggered;
|
||||
|
||||
/*** set the target eNB ***/
|
||||
container.csg_id_present = false; // NOTE: CSG/hybrid target cell not supported
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
/**
|
||||
*
|
||||
* \section COPYRIGHT
|
||||
*
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* By using this file, you agree to the terms and conditions set
|
||||
* forth in the LICENSE file which can be found at the top level of
|
||||
* the distribution.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "srsenb/hdr/stack/upper/s1ap.h"
|
||||
#include "srsenb/test/common/dummy_classes.h"
|
||||
#include "srsran/common/test_common.h"
|
||||
|
||||
using namespace srsenb;
|
||||
|
||||
class stack_dummy : public srsenb::stack_interface_s1ap_lte
|
||||
{
|
||||
public:
|
||||
void add_mme_socket(int fd) {}
|
||||
void remove_mme_socket(int fd) {}
|
||||
};
|
||||
|
||||
void test_s1ap_erab_setup()
|
||||
{
|
||||
srsran::task_scheduler task_sched;
|
||||
srslog::basic_logger& logger = srslog::fetch_basic_logger("S1AP");
|
||||
s1ap s1ap_obj(&task_sched, logger);
|
||||
rrc_dummy rrc;
|
||||
stack_dummy stack;
|
||||
|
||||
s1ap_args_t args = {};
|
||||
args.cell_id = 0x01;
|
||||
args.enb_id = 0x19B;
|
||||
args.mcc = 907;
|
||||
args.mnc = 70;
|
||||
args.s1c_bind_addr = "127.0.0.100";
|
||||
args.tac = 7;
|
||||
args.gtp_bind_addr = "127.0.0.100";
|
||||
args.mme_addr = "127.0.0.1";
|
||||
|
||||
TESTASSERT(s1ap_obj.init(args, &rrc, &stack) == SRSRAN_SUCCESS);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// Setup logging.
|
||||
auto& logger = srslog::fetch_basic_logger("S1AP");
|
||||
logger.set_level(srslog::basic_levels::debug);
|
||||
logger.set_hex_dump_max_size(-1);
|
||||
|
||||
// Start the log backend.
|
||||
srsran::test_init(argc, argv);
|
||||
|
||||
test_s1ap_erab_setup();
|
||||
}
|
Loading…
Reference in New Issue