Commit 98461495 authored by Niuhaiwen's avatar Niuhaiwen

add handover and motify configuration file

parent d64549c3
......@@ -37,19 +37,19 @@ AMF =
GUAMI:
{
MCC = "208"; MNC = "95"; RegionID = "128"; AMFSetID = "1"; AMFPointer = "1" # YOUR GUAMI CONFIG HERE
MCC = "110"; MNC = "11"; RegionID = "128"; AMFSetID = "1"; AMFPointer = "1" # YOUR GUAMI CONFIG HERE
}
SERVED_GUAMI_LIST = (
{MCC = "208"; MNC = "95"; RegionID = "128"; AMFSetID = "1"; AMFPointer = "0"}, #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
{MCC = "460"; MNC = "11"; RegionID = "10"; AMFSetID = "1"; AMFPointer = "1"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
{MCC = "110"; MNC = "11"; RegionID = "128"; AMFSetID = "1"; AMFPointer = "0"}, #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
{MCC = "110"; MNC = "11"; RegionID = "10"; AMFSetID = "1"; AMFPointer = "1"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
);
PLMN_SUPPORT_LIST = (
{
MCC = "208"; MNC = "95"; TAC = 0xa000; # YOUR PLMN CONFIG HERE
MCC = "110"; MNC = "11"; TAC = 100; # YOUR PLMN CONFIG HERE
SLICE_SUPPORT_LIST = (
{SST = "222"; SD = "123"}, # YOUR NSSAI CONFIG HERE
{SST = "1"; SD = "none"}, # YOUR NSSAI CONFIG HERE
{SST = "1"; SD = "12"} # YOUR NSSAI CONFIG HERE
)
}
......@@ -60,7 +60,7 @@ AMF =
# AMF binded interface for N1/N2 interface (NGAP)
NGAP_AMF:
{
INTERFACE_NAME = "ens3"; # YOUR NETWORK CONFIG HERE
INTERFACE_NAME = "ens32"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read";
PORT = 38412; # YOUR NETWORK CONFIG HERE
PPID = 60; # YOUR NETWORK CONFIG HERE
......@@ -69,12 +69,12 @@ AMF =
# AMF binded interface for N11
N11:
{
INTERFACE_NAME = "ens3"; # YOUR NETWORK CONFIG HERE
INTERFACE_NAME = "ens32"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read";
PORT = 80; # YOUR NETWORK CONFIG HERE
PORT = 8282; # YOUR NETWORK CONFIG HERE
SMF_INSTANCES_POOL = (
{SMF_INSTANCE_ID = 1; IPV4_ADDRESS = "192.168.122.1"; PORT = "80"; VERSION = "v1"; SELECTED = "true"}, # YOUR SMF CONFIG HERE
{SMF_INSTANCE_ID = 1; IPV4_ADDRESS = "192.168.199.203"; PORT = "8889"; VERSION = "v1"; SELECTED = "true"}, # YOUR SMF CONFIG HERE
{SMF_INSTANCE_ID = 2; IPV4_ADDRESS = "192.168.122.2"; PORT = "80"; VERSION = "v1"; SELECTED = "false"} # YOUR SMF CONFIG HERE
);
};
......@@ -85,9 +85,9 @@ AMF =
{
## MySQL mandatory options
MYSQL_server = "127.0.0.1"; # MySQL Server address
MYSQL_user = "root"; # Database server login
MYSQL_user = "bupt"; # Database server login
MYSQL_pass = "linux"; # Database server password
MYSQL_db = "oai_db"; # Your database name
MYSQL_db = "OAI_DB"; # Your database name
## OP
OPERATOR_key = "63bfa50ee6523365ff14c1f45f88737d"; # OP key matching your database
......@@ -96,7 +96,7 @@ AMF =
NAS:
{
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "NIA0" , "NIA1" , "NIA2" ];
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "NIA2" , "NIA1" , "NIA0" ];
ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "NEA0" , "NEA1" , "NEA2" ];
};
......
......@@ -352,7 +352,7 @@ void amf_n11::handle_pdu_session_initial_request(
supi.c_str(), psc.get()->pdu_session_id);
//TODO: Remove hardcoded values
std::string remote_uri = smf_addr + "/nsmf-pdusession/v1/sm-contexts"; //TODO
std::string remote_uri = smf_addr + "/nsmf-pdusession/v2/sm-contexts"; //TODO
nlohmann::json pdu_session_establishment_request;
pdu_session_establishment_request["supi"] = supi.c_str();
pdu_session_establishment_request["pei"] = "imei-200000000000001";
......
This diff is collapsed.
......@@ -79,7 +79,7 @@ int IdentityRequest::encode2buffer(uint8_t *buf, int len) {
}
Logger::nas_mm().debug("encoded IdentityRequest message len(%d)",
encoded_size);
return 1;
return encoded_size;
}
//------------------------------------------------------------------------------
......
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "COUNTValueForPDCP_SN18.hpp"
#include <iostream>
#include <vector>
using namespace std;
namespace ngap {
COUNTValueForPDCP_SN18::COUNTValueForPDCP_SN18() {
pdcp = 0;
hfn_pdcp = 0;
}
COUNTValueForPDCP_SN18::~COUNTValueForPDCP_SN18() {
}
void COUNTValueForPDCP_SN18::setvalue(long pDCP, long hfn_PDCP) {
pdcp = pDCP;
hfn_pdcp = hfn_PDCP;
}
void COUNTValueForPDCP_SN18::getvalue(long &pDCP, long &hFN_PDCP) {
pDCP = pdcp;
hFN_PDCP = hfn_pdcp;
}
bool COUNTValueForPDCP_SN18::encodedCOUNTValueForPDCP_SN18(
Ngap_COUNTValueForPDCP_SN18_t &countvalue) {
countvalue.pDCP_SN18 = pdcp;
countvalue.hFN_PDCP_SN18 = hfn_pdcp;
cout << "the encode pdcp_sn18 is" << countvalue.pDCP_SN18 << endl;
cout << "the encode hfn_pdcp_sn18 is" << countvalue.hFN_PDCP_SN18 << endl;
return true;
}
bool COUNTValueForPDCP_SN18::decodedCOUNTValueForPDCP_SN18(
Ngap_COUNTValueForPDCP_SN18_t &countValue) {
pdcp = countValue.pDCP_SN18;
hfn_pdcp = countValue.hFN_PDCP_SN18;
cout << "the decode pdcp_sn18 is" << countValue.pDCP_SN18 << endl;
cout << "the decode hfn_pdcp_sn18 is" << countValue.hFN_PDCP_SN18 << endl;
return true;
}
} // namespace ngap
namespace ngap
{
COUNTValueForPDCP_SN18::COUNTValueForPDCP_SN18()
{
pdcp = 0;
hfn_pdcp = 0;
}
COUNTValueForPDCP_SN18::~COUNTValueForPDCP_SN18() {}
void COUNTValueForPDCP_SN18::setvalue(long pDCP, long hfn_PDCP)
{
pdcp = pDCP;
hfn_pdcp = hfn_PDCP;
}
void COUNTValueForPDCP_SN18::getvalue(long &pDCP, long &hFN_PDCP)
{
pDCP = pdcp;
hFN_PDCP = hfn_pdcp;
}
bool COUNTValueForPDCP_SN18::encodedCOUNTValueForPDCP_SN18(Ngap_COUNTValueForPDCP_SN18_t *countvalue)
{
countvalue->pDCP_SN18 = pdcp;
countvalue->hFN_PDCP_SN18 = hfn_pdcp;
cout << "the encode pdcp_sn18 is" << countvalue->pDCP_SN18 << endl;
cout << "the encode hfn_pdcp_sn18 is" << countvalue->hFN_PDCP_SN18 << endl;
return true;
}
bool COUNTValueForPDCP_SN18::decodedCOUNTValueForPDCP_SN18(Ngap_COUNTValueForPDCP_SN18_t &countValue)
{
pdcp = countValue.pDCP_SN18;
hfn_pdcp = countValue.hFN_PDCP_SN18;
cout << "the decode pdcp_sn18 is" << countValue.pDCP_SN18 << endl;
cout << "the decode hfn_pdcp_sn18 is" << countValue.hFN_PDCP_SN18 << endl;
return true;
}
} // 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _COUNTVALUEFORPDCP_SN18_H_
#define _COUNTVALUEFORPDCP_SN18_H_
extern "C" {
extern "C"
{
#include "Ngap_COUNTValueForPDCP-SN18.h"
}
namespace ngap {
class COUNTValueForPDCP_SN18 {
private:
/* data */
long pdcp;
long hfn_pdcp;
namespace ngap
{
class COUNTValueForPDCP_SN18
{
private:
/* data */
long pdcp;
long hfn_pdcp;
public:
COUNTValueForPDCP_SN18(/* args */);
virtual ~COUNTValueForPDCP_SN18();
void getvalue(long &pDCP, long &hFN_PDCP);
void setvalue(long pDCP, long hfn_PDCP);
bool encodedCOUNTValueForPDCP_SN18(Ngap_COUNTValueForPDCP_SN18_t &countvalue);
bool decodedCOUNTValueForPDCP_SN18(Ngap_COUNTValueForPDCP_SN18_t &countValue);
};
public:
COUNTValueForPDCP_SN18(/* args */);
virtual ~COUNTValueForPDCP_SN18();
void getvalue(long &pDCP, long &hFN_PDCP);
void setvalue(long pDCP, long hfn_PDCP);
bool encodedCOUNTValueForPDCP_SN18(Ngap_COUNTValueForPDCP_SN18_t *countvalue);
bool decodedCOUNTValueForPDCP_SN18(Ngap_COUNTValueForPDCP_SN18_t &countValue);
};
} // namespace ngap
} // 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "MobilityRestrictionList.hpp"
#include <iostream>
using namespace std;
namespace ngap
{
//------------------------------------------------------------------------------
MobilityRestrictionList::MobilityRestrictionList()
{
Servingplmn = NULL;
}
//------------------------------------------------------------------------------
MobilityRestrictionList::~MobilityRestrictionList() {}
//------------------------------------------------------------------------------
void MobilityRestrictionList::setMobilityRestrictionList(PlmnId *servingplmn)
{
Servingplmn = servingplmn;
}
//------------------------------------------------------------------------------
bool MobilityRestrictionList::encodeMobilityRestrictionList(Ngap_MobilityRestrictionList_t *mobilityrestrictionlist)
{
if (!Servingplmn->encode2octetstring(mobilityrestrictionlist->servingPLMN))
{
return false;
}
return true;
}
} // 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _MOBILITYRESTRICETIONLIST_H_
#define _MOBILITYRESTRICETIONLIST_H_
#include "PlmnId.hpp"
extern "C"
{
#include "Ngap_MobilityRestrictionList.h"
}
namespace ngap
{
class MobilityRestrictionList
{
public:
MobilityRestrictionList();
virtual ~MobilityRestrictionList();
void setMobilityRestrictionList(PlmnId *servingplmn);
bool encodeMobilityRestrictionList(Ngap_MobilityRestrictionList_t *mobilityrestrictionlist);
private:
PlmnId *Servingplmn;
};
} // 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "PDUSessionResourceAdmittedItem.hpp"
#include "PDUSessionResourceAdmittedItem.hpp"
#include <iostream>
using namespace std;
namespace ngap {
PDUSessionResourceAdmittedItem::PDUSessionResourceAdmittedItem() {
pDUSessionID = NULL;
}
PDUSessionResourceAdmittedItem::~PDUSessionResourceAdmittedItem() {
}
void PDUSessionResourceAdmittedItem::setPDUSessionResourceAdmittedItem(
PDUSessionID *m_pDUSessionID, OCTET_STRING_t m_handoverrequestAcktransfer) {
pDUSessionID = m_pDUSessionID;
handoverrequestAcktransfer = m_handoverrequestAcktransfer;
}
bool PDUSessionResourceAdmittedItem::encode2PDUSessionResourceAdmittedItem(
Ngap_PDUSessionResourceAdmittedItem_t *pdUSessionResourceAdmittedItem) {
if (!pDUSessionID)
return false;
if (!pDUSessionID->encode2PDUSessionID(
pdUSessionResourceAdmittedItem->pDUSessionID))
return false;
pdUSessionResourceAdmittedItem->handoverRequestAcknowledgeTransfer =
handoverrequestAcktransfer;
namespace ngap{
PDUSessionResourceAdmittedItem::PDUSessionResourceAdmittedItem()
{
pDUSessionID = NULL;
}
PDUSessionResourceAdmittedItem::~PDUSessionResourceAdmittedItem(){}
void PDUSessionResourceAdmittedItem::setPDUSessionResourceAdmittedItem(PDUSessionID *m_pDUSessionID, OCTET_STRING_t m_handoverrequestAcktransfer)
{
pDUSessionID = m_pDUSessionID;
handoverrequestAcktransfer = m_handoverrequestAcktransfer;
}
bool PDUSessionResourceAdmittedItem::encode2PDUSessionResourceAdmittedItem(Ngap_PDUSessionResourceAdmittedItem_t *pdUSessionResourceAdmittedItem)
{
if(!pDUSessionID) return false;
if(!pDUSessionID->encode2PDUSessionID(pdUSessionResourceAdmittedItem->pDUSessionID)) return false;
pdUSessionResourceAdmittedItem->handoverRequestAcknowledgeTransfer = handoverrequestAcktransfer;
return true;
}
//......
bool PDUSessionResourceAdmittedItem::decodefromPDUSessionResourceAdmittedItem(Ngap_PDUSessionResourceAdmittedItem_t *pdUSessionResourceAdmittedItem)
{
pDUSessionID = new PDUSessionID();
if(!pDUSessionID->decodefromPDUSessionID(pdUSessionResourceAdmittedItem->pDUSessionID)) return false;
handoverrequestAcktransfer = pdUSessionResourceAdmittedItem->handoverRequestAcknowledgeTransfer;
return true;
}
void PDUSessionResourceAdmittedItem::getPDUSessionResourceAdmittedItem(PDUSessionID *&m_pDUSessionID, OCTET_STRING_t&m_handoverrequestAcktransfer)
{
m_pDUSessionID = pDUSessionID;
m_handoverrequestAcktransfer = handoverrequestAcktransfer;
}
return true;
}
//�����......
bool PDUSessionResourceAdmittedItem::decodefromPDUSessionResourceAdmittedItem(
Ngap_PDUSessionResourceAdmittedItem_t *pdUSessionResourceAdmittedItem) {
pDUSessionID = new PDUSessionID();
if (!pDUSessionID->decodefromPDUSessionID(
pdUSessionResourceAdmittedItem->pDUSessionID))
return false;
handoverrequestAcktransfer = pdUSessionResourceAdmittedItem
->handoverRequestAcknowledgeTransfer;
return true;
}
void PDUSessionResourceAdmittedItem::getPDUSessionResourceAdmittedItem(
PDUSessionID *&m_pDUSessionID,
OCTET_STRING_t &m_handoverrequestAcktransfer) {
m_pDUSessionID = pDUSessionID;
m_handoverrequestAcktransfer = handoverrequestAcktransfer;
}
}
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _PDUSESSIONRESOURCEADMITTEDITEM_H_
#define _PDUSESSIONRESOURCEADMITTEDITEM_H_
#include "PDUSessionID.hpp"
#include "PDUSessionResourceHandoverRequestAckTransfer.hpp"
extern "C" {
#include "Ngap_PDUSessionResourceAdmittedItem.h"
extern "C"{
#include "Ngap_PDUSessionResourceAdmittedItem.h"
}
namespace ngap {
class PDUSessionResourceAdmittedItem {
public:
PDUSessionResourceAdmittedItem();
virtual ~PDUSessionResourceAdmittedItem();
void setPDUSessionResourceAdmittedItem(
PDUSessionID *m_pDUSessionID,
OCTET_STRING_t m_handoverrequestAcktransfer);
void getPDUSessionResourceAdmittedItem(
PDUSessionID *&m_pDUSessionID,
OCTET_STRING_t &m_handoverrequestAcktransfer);
bool encode2PDUSessionResourceAdmittedItem(
Ngap_PDUSessionResourceAdmittedItem_t *pdUSessionResourceAdmittedItem);
bool decodefromPDUSessionResourceAdmittedItem(
Ngap_PDUSessionResourceAdmittedItem_t *pdUSessionResourceAdmittedItem);
private:
PDUSessionID *pDUSessionID;
OCTET_STRING_t handoverrequestAcktransfer;
};
namespace ngap{
class PDUSessionResourceAdmittedItem {
public:
PDUSessionResourceAdmittedItem();
virtual ~PDUSessionResourceAdmittedItem();
void setPDUSessionResourceAdmittedItem(PDUSessionID *m_pDUSessionID, OCTET_STRING_t m_handoverrequestAcktransfer);
void getPDUSessionResourceAdmittedItem(PDUSessionID *&m_pDUSessionID, OCTET_STRING_t&m_handoverrequestAcktransfer);
bool encode2PDUSessionResourceAdmittedItem(Ngap_PDUSessionResourceAdmittedItem_t *pdUSessionResourceAdmittedItem);
bool decodefromPDUSessionResourceAdmittedItem(Ngap_PDUSessionResourceAdmittedItem_t *pdUSessionResourceAdmittedItem);
private:
PDUSessionID *pDUSessionID;
OCTET_STRING_t handoverrequestAcktransfer;
};
}
#endif
#include "PDUSessionResourceAdmittedList.hpp"
#include <iostream>
using namespace std;
namespace ngap{
PDUSessionResourceAdmittedList::PDUSessionResourceAdmittedList()
{
pduSessionResourceAdmittedItem = NULL;
numofSessionResourceAdmittedItem = 0;
}
PDUSessionResourceAdmittedList::~PDUSessionResourceAdmittedList(){}
void PDUSessionResourceAdmittedList::setPDUSessionResourceAdmittedList(PDUSessionResourceAdmittedItem *m_pduSessionResourceAdmittedItem,int num)
{
pduSessionResourceAdmittedItem = m_pduSessionResourceAdmittedItem;
numofSessionResourceAdmittedItem = num;
}
bool PDUSessionResourceAdmittedList::encode2PDUSessionResourceAdmittedList(Ngap_PDUSessionResourceAdmittedList_t *pduSessionResourceAdmittedList)
{
for(int i=0;i< numofSessionResourceAdmittedItem;i++)
{
Ngap_PDUSessionResourceAdmittedItem_t *response = (Ngap_PDUSessionResourceAdmittedItem_t *)calloc(1,sizeof(Ngap_PDUSessionResourceAdmittedItem_t));
if(!response) return false;
if(!pduSessionResourceAdmittedItem[i].encode2PDUSessionResourceAdmittedItem(response)) return false;
if(ASN_SEQUENCE_ADD(&pduSessionResourceAdmittedList->list, response) != 0) return false;
}
return true;
}
bool PDUSessionResourceAdmittedList::decodefromPDUSessionResourceAdmittedList(Ngap_PDUSessionResourceAdmittedList_t *pduSessionResourceAdmittedList)
{
numofSessionResourceAdmittedItem = pduSessionResourceAdmittedList->list.count;
pduSessionResourceAdmittedItem = new PDUSessionResourceAdmittedItem[numofSessionResourceAdmittedItem]();
for(int i=0;i< numofSessionResourceAdmittedItem;i++)
{
if(!pduSessionResourceAdmittedItem[i].decodefromPDUSessionResourceAdmittedItem(pduSessionResourceAdmittedList->list.array[i])) return false;
}
return true;
}
void PDUSessionResourceAdmittedList::getPDUSessionResourceAdmittedList(PDUSessionResourceAdmittedItem *&m_pduSessionResourceAdmittedItem,int &num)
{
m_pduSessionResourceAdmittedItem = pduSessionResourceAdmittedItem;
num = numofSessionResourceAdmittedItem;
}
}
#include <iostream>
using namespace std;
namespace ngap {
PDUSessionResourceAdmittedList::PDUSessionResourceAdmittedList() {
pduSessionResourceAdmittedItem = NULL;
numofSessionResourceAdmittedItem = 0;
}
PDUSessionResourceAdmittedList::~PDUSessionResourceAdmittedList() {
}
void PDUSessionResourceAdmittedList::setPDUSessionResourceAdmittedList(
PDUSessionResourceAdmittedItem *m_pduSessionResourceAdmittedItem, int num) {
pduSessionResourceAdmittedItem = m_pduSessionResourceAdmittedItem;
numofSessionResourceAdmittedItem = num;
}
bool PDUSessionResourceAdmittedList::encode2PDUSessionResourceAdmittedList(
Ngap_PDUSessionResourceAdmittedList_t *pduSessionResourceAdmittedList) {
for (int i = 0; i < numofSessionResourceAdmittedItem; i++) {
Ngap_PDUSessionResourceAdmittedItem_t *response =
(Ngap_PDUSessionResourceAdmittedItem_t*) calloc(
1, sizeof(Ngap_PDUSessionResourceAdmittedItem_t));
if (!response)
return false;
if (!pduSessionResourceAdmittedItem[i].encode2PDUSessionResourceAdmittedItem(
response))
return false;
if (ASN_SEQUENCE_ADD(&pduSessionResourceAdmittedList->list, response) != 0)
return false;
}
return true;
}
bool PDUSessionResourceAdmittedList::decodefromPDUSessionResourceAdmittedList(
Ngap_PDUSessionResourceAdmittedList_t *pduSessionResourceAdmittedList) {
numofSessionResourceAdmittedItem = pduSessionResourceAdmittedList->list.count;
pduSessionResourceAdmittedItem =
new PDUSessionResourceAdmittedItem[numofSessionResourceAdmittedItem]();
for (int i = 0; i < numofSessionResourceAdmittedItem; i++) {
if (!pduSessionResourceAdmittedItem[i]
.decodefromPDUSessionResourceAdmittedItem(
pduSessionResourceAdmittedList->list.array[i]))
return false;
}
return true;
}
void PDUSessionResourceAdmittedList::getPDUSessionResourceAdmittedList(
PDUSessionResourceAdmittedItem *&m_pduSessionResourceAdmittedItem,
int &num) {
m_pduSessionResourceAdmittedItem = pduSessionResourceAdmittedItem;
num = numofSessionResourceAdmittedItem;
}
}
......@@ -3,32 +3,26 @@
#include "PDUSessionResourceAdmittedItem.hpp"
extern "C" {
#include "Ngap_PDUSessionResourceAdmittedList.h"
extern "C"{
#include "Ngap_PDUSessionResourceAdmittedList.h"
}
namespace ngap {
class PDUSessionResourceAdmittedList {
public:
PDUSessionResourceAdmittedList();
virtual ~PDUSessionResourceAdmittedList();
void setPDUSessionResourceAdmittedList(
PDUSessionResourceAdmittedItem *m_pduSessionResourceAdmittedItem,
int num);
void getPDUSessionResourceAdmittedList(
PDUSessionResourceAdmittedItem *&m_pduSessionResourceAdmittedItem,
int &num);
bool encode2PDUSessionResourceAdmittedList(
Ngap_PDUSessionResourceAdmittedList_t *pduSessionResourceAdmittedList);
bool decodefromPDUSessionResourceAdmittedList(
Ngap_PDUSessionResourceAdmittedList_t *pduSessionResourceAdmittedList);
private:
PDUSessionResourceAdmittedItem *pduSessionResourceAdmittedItem;
int numofSessionResourceAdmittedItem;
};
namespace ngap{
class PDUSessionResourceAdmittedList {
public:
PDUSessionResourceAdmittedList();
virtual ~PDUSessionResourceAdmittedList();
void setPDUSessionResourceAdmittedList(PDUSessionResourceAdmittedItem *m_pduSessionResourceAdmittedItem,int num);
void getPDUSessionResourceAdmittedList(PDUSessionResourceAdmittedItem *&m_pduSessionResourceAdmittedItem,int &num);
bool encode2PDUSessionResourceAdmittedList(Ngap_PDUSessionResourceAdmittedList_t *pduSessionResourceAdmittedList);
bool decodefromPDUSessionResourceAdmittedList(Ngap_PDUSessionResourceAdmittedList_t *pduSessionResourceAdmittedList);
private:
PDUSessionResourceAdmittedItem *pduSessionResourceAdmittedItem;
int numofSessionResourceAdmittedItem;
};
}
......
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "PDUSessionResourceHandoverCommandTransfer.hpp"
extern "C" {
extern "C"
{
#include "constr_TYPE.h"
#include "asn_codecs.h"
#include "per_encoder.h"
......@@ -35,81 +9,78 @@ extern "C" {
}
#include <iostream>
using namespace std;
namespace ngap {
PDUSessionResourceHandoverCommandTransfer::PDUSessionResourceHandoverCommandTransfer() {
handovercommandtransferIE = (Ngap_HandoverCommandTransfer_t*) calloc(
1, sizeof(Ngap_HandoverCommandTransfer_t));
dLForwardingUP_TNLInformation = NULL;
qosFlowToBeForwardedList = NULL;
}
PDUSessionResourceHandoverCommandTransfer::~PDUSessionResourceHandoverCommandTransfer() {
}
void PDUSessionResourceHandoverCommandTransfer::setQosFlowToBeForwardedList(
std::vector<QosFlowToBeForwardedItem_t> list) {
if (!qosFlowToBeForwardedList)
qosFlowToBeForwardedList = new QosFlowToBeForwardedList();
QosFlowToBeForwardedItem *m_item =
new QosFlowToBeForwardedItem[list.size()]();
for (int i = 0; i < list.size(); i++) {
QosFlowIdentifier *m_qosFlowIdentifier = new QosFlowIdentifier();
m_qosFlowIdentifier->setQosFlowIdentifier(list[i].QFI);
m_item[i].setQosFlowIdentifier(m_qosFlowIdentifier);
}
qosFlowToBeForwardedList->setQosFlowToBeForwardedItem(m_item, list.size());
int ret = qosFlowToBeForwardedList->encodeQosFlowToBeForwardedList(
handovercommandtransferIE->qosFlowToBeForwardedList);
cout << "QFI in list "
<< handovercommandtransferIE->qosFlowToBeForwardedList->list.count
<< endl;
if (handovercommandtransferIE->qosFlowToBeForwardedList->list.array) {
cout << "array OK" << endl;
if (handovercommandtransferIE->qosFlowToBeForwardedList->list.array[0]) {
cout << "QFI in list "
<< handovercommandtransferIE->qosFlowToBeForwardedList->list.array[0]
->qosFlowIdentifier << endl;
} else {
cout << "error1" << endl;
namespace ngap
{
PDUSessionResourceHandoverCommandTransfer::PDUSessionResourceHandoverCommandTransfer()
{
handovercommandtransferIE = (Ngap_HandoverCommandTransfer_t *)calloc(1, sizeof(Ngap_HandoverCommandTransfer_t));
dLForwardingUP_TNLInformation = NULL;
qosFlowToBeForwardedList = NULL;
}
} else {
cout << "error2" << endl;
}
PDUSessionResourceHandoverCommandTransfer::~PDUSessionResourceHandoverCommandTransfer() {}
void PDUSessionResourceHandoverCommandTransfer::setQosFlowToBeForwardedList(std::vector<QosFlowToBeForwardedItem_t> list)
{
if (!qosFlowToBeForwardedList)
qosFlowToBeForwardedList = new QosFlowToBeForwardedList();
QosFlowToBeForwardedItem *m_item = new QosFlowToBeForwardedItem[list.size()]();
for (int i = 0; i < list.size(); i++)
{
QosFlowIdentifier *m_qosFlowIdentifier = new QosFlowIdentifier();
m_qosFlowIdentifier->setQosFlowIdentifier(list[i].QFI);
m_item[i].setQosFlowIdentifier(m_qosFlowIdentifier);
}
qosFlowToBeForwardedList->setQosFlowToBeForwardedItem(m_item, list.size());
int ret = qosFlowToBeForwardedList->encodeQosFlowToBeForwardedList(handovercommandtransferIE->qosFlowToBeForwardedList);
cout << "QFI in list " << handovercommandtransferIE->qosFlowToBeForwardedList->list.count << endl;
if (handovercommandtransferIE->qosFlowToBeForwardedList->list.array)
{
cout << "array OK" << endl;
if (handovercommandtransferIE->qosFlowToBeForwardedList->list.array[0])
{
cout << "QFI in list " << handovercommandtransferIE->qosFlowToBeForwardedList->list.array[0]->qosFlowIdentifier << endl;
}
else
{
cout << "error1" << endl;
}
}
else
{
cout << "error2" << endl;
}
if (!ret) {
cout << "encode QosFlowToBeForwardedList IE error" << endl;
return;
}
}
void PDUSessionResourceHandoverCommandTransfer::setUPTransportLayerInformation(
GtpTunnel_t uptlinfo) {
if (!dLForwardingUP_TNLInformation) {
dLForwardingUP_TNLInformation = new UpTransportLayerInformation();
}
TransportLayerAddress *m_transportLayerAddress = new TransportLayerAddress();
GtpTeid *m_gtpTeid = new GtpTeid();
m_transportLayerAddress->setTransportLayerAddress(uptlinfo.ip_address);
m_gtpTeid->setGtpTeid(uptlinfo.gtp_teid);
dLForwardingUP_TNLInformation->setUpTransportLayerInformation(
m_transportLayerAddress, m_gtpTeid);
Ngap_UPTransportLayerInformation *test =
(Ngap_UPTransportLayerInformation*) calloc(
1, sizeof(Ngap_UPTransportLayerInformation));
handovercommandtransferIE->dLForwardingUP_TNLInformation = test;
int ret = dLForwardingUP_TNLInformation->encode2UpTransportLayerInformation(
*test);
if (!ret) {
cout << "encode dLForwardingUP_TNLInformation IE error";
return;
}
}
int PDUSessionResourceHandoverCommandTransfer::encodePDUSessionResourceHandoverCommandTransfer(
uint8_t *buf, int buf_size) {
asn_fprint(stderr, &asn_DEF_Ngap_HandoverCommandTransfer,
handovercommandtransferIE);
asn_enc_rval_t er = aper_encode_to_buffer(
&asn_DEF_Ngap_HandoverCommandTransfer, NULL, handovercommandtransferIE,
buf, buf_size);
cout << "er.encoded(" << er.encoded << ")" << endl;
return er.encoded;
}
if (!ret)
{
cout << "encode QosFlowToBeForwardedList IE error" << endl;
return;
}
}
void PDUSessionResourceHandoverCommandTransfer::setUPTransportLayerInformation(GtpTunnel_t uptlinfo)
{
if (!dLForwardingUP_TNLInformation)
{
dLForwardingUP_TNLInformation = new UpTransportLayerInformation();
}
TransportLayerAddress *m_transportLayerAddress = new TransportLayerAddress();
GtpTeid *m_gtpTeid = new GtpTeid();
m_transportLayerAddress->setTransportLayerAddress(uptlinfo.ip_address);
m_gtpTeid->setGtpTeid(uptlinfo.gtp_teid);
dLForwardingUP_TNLInformation->setUpTransportLayerInformation(m_transportLayerAddress, m_gtpTeid);
Ngap_UPTransportLayerInformation *test = (Ngap_UPTransportLayerInformation *)calloc(1, sizeof(Ngap_UPTransportLayerInformation));
handovercommandtransferIE->dLForwardingUP_TNLInformation = test;
int ret = dLForwardingUP_TNLInformation->encode2UpTransportLayerInformation(*test);
if (!ret)
{
cout << "encode dLForwardingUP_TNLInformation IE error";
return;
}
}
int PDUSessionResourceHandoverCommandTransfer::encodePDUSessionResourceHandoverCommandTransfer(uint8_t *buf, int buf_size)
{
asn_fprint(stderr, &asn_DEF_Ngap_HandoverCommandTransfer, handovercommandtransferIE);
asn_enc_rval_t er = aper_encode_to_buffer(&asn_DEF_Ngap_HandoverCommandTransfer, NULL, handovercommandtransferIE, buf, buf_size);
cout << "er.encoded(" << er.encoded << ")" << endl;
return er.encoded;
}
} // namespace ngap
} // namespace ngap
\ No newline at end of file
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _PDUSessionResourceHandoverCommandTransfer_H_
#define _PDUSessionResourceHandoverCommandTransfer_H_
#include "UPTransportLayerInformation.hpp"
#include "QosFlowToBeForwardedList.hpp"
#include "NgapIEsStruct.hpp"
extern "C" {
extern "C"
{
#include "Ngap_ProtocolIE-Field.h"
#include "Ngap_HandoverCommandTransfer.h"
}
namespace ngap {
class PDUSessionResourceHandoverCommandTransfer {
private:
/* data */
Ngap_HandoverCommandTransfer_t *handovercommandtransferIE;
UpTransportLayerInformation *dLForwardingUP_TNLInformation;
QosFlowToBeForwardedList *qosFlowToBeForwardedList;
namespace ngap
{
class PDUSessionResourceHandoverCommandTransfer
{
private:
/* data */
Ngap_HandoverCommandTransfer_t *handovercommandtransferIE;
UpTransportLayerInformation *dLForwardingUP_TNLInformation;
QosFlowToBeForwardedList *qosFlowToBeForwardedList;
public:
PDUSessionResourceHandoverCommandTransfer(/* args */);
virtual ~PDUSessionResourceHandoverCommandTransfer();
void setUPTransportLayerInformation(GtpTunnel_t uptlinfo);
void setQosFlowToBeForwardedList(
std::vector<QosFlowToBeForwardedItem_t> list);
int encodePDUSessionResourceHandoverCommandTransfer(uint8_t *buf,
int buf_size);
};
public:
PDUSessionResourceHandoverCommandTransfer(/* args */);
virtual ~PDUSessionResourceHandoverCommandTransfer();
void setUPTransportLayerInformation(GtpTunnel_t uptlinfo);
void setQosFlowToBeForwardedList(std::vector<QosFlowToBeForwardedItem_t> list);
int encodePDUSessionResourceHandoverCommandTransfer(uint8_t *buf, int buf_size);
};
} // namespace ngap
#endif
} // namespace ngap
#endif
\ No newline at end of file
......@@ -20,14 +20,15 @@
*/
/*! \file
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "PDUSessionResourceHandoverRequestAckTransfer.hpp"
extern "C" {
extern "C"
{
#include "constr_TYPE.h"
#include "asn_codecs.h"
#include "per_encoder.h"
......@@ -38,79 +39,78 @@ extern "C" {
#include <iostream>
using namespace std;
namespace ngap {
PDUSessionResourceHandoverRequestAckTransfer::PDUSessionResourceHandoverRequestAckTransfer() {
handoverRequestAcknowledegTransferIEs =
(Ngap_HandoverRequestAcknowledgeTransfer_t*) calloc(
1, sizeof(Ngap_HandoverRequestAcknowledgeTransfer_t));
dLForwardingUP_TNLInformation = NULL;
QosFlowSetupResponseList = NULL;
}
PDUSessionResourceHandoverRequestAckTransfer::~PDUSessionResourceHandoverRequestAckTransfer() {
}
bool PDUSessionResourceHandoverRequestAckTransfer::decodefromHandoverRequestAckTransfer(
uint8_t *buf, int buf_size) {
asn_dec_rval_t rc = asn_decode(
NULL, ATS_ALIGNED_CANONICAL_PER,
&asn_DEF_Ngap_HandoverRequestAcknowledgeTransfer,
(void**) &handoverRequestAcknowledegTransferIEs, buf, buf_size);
if (rc.code == RC_OK) {
cout << "Decoded handoverRequestAcknowledegTransfer successfully" << endl;
} else if (rc.code == RC_WMORE) {
cout << "More data expected, call again" << endl;
return false;
} else {
cout << "Failure to decode handoverRequestAcknowledegTransfer data" << endl;
//return false;
}
cout << "rc.consumed to decode = " << rc.consumed << endl;
cout << endl;
dLForwardingUP_TNLInformation = new UpTransportLayerInformation();
if (!dLForwardingUP_TNLInformation->decodefromUpTransportLayerInformation(
*handoverRequestAcknowledegTransferIEs->dLForwardingUP_TNLInformation)) {
cout << "decoded ngap DL_NGU_UP_TNLInformation IE error" << endl;
return false;
}
QosFlowSetupResponseList = new QosFlowListWithDataForwarding();
if (!QosFlowSetupResponseList->decodeFormQosFlowListWithDataForwarding(
handoverRequestAcknowledegTransferIEs->qosFlowSetupResponseList)) {
cout << "decoded ngap QosFlowSetupResponseList IE error" << endl;
return false;
}
return true;
}
bool PDUSessionResourceHandoverRequestAckTransfer::getUpTransportLayerInformation2(
GtpTunnel_t *&upTnlInfo) {
if (!dLForwardingUP_TNLInformation->decodefromUpTransportLayerInformation(
*handoverRequestAcknowledegTransferIEs->dLForwardingUP_TNLInformation))
return false;
TransportLayerAddress *m_transportLayerAddress;
GtpTeid *m_gtpTeid;
if (!dLForwardingUP_TNLInformation->getUpTransportLayerInformation(
m_transportLayerAddress, m_gtpTeid))
return false;
if (!m_transportLayerAddress->getTransportLayerAddress(upTnlInfo->ip_address))
return false;
if (!m_gtpTeid->getGtpTeid(upTnlInfo->gtp_teid))
return false;
return true;
}
bool PDUSessionResourceHandoverRequestAckTransfer::getqosFlowSetupResponseList(
std::vector<QosFlowLItemWithDataForwarding_t> &list) {
if (!QosFlowSetupResponseList)
return false;
QosFlowItemWithDataForWarding *m_qosflowitemwithdataforwarding;
int num = 0;
if (QosFlowSetupResponseList->getQosFlowListWithDataForwarding(
m_qosflowitemwithdataforwarding, num)) {
cout << "successful decode QosFlowList" << endl;
}
for (int i = 0; i < num; i++) {
QosFlowLItemWithDataForwarding_t response;
m_qosflowitemwithdataforwarding[i].getQosFlowItemWithDataForWarding(
response.qosFlowIdentifier);
list.push_back(response);
}
return true;
}
} // namespace ngap
namespace ngap
{
PDUSessionResourceHandoverRequestAckTransfer::PDUSessionResourceHandoverRequestAckTransfer()
{
handoverRequestAcknowledegTransferIEs = (Ngap_HandoverRequestAcknowledgeTransfer_t *)calloc(1, sizeof(Ngap_HandoverRequestAcknowledgeTransfer_t));
dLForwardingUP_TNLInformation = NULL;
QosFlowSetupResponseList = NULL;
}
PDUSessionResourceHandoverRequestAckTransfer::~PDUSessionResourceHandoverRequestAckTransfer() {}
bool PDUSessionResourceHandoverRequestAckTransfer::decodefromHandoverRequestAckTransfer(uint8_t *buf, int buf_size)
{
asn_dec_rval_t rc = asn_decode(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_Ngap_HandoverRequestAcknowledgeTransfer, (void **)&handoverRequestAcknowledegTransferIEs, buf, buf_size);
if (rc.code == RC_OK)
{
cout << "Decoded handoverRequestAcknowledegTransfer successfully" << endl;
}
else if (rc.code == RC_WMORE)
{
cout << "More data expected, call again" << endl;
return false;
}
else
{
cout << "Failure to decode handoverRequestAcknowledegTransfer data" << endl;
//return false;
}
cout << "rc.consumed to decode = " << rc.consumed << endl;
cout << endl;
dLForwardingUP_TNLInformation = new UpTransportLayerInformation();
if (!dLForwardingUP_TNLInformation->decodefromUpTransportLayerInformation(*handoverRequestAcknowledegTransferIEs->dLForwardingUP_TNLInformation))
{
cout << "decoded ngap DL_NGU_UP_TNLInformation IE error" << endl;
return false;
}
QosFlowSetupResponseList = new QosFlowListWithDataForwarding();
if (!QosFlowSetupResponseList->decodeFormQosFlowListWithDataForwarding(handoverRequestAcknowledegTransferIEs->qosFlowSetupResponseList))
{
cout << "decoded ngap QosFlowSetupResponseList IE error" << endl;
return false;
}
return true;
}
bool PDUSessionResourceHandoverRequestAckTransfer::getUpTransportLayerInformation2(GtpTunnel_t *&upTnlInfo)
{
if (!dLForwardingUP_TNLInformation->decodefromUpTransportLayerInformation(*handoverRequestAcknowledegTransferIEs->dLForwardingUP_TNLInformation))
return false;
TransportLayerAddress *m_transportLayerAddress;
GtpTeid *m_gtpTeid;
if (!dLForwardingUP_TNLInformation->getUpTransportLayerInformation(m_transportLayerAddress, m_gtpTeid))
return false;
if (!m_transportLayerAddress->getTransportLayerAddress(upTnlInfo->ip_address))
return false;
if (!m_gtpTeid->getGtpTeid(upTnlInfo->gtp_teid))
return false;
return true;
}
bool PDUSessionResourceHandoverRequestAckTransfer::getqosFlowSetupResponseList(std::vector<QosFlowLItemWithDataForwarding_t> &list)
{
if (!QosFlowSetupResponseList)
return false;
QosFlowItemWithDataForWarding *m_qosflowitemwithdataforwarding;
int num = 0;
if (QosFlowSetupResponseList->getQosFlowListWithDataForwarding(m_qosflowitemwithdataforwarding, num))
{
cout << "successful decode QosFlowList" << endl;
}
for (int i = 0; i < num; i++)
{
QosFlowLItemWithDataForwarding_t response;
m_qosflowitemwithdataforwarding[i].getQosFlowItemWithDataForWarding(response.qosFlowIdentifier);
list.push_back(response);
}
return true;
}
} // namespace ngap
......@@ -20,11 +20,11 @@
*/
/*! \file
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _PDUSESSIONRESOURCEHANDOVERREQUESTACKTRANSFER_H_
#define _PDUSESSIONRESOURCEHANDOVERREQUESTACKTRANSFER_H_
......@@ -33,25 +33,27 @@
#include "DLQoSFlowPerTNLInformation.hpp"
#include "SecurityResult.hpp"
#include "QosFlowListWithDataForwarding.hpp"
extern "C" {
extern "C"
{
#include "Ngap_ProtocolIE-Field.h"
#include "Ngap_HandoverRequestAcknowledgeTransfer.h"
}
namespace ngap {
class PDUSessionResourceHandoverRequestAckTransfer {
public:
PDUSessionResourceHandoverRequestAckTransfer();
virtual ~PDUSessionResourceHandoverRequestAckTransfer();
bool decodefromHandoverRequestAckTransfer(uint8_t *buf, int buf_size);
bool getUpTransportLayerInformation2(GtpTunnel_t *&upTnlInfo);
bool getqosFlowSetupResponseList(
std::vector<QosFlowLItemWithDataForwarding_t> &list);
namespace ngap
{
class PDUSessionResourceHandoverRequestAckTransfer
{
public:
PDUSessionResourceHandoverRequestAckTransfer();
virtual ~PDUSessionResourceHandoverRequestAckTransfer();
bool decodefromHandoverRequestAckTransfer(uint8_t *buf, int buf_size);
bool getUpTransportLayerInformation2(GtpTunnel_t *&upTnlInfo);
bool getqosFlowSetupResponseList(std::vector<QosFlowLItemWithDataForwarding_t> &list);
private:
Ngap_HandoverRequestAcknowledgeTransfer_t *handoverRequestAcknowledegTransferIEs;
UpTransportLayerInformation *dLForwardingUP_TNLInformation;
QosFlowListWithDataForwarding *QosFlowSetupResponseList;
};
} // namespace ngap
private:
Ngap_HandoverRequestAcknowledgeTransfer_t *handoverRequestAcknowledegTransferIEs;
UpTransportLayerInformation *dLForwardingUP_TNLInformation;
QosFlowListWithDataForwarding *QosFlowSetupResponseList;
};
} // namespace ngap
#endif
#endif
\ No newline at end of file
#include "PDUSessionResourceHandoverRequiredTransfer.hpp"
extern "C" {
#include "constr_TYPE.h"
#include "asn_codecs.h"
#include "per_encoder.h"
#include "per_decoder.h"
#include "constraints.h"
extern "C"{
#include "constr_TYPE.h"
#include "asn_codecs.h"
#include "per_encoder.h"
#include "per_decoder.h"
#include "constraints.h"
}
#include <iostream>
using namespace std;
namespace ngap {
PDUSessionResourceHandoverRequiredTransfer::PDUSessionResourceHandoverRequiredTransfer() {
handoverrquiredTransferIEs = (Ngap_HandoverRequiredTransfer_t*) calloc(
1, sizeof(Ngap_HandoverRequiredTransfer_t));
DirectForwardingPathAvailability = NULL;
}
PDUSessionResourceHandoverRequiredTransfer::~PDUSessionResourceHandoverRequiredTransfer() {
}
void PDUSessionResourceHandoverRequiredTransfer::setDirectForwardingPathAvailability(
Ngap_DirectForwardingPathAvailability_t directForwardingPathAvailability) {
if (!DirectForwardingPathAvailability)
DirectForwardingPathAvailability =
new Ngap_DirectForwardingPathAvailability_t();
*DirectForwardingPathAvailability = directForwardingPathAvailability;
}
namespace ngap{
PDUSessionResourceHandoverRequiredTransfer::PDUSessionResourceHandoverRequiredTransfer()
{
handoverrquiredTransferIEs = (Ngap_HandoverRequiredTransfer_t *)calloc(1,sizeof(Ngap_HandoverRequiredTransfer_t));
DirectForwardingPathAvailability = NULL;
}
PDUSessionResourceHandoverRequiredTransfer::~PDUSessionResourceHandoverRequiredTransfer(){}
int PDUSessionResourceHandoverRequiredTransfer::encode2buffer(uint8_t *buf,
int buf_size) {
asn_fprint(stderr, &asn_DEF_Ngap_HandoverRequiredTransfer,
handoverrquiredTransferIEs);
asn_enc_rval_t er = aper_encode_to_buffer(
&asn_DEF_Ngap_HandoverRequiredTransfer, NULL, handoverrquiredTransferIEs,
buf, buf_size);
cout << "er.encoded(" << er.encoded << ")" << endl;
return er.encoded;
}
//Decapsulation
bool PDUSessionResourceHandoverRequiredTransfer::decodefromIE(uint8_t *buf,
int buf_size) {
asn_dec_rval_t rc = asn_decode(NULL, ATS_ALIGNED_CANONICAL_PER,
&asn_DEF_Ngap_HandoverRequiredTransfer,
(void**) &handoverrquiredTransferIEs, buf,
buf_size);
if (rc.code == RC_OK) {
cout << "Decoded successfully" << endl;
} else if (rc.code == RC_WMORE) {
cout << "More data expected, call again" << endl;
return false;
} else {
cout << "Failure to decode data" << endl;
return false;
}
cout << "rc.consumed to decode = " << rc.consumed << endl;
cout << endl;
//asn_fprint(stderr, &asn_DEF_Ngap_PDUSessionResourceSetupResponseTransfer, pduSessionResourceSetupResponseTransferIEs);
if (handoverrquiredTransferIEs->directForwardingPathAvailability) {
Ngap_DirectForwardingPathAvailability_t *directForwardingPathAvailability =
new Ngap_DirectForwardingPathAvailability_t;
directForwardingPathAvailability = handoverrquiredTransferIEs
->directForwardingPathAvailability;
}
return true;
}
void PDUSessionResourceHandoverRequiredTransfer::setDirectForwardingPathAvailability(Ngap_DirectForwardingPathAvailability_t directForwardingPathAvailability)
{
if(!DirectForwardingPathAvailability)
DirectForwardingPathAvailability = new Ngap_DirectForwardingPathAvailability_t();
*DirectForwardingPathAvailability = directForwardingPathAvailability;
}
bool PDUSessionResourceHandoverRequiredTransfer::getDirectForwardingPathAvailability(
long *directForwardingPathAvailability) {
directForwardingPathAvailability = DirectForwardingPathAvailability;
return true;
}
int PDUSessionResourceHandoverRequiredTransfer::encode2buffer(uint8_t *buf, int buf_size)
{
asn_fprint(stderr, &asn_DEF_Ngap_HandoverRequiredTransfer, handoverrquiredTransferIEs);
asn_enc_rval_t er = aper_encode_to_buffer(&asn_DEF_Ngap_HandoverRequiredTransfer, NULL, handoverrquiredTransferIEs, buf, buf_size);
cout<<"er.encoded("<<er.encoded<<")"<<endl;
return er.encoded;
}
//Decapsulation
bool PDUSessionResourceHandoverRequiredTransfer::decodefromIE(uint8_t *buf, int buf_size)
{
asn_dec_rval_t rc = asn_decode(NULL,ATS_ALIGNED_CANONICAL_PER,&asn_DEF_Ngap_HandoverRequiredTransfer,(void**)&handoverrquiredTransferIEs,buf,buf_size);
if(rc.code == RC_OK)
{
cout<<"Decoded successfully"<<endl;
}
else if(rc.code == RC_WMORE)
{
cout<<"More data expected, call again"<<endl;
return false;
}
else
{
cout<<"Failure to decode data"<<endl;
return false;
}
cout<<"rc.consumed to decode = "<<rc.consumed<<endl;
cout<<endl;
//asn_fprint(stderr, &asn_DEF_Ngap_PDUSessionResourceSetupResponseTransfer, pduSessionResourceSetupResponseTransferIEs);
if(handoverrquiredTransferIEs->directForwardingPathAvailability)
{
Ngap_DirectForwardingPathAvailability_t *directForwardingPathAvailability=new Ngap_DirectForwardingPathAvailability_t;
directForwardingPathAvailability = handoverrquiredTransferIEs->directForwardingPathAvailability;
}
return true;
}
bool PDUSessionResourceHandoverRequiredTransfer::getDirectForwardingPathAvailability(long *directForwardingPathAvailability)
{
directForwardingPathAvailability = DirectForwardingPathAvailability;
return true;
}
}
......@@ -6,30 +6,30 @@
#include "DLQoSFlowPerTNLInformation.hpp"
#include "SecurityResult.hpp"
extern "C" {
#include "Ngap_ProtocolIE-Field.h"
#include "Ngap_HandoverRequiredTransfer.h"
extern "C"{
#include "Ngap_ProtocolIE-Field.h"
#include "Ngap_HandoverRequiredTransfer.h"
}
namespace ngap {
class PDUSessionResourceHandoverRequiredTransfer {
public:
PDUSessionResourceHandoverRequiredTransfer();
virtual ~PDUSessionResourceHandoverRequiredTransfer();
void setDirectForwardingPathAvailability(
Ngap_DirectForwardingPathAvailability_t directForwardingPathAvailability);
int encode2buffer(uint8_t *buf, int buf_size);
//Decapsulation
bool decodefromIE(uint8_t *buf, int buf_size);
bool getDirectForwardingPathAvailability(
long *directForwardingPathAvailability);
private:
Ngap_HandoverRequiredTransfer_t *handoverrquiredTransferIEs;
Ngap_DirectForwardingPathAvailability_t *DirectForwardingPathAvailability;
};
namespace ngap{
class PDUSessionResourceHandoverRequiredTransfer {
public:
PDUSessionResourceHandoverRequiredTransfer();
virtual ~PDUSessionResourceHandoverRequiredTransfer();
void setDirectForwardingPathAvailability(Ngap_DirectForwardingPathAvailability_t directForwardingPathAvailability);
int encode2buffer(uint8_t *buf, int buf_size);
//Decapsulation
bool decodefromIE(uint8_t *buf, int buf_size);
bool getDirectForwardingPathAvailability(long *directForwardingPathAvailability);
private:
Ngap_HandoverRequiredTransfer_t *handoverrquiredTransferIEs;
Ngap_DirectForwardingPathAvailability_t *DirectForwardingPathAvailability;
};
}
#endif
......@@ -20,40 +20,42 @@
*/
/*! \file
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "QosFlowItemWithDataForwarding.hpp"
#include <iostream>
using namespace std;
namespace ngap {
QosFlowItemWithDataForWarding::QosFlowItemWithDataForWarding() {
qosFlowIdentifier = NULL;
}
QosFlowItemWithDataForWarding::~QosFlowItemWithDataForWarding() {
}
void QosFlowItemWithDataForWarding::getQosFlowItemWithDataForWarding(
Ngap_QosFlowIdentifier_t &m_QosFlowIdentifier) {
if (!qosFlowIdentifier)
printf("qosFlowIdentifier null\n");
else
printf("qosFlowIdentifier \n");
if (qosFlowIdentifier->getQosFlowIdentifier(value)) {
m_QosFlowIdentifier = (Ngap_QosFlowIdentifier_t) value;
}
}
bool QosFlowItemWithDataForWarding::decodeformQosFlowItemWithDataForWarding(
Ngap_QosFlowSetupResponseItemHOReqAck_t *qosFlowItemWithDataForWarding) {
qosFlowIdentifier = new QosFlowIdentifier();
if (!qosFlowIdentifier->decodefromQosFlowIdentifier(
&(qosFlowItemWithDataForWarding->qosFlowIdentifier))) {
printf("false\n");
return false;
}
printf("true\n");
return true;
}
} // namespace ngap
namespace ngap
{
QosFlowItemWithDataForWarding::QosFlowItemWithDataForWarding()
{
qosFlowIdentifier = NULL;
}
QosFlowItemWithDataForWarding::~QosFlowItemWithDataForWarding() {}
void QosFlowItemWithDataForWarding::getQosFlowItemWithDataForWarding(Ngap_QosFlowIdentifier_t &m_QosFlowIdentifier)
{
if (!qosFlowIdentifier)
printf("qosFlowIdentifier null\n");
else
printf("qosFlowIdentifier \n");
if (qosFlowIdentifier->getQosFlowIdentifier(value))
{
m_QosFlowIdentifier = (Ngap_QosFlowIdentifier_t)value;
}
}
bool QosFlowItemWithDataForWarding::decodeformQosFlowItemWithDataForWarding(Ngap_QosFlowSetupResponseItemHOReqAck_t *qosFlowItemWithDataForWarding)
{
qosFlowIdentifier = new QosFlowIdentifier();
if (!qosFlowIdentifier->decodefromQosFlowIdentifier(&(qosFlowItemWithDataForWarding->qosFlowIdentifier)))
{
printf("false\n");
return false;
}
printf("true\n");
return true;
}
} // namespace ngap
......@@ -20,34 +20,35 @@
*/
/*! \file
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _QOSFLOWITEMWITHDATAFORWARDING_H_
#define _QOSFLOWITEMWITHDATAFORWARDING_H_
#include "QosFlowLevelQosParameters.hpp"
#include "QosFlowIdentifier.hpp"
extern "C" {
extern "C"
{
#include "Ngap_QosFlowSetupResponseItemHOReqAck.h"
}
namespace ngap {
class QosFlowItemWithDataForWarding {
public:
QosFlowItemWithDataForWarding();
virtual ~QosFlowItemWithDataForWarding();
namespace ngap
{
class QosFlowItemWithDataForWarding
{
public:
QosFlowItemWithDataForWarding();
virtual ~QosFlowItemWithDataForWarding();
void getQosFlowItemWithDataForWarding(
Ngap_QosFlowIdentifier_t &m_QosFlowIdentifier);
bool decodeformQosFlowItemWithDataForWarding(
Ngap_QosFlowSetupResponseItemHOReqAck_t *qosFlowItemWithDataForWarding);
void getQosFlowItemWithDataForWarding(Ngap_QosFlowIdentifier_t &m_QosFlowIdentifier);
bool decodeformQosFlowItemWithDataForWarding(Ngap_QosFlowSetupResponseItemHOReqAck_t *qosFlowItemWithDataForWarding);
private:
long value;
QosFlowIdentifier *qosFlowIdentifier;
};
} // namespace ngap
private:
long value;
QosFlowIdentifier *qosFlowIdentifier;
};
} // namespace ngap
#endif // !_QOSFLOWITEMWITHDATAFORWARDING_H_
......@@ -19,41 +19,36 @@
* contact@openairinterface.org
*/
/*! \file
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
/*! \file
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "QosFlowListWithDataForwarding.hpp"
#include <iostream>
using namespace std;
namespace ngap {
QosFlowListWithDataForwarding::QosFlowListWithDataForwarding() {
qosFlowItemWithDataForwarding = NULL;
numofQosFlowItemWithDataForwarding = 0;
}
QosFlowListWithDataForwarding::~QosFlowListWithDataForwarding() {
}
QosFlowListWithDataForwarding::QosFlowListWithDataForwarding()
{
qosFlowItemWithDataForwarding = NULL;
numofQosFlowItemWithDataForwarding = 0;
}
QosFlowListWithDataForwarding::~QosFlowListWithDataForwarding(){}
bool QosFlowListWithDataForwarding::decodeFormQosFlowListWithDataForwarding(
Ngap_QosFlowSetupResponseListHOReqAck_t qosFlowSetupResponseList) {
numofQosFlowItemWithDataForwarding = qosFlowSetupResponseList.list.count;
qosFlowItemWithDataForwarding =
new QosFlowItemWithDataForWarding[numofQosFlowItemWithDataForwarding]();
for (int i = 0; i < numofQosFlowItemWithDataForwarding; i++) {
if (!qosFlowItemWithDataForwarding[i]
.decodeformQosFlowItemWithDataForWarding(
qosFlowSetupResponseList.list.array[i]))
return false;
}
return true;
}
bool QosFlowListWithDataForwarding::getQosFlowListWithDataForwarding(
QosFlowItemWithDataForWarding *&m_QosFlowItemWithDataForwarding, int &num) {
m_QosFlowItemWithDataForwarding = qosFlowItemWithDataForwarding;
num = numofQosFlowItemWithDataForwarding;
return true;
}
bool QosFlowListWithDataForwarding::decodeFormQosFlowListWithDataForwarding(Ngap_QosFlowSetupResponseListHOReqAck_t qosFlowSetupResponseList) {
numofQosFlowItemWithDataForwarding = qosFlowSetupResponseList.list.count;
qosFlowItemWithDataForwarding = new QosFlowItemWithDataForWarding[numofQosFlowItemWithDataForwarding]();
for (int i = 0; i < numofQosFlowItemWithDataForwarding; i++) {
if (!qosFlowItemWithDataForwarding[i].decodeformQosFlowItemWithDataForWarding(qosFlowSetupResponseList.list.array[i]))
return false;
}
return true;
}
bool QosFlowListWithDataForwarding::getQosFlowListWithDataForwarding(QosFlowItemWithDataForWarding *&m_QosFlowItemWithDataForwarding, int &num){
m_QosFlowItemWithDataForwarding = qosFlowItemWithDataForwarding;
num = numofQosFlowItemWithDataForwarding;
return true;
}
}
......@@ -19,35 +19,33 @@
* contact@openairinterface.org
*/
/*! \file
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
/*! \file
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _QOSFLOWLISTWITHDATAFORWRADING_H_
#define _QOSFLOWLISTWITHDATAFORWRADING_H_
#include "QosFlowLevelQosParameters.hpp"
#include "QosFlowItemWithDataForwarding.hpp"
extern "C" {
#include "Ngap_QosFlowSetupResponseListHOReqAck.h"
extern "C"
{
#include "Ngap_QosFlowSetupResponseListHOReqAck.h"
}
namespace ngap {
class QosFlowListWithDataForwarding {
public:
QosFlowListWithDataForwarding();
virtual ~QosFlowListWithDataForwarding();
bool getQosFlowListWithDataForwarding(
QosFlowItemWithDataForWarding *&m_QosFlowItemWithDataForwarding,
int &num);
bool decodeFormQosFlowListWithDataForwarding(
Ngap_QosFlowSetupResponseListHOReqAck_t qosFlowSetupResponseList);
private:
//QosFlowIdentifier *qosFlowIdentifier;
QosFlowItemWithDataForWarding *qosFlowItemWithDataForwarding;
int numofQosFlowItemWithDataForwarding;
};
class QosFlowListWithDataForwarding {
public:
QosFlowListWithDataForwarding();
virtual ~QosFlowListWithDataForwarding();
bool getQosFlowListWithDataForwarding(QosFlowItemWithDataForWarding *&m_QosFlowItemWithDataForwarding, int &num);
bool decodeFormQosFlowListWithDataForwarding(Ngap_QosFlowSetupResponseListHOReqAck_t qosFlowSetupResponseList);
private:
//QosFlowIdentifier *qosFlowIdentifier;
QosFlowItemWithDataForWarding* qosFlowItemWithDataForwarding;
int numofQosFlowItemWithDataForwarding;
};
}
#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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "QosFlowToBeForwardedItem.hpp"
extern "C" {
extern "C"
{
}
#include <iostream>
using namespace std;
namespace ngap {
QosFlowToBeForwardedItem::QosFlowToBeForwardedItem() {
qosflowidentifier = NULL;
}
QosFlowToBeForwardedItem::~QosFlowToBeForwardedItem() {
}
void QosFlowToBeForwardedItem::setQosFlowIdentifier(
QosFlowIdentifier *m_qosflowidentifier) {
qosflowidentifier = m_qosflowidentifier;
}
bool QosFlowToBeForwardedItem::encodeQosFlowToBeForwardedItem(
Ngap_QosFlowToBeForwardedItem_t *qosflowtobeforwardeditem) {
if (!qosflowidentifier)
return false;
if (!qosflowidentifier->encode2QosFlowIdentifier(
&qosflowtobeforwardeditem->qosFlowIdentifier)) {
cout << "encode QFI error" << endl;
return false;
}
return true;
}
} // namespace ngap
namespace ngap
{
QosFlowToBeForwardedItem::QosFlowToBeForwardedItem()
{
qosflowidentifier = NULL;
}
QosFlowToBeForwardedItem::~QosFlowToBeForwardedItem() {}
void QosFlowToBeForwardedItem::setQosFlowIdentifier(QosFlowIdentifier *m_qosflowidentifier)
{
qosflowidentifier = m_qosflowidentifier;
}
bool QosFlowToBeForwardedItem::encodeQosFlowToBeForwardedItem(Ngap_QosFlowToBeForwardedItem_t *qosflowtobeforwardeditem)
{
if (!qosflowidentifier)
return false;
if (!qosflowidentifier->encode2QosFlowIdentifier(&qosflowtobeforwardeditem->qosFlowIdentifier))
{
cout << "encode QFI error" << endl;
return false;
}
return true;
}
} // namespace ngap
\ No newline at end of file
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _QOSFLOWTOBEFORWARDEDITEM_H_
#define _QOSFLOWTOBEFORWARDEDITEM_H_
#include "QosFlowIdentifier.hpp"
extern "C" {
extern "C"
{
#include "Ngap_QosFlowToBeForwardedItem.h"
}
namespace ngap {
class QosFlowToBeForwardedItem {
public:
QosFlowToBeForwardedItem();
virtual ~QosFlowToBeForwardedItem();
void setQosFlowIdentifier(QosFlowIdentifier *m_qosflowidentifier);
bool encodeQosFlowToBeForwardedItem(
Ngap_QosFlowToBeForwardedItem_t *qosflowtobeforwardeditem);
namespace ngap
{
class QosFlowToBeForwardedItem
{
public:
QosFlowToBeForwardedItem();
virtual ~QosFlowToBeForwardedItem();
void setQosFlowIdentifier(QosFlowIdentifier *m_qosflowidentifier);
bool encodeQosFlowToBeForwardedItem(Ngap_QosFlowToBeForwardedItem_t *qosflowtobeforwardeditem);
private:
QosFlowIdentifier *qosflowidentifier;
};
} // namespace ngap
#endif
private:
QosFlowIdentifier *qosflowidentifier;
};
} // namespace ngap
#endif
\ No newline at end of file
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "QosFlowToBeForwardedList.hpp"
#include <iostream>
using namespace std;
namespace ngap {
QosFlowToBeForwardedList::QosFlowToBeForwardedList() {
Qosflowtobeforwardeditem = NULL;
numofqosflowtobeforwardeditem = 0;
}
QosFlowToBeForwardedList::~QosFlowToBeForwardedList() {
}
void QosFlowToBeForwardedList::setQosFlowToBeForwardedItem(
QosFlowToBeForwardedItem *m_qosflowtobeforwardeditem, int num) {
Qosflowtobeforwardeditem = m_qosflowtobeforwardeditem;
numofqosflowtobeforwardeditem = num;
}
bool QosFlowToBeForwardedList::encodeQosFlowToBeForwardedList(
Ngap_QosFlowToBeForwardedList *&m_ngap_qosflowtobeforwardedlist) {
m_ngap_qosflowtobeforwardedlist = (Ngap_QosFlowToBeForwardedList_t*) calloc(
1, sizeof(Ngap_QosFlowToBeForwardedList_t));
for (int i = 0; i < numofqosflowtobeforwardeditem; i++) {
cout << "encoding list..." << endl;
Ngap_QosFlowToBeForwardedItem_t *response =
(Ngap_QosFlowToBeForwardedItem_t*) calloc(
1, sizeof(Ngap_QosFlowToBeForwardedItem_t));
if (!response)
return false;
if (!Qosflowtobeforwardeditem[i].encodeQosFlowToBeForwardedItem(response)) {
cout << "encode QosFlowTowardedItem error" << endl;
return false;
namespace ngap
{
QosFlowToBeForwardedList::QosFlowToBeForwardedList()
{
Qosflowtobeforwardeditem = NULL;
numofqosflowtobeforwardeditem = 0;
}
cout << "QFI is " << response->qosFlowIdentifier << endl;
if (ASN_SEQUENCE_ADD(&m_ngap_qosflowtobeforwardedlist->list, response)
!= 0) {
cout << "encode QosFlowTowardedList error" << endl;
return false;
QosFlowToBeForwardedList::~QosFlowToBeForwardedList() {}
void QosFlowToBeForwardedList::setQosFlowToBeForwardedItem(QosFlowToBeForwardedItem *m_qosflowtobeforwardeditem, int num)
{
Qosflowtobeforwardeditem = m_qosflowtobeforwardeditem;
numofqosflowtobeforwardeditem = num;
}
}
return true;
}
} // namespace ngap
bool QosFlowToBeForwardedList::encodeQosFlowToBeForwardedList(Ngap_QosFlowToBeForwardedList *&m_ngap_qosflowtobeforwardedlist)
{
m_ngap_qosflowtobeforwardedlist = (Ngap_QosFlowToBeForwardedList_t *)calloc(1, sizeof(Ngap_QosFlowToBeForwardedList_t));
for (int i = 0; i < numofqosflowtobeforwardeditem; i++)
{
cout << "encoding list..." << endl;
Ngap_QosFlowToBeForwardedItem_t *response = (Ngap_QosFlowToBeForwardedItem_t *)calloc(1, sizeof(Ngap_QosFlowToBeForwardedItem_t));
if (!response)
return false;
if (!Qosflowtobeforwardeditem[i].encodeQosFlowToBeForwardedItem(response))
{
cout << "encode QosFlowTowardedItem error" << endl;
return false;
}
cout << "QFI is " << response->qosFlowIdentifier << endl;
if (ASN_SEQUENCE_ADD(&m_ngap_qosflowtobeforwardedlist->list, response) != 0)
{
cout << "encode QosFlowTowardedList error" << endl;
return false;
}
}
return true;
}
} // namespace ngap
\ No newline at end of file
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _QOSFLOWTOBEFORWARDEDLIST_H_
#define _QOSFLOWTOBEFORWARDEDLIST_H_
#include "QosFlowToBeForwardedItem.hpp"
extern "C" {
extern "C"
{
#include "Ngap_QosFlowToBeForwardedList.h"
}
namespace ngap {
class QosFlowToBeForwardedList {
public:
QosFlowToBeForwardedList();
virtual ~QosFlowToBeForwardedList();
void setQosFlowToBeForwardedItem(
QosFlowToBeForwardedItem *m_qosflowtobeforwardeditem, int num);
bool encodeQosFlowToBeForwardedList(
Ngap_QosFlowToBeForwardedList *&m_ngap_qosflowtobeforwardedlist);
namespace ngap
{
class QosFlowToBeForwardedList
{
public:
QosFlowToBeForwardedList();
virtual ~QosFlowToBeForwardedList();
void setQosFlowToBeForwardedItem(QosFlowToBeForwardedItem *m_qosflowtobeforwardeditem, int num);
bool encodeQosFlowToBeForwardedList(Ngap_QosFlowToBeForwardedList *&m_ngap_qosflowtobeforwardedlist);
private:
QosFlowToBeForwardedItem *Qosflowtobeforwardeditem;
int numofqosflowtobeforwardeditem;
};
} // namespace ngap
#endif
private:
QosFlowToBeForwardedItem *Qosflowtobeforwardeditem;
int numofqosflowtobeforwardeditem;
};
} // namespace ngap
#endif
\ No newline at end of file
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "RANStatusTransferTransparentContainer.hpp"
#include <iostream>
#include <vector>
using namespace std;
namespace ngap {
RANStatusTransferTransparentContainer::RANStatusTransferTransparentContainer() {
drb_sub_list = NULL;
}
RANStatusTransferTransparentContainer::~RANStatusTransferTransparentContainer() {
}
void RANStatusTransferTransparentContainer::getdRBSubject_list(
dRBSubjectList *&drblist) {
drblist = drb_sub_list;
}
void RANStatusTransferTransparentContainer::setdRBSubject_list(
dRBSubjectList *drblist) {
drb_sub_list = drblist;
}
bool RANStatusTransferTransparentContainer::encoderanstatustransfer_transparentcontainer(
Ngap_RANStatusTransfer_TransparentContainer_t *ranstatustransfer_transparentcontainer) {
if (!drb_sub_list->encodefromdRBSubjectlist(
ranstatustransfer_transparentcontainer->dRBsSubjectToStatusTransferList)) {
cout << "encoderanstatustransfer_transparentcontainer error" << endl;
return false;
}
return true;
}
bool RANStatusTransferTransparentContainer::decoderanstatustransfer_transparentcontainer(
Ngap_RANStatusTransfer_TransparentContainer_t *ranstatustransfer_transparentcontainer) {
drb_sub_list = new dRBSubjectList();
if (!drb_sub_list->decodefromdRBSubjectlist(
ranstatustransfer_transparentcontainer->dRBsSubjectToStatusTransferList)) {
cout << "decoderanstatustransfer_transparentcontainer error" << endl;
return false;
}
return true;
}
} // namespace ngap
namespace ngap
{
RANStatusTransferTransparentContainer::RANStatusTransferTransparentContainer()
{
drb_sub_list = NULL;
}
RANStatusTransferTransparentContainer::~RANStatusTransferTransparentContainer() {}
void RANStatusTransferTransparentContainer::getdRBSubject_list(dRBSubjectList *&drblist)
{
drblist = drb_sub_list;
}
void RANStatusTransferTransparentContainer::setdRBSubject_list(dRBSubjectList *drblist)
{
drb_sub_list = drblist;
}
bool RANStatusTransferTransparentContainer::encoderanstatustransfer_transparentcontainer(Ngap_RANStatusTransfer_TransparentContainer_t *ranstatustransfer_transparentcontainer)
{
if (!drb_sub_list->encodefromdRBSubjectlist(ranstatustransfer_transparentcontainer->dRBsSubjectToStatusTransferList))
{
cout << "encoderanstatustransfer_transparentcontainer error" << endl;
return false;
}
return true;
}
bool RANStatusTransferTransparentContainer::decoderanstatustransfer_transparentcontainer(Ngap_RANStatusTransfer_TransparentContainer_t *ranstatustransfer_transparentcontainer)
{
drb_sub_list = new dRBSubjectList();
if (!drb_sub_list->decodefromdRBSubjectlist(ranstatustransfer_transparentcontainer->dRBsSubjectToStatusTransferList))
{
cout << "decoderanstatustransfer_transparentcontainer error" << endl;
return false;
}
return true;
}
} // namespace ngap
\ No newline at end of file
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _RANSTATUSTRANSFERTRANSPATENTCONTAINER_H_
#define _RANSTATUSTRANSFERTRANSPATENTCONTAINER_H_
#include "dRBsSubjectToStatusTransferList.hpp"
#include "dRBsSubjectToStatusTransferItem.hpp"
extern "C" {
extern "C"
{
#include "Ngap_RANStatusTransfer-TransparentContainer.h"
}
namespace ngap {
class RANStatusTransferTransparentContainer {
private:
/* data */
dRBSubjectList *drb_sub_list;
namespace ngap
{
class RANStatusTransferTransparentContainer
{
private:
/* data */
dRBSubjectList *drb_sub_list;
public:
RANStatusTransferTransparentContainer(/* args */);
virtual ~RANStatusTransferTransparentContainer();
void getdRBSubject_list(dRBSubjectList *&drblist);
void setdRBSubject_list(dRBSubjectList *drblist);
bool encoderanstatustransfer_transparentcontainer(
Ngap_RANStatusTransfer_TransparentContainer_t *ranstatustransfer_transparentcontainer);
bool decoderanstatustransfer_transparentcontainer(
Ngap_RANStatusTransfer_TransparentContainer_t *ranstatustransfer_transparentcontainer);
};
public:
RANStatusTransferTransparentContainer(/* args */);
virtual ~RANStatusTransferTransparentContainer();
void getdRBSubject_list(dRBSubjectList *&drblist);
void setdRBSubject_list(dRBSubjectList *drblist);
bool encoderanstatustransfer_transparentcontainer(Ngap_RANStatusTransfer_TransparentContainer_t *ranstatustransfer_transparentcontainer);
bool decoderanstatustransfer_transparentcontainer(Ngap_RANStatusTransfer_TransparentContainer_t *ranstatustransfer_transparentcontainer);
};
} // namespace ngap
#endif
} // namespace ngap
#endif
\ No newline at end of file
......@@ -29,33 +29,42 @@
#include <iostream>
#include <vector>
using namespace std;
namespace ngap {
dRBStatusDL::dRBStatusDL() {
dl18 = (DRBStatusDL18*) calloc(1, sizeof(DRBStatusDL18));
}
dRBStatusDL::~dRBStatusDL() {
}
void dRBStatusDL::setDRBStatusDL18(DRBStatusDL18 *dL18) {
dl18 = dL18;
}
void dRBStatusDL::getDRBStatusDL18(DRBStatusDL18 *&dL18) {
dL18 = dl18;
}
bool dRBStatusDL::encodedRBStatusDL(Ngap_DRBStatusDL_t *dL) {
if (!dl18->encodeddRBStatusDL18(dL->choice.dRBStatusDL18)) {
cout << "encodedRBStatusDL error" << endl;
return false;
}
cout << "encodedRBStatusDL successfully" << endl;
return true;
}
bool dRBStatusDL::decodedRBStatusDL(Ngap_DRBStatusDL_t *dL) {
dl18 = new DRBStatusDL18();
if (!dl18->decodeddRBStatusDL18(dL->choice.dRBStatusDL18)) {
cout << "decodedRBStatusDL error" << endl;
return false;
}
cout << "decodedRBStatusDL successfully" << endl;
return true;
}
} // namespace ngap
namespace ngap
{
dRBStatusDL::dRBStatusDL()
{
dl18 = (DRBStatusDL18 *)calloc(1, sizeof(DRBStatusDL18));
}
dRBStatusDL::~dRBStatusDL() {}
void dRBStatusDL::setDRBStatusDL18(DRBStatusDL18 *dL18)
{
dl18 = dL18;
}
void dRBStatusDL::getDRBStatusDL18(DRBStatusDL18 *&dL18)
{
dL18 = dl18;
}
bool dRBStatusDL::encodedRBStatusDL(Ngap_DRBStatusDL_t *dL)
{
dL->present = Ngap_DRBStatusDL_PR_dRBStatusDL18;
dL->choice.dRBStatusDL18 = (Ngap_DRBStatusDL18_t *)calloc(1, sizeof(Ngap_DRBStatusDL18_t));
if (!dl18->encodeddRBStatusDL18(dL->choice.dRBStatusDL18))
{
cout << "encodedRBStatusDL error" << endl;
return false;
}
cout << "encodedRBStatusDL successfully" << endl;
return true;
}
bool dRBStatusDL::decodedRBStatusDL(Ngap_DRBStatusDL_t *dL)
{
dl18 = new DRBStatusDL18();
if (!dl18->decodeddRBStatusDL18(dL->choice.dRBStatusDL18))
{
cout << "decodedRBStatusDL error" << endl;
return false;
}
cout << "decodedRBStatusDL successfully" << endl;
return true;
}
} // 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _DRBSTATUSDL_H_
#define _DRBSTATUSDL_H_
#include "dRBStatusDL18.hpp"
extern "C" {
extern "C"
{
#include "Ngap_DRBStatusDL.h"
#include "Ngap_DRBStatusDL18.h"
}
namespace ngap {
class dRBStatusDL {
private:
/* data */
DRBStatusDL18 *dl18;
namespace ngap
{
class dRBStatusDL
{
private:
/* data */
DRBStatusDL18 *dl18;
public:
dRBStatusDL();
virtual ~dRBStatusDL();
void getDRBStatusDL18(DRBStatusDL18 *&dL18);
void setDRBStatusDL18(DRBStatusDL18 *dL18);
bool encodedRBStatusDL(Ngap_DRBStatusDL_t *dL);
bool decodedRBStatusDL(Ngap_DRBStatusDL_t *dL);
};
public:
dRBStatusDL();
virtual ~dRBStatusDL();
void getDRBStatusDL18(DRBStatusDL18 *&dL18);
void setDRBStatusDL18(DRBStatusDL18 *dL18);
bool encodedRBStatusDL(Ngap_DRBStatusDL_t *dL);
bool decodedRBStatusDL(Ngap_DRBStatusDL_t *dL);
};
} // namespace ngap
} // 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "dRBStatusDL18.hpp"
#include <iostream>
using namespace std;
namespace ngap {
DRBStatusDL18::DRBStatusDL18() {
pdcp_value = NULL;
}
DRBStatusDL18::~DRBStatusDL18() {
}
void DRBStatusDL18::getcountvalue(COUNTValueForPDCP_SN18 *&count_value) {
count_value = pdcp_value;
}
void DRBStatusDL18::setcountvalue(COUNTValueForPDCP_SN18 *count_value) {
pdcp_value = count_value;
}
bool DRBStatusDL18::encodeddRBStatusDL18(Ngap_DRBStatusDL18_t *DL18) {
if (!pdcp_value->encodedCOUNTValueForPDCP_SN18(DL18->dL_COUNTValue)) {
cout << "encodeddRBStatusDL18 error" << endl;
return false;
}
return true;
}
bool DRBStatusDL18::decodeddRBStatusDL18(Ngap_DRBStatusDL18_t *DL18) {
pdcp_value = new COUNTValueForPDCP_SN18();
if (!pdcp_value->decodedCOUNTValueForPDCP_SN18(DL18->dL_COUNTValue)) {
cout << "decodeddRBStatusDL18 error" << endl;
return false;
}
return true;
}
} // namespace ngap
namespace ngap
{
DRBStatusDL18::DRBStatusDL18()
{
pdcp_value = NULL;
}
DRBStatusDL18::~DRBStatusDL18() {}
void DRBStatusDL18::getcountvalue(COUNTValueForPDCP_SN18 *&count_value)
{
count_value = pdcp_value;
}
void DRBStatusDL18::setcountvalue(COUNTValueForPDCP_SN18 *count_value)
{
pdcp_value = count_value;
}
bool DRBStatusDL18::encodeddRBStatusDL18(Ngap_DRBStatusDL18_t *DL18)
{
if (!pdcp_value->encodedCOUNTValueForPDCP_SN18(&DL18->dL_COUNTValue))
{
cout << "encodeddRBStatusDL18 error" << endl;
return false;
}
return true;
}
bool DRBStatusDL18::decodeddRBStatusDL18(Ngap_DRBStatusDL18_t *DL18)
{
pdcp_value = new COUNTValueForPDCP_SN18();
if (!pdcp_value->decodedCOUNTValueForPDCP_SN18(DL18->dL_COUNTValue))
{
cout << "decodeddRBStatusDL18 error" << endl;
return false;
}
return true;
}
} // 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _DRBSTATUSDL18_H_
#define _DRBSTATUSDL18_H_
#include "COUNTValueForPDCP_SN18.hpp"
extern "C" {
extern "C"
{
#include "Ngap_DRBStatusDL18.h"
}
namespace ngap {
class DRBStatusDL18 {
private:
/* data */
COUNTValueForPDCP_SN18 *pdcp_value;
namespace ngap
{
class DRBStatusDL18
{
private:
/* data */
COUNTValueForPDCP_SN18 *pdcp_value;
public:
DRBStatusDL18(/* args */);
virtual ~DRBStatusDL18();
void getcountvalue(COUNTValueForPDCP_SN18 *&count_value);
void setcountvalue(COUNTValueForPDCP_SN18 *count_value);
bool encodeddRBStatusDL18(Ngap_DRBStatusDL18_t *DL18);
bool decodeddRBStatusDL18(Ngap_DRBStatusDL18_t *DL18);
};
} // namespace ngap
#endif
public:
DRBStatusDL18(/* args */);
virtual ~DRBStatusDL18();
void getcountvalue(COUNTValueForPDCP_SN18 *&count_value);
void setcountvalue(COUNTValueForPDCP_SN18 *count_value);
bool encodeddRBStatusDL18(Ngap_DRBStatusDL18_t *DL18);
bool decodeddRBStatusDL18(Ngap_DRBStatusDL18_t *DL18);
};
} // namespace ngap
#endif
\ No newline at end of file
......@@ -30,33 +30,42 @@
#include <vector>
using namespace std;
namespace ngap {
dRBStatusUL::dRBStatusUL() {
ul18 = (dRBStatusUL18*) calloc(1, sizeof(dRBStatusUL18));
}
dRBStatusUL::~dRBStatusUL() {
}
void dRBStatusUL::setdRBStatusUL(dRBStatusUL18 *uL18) {
ul18 = uL18;
}
void dRBStatusUL::getdRBStatusUL(dRBStatusUL18 *&uL18) {
uL18 = ul18;
}
bool dRBStatusUL::encodedRBStatusUL(Ngap_DRBStatusUL_t *uL) {
if (ul18->encodeddRBStatusUL18(uL->choice.dRBStatusUL18)) {
cout << "encodeddRBStatusUL18 error" << endl;
return false;
}
cout << "encodedRBStatusUL successfully" << endl;
return true;
}
bool dRBStatusUL::decodedRBStatusUL(Ngap_DRBStatusUL_t *uL) {
ul18 = new dRBStatusUL18();
if (!ul18->decodeddRBStatusUL18(uL->choice.dRBStatusUL18)) {
cout << "decodeddRBStatusUL18 error" << endl;
return false;
}
cout << "decodedRBStatusUL successfully" << endl;
return true;
}
} // namespace ngap
namespace ngap
{
dRBStatusUL::dRBStatusUL()
{
ul18 = (dRBStatusUL18 *)calloc(1, sizeof(dRBStatusUL18));
}
dRBStatusUL::~dRBStatusUL() {}
void dRBStatusUL::setdRBStatusUL(dRBStatusUL18 *uL18)
{
ul18 = uL18;
}
void dRBStatusUL::getdRBStatusUL(dRBStatusUL18 *&uL18)
{
uL18 = ul18;
}
bool dRBStatusUL::encodedRBStatusUL(Ngap_DRBStatusUL_t *uL)
{
uL->present = Ngap_DRBStatusUL_PR_dRBStatusUL18;
uL->choice.dRBStatusUL18 = (Ngap_DRBStatusUL18_t *)calloc(1, sizeof(Ngap_DRBStatusUL18_t));
if (!ul18->encodeddRBStatusUL18(uL->choice.dRBStatusUL18))
{
cout << "encodeddRBStatusUL18 error" << endl;
return false;
}
cout << "encodedRBStatusUL successfully" << endl;
return true;
}
bool dRBStatusUL::decodedRBStatusUL(Ngap_DRBStatusUL_t *uL)
{
ul18 = new dRBStatusUL18();
if (!ul18->decodeddRBStatusUL18(uL->choice.dRBStatusUL18))
{
cout << "decodeddRBStatusUL18 error" << endl;
return false;
}
cout << "decodedRBStatusUL successfully" << endl;
return true;
}
} // 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _DRBSTATUSUL_H_
#define _DRBSTATUSUL_H_
#include "dRBStatusUL18.hpp"
extern "C" {
extern "C"
{
#include "Ngap_DRBStatusUL.h"
}
namespace ngap {
class dRBStatusUL {
private:
/* data */
dRBStatusUL18 *ul18;
namespace ngap
{
class dRBStatusUL
{
private:
/* data */
dRBStatusUL18 *ul18;
public:
dRBStatusUL(/* args */);
virtual ~dRBStatusUL();
void setdRBStatusUL(dRBStatusUL18 *uL18);
void getdRBStatusUL(dRBStatusUL18 *&uL18);
bool encodedRBStatusUL(Ngap_DRBStatusUL_t *uL);
bool decodedRBStatusUL(Ngap_DRBStatusUL_t *uL);
};
} // namespace ngap
#endif
public:
dRBStatusUL(/* args */);
virtual ~dRBStatusUL();
void setdRBStatusUL(dRBStatusUL18 *uL18);
void getdRBStatusUL(dRBStatusUL18 *&uL18);
bool encodedRBStatusUL(Ngap_DRBStatusUL_t *uL);
bool decodedRBStatusUL(Ngap_DRBStatusUL_t *uL);
};
} // namespace ngap
#endif
\ No newline at end of file
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "dRBStatusUL18.hpp"
#include <iostream>
using namespace std;
namespace ngap {
dRBStatusUL18::dRBStatusUL18() {
pdcp_value = NULL;
}
dRBStatusUL18::~dRBStatusUL18() {
}
void dRBStatusUL18::getcountvalue(COUNTValueForPDCP_SN18 *&count_value) {
count_value = pdcp_value;
}
void dRBStatusUL18::setcountvalue(COUNTValueForPDCP_SN18 *count_value) {
pdcp_value = count_value;
}
bool dRBStatusUL18::encodeddRBStatusUL18(Ngap_DRBStatusUL18_t *UL18) {
if (!pdcp_value->encodedCOUNTValueForPDCP_SN18(UL18->uL_COUNTValue)) {
cout << "encodeddRBStatusUL18 error" << endl;
return false;
}
return true;
}
bool dRBStatusUL18::decodeddRBStatusUL18(Ngap_DRBStatusUL18_t *UL18) {
pdcp_value = new COUNTValueForPDCP_SN18();
if (!pdcp_value->decodedCOUNTValueForPDCP_SN18(UL18->uL_COUNTValue)) {
cout << "decodeddRBStatusUL18 error" << endl;
return false;
}
return true;
}
} // namespace ngap
namespace ngap
{
dRBStatusUL18::dRBStatusUL18()
{
pdcp_value = NULL;
}
dRBStatusUL18::~dRBStatusUL18() {}
void dRBStatusUL18::getcountvalue(COUNTValueForPDCP_SN18 *&count_value)
{
count_value = pdcp_value;
}
void dRBStatusUL18::setcountvalue(COUNTValueForPDCP_SN18 *count_value)
{
pdcp_value = count_value;
}
bool dRBStatusUL18::encodeddRBStatusUL18(Ngap_DRBStatusUL18_t *UL18)
{
if (!pdcp_value->encodedCOUNTValueForPDCP_SN18(&UL18->uL_COUNTValue))
{
cout << "encodeddRBStatusUL18 error" << endl;
return false;
}
return true;
}
bool dRBStatusUL18::decodeddRBStatusUL18(Ngap_DRBStatusUL18_t *UL18)
{
pdcp_value = new COUNTValueForPDCP_SN18();
if (!pdcp_value->decodedCOUNTValueForPDCP_SN18(UL18->uL_COUNTValue))
{
cout << "decodeddRBStatusUL18 error" << endl;
return false;
}
return true;
}
} // 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _DRBSTATUSUL18_H_
#define _DRBSTATUSUL18_H_
#include "COUNTValueForPDCP_SN18.hpp"
extern "C" {
extern "C"
{
#include "Ngap_DRBStatusUL18.h"
}
namespace ngap {
class dRBStatusUL18 {
private:
/* data */
COUNTValueForPDCP_SN18 *pdcp_value;
namespace ngap
{
class dRBStatusUL18
{
private:
/* data */
COUNTValueForPDCP_SN18 *pdcp_value;
public:
dRBStatusUL18(/* args */);
virtual ~dRBStatusUL18();
void getcountvalue(COUNTValueForPDCP_SN18 *&count_value);
void setcountvalue(COUNTValueForPDCP_SN18 *count_value);
bool encodeddRBStatusUL18(Ngap_DRBStatusUL18_t *UL18);
bool decodeddRBStatusUL18(Ngap_DRBStatusUL18_t *UL18);
};
public:
dRBStatusUL18(/* args */);
virtual ~dRBStatusUL18();
void getcountvalue(COUNTValueForPDCP_SN18 *&count_value);
void setcountvalue(COUNTValueForPDCP_SN18 *count_value);
bool encodeddRBStatusUL18(Ngap_DRBStatusUL18_t *UL18);
bool decodeddRBStatusUL18(Ngap_DRBStatusUL18_t *UL18);
};
} // namespace ngap
#endif
} // namespace ngap
#endif
\ No newline at end of file
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "dRBsSubjectToStatusTransferItem.hpp"
#include <iostream>
#include <vector>
using namespace std;
namespace ngap {
dRBSubjectItem::dRBSubjectItem() {
drb_id = NULL;
drb_ul = NULL;
drb_dl = NULL;
}
dRBSubjectItem::~dRBSubjectItem() {
}
void dRBSubjectItem::setdRBSubjectItem(Ngap_DRB_ID_t *dRB_ID,
dRBStatusUL *dRB_UL,
dRBStatusDL *dRB_DL) {
drb_id = dRB_ID;
drb_ul = dRB_UL;
drb_dl = dRB_DL;
}
void dRBSubjectItem::getdRBSubjectItem(Ngap_DRB_ID_t *&dRB_ID,
dRBStatusUL *&dRB_UL,
dRBStatusDL *&dRB_DL) {
dRB_ID = drb_id;
dRB_UL = drb_ul;
dRB_DL = drb_dl;
}
bool dRBSubjectItem::decodefromdRBSubjectItem(
Ngap_DRBsSubjectToStatusTransferItem_t *dRB_item) {
if (dRB_item->dRB_ID) {
drb_id = &dRB_item->dRB_ID;
cout << "the decode drb_id is" << *drb_id << endl;
}
drb_ul = new dRBStatusUL();
if (!drb_ul->decodedRBStatusUL(&dRB_item->dRBStatusUL)) {
cout << "decode from dRBSubjectItem dRBStatusUL error" << endl;
return false;
}
drb_dl = new dRBStatusDL();
if (!drb_dl->decodedRBStatusDL(&dRB_item->dRBStatusDL)) {
cout << "decode from dRBSubjectItem dRBStatusDL error" << endl;
return false;
}
cout << "decode from dRBSubjectItem successfully" << endl;
return true;
}
bool dRBSubjectItem::encodedRBSubjectItem(
Ngap_DRBsSubjectToStatusTransferItem_t *dRB_item) {
if (drb_id) {
dRB_item->dRB_ID = *drb_id;
cout << "the encode drb_id is" << *drb_id << endl;
}
if (!drb_ul->encodedRBStatusUL(&dRB_item->dRBStatusUL)) {
cout << "encode from dRBSubjectItem dRBStatusUL error" << endl;
return false;
}
if (!drb_dl->encodedRBStatusDL(&dRB_item->dRBStatusDL)) {
cout << "encode from dRBSubjectItem dRBStatusDL error" << endl;
return false;
}
cout << "encode from dRBSubjectItem successfully" << endl;
return true;
}
} // namespace ngap
namespace ngap
{
dRBSubjectItem::dRBSubjectItem()
{
drb_id = NULL;
drb_ul = NULL;
drb_dl = NULL;
}
dRBSubjectItem::~dRBSubjectItem() {}
void dRBSubjectItem::setdRBSubjectItem(Ngap_DRB_ID_t *dRB_ID, dRBStatusUL *dRB_UL, dRBStatusDL *dRB_DL)
{
drb_id = dRB_ID;
drb_ul = dRB_UL;
drb_dl = dRB_DL;
}
void dRBSubjectItem::getdRBSubjectItem(Ngap_DRB_ID_t *&dRB_ID, dRBStatusUL *&dRB_UL, dRBStatusDL *&dRB_DL)
{
dRB_ID = drb_id;
dRB_UL = drb_ul;
dRB_DL = drb_dl;
}
bool dRBSubjectItem::decodefromdRBSubjectItem(Ngap_DRBsSubjectToStatusTransferItem_t *dRB_item)
{
if (dRB_item->dRB_ID)
{
drb_id = &dRB_item->dRB_ID;
cout << "the decode drb_id is" << *drb_id << endl;
}
drb_ul = new dRBStatusUL();
if (!drb_ul->decodedRBStatusUL(&dRB_item->dRBStatusUL))
{
cout << "decode from dRBSubjectItem dRBStatusUL error" << endl;
return false;
}
drb_dl = new dRBStatusDL();
if (!drb_dl->decodedRBStatusDL(&dRB_item->dRBStatusDL))
{
cout << "decode from dRBSubjectItem dRBStatusDL error" << endl;
return false;
}
cout << "decode from dRBSubjectItem successfully" << endl;
return true;
}
bool dRBSubjectItem::encodedRBSubjectItem(Ngap_DRBsSubjectToStatusTransferItem_t *dRB_item)
{
if (drb_id)
{
dRB_item->dRB_ID = *drb_id;
cout << "the encode drb_id is" << *drb_id << endl;
}
if (!drb_ul->encodedRBStatusUL(&dRB_item->dRBStatusUL))
{
cout << "encode from dRBSubjectItem dRBStatusUL error" << endl;
return false;
}
if (!drb_dl->encodedRBStatusDL(&dRB_item->dRBStatusDL))
{
cout << "encode from dRBSubjectItem dRBStatusDL error" << endl;
return false;
}
cout << "encode from dRBSubjectItem successfully" << endl;
return true;
}
} // namespace ngap
\ No newline at end of file
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _DRBSSUBJECTTOSTATUSTRANSFERITEM_H_
#define _DRBSSUBJECTTOSTATUSTRANSFERITEM_H_
#include "dRBStatusUL.hpp"
#include "dRBStatusDL.hpp"
extern "C" {
extern "C"
{
#include "Ngap_DRBsSubjectToStatusTransferItem.h"
}
namespace ngap {
class dRBSubjectItem {
public:
dRBSubjectItem();
virtual ~dRBSubjectItem();
void getdRBSubjectItem(Ngap_DRB_ID_t *&dRB_ID, dRBStatusUL *&dRB_UL,
dRBStatusDL *&dRB_DL);
void setdRBSubjectItem(Ngap_DRB_ID_t *dRB_ID, dRBStatusUL *dRB_UL,
dRBStatusDL *dRB_DL);
bool decodefromdRBSubjectItem(
Ngap_DRBsSubjectToStatusTransferItem_t *dRB_item);
bool encodedRBSubjectItem(Ngap_DRBsSubjectToStatusTransferItem_t *dRB_item);
namespace ngap
{
class dRBSubjectItem
{
public:
dRBSubjectItem();
virtual ~dRBSubjectItem();
void getdRBSubjectItem(Ngap_DRB_ID_t *&dRB_ID, dRBStatusUL *&dRB_UL, dRBStatusDL *&dRB_DL);
void setdRBSubjectItem(Ngap_DRB_ID_t *dRB_ID, dRBStatusUL *dRB_UL, dRBStatusDL *dRB_DL);
bool decodefromdRBSubjectItem(Ngap_DRBsSubjectToStatusTransferItem_t *dRB_item);
bool encodedRBSubjectItem(Ngap_DRBsSubjectToStatusTransferItem_t *dRB_item);
private:
Ngap_DRB_ID_t *drb_id;
dRBStatusUL *drb_ul;
dRBStatusDL *drb_dl;
};
} // namespace ngap
#endif
private:
Ngap_DRB_ID_t *drb_id;
dRBStatusUL *drb_ul;
dRBStatusDL *drb_dl;
};
} // namespace ngap
#endif
\ No newline at end of file
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "dRBsSubjectToStatusTransferList.hpp"
#include <iostream>
#include <vector>
using namespace std;
namespace ngap {
dRBSubjectList::dRBSubjectList() {
drbsubjectitem = NULL;
numofitem = 0;
}
dRBSubjectList::~dRBSubjectList() {
}
void dRBSubjectList::setdRBSubjectItem(dRBSubjectItem *m_item, int num) {
drbsubjectitem = m_item;
numofitem = num;
}
void dRBSubjectList::getdRBSubjectItem(dRBSubjectItem *&m_item, int &num) {
m_item = drbsubjectitem;
num = numofitem;
}
bool dRBSubjectList::encodefromdRBSubjectlist(
Ngap_DRBsSubjectToStatusTransferList_t &DRBsSubjectToStatusTransferList) {
for (int i = 0; i < numofitem; i++) {
Ngap_DRBsSubjectToStatusTransferItem_t *ie =
(Ngap_DRBsSubjectToStatusTransferItem_t*) calloc(
1, sizeof(Ngap_DRBsSubjectToStatusTransferItem_t));
if (!ie)
return false;
if (!drbsubjectitem[i].encodedRBSubjectItem(ie)) {
cout << "encodefromdRBSubjectlist error" << endl;
return false;
namespace ngap
{
dRBSubjectList::dRBSubjectList()
{
drbsubjectitem = NULL;
numofitem = 0;
}
if (ASN_SEQUENCE_ADD(&DRBsSubjectToStatusTransferList.list, ie) != 0) {
cout
<< "ASN_SEQUENCE_ADD(&DRBsSubjectToStatusTransferList.list, ie) error"
<< endl;
return false;
dRBSubjectList::~dRBSubjectList() {}
void dRBSubjectList::setdRBSubjectItem(dRBSubjectItem *m_item, int num)
{
drbsubjectitem = m_item;
numofitem = num;
}
}
cout << "encodefromdRBSubjectlist successfully" << endl;
return true;
}
bool dRBSubjectList::decodefromdRBSubjectlist(
Ngap_DRBsSubjectToStatusTransferList_t &DRBsSubjectToStatusTransferList) {
numofitem = DRBsSubjectToStatusTransferList.list.count;
drbsubjectitem = new dRBSubjectItem[numofitem]();
for (int i = 0; i < numofitem; i++) {
if (!drbsubjectitem[i].decodefromdRBSubjectItem(
DRBsSubjectToStatusTransferList.list.array[i])) {
cout << "decodefromdRBSubjectlist error" << endl;
return false;
void dRBSubjectList::getdRBSubjectItem(dRBSubjectItem *&m_item, int &num)
{
m_item = drbsubjectitem;
num = numofitem;
}
}
cout << "decodefromdRBSubjectlist successfully" << endl;
return true;
}
} // namespace ngap
bool dRBSubjectList::encodefromdRBSubjectlist(Ngap_DRBsSubjectToStatusTransferList_t &DRBsSubjectToStatusTransferList)
{
for (int i = 0; i < numofitem; i++)
{
Ngap_DRBsSubjectToStatusTransferItem_t *ie = (Ngap_DRBsSubjectToStatusTransferItem_t *)calloc(1, sizeof(Ngap_DRBsSubjectToStatusTransferItem_t));
if (!ie)
return false;
if (!drbsubjectitem[i].encodedRBSubjectItem(ie))
{
cout << "encodefromdRBSubjectlist error" << endl;
return false;
}
if (ASN_SEQUENCE_ADD(&DRBsSubjectToStatusTransferList.list, ie) != 0)
{
cout << "ASN_SEQUENCE_ADD(&DRBsSubjectToStatusTransferList.list, ie) error" << endl;
return false;
}
}
cout << "encodefromdRBSubjectlist successfully" << endl;
return true;
}
bool dRBSubjectList::decodefromdRBSubjectlist(Ngap_DRBsSubjectToStatusTransferList_t &DRBsSubjectToStatusTransferList)
{
numofitem = DRBsSubjectToStatusTransferList.list.count;
drbsubjectitem = new dRBSubjectItem[numofitem]();
for (int i = 0; i < numofitem; i++)
{
if (!drbsubjectitem[i].decodefromdRBSubjectItem(DRBsSubjectToStatusTransferList.list.array[i]))
{
cout << "decodefromdRBSubjectlist error" << endl;
return false;
}
}
cout << "decodefromdRBSubjectlist successfully" << endl;
return true;
}
} // namespace ngap
\ No newline at end of file
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _DRBSSUBJECTTOSTATUSTRANSFERLIST_H_
#define _DRBSSUBJECTTOSTATUSTRANSFERLIST_H_
#include "dRBsSubjectToStatusTransferItem.hpp"
extern "C" {
extern "C"
{
#include "Ngap_DRBsSubjectToStatusTransferList.h"
#include "asn_SEQUENCE_OF.h"
}
namespace ngap {
class dRBSubjectList {
public:
dRBSubjectList();
virtual ~dRBSubjectList();
void setdRBSubjectItem(dRBSubjectItem *m_item, int num);
void getdRBSubjectItem(dRBSubjectItem *&m_item, int &num);
bool decodefromdRBSubjectlist(
Ngap_DRBsSubjectToStatusTransferList_t &DRBsSubjectToStatusTransferList);
bool encodefromdRBSubjectlist(
Ngap_DRBsSubjectToStatusTransferList_t &DRBsSubjectToStatusTransferList);
namespace ngap
{
class dRBSubjectList
{
public:
dRBSubjectList();
virtual ~dRBSubjectList();
void setdRBSubjectItem(dRBSubjectItem *m_item, int num);
void getdRBSubjectItem(dRBSubjectItem *&m_item, int &num);
bool decodefromdRBSubjectlist(Ngap_DRBsSubjectToStatusTransferList_t &DRBsSubjectToStatusTransferList);
bool encodefromdRBSubjectlist(Ngap_DRBsSubjectToStatusTransferList_t &DRBsSubjectToStatusTransferList);
private:
dRBSubjectItem *drbsubjectitem;
int numofitem;
};
} // namespace ngap
#endif
private:
dRBSubjectItem *drbsubjectitem;
int numofitem;
};
} // namespace ngap
#endif
\ No newline at end of file
/*
* 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 niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _DOWNLINKRANSTATUSTRANSFER_H_
#define _DOWNLINKRANSTATUSTRANSFER_H_
#include "AMF-UE-NGAP-ID.hpp"
......@@ -32,7 +5,8 @@
#include "MessageType.hpp"
#include "RANStatusTransferTransparentContainer.hpp"
#include "dRBStatusDL18.hpp"
extern "C" {
extern "C"
{
#include "Ngap_UplinkRANStatusTransfer.h"
#include "Ngap_RANStatusTransfer-TransparentContainer.h"
#include "Ngap_NGAP-PDU.h"
......@@ -42,23 +16,23 @@ extern "C" {
}
namespace ngap
{
class DownlinkRANStatusTransfer
{
public:
DownlinkRANStatusTransfer();
virtual ~DownlinkRANStatusTransfer();
void setmessagetype();
void setAmfUeNgapId(unsigned long id); //40 bits
void setRanUeNgapId(uint32_t id);// 32 bits
void setRANStatusTransfer_TransparentContainer(long drb_id, long ul_pcdp, long ul_hfn_pdcp, long dl_pcdp, long dl_hfn_pdcp);
int encodetobuffer(uint8_t *buf, int buf_size);
class DownlinkRANStatusTransfer
{
public:
DownlinkRANStatusTransfer();
virtual ~DownlinkRANStatusTransfer();
void setmessagetype();
void setAmfUeNgapId(unsigned long id); //40 bits
void setRanUeNgapId(uint32_t id); // 32 bits
void setRANStatusTransfer_TransparentContainer(long drb_id, long ul_pcdp, long ul_hfn_pdcp, long dl_pcdp, long dl_hfn_pdcp);
int encodetobuffer(uint8_t *buf, int buf_size);
private:
Ngap_NGAP_PDU_t *DownlinkranstatustransferPDU;
Ngap_DownlinkRANStatusTransfer_t *DownlinkranstatustransferIEs;
AMF_UE_NGAP_ID *amfUeNgapId;
RAN_UE_NGAP_ID *ranUeNgapId;
RANStatusTransferTransparentContainer *ranStatusTransfer_TransparentContainer;
};
} // namespace ngap
#endif
private:
Ngap_NGAP_PDU_t *DownlinkranstatustransferPDU;
Ngap_DownlinkRANStatusTransfer_t *DownlinkranstatustransferIEs;
AMF_UE_NGAP_ID *amfUeNgapId;
RAN_UE_NGAP_ID *ranUeNgapId;
RANStatusTransferTransparentContainer *ranStatusTransfer_TransparentContainer;
};
} // namespace ngap
#endif
\ No newline at end of file
This diff is collapsed.
......@@ -11,56 +11,60 @@
#include "AMF-UE-NGAP-ID.hpp"
#include "RAN-UE-NGAP-ID.hpp"
#include "Cause.hpp"
extern "C" {
#include "Ngap_NGAP-PDU.h"
#include "Ngap_ProtocolIE-Field.h"
#include "Ngap_NGSetupRequest.h"
extern "C"{
#include "Ngap_NGAP-PDU.h"
#include "Ngap_ProtocolIE-Field.h"
#include "Ngap_NGSetupRequest.h"
}
namespace ngap {
typedef struct {
uint8_t pduSessionId;
OCTET_STRING_t HandoverCommandTransfer;
}PDUSessionResourceHandoverItem_t;
class HandoverCommandMsg {
public:
HandoverCommandMsg();
virtual ~HandoverCommandMsg();
void setMessageType(); //Initialize the PDU and populate the MessageType;
void setAmfUeNgapId(unsigned long id);//40 bits
void setRanUeNgapId(uint32_t id);// 32 bits
void setHandoverType(long type);
void setPduSessionResourceHandoverList(std::vector<PDUSessionResourceHandoverItem_t> list);
void setTargetToSource_TransparentContainer(OCTET_STRING_t targetTosource);
int encode2buffer(uint8_t *buf, int buf_size);
bool decodefrompdu(Ngap_NGAP_PDU_t *ngap_msg_pdu);
unsigned long getAmfUeNgapId();//return -1;(不存在)
uint32_t getRanUeNgapId();//return -1;(不存在)
/*void getHandoverType(Ngap_HandoverType_t &handovertype);
void getCause(Cause cause);
void getTargetID(Ngap_TargetID_t targetID);
void getDirectForwardingPathAvailability(Ngap_DirectForwardingPathAvailability_t directpathavailable);
void getPDUSessionResourceList(Ngap_PDUSessionResourceHandoverList_t pdusessionresourcelist);
void getSourceToTargetTransparentContainer();*/
private:
Ngap_NGAP_PDU_t *handoverCommandPdu;
Ngap_HandoverCommand_t *handoverCommandIEs;
/***************** for decoding ****************/
AMF_UE_NGAP_ID *amfUeNgapId;
RAN_UE_NGAP_ID *ranUeNgapId;
Ngap_HandoverType_t *ngap_handovertype;
Ngap_NASSecurityParametersFromNGRAN_t *NASSecurityParametersFromNGRAN;
Ngap_PDUSessionResourceHandoverList_t *PDUSessionResourceHandoverList;
Ngap_PDUSessionResourceToReleaseListHOCmd_t *PDUSessionResourceToReleaseListHOCmd;
Ngap_TargetToSource_TransparentContainer_t *TargetToSource_TransparentContainer;
Ngap_CriticalityDiagnostics_t *CriticalityDiagnostics;
};
namespace ngap{
typedef struct {
uint8_t pduSessionId;
OCTET_STRING_t HandoverCommandTransfer;
}PDUSessionResourceHandoverItem_t;
class HandoverCommandMsg{
public:
HandoverCommandMsg();
virtual ~HandoverCommandMsg();
void setMessageType(); //Initialize the PDU and populate the MessageType;
void setAmfUeNgapId(unsigned long id);//40 bits
void setRanUeNgapId(uint32_t id);// 32 bits
void setHandoverType(long type);
void setPduSessionResourceHandoverList(std::vector<PDUSessionResourceHandoverItem_t> list);
void setTargetToSource_TransparentContainer(OCTET_STRING_t targetTosource);
int encode2buffer(uint8_t *buf, int buf_size);
bool decodefrompdu(Ngap_NGAP_PDU_t *ngap_msg_pdu);
unsigned long getAmfUeNgapId();//return -1;(不存在)
uint32_t getRanUeNgapId();//return -1;(不存在)
/*void getHandoverType(Ngap_HandoverType_t &handovertype);
void getCause(Cause cause);
void getTargetID(Ngap_TargetID_t targetID);
void getDirectForwardingPathAvailability(Ngap_DirectForwardingPathAvailability_t directpathavailable);
void getPDUSessionResourceList(Ngap_PDUSessionResourceHandoverList_t pdusessionresourcelist);
void getSourceToTargetTransparentContainer();*/
private:
Ngap_NGAP_PDU_t *handoverCommandPdu;
Ngap_HandoverCommand_t *handoverCommandIEs;
/***************** for decoding ****************/
AMF_UE_NGAP_ID *amfUeNgapId;
RAN_UE_NGAP_ID *ranUeNgapId;
Ngap_HandoverType_t *ngap_handovertype;
Ngap_NASSecurityParametersFromNGRAN_t *NASSecurityParametersFromNGRAN;
Ngap_PDUSessionResourceHandoverList_t *PDUSessionResourceHandoverList;
Ngap_PDUSessionResourceToReleaseListHOCmd_t *PDUSessionResourceToReleaseListHOCmd;
Ngap_TargetToSource_TransparentContainer_t *TargetToSource_TransparentContainer;
Ngap_CriticalityDiagnostics_t *CriticalityDiagnostics;
};
}
......
This diff is collapsed.
......@@ -19,12 +19,12 @@
* contact@openairinterface.org
*/
/*! \file HandoverNotifyMsg.hpp
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
/*! \file HandoverNotifyMsg.hpp
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _HANDOVERNOTIFYMSG_H_
#define _HANDOVERNOTIFYMSG_H_
......@@ -42,24 +42,24 @@ extern "C" {
}
namespace ngap {
class HandoverNotifyMsg {
public:
HandoverNotifyMsg();
virtual ~HandoverNotifyMsg();
int encode2buffer(uint8_t *buf, int buf_size);
bool decodefrompdu(Ngap_NGAP_PDU_t *ngap_msg_pdu);
void setUserLocationInfoNR(struct NrCgi_s cig, struct Tai_s tai);
unsigned long getAmfUeNgapId(); //return -1;(������)
uint32_t getRanUeNgapId(); //return -1;(������)
bool getUserLocationInfoNR(struct NrCgi_s &cig, struct Tai_s &tai);
class HandoverNotifyMsg{
public:
HandoverNotifyMsg();
virtual ~HandoverNotifyMsg();
int encode2buffer(uint8_t* buf, int buf_size);
bool decodefrompdu(Ngap_NGAP_PDU_t* ngap_msg_pdu);
void setUserLocationInfoNR(struct NrCgi_s cig, struct Tai_s tai);
unsigned long getAmfUeNgapId();//return -1;()
uint32_t getRanUeNgapId();//return -1;()
bool getUserLocationInfoNR(struct NrCgi_s& cig, struct Tai_s& tai);
private:
Ngap_NGAP_PDU_t *handoverNotifyPdu;
Ngap_HandoverNotify_t *handoverNotifyIEs;
AMF_UE_NGAP_ID *amfUeNgapId;
RAN_UE_NGAP_ID *ranUeNgapId;
UserLocationInformation *userLocationInformation;
};
private:
Ngap_NGAP_PDU_t* handoverNotifyPdu;
Ngap_HandoverNotify_t* handoverNotifyIEs;
AMF_UE_NGAP_ID* amfUeNgapId;
RAN_UE_NGAP_ID* ranUeNgapId;
UserLocationInformation* userLocationInformation;
};
}
#endif
This diff is collapsed.
......@@ -12,11 +12,11 @@
#include "RAN-UE-NGAP-ID.hpp"
#include "Cause.hpp"
#include "UEAggregateMaxBitRate.hpp"
extern "C" {
#include "Ngap_NGAP-PDU.h"
#include "Ngap_ProtocolIE-Field.h"
#include "Ngap_NGSetupRequest.h"
#include "Ngap_AllowedNSSAI-Item.h"
extern "C"{
#include "Ngap_NGAP-PDU.h"
#include "Ngap_ProtocolIE-Field.h"
#include "Ngap_NGSetupRequest.h"
#include "Ngap_AllowedNSSAI-Item.h"
}
#include "UESecurityCapabilities.hpp"
......@@ -24,56 +24,61 @@ extern "C" {
#include "GUAMI.hpp"
#include "S-NSSAI.hpp"
#include "SecurityKey.hpp"
namespace ngap {
#include "MobilityRestrictionList.hpp"
namespace ngap{
class HandoverRequest {
public:
HandoverRequest();
virtual ~HandoverRequest();
void setMessageType(); //Initialize the PDU and populate the MessageType;
void setAmfUeNgapId(unsigned long id);//40 bits
void setHandoverType(long type);
void setCause(Ngap_Cause_PR m_causePresent,long value);
void setUEAggregateMaximumBitRate(long bit_rate_downlink,long bit_rate_uplink);
void setUESecurityCapabilities(uint16_t m_NR_EncryptionAlgs, uint16_t m_NR_IntegrityProtectionAlgs, uint16_t m_E_UTRA_EncryptionAlgs, uint16_t m_E_UTRA_IntegrityProtectionAlgs);
void setSecurityContext(long count, uint8_t* buffer);
void setPduSessionResourceSetupList(std::vector<PDUSessionResourceSetupRequestItem_t>list);
class HandoverRequest{
public:
HandoverRequest();
virtual ~HandoverRequest();
void setSourceToTarget_TransparentContainer(OCTET_STRING_t sourceTotarget);
void setMessageType(); //Initialize the PDU and populate the MessageType;
void setAmfUeNgapId(unsigned long id);//40 bits
void setHandoverType(long type);
void setCause(Ngap_Cause_PR m_causePresent,long value);
void setUEAggregateMaximumBitRate(long bit_rate_downlink,long bit_rate_uplink);
void setUESecurityCapabilities(uint16_t m_NR_EncryptionAlgs, uint16_t m_NR_IntegrityProtectionAlgs, uint16_t m_E_UTRA_EncryptionAlgs, uint16_t m_E_UTRA_IntegrityProtectionAlgs);
void setSecurityContext(long count, uint8_t* buffer);
void setPduSessionResourceSetupList(std::vector<PDUSessionResourceSetupRequestItem_t>list);
void setAllowedNSSAI(std::vector<S_NSSAI> list);
void setGUAMI(PlmnId* m_plmnId, AMFRegionID* m_aMFRegionID, AMFSetID* m_aMFSetID, AMFPointer* m_aMFPointer);
int encode2buffer(uint8_t *buf, int buf_size);
//bool decodefrompdu(Ngap_NGAP_PDU_t *ngap_msg_pdu);
unsigned long getAmfUeNgapId();//return -1;(不存在)
void setSourceToTarget_TransparentContainer(OCTET_STRING_t sourceTotarget);
private:
Ngap_NGAP_PDU_t *handoverRequestPdu;
Ngap_HandoverRequest_t *handoverRequestIEs;
/***************** for decoding ****************/
AMF_UE_NGAP_ID *amfUeNgapId;
Ngap_HandoverType_t *handovertype;
Cause *cause;
UEAggregateMaxBitRate *ueAggregateMaximumBitRate;
//Core Network Assistance Information for RRC INACTIVE
UESecurityCapabilities *ueSecurityCapabilities;
Ngap_SecurityContext_t *SecurityContext;
//New Security Context Indicator
//NASC
PDUSessionResourceSetupListHOReq *PDUSessionResourceSetupList;
Ngap_AllowedNSSAI_t *allowedNSSAI;
//Trace Activation
//Masked IMEISV
Ngap_SourceToTarget_TransparentContainer_t *SourceToTarget_TransparentContainer;
//Mobility Restriction List
//Location Reporting Request Type
//RRC Inactive Transition Report Request
GUAMI *guami;
//Redirection for Voice EPS Fallback
//CN Assisted RAN Parameters Tuning
};
void setAllowedNSSAI(std::vector<S_NSSAI> list);
void setGUAMI(PlmnId* m_plmnId, AMFRegionID* m_aMFRegionID, AMFSetID* m_aMFSetID, AMFPointer* m_aMFPointer);
void setMobilityRestrictionList(PlmnId *m_plmnId);
int encode2buffer(uint8_t *buf, int buf_size);
//bool decodefrompdu(Ngap_NGAP_PDU_t *ngap_msg_pdu);
unsigned long getAmfUeNgapId();//return -1;(不存在)
private:
Ngap_NGAP_PDU_t *handoverRequestPdu;
Ngap_HandoverRequest_t *handoverRequestIEs;
/***************** for decoding ****************/
AMF_UE_NGAP_ID *amfUeNgapId;
Ngap_HandoverType_t *handovertype;
Cause *cause;
UEAggregateMaxBitRate *ueAggregateMaximumBitRate;
//Core Network Assistance Information for RRC INACTIVE
UESecurityCapabilities *ueSecurityCapabilities;
Ngap_SecurityContext_t *SecurityContext;
//New Security Context Indicator
//NASC
PDUSessionResourceSetupListHOReq *PDUSessionResourceSetupList;
Ngap_AllowedNSSAI_t *allowedNSSAI;
//Trace Activation
//Masked IMEISV
Ngap_SourceToTarget_TransparentContainer_t *SourceToTarget_TransparentContainer;
//Mobility Restriction List
//Location Reporting Request Type
//RRC Inactive Transition Report Request
GUAMI *guami;
MobilityRestrictionList *mobilityrestrictionlist;
//Redirection for Voice EPS Fallback
//CN Assisted RAN Parameters Tuning
};
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -144,7 +144,7 @@ bool UEContextReleaseRequestMsg::decodefrompdu(Ngap_NGAP_PDU_t *ngap_msg_pdu) {
if (pdu->choice.initiatingMessage
&& pdu->choice.initiatingMessage->procedureCode
== Ngap_ProcedureCode_id_UEContextReleaseRequest
&& pdu->choice.initiatingMessage->criticality == Ngap_Criticality_reject
&& pdu->choice.initiatingMessage->criticality == Ngap_Criticality_ignore
&& pdu->choice.initiatingMessage->value.present
== Ngap_InitiatingMessage__value_PR_UEContextReleaseRequest) {
ies =
......
......@@ -44,7 +44,7 @@ public:
virtual ~N1N2MessageCollectionDocumentApi() {}
void init();
const std::string base = "/namf-comm/v1";
const std::string base = "/namf-comm/v2";
private:
void setupRoutes();
......
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