Commit 977790c3 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Clean up N2 Handover procedure

parent 96e00243
This diff is collapsed.
...@@ -61,7 +61,7 @@ class amf_n2 : public ngap::ngap_app { ...@@ -61,7 +61,7 @@ class amf_n2 : public ngap::ngap_app {
bool handle_itti_message(itti_handover_required& itti_msg); bool handle_itti_message(itti_handover_required& itti_msg);
void handle_itti_message(itti_handover_request_Ack& itti_msg); void handle_itti_message(itti_handover_request_Ack& itti_msg);
void handle_itti_message(itti_handover_notify& itti_msg); void handle_itti_message(itti_handover_notify& itti_msg);
void handle_itti_message(itti_uplinkranstatsutransfer& itti_msg); void handle_itti_message(itti_uplink_ran_status_transfer& itti_msg);
void send_handover_preparation_failure( void send_handover_preparation_failure(
const unsigned long amf_ue_ngap_id, const uint32_t ran_ue_ngap_id, const unsigned long amf_ue_ngap_id, const uint32_t ran_ue_ngap_id,
const sctp_assoc_id_t& gnb_assoc_id); const sctp_assoc_id_t& gnb_assoc_id);
......
...@@ -89,7 +89,7 @@ typedef enum { ...@@ -89,7 +89,7 @@ typedef enum {
HANDOVER_REQUIRED, HANDOVER_REQUIRED,
HANDOVER_REQUEST_ACK, HANDOVER_REQUEST_ACK,
HANDOVER_NOTIFY, HANDOVER_NOTIFY,
UPLINKRANSTATUSTRANSFER, UPLINK_RAN_STATUS_TRANSFER,
PDU_SESS_RES_SET_RESP, PDU_SESS_RES_SET_RESP,
TIME_OUT, TIME_OUT,
HEALTH_PING, HEALTH_PING,
......
...@@ -238,12 +238,12 @@ class itti_handover_notify : public itti_msg_n2 { ...@@ -238,12 +238,12 @@ class itti_handover_notify : public itti_msg_n2 {
HandoverNotifyMsg* handovernotify; HandoverNotifyMsg* handovernotify;
}; };
class itti_uplinkranstatsutransfer : public itti_msg_n2 { class itti_uplink_ran_status_transfer : public itti_msg_n2 {
public: public:
itti_uplinkranstatsutransfer( itti_uplink_ran_status_transfer(
const task_id_t origin, const task_id_t destination) const task_id_t origin, const task_id_t destination)
: itti_msg_n2(UPLINKRANSTATUSTRANSFER, origin, destination) {} : itti_msg_n2(UPLINK_RAN_STATUS_TRANSFER, origin, destination) {}
itti_uplinkranstatsutransfer(const itti_uplinkranstatsutransfer& i) itti_uplink_ran_status_transfer(const itti_uplink_ran_status_transfer& i)
: itti_msg_n2(i) {} : itti_msg_n2(i) {}
UplinkRANStatusTransfer* uplinkrantransfer; UplinkRANStatusTransfer* uplinkrantransfer;
}; };
......
...@@ -872,22 +872,22 @@ int uplink_ran_status_transfer( ...@@ -872,22 +872,22 @@ int uplink_ran_status_transfer(
const sctp_assoc_id_t assoc_id, const sctp_stream_id_t stream, const sctp_assoc_id_t assoc_id, const sctp_stream_id_t stream,
struct Ngap_NGAP_PDU* message_p) { struct Ngap_NGAP_PDU* message_p) {
Logger::ngap().debug( Logger::ngap().debug(
"Sending itti uplink ran status transfer to TASK_AMF_N2"); "Sending ITTI Uplink RAN Status Transfer to TASK_AMF_N2");
/*receive uplinkranstatustransfer*/
asn_fprint(stderr, &asn_DEF_Ngap_NGAP_PDU, message_p); asn_fprint(stderr, &asn_DEF_Ngap_NGAP_PDU, message_p);
UplinkRANStatusTransfer* Uplinkranstatustransfer = UplinkRANStatusTransfer* Uplinkranstatustransfer =
new UplinkRANStatusTransfer(); new UplinkRANStatusTransfer();
if (!Uplinkranstatustransfer->defromPDU(message_p)) { if (!Uplinkranstatustransfer->defromPDU(message_p)) {
Logger::ngap().error("Decoding Uplinkranstatustransfer message error"); Logger::ngap().error("Decoding Uplink RAN Status Transfer message error");
return -1; return -1;
} }
itti_uplinkranstatsutransfer* itti_uplinkran_sta_tran = itti_uplink_ran_status_transfer* itti_uplinkran_sta_tran =
new itti_uplinkranstatsutransfer(TASK_NGAP, TASK_AMF_N2); new itti_uplink_ran_status_transfer(TASK_NGAP, TASK_AMF_N2);
itti_uplinkran_sta_tran->assoc_id = assoc_id; itti_uplinkran_sta_tran->assoc_id = assoc_id;
itti_uplinkran_sta_tran->stream = stream; itti_uplinkran_sta_tran->stream = stream;
itti_uplinkran_sta_tran->uplinkrantransfer = Uplinkranstatustransfer; itti_uplinkran_sta_tran->uplinkrantransfer = Uplinkranstatustransfer;
std::shared_ptr<itti_uplinkranstatsutransfer> i = std::shared_ptr<itti_uplink_ran_status_transfer> i =
std::shared_ptr<itti_uplinkranstatsutransfer>(itti_uplinkran_sta_tran); std::shared_ptr<itti_uplink_ran_status_transfer>(itti_uplinkran_sta_tran);
int ret = itti_inst->send_msg(i); int ret = itti_inst->send_msg(i);
if (0 != ret) { if (0 != ret) {
Logger::ngap().error( Logger::ngap().error(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment