Commit 04e7e210 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Add IEs for PDUSessionResourceModifyResponse

parent a40a6055
......@@ -110,6 +110,12 @@ typedef struct {
OCTET_STRING_t pduSessionResourceModifyRequestTransfer;
} PDUSessionResourceModifyRequestItem_t;
typedef struct {
uint8_t pduSessionId;
OCTET_STRING_t pduSessionResourceModifyResponseTransfer;
OCTET_STRING_t pduSessionResourceModifyUnsuccessfulTransfer;
} PDUSessionResourceModifyResponseItem_t;
// section 9.2.1.3 PDU Session Resource Release Command (3GPP TS 38.413 V16.0.0
// (2019-12))
typedef struct {
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file
\brief
\author
\date
\email: contact@openairinterface.org
*/
#include "PDUSessionResourceModifyItemModRes.hpp"
#include <iostream>
using namespace std;
namespace ngap {
//------------------------------------------------------------------------------
PDUSessionResourceModifyItemModRes::PDUSessionResourceModifyItemModRes() {}
//------------------------------------------------------------------------------
PDUSessionResourceModifyItemModRes::~PDUSessionResourceModifyItemModRes() {}
//------------------------------------------------------------------------------
void PDUSessionResourceModifyItemModRes::setPDUSessionResourceModifyItemModRes(
const PDUSessionID& m_pDUSessionID,
const OCTET_STRING_t m_pDUSessionResourceModifyResponseTransfer) {
pDUSessionID = m_pDUSessionID;
pDUSessionResourceModifyResponseTransfer =
m_pDUSessionResourceModifyResponseTransfer;
}
//------------------------------------------------------------------------------
bool PDUSessionResourceModifyItemModRes::
encode2PDUSessionResourceModifyItemModRes(
Ngap_PDUSessionResourceModifyItemModRes_t&
pduSessionResourceModifyItemModReq) {
if (!pDUSessionID.encode2PDUSessionID(
pduSessionResourceModifyItemModReq.pDUSessionID))
return false;
pduSessionResourceModifyItemModReq.pDUSessionResourceModifyResponseTransfer =
pDUSessionResourceModifyResponseTransfer;
return true;
}
//------------------------------------------------------------------------------
bool PDUSessionResourceModifyItemModRes::
decodefromPDUSessionResourceModifyItemModRes(
Ngap_PDUSessionResourceModifyItemModRes_t&
pduSessionResourceModifyItemModReq) {
if (!pDUSessionID.decodefromPDUSessionID(
pduSessionResourceModifyItemModReq.pDUSessionID))
return false;
pDUSessionResourceModifyResponseTransfer =
pduSessionResourceModifyItemModReq
.pDUSessionResourceModifyResponseTransfer;
return true;
}
//------------------------------------------------------------------------------
void PDUSessionResourceModifyItemModRes::getPDUSessionResourceModifyItemModRes(
PDUSessionID& m_pDUSessionID,
OCTET_STRING_t& m_pDUSessionResourceModifyResponseTransfer) {
m_pDUSessionID = pDUSessionID;
m_pDUSessionResourceModifyResponseTransfer =
pDUSessionResourceModifyResponseTransfer;
}
} // namespace ngap
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file
\brief
\author
\date
\email: contact@openairinterface.org
*/
#ifndef _PDU_SESSION_RESOURCE_MODIFY_ITEM_MOD_RES_H_
#define _PDU_SESSION_RESOURCE_MODIFY_ITEM_MOD_RES_H_
#include "NAS-PDU.hpp"
#include "PDUSessionID.hpp"
#include "S-NSSAI.hpp"
extern "C" {
#include "Ngap_PDUSessionResourceModifyItemModRes.h"
}
namespace ngap {
class PDUSessionResourceModifyItemModRes {
public:
PDUSessionResourceModifyItemModRes();
virtual ~PDUSessionResourceModifyItemModRes();
void setPDUSessionResourceModifyItemModRes(
const PDUSessionID& m_pDUSessionID,
const OCTET_STRING_t m_pDUSessionResourceModifyResponseTransfer);
void getPDUSessionResourceModifyItemModRes(
PDUSessionID& m_pDUSessionID,
OCTET_STRING_t& m_pDUSessionResourceModifyResponseTransfer);
bool encode2PDUSessionResourceModifyItemModRes(
Ngap_PDUSessionResourceModifyItemModRes_t&
pduSessionResourceModifyItemModRes);
bool decodefromPDUSessionResourceModifyItemModRes(
Ngap_PDUSessionResourceModifyItemModRes_t&
pduSessionResourceModifyItemModRes);
private:
PDUSessionID pDUSessionID;
OCTET_STRING_t pDUSessionResourceModifyResponseTransfer; // Optional
};
} // namespace ngap
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file
\brief
\author
\date
\email: contact@openairinterface.org
*/
#include "PDUSessionResourceModifyListModRes.hpp"
#include <iostream>
using namespace std;
namespace ngap {
//------------------------------------------------------------------------------
PDUSessionResourceModifyListModRes::PDUSessionResourceModifyListModRes() {}
//------------------------------------------------------------------------------
PDUSessionResourceModifyListModRes::~PDUSessionResourceModifyListModRes() {}
//------------------------------------------------------------------------------
void PDUSessionResourceModifyListModRes::setPDUSessionResourceModifyListModRes(
const std::vector<PDUSessionResourceModifyItemModRes>&
m_pduSessionResourceModifyListModRes) {
pduSessionResourceModifyListModRes = m_pduSessionResourceModifyListModRes;
}
//------------------------------------------------------------------------------
bool PDUSessionResourceModifyListModRes::
encode2PDUSessionResourceModifyListModRes(
Ngap_PDUSessionResourceModifyListModRes_t&
m_pduSessionResourceModifyListModRes) {
for (auto pdu : pduSessionResourceModifyListModRes) {
Ngap_PDUSessionResourceModifyItemModRes_t* request =
(Ngap_PDUSessionResourceModifyItemModRes_t*) calloc(
1, sizeof(Ngap_PDUSessionResourceModifyItemModRes_t));
if (!request) return false;
if (!pdu.encode2PDUSessionResourceModifyItemModRes(*request)) return false;
if (ASN_SEQUENCE_ADD(&m_pduSessionResourceModifyListModRes.list, request) !=
0)
return false;
}
return true;
}
//------------------------------------------------------------------------------
bool PDUSessionResourceModifyListModRes::
decodefromPDUSessionResourceModifyListModRes(
Ngap_PDUSessionResourceModifyListModRes_t&
pduSessionResourceSetupListSURes) {
uint32_t numberofPDUSessions = pduSessionResourceSetupListSURes.list.count;
for (int i = 0; i < numberofPDUSessions; i++) {
PDUSessionResourceModifyItemModRes pduSessionResourceModifyItemModRes = {};
if (!pduSessionResourceModifyItemModRes
.decodefromPDUSessionResourceModifyItemModRes(
*pduSessionResourceSetupListSURes.list.array[i]))
return false;
pduSessionResourceModifyListModRes.push_back(
pduSessionResourceModifyItemModRes);
}
return true;
}
//------------------------------------------------------------------------------
void PDUSessionResourceModifyListModRes::getPDUSessionResourceModifyListModRes(
std::vector<PDUSessionResourceModifyItemModRes>&
m_pduSessionResourceModifyListModRes) {
m_pduSessionResourceModifyListModRes = pduSessionResourceModifyListModRes;
}
} // namespace ngap
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file
\brief
\author
\date
\email: contact@openairinterface.org
*/
#ifndef _PDU_SESSION_RESOURCE_MODIFY_LIST_MOD_RES_H_
#define _PDU_SESSION_RESOURCE_MODIFY_LIST_MOD_RES_H_
#include "PDUSessionResourceModifyItemModRes.hpp"
#include <vector>
extern "C" {
#include "Ngap_PDUSessionResourceModifyListModRes.h"
}
namespace ngap {
class PDUSessionResourceModifyListModRes {
public:
PDUSessionResourceModifyListModRes();
virtual ~PDUSessionResourceModifyListModRes();
void setPDUSessionResourceModifyListModRes(
const std::vector<PDUSessionResourceModifyItemModRes>&
m_pduSessionResourceModifyListModRes);
void getPDUSessionResourceModifyListModRes(
std::vector<PDUSessionResourceModifyItemModRes>&
m_pduSessionResourceModifyListModRes);
bool encode2PDUSessionResourceModifyListModRes(
Ngap_PDUSessionResourceModifyListModRes_t&
m_pduSessionResourceModifyListModRes);
bool decodefromPDUSessionResourceModifyListModRes(
Ngap_PDUSessionResourceModifyListModRes_t&
m_pduSessionResourceModifyListModRes);
private:
std::vector<PDUSessionResourceModifyItemModRes>
pduSessionResourceModifyListModRes;
};
} // namespace ngap
#endif
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file
\brief
\author
\date 2021
\email: contact@openairinterface.org
*/
#ifndef PDU_SESSION_RESOURCE_MODIFY_RESPONSE_H_
#define PDU_SESSION_RESOURCE_MODIFY_RESPONSE_H_
#include "AMF-UE-NGAP-ID.hpp"
#include "MessageType.hpp"
#include "NgapIEsStruct.hpp"
#include "PDUSessionResourceModifyListModRes.hpp"
#include "RAN-UE-NGAP-ID.hpp"
#include "RANPagingPriority.hpp"
extern "C" {
#include "Ngap_InitialContextSetupRequest.h"
#include "Ngap_PDUSessionResourceModifyResponse.h"
#include "Ngap_NGAP-PDU.h"
#include "Ngap_ProtocolIE-Field.h"
}
namespace ngap {
class PduSessionResourceModifyResponseMsg {
public:
PduSessionResourceModifyResponseMsg();
virtual ~PduSessionResourceModifyResponseMsg();
void setMessageType();
void setAmfUeNgapId(unsigned long id); // 40 bits
void setRanUeNgapId(uint32_t id); // 32 bits
void setPduSessionResourceModifyResponseList(
std::vector<PDUSessionResourceModifyResponseItem_t> list);
int encode2buffer(uint8_t* buf, int buf_size);
void encode2buffer_new(char* buf, int& encoded_size);
bool decodefrompdu(Ngap_NGAP_PDU_t* ngap_msg_pdu);
unsigned long getAmfUeNgapId();
uint32_t getRanUeNgapId();
bool getPduSessionResourceModifyResponseList(
std::vector<PDUSessionResourceModifyResponseItem_t>& list);
private:
Ngap_NGAP_PDU_t* pduSessionResourceModifyResponsePdu;
Ngap_PDUSessionResourceModifyResponse_t* pduSessionResourceModifyResponseIEs;
AMF_UE_NGAP_ID amfUeNgapId; // Mandatory
RAN_UE_NGAP_ID ranUeNgapId; // Mandatory
PDUSessionResourceModifyListModRes pduSessionResourceModifyList; // Mandatory
// PDUSessionResourceFailedToModifyListModRes*
// pduSessionResourceFailedToModifyListModRes;
};
} // namespace ngap
#endif
......@@ -736,11 +736,10 @@ int ngap_amf_handle_path_switch_request(
}
//------------------------------------------------------------------------------
int pdu_session_resource_modify(
int ngap_amf_handle_pdu_session_resource_modify_response(
const sctp_assoc_id_t assoc_id, const sctp_stream_id_t stream,
struct Ngap_NGAP_PDU* message_p) {
Logger::ngap().debug(
"Sending ITTI PDU Session Resource Modify to TASK_AMF_N2");
Logger::ngap().debug("Handle PDU Session Resource Modify Response");
return 0;
}
......@@ -970,8 +969,8 @@ ngap_message_decoded_callback messages_callback[][3] = {
{paging, paging, paging}, /*Paging*/
{ngap_amf_handle_path_switch_request, ngap_amf_handle_path_switch_request,
ngap_amf_handle_path_switch_request}, /*PathSwitchRequest*/
{pdu_session_resource_modify, pdu_session_resource_modify,
pdu_session_resource_modify}, /*PDUSessionResourceModify*/
{0, ngap_amf_handle_pdu_session_resource_modify_response,
0}, /*PDUSessionResourceModify*/
{pdu_session_resource_modify_indication,
pdu_session_resource_modify_indication,
pdu_session_resource_modify_indication}, /*PDUSessionResourceModifyIndication*/
......
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