Commit a44ba544 authored by Niuhaiwen's avatar Niuhaiwen

the first step of integration

parent a144c1de
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
/*
* 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
/*
* 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"
{
#include "Ngap_COUNTValueForPDCP-SN18.h"
}
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);
};
} // namespace ngap
#endif
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
/*
* 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 Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _NGAPIESSTRUCT_H_
#define _NGAPIESSTRUCT_H_
#include <string>
#include <vector>
extern "C" {
#include "Ngap_AdditionalQosFlowInformation.h"
#include "Ngap_AssociatedQosFlowItem.h"
#include <string>
extern "C"
{
#include <OCTET_STRING.h>
#include "Ngap_DelayCritical.h"
#include "Ngap_NotificationControl.h"
#include "Ngap_Pre-emptionCapability.h"
#include "Ngap_Pre-emptionVulnerability.h"
#include "Ngap_NotificationControl.h"
#include "Ngap_ReflectiveQosAttribute.h"
#include <OCTET_STRING.h>
#include "Ngap_AdditionalQosFlowInformation.h"
#include "Ngap_AssociatedQosFlowItem.h"
}
namespace ngap {
typedef struct SliceSupportItem_s {
std::string sst;
std::string sd;
} SliceSupportItem_t;
typedef struct PlmnSliceSupport_s {
std::string mcc;
std::string mnc;
std::vector<SliceSupportItem_t> slice_list;
} PlmnSliceSupport_t;
typedef struct SupportedItem_s {
uint32_t tac;
std::vector<PlmnSliceSupport_t> b_plmn_list;
} SupportedItem_t;
typedef struct GuamiItem_s {
std::string mcc;
std::string mnc;
std::string regionID;
std::string AmfSetID;
std::string AmfPointer;
std::string backupAMFName; // optional
} GuamiItem_t;
typedef struct NrCgi_s {
std::string mcc;
std::string mnc;
unsigned long nrCellID;
} NrCgi_t;
typedef struct Tai_s {
std::string mcc;
std::string mnc;
uint32_t tac : 24;
} Tai_t;
typedef struct Guami_s {
std::string mcc;
std::string mnc;
std::string regionID;
std::string AmfSetID;
std::string AmfPointer;
} Guami_t;
typedef struct {
std::string sst;
std::string sd; //可选
} S_Nssai;
typedef struct {
uint8_t pduSessionId;
uint8_t *pduSessionNAS_PDU;
size_t sizeofpduSessionNAS_PDU;
S_Nssai s_nssai;
OCTET_STRING_t pduSessionResourceSetupRequestTransfer;
} PDUSessionResourceSetupRequestItem_t;
typedef struct {
std::string ip_address;
uint32_t gtp_teid;
} GtpTunnel_t;
typedef struct {
long _5QI;
long *priorityLevelQos;
long *averagingWindow;
long *maximumDataBurstVolume;
} NonDynamic5QI_t;
typedef struct {
long pERScalar;
long pERExponent;
} PacketErrorRate_t;
typedef struct {
long priorityLevelQos;
long packetDelayBudget;
PacketErrorRate_t packetErrorRate;
long *_5QI;
e_Ngap_DelayCritical *delayCritical;
long *averagingWindow;
long *maximumDataBurstVolume;
} Dynamic5QI_t;
typedef struct {
NonDynamic5QI_t *nonDy;
Dynamic5QI_t *dy;
} QosCharacteristics_t;
typedef struct {
long priorityLevelARP;
e_Ngap_Pre_emptionCapability pre_emptionCapability;
e_Ngap_Pre_emptionVulnerability pre_emptionVulnerability;
} AllocationAndRetentionPriority_t;
typedef struct {
long maximumFlowBitRateDL;
long maximumFlowBitRateUL;
long guaranteedFlowBitRateDL;
long guaranteedFlowBitRateUL;
e_Ngap_NotificationControl *notificationControl;
long *maximumPacketLossRateDL;
long *maximumPacketLossRateUL;
} GBR_QosInformation_t;
typedef struct {
QosCharacteristics_t qosc;
AllocationAndRetentionPriority_t arp;
GBR_QosInformation_t *gbr_qos_info;
e_Ngap_ReflectiveQosAttribute *reflectiveQosAttribute;
e_Ngap_AdditionalQosFlowInformation *additionalQosFlowInformation;
} QosFlowLevelQosParameters_t;
typedef struct {
long qos_flow_id;
QosFlowLevelQosParameters_t qflqp;
} QosFlowSetupReq_t;
typedef struct {
long qosFlowIdentifier;
e_Ngap_AssociatedQosFlowItem__qosFlowMappingIndication
*qosFlowMappingIndication;
} AssociatedQosFlow_t;
typedef struct {
uint8_t pduSessionId;
OCTET_STRING_t pduSessionResourceSetupResponseTransfer;
} PDUSessionResourceSetupResponseItem_t;
typedef struct {
uint8_t pduSessionId;
OCTET_STRING_t pduSessionResourceSetupUnsuccessfulTransfer;
} PDUSessionResourceFailedToSetupItem_t;
typedef struct {
uint8_t pduSessionId;
OCTET_STRING_t pduSessionResourceReleaseCommandTransfer;
} PDUSessionResourceReleaseCommandItem_t;
typedef struct {
uint8_t pduSessionId;
OCTET_STRING_t HandoverRequiredTransfer;
} PDUSessionResourceItem_t;
typedef struct {
uint8_t pduSessionId;
S_Nssai s_nssai;
OCTET_STRING_t pduSessionResourceSetupRequestTransfer;
} PDUSessionResourceSetupItem_t;
typedef struct {
uint8_t pduSessionId;
OCTET_STRING_t handoverRequestAcknowledgeTransfer;
} PDUSessionResourceAdmittedItem_t;
typedef struct {
Ngap_QosFlowIdentifier_t qosFlowIdentifier;
} QosFlowLItemWithDataForwarding_t;
namespace ngap
{
typedef struct SliceSupportItem_s
{
std::string sst;
std::string sd;
} SliceSupportItem_t;
typedef struct PlmnSliceSupport_s
{
std::string mcc;
std::string mnc;
std::vector<SliceSupportItem_t> slice_list;
} PlmnSliceSupport_t;
typedef struct SupportedItem_s
{
uint32_t tac;
std::vector<PlmnSliceSupport_t> b_plmn_list;
} SupportedItem_t;
typedef struct GuamiItem_s
{
std::string mcc;
std::string mnc;
std::string regionID;
std::string AmfSetID;
std::string AmfPointer;
std::string backupAMFName; //optional
} GuamiItem_t;
typedef struct NrCgi_s
{
std::string mcc;
std::string mnc;
unsigned long nrCellID;
} NrCgi_t;
typedef struct Tai_s
{
std::string mcc;
std::string mnc;
uint32_t tac : 24;
} Tai_t;
typedef struct Guami_s
{
std::string mcc;
std::string mnc;
std::string regionID;
std::string AmfSetID;
std::string AmfPointer;
} Guami_t;
typedef struct
{
std::string sst;
std::string sd; //可选
} S_Nssai;
typedef struct
{
uint8_t pduSessionId;
uint8_t *pduSessionNAS_PDU;
size_t sizeofpduSessionNAS_PDU;
S_Nssai s_nssai;
OCTET_STRING_t pduSessionResourceSetupRequestTransfer;
} PDUSessionResourceSetupRequestItem_t;
typedef struct
{
std::string ip_address;
uint32_t gtp_teid;
} GtpTunnel_t;
typedef struct
{
long _5QI;
long *priorityLevelQos;
long *averagingWindow;
long *maximumDataBurstVolume;
} NonDynamic5QI_t;
typedef struct
{
long pERScalar;
long pERExponent;
} PacketErrorRate_t;
typedef struct
{
long priorityLevelQos;
long packetDelayBudget;
PacketErrorRate_t packetErrorRate;
long *_5QI;
e_Ngap_DelayCritical *delayCritical;
long *averagingWindow;
long *maximumDataBurstVolume;
} Dynamic5QI_t;
typedef struct
{
NonDynamic5QI_t *nonDy;
Dynamic5QI_t *dy;
} QosCharacteristics_t;
typedef struct
{
long priorityLevelARP;
e_Ngap_Pre_emptionCapability pre_emptionCapability;
e_Ngap_Pre_emptionVulnerability pre_emptionVulnerability;
} AllocationAndRetentionPriority_t;
typedef struct
{
long maximumFlowBitRateDL;
long maximumFlowBitRateUL;
long guaranteedFlowBitRateDL;
long guaranteedFlowBitRateUL;
e_Ngap_NotificationControl *notificationControl;
long *maximumPacketLossRateDL;
long *maximumPacketLossRateUL;
} GBR_QosInformation_t;
typedef struct
{
QosCharacteristics_t qosc;
AllocationAndRetentionPriority_t arp;
GBR_QosInformation_t *gbr_qos_info;
e_Ngap_ReflectiveQosAttribute *reflectiveQosAttribute;
e_Ngap_AdditionalQosFlowInformation *additionalQosFlowInformation;
} QosFlowLevelQosParameters_t;
typedef struct
{
long qos_flow_id;
QosFlowLevelQosParameters_t qflqp;
} QosFlowSetupReq_t;
typedef struct
{
long qosFlowIdentifier;
e_Ngap_AssociatedQosFlowItem__qosFlowMappingIndication *qosFlowMappingIndication;
} AssociatedQosFlow_t;
typedef struct
{
uint8_t pduSessionId;
OCTET_STRING_t pduSessionResourceSetupResponseTransfer;
} PDUSessionResourceSetupResponseItem_t;
typedef struct
{
uint8_t pduSessionId;
OCTET_STRING_t pduSessionResourceSetupUnsuccessfulTransfer;
} PDUSessionResourceFailedToSetupItem_t;
typedef struct
{
uint8_t pduSessionId;
OCTET_STRING_t pduSessionResourceReleaseCommandTransfer;
} PDUSessionResourceReleaseCommandItem_t;
typedef struct
{
uint8_t pduSessionId;
OCTET_STRING_t HandoverRequiredTransfer;
} PDUSessionResourceItem_t;
typedef struct
{
uint8_t pduSessionId;
S_Nssai s_nssai;
OCTET_STRING_t pduSessionResourceSetupRequestTransfer;
} PDUSessionResourceSetupItem_t;
typedef struct
{
uint8_t pduSessionId;
OCTET_STRING_t handoverRequestAcknowledgeTransfer;
} PDUSessionResourceAdmittedItem_t;
typedef struct
{
Ngap_QosFlowIdentifier_t qosFlowIdentifier;
} QosFlowLItemWithDataForwarding_t;
typedef struct
{
long QFI;
} QosFlowToBeForwardedItem_t;
} // 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 <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;
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;
}
}
#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;
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;
}
} // 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 _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 {
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;
};
class PDUSessionResourceAdmittedItem {
public:
PDUSessionResourceAdmittedItem();
virtual ~PDUSessionResourceAdmittedItem();
}
#endif
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
#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 "PDUSessionResourceHandoverCommandTransfer.hpp"
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
{
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;
}
}
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;
}
} // 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 _PDUSessionResourceHandoverCommandTransfer_H_
#define _PDUSessionResourceHandoverCommandTransfer_H_
#include "UPTransportLayerInformation.hpp"
#include "QosFlowToBeForwardedList.hpp"
#include "NgapIEsStruct.hpp"
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;
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
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -20,98 +20,97 @@
*/
/*! \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" {
#include "asn_codecs.h"
extern "C"
{
#include "constr_TYPE.h"
#include "constraints.h"
#include "per_decoder.h"
#include "asn_codecs.h"
#include "per_encoder.h"
#include "per_decoder.h"
#include "constraints.h"
}
#include <iostream>
using namespace std;
namespace ngap {
PDUSessionResourceHandoverRequestAckTransfer::
PDUSessionResourceHandoverRequestAckTransfer() {
handoverRequestAcknowledegTransferIEs =
(Ngap_HandoverRequestAcknowledgeTransfer_t *)calloc(
1, sizeof(Ngap_HandoverRequestAcknowledgeTransfer_t));
DL_NGU_UP_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;
DL_NGU_UP_TNLInformation = new UpTransportLayerInformation();
if (!DL_NGU_UP_TNLInformation->decodefromUpTransportLayerInformation(
handoverRequestAcknowledegTransferIEs->dL_NGU_UP_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 (!DL_NGU_UP_TNLInformation->decodefromUpTransportLayerInformation(
handoverRequestAcknowledegTransferIEs->dL_NGU_UP_TNLInformation))
return false;
TransportLayerAddress *m_transportLayerAddress;
GtpTeid *m_gtpTeid;
if (!DL_NGU_UP_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" << 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
{
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
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -20,39 +20,40 @@
*/
/*! \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_
#include "DLQoSFlowPerTNLInformation.hpp"
#include "NgapIEsStruct.hpp"
#include "QosFlowListWithDataForwarding.hpp"
#include "SecurityResult.hpp"
#include "UPTransportLayerInformation.hpp"
extern "C" {
#include "DLQoSFlowPerTNLInformation.hpp"
#include "SecurityResult.hpp"
#include "QosFlowListWithDataForwarding.hpp"
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 *DL_NGU_UP_TNLInformation;
QosFlowListWithDataForwarding *QosFlowSetupResponseList;
};
private:
Ngap_HandoverRequestAcknowledgeTransfer_t *handoverRequestAcknowledegTransferIEs;
UpTransportLayerInformation *dLForwardingUP_TNLInformation;
QosFlowListWithDataForwarding *QosFlowSetupResponseList;
};
} // 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 "PDUSessionResourceItemHORqd.hpp"
#include <iostream>
using namespace std;
namespace ngap{
PDUSessionResourceItemHORqd::PDUSessionResourceItemHORqd()
{
pDUSessionID = NULL;
}
PDUSessionResourceItemHORqd::~PDUSessionResourceItemHORqd(){}
void PDUSessionResourceItemHORqd::setPDUSessionResourceItemHORqd(PDUSessionID *m_pDUSessionID, OCTET_STRING_t m_handoverrequiredtransfer)
{
pDUSessionID = m_pDUSessionID;
handoverrequiredtransfer = m_handoverrequiredtransfer;
}
bool PDUSessionResourceItemHORqd::encode2PDUSessionResourceItemHORqd(Ngap_PDUSessionResourceItemHORqd_t *pdUSessionResourceItemHORqd)
{
if(!pDUSessionID) return false;
if(!pDUSessionID->encode2PDUSessionID(pdUSessionResourceItemHORqd->pDUSessionID)) return false;
pdUSessionResourceItemHORqd->handoverRequiredTransfer = handoverrequiredtransfer;
return true;
}
bool PDUSessionResourceItemHORqd::decodefromPDUSessionResourceItemHORqd(Ngap_PDUSessionResourceItemHORqd_t *pdUSessionResourceItemHORqd)
{
pDUSessionID = new PDUSessionID();
if(!pDUSessionID->decodefromPDUSessionID(pdUSessionResourceItemHORqd->pDUSessionID)) return false;
handoverrequiredtransfer = pdUSessionResourceItemHORqd->handoverRequiredTransfer;
return true;
}
void PDUSessionResourceItemHORqd::getPDUSessionResourceItemHORqd(PDUSessionID *&m_pDUSessionID, OCTET_STRING_t&m_handoverrequiredtransfer)
{
m_pDUSessionID = pDUSessionID;
m_handoverrequiredtransfer = handoverrequiredtransfer;
}
}
#include <iostream>
using namespace std;
namespace ngap {
PDUSessionResourceItemHORqd::PDUSessionResourceItemHORqd() {
pDUSessionID = NULL;
}
PDUSessionResourceItemHORqd::~PDUSessionResourceItemHORqd() {}
void PDUSessionResourceItemHORqd::setPDUSessionResourceItemHORqd(
PDUSessionID *m_pDUSessionID, OCTET_STRING_t m_handoverrequiredtransfer) {
pDUSessionID = m_pDUSessionID;
handoverrequiredtransfer = m_handoverrequiredtransfer;
}
bool PDUSessionResourceItemHORqd::encode2PDUSessionResourceItemHORqd(
Ngap_PDUSessionResourceItemHORqd_t *pdUSessionResourceItemHORqd) {
if (!pDUSessionID)
return false;
if (!pDUSessionID->encode2PDUSessionID(
pdUSessionResourceItemHORqd->pDUSessionID))
return false;
pdUSessionResourceItemHORqd->handoverRequiredTransfer =
handoverrequiredtransfer;
return true;
}
bool PDUSessionResourceItemHORqd::decodefromPDUSessionResourceItemHORqd(
Ngap_PDUSessionResourceItemHORqd_t *pdUSessionResourceItemHORqd) {
pDUSessionID = new PDUSessionID();
if (!pDUSessionID->decodefromPDUSessionID(
pdUSessionResourceItemHORqd->pDUSessionID))
return false;
handoverrequiredtransfer =
pdUSessionResourceItemHORqd->handoverRequiredTransfer;
return true;
}
void PDUSessionResourceItemHORqd::getPDUSessionResourceItemHORqd(
PDUSessionID *&m_pDUSessionID, OCTET_STRING_t &m_handoverrequiredtransfer) {
m_pDUSessionID = pDUSessionID;
m_handoverrequiredtransfer = handoverrequiredtransfer;
}
} // 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 _PDUSESSIONRESOURCEITEMHORQD_H_
#define _PDUSESSIONRESOURCEITEMHQRQD_H_
#include "PDUSessionID.hpp"
#include "PDUSessionResourceHandoverRequestAckTransfer.hpp"
extern "C" {
#include "Ngap_PDUSessionResourceItemHORqd.h"
extern "C"{
#include "Ngap_PDUSessionResourceItemHORqd.h"
}
namespace ngap {
namespace ngap{
class PDUSessionResourceItemHORqd{
public:
PDUSessionResourceItemHORqd();
virtual ~PDUSessionResourceItemHORqd();
void setPDUSessionResourceItemHORqd(PDUSessionID *m_pDUSessionID, OCTET_STRING_t m_handoverrequiredtransfer);
void getPDUSessionResourceItemHORqd(PDUSessionID *&m_pDUSessionID, OCTET_STRING_t&m_handoverrequiredtransfer);
bool encode2PDUSessionResourceItemHORqd(Ngap_PDUSessionResourceItemHORqd_t *pdUSessionResourceItemHORqd);
bool decodefromPDUSessionResourceItemHORqd(Ngap_PDUSessionResourceItemHORqd_t *pdUSessionResourceItemHORqd);
private:
PDUSessionID *pDUSessionID;
OCTET_STRING_t handoverrequiredtransfer;
};
class PDUSessionResourceItemHORqd {
public:
PDUSessionResourceItemHORqd();
virtual ~PDUSessionResourceItemHORqd();
}
#endif
void
setPDUSessionResourceItemHORqd(PDUSessionID *m_pDUSessionID,
OCTET_STRING_t m_handoverrequiredtransfer);
void
getPDUSessionResourceItemHORqd(PDUSessionID *&m_pDUSessionID,
OCTET_STRING_t &m_handoverrequiredtransfer);
bool encode2PDUSessionResourceItemHORqd(
Ngap_PDUSessionResourceItemHORqd_t *pdUSessionResourceItemHORqd);
bool decodefromPDUSessionResourceItemHORqd(
Ngap_PDUSessionResourceItemHORqd_t *pdUSessionResourceItemHORqd);
private:
PDUSessionID *pDUSessionID;
OCTET_STRING_t handoverrequiredtransfer;
};
} // 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 "PDUSessionResourceReleaseCommandTransfer.hpp"
extern "C" {
......@@ -17,7 +44,11 @@ namespace ngap {
pduSessionResourceReleaseCommandTransferIEs = (Ngap_PDUSessionResourceReleaseCommandTransfer_t *)calloc(1, sizeof(Ngap_PDUSessionResourceReleaseCommandTransfer_t));
causeValue = NULL;
}
PDUSessionResourceReleaseCommandTransfer::~PDUSessionResourceReleaseCommandTransfer() {}
PDUSessionResourceReleaseCommandTransfer::~PDUSessionResourceReleaseCommandTransfer() {
//if(pduSessionResourceReleaseCommandTransferIEs) ASN_STRUCT_FREE(asn_DEF_Ngap_PDUSessionResourceReleaseCommandTransfer,pduSessionResourceReleaseCommandTransferIEs);
if (causeValue) delete causeValue;
//if (pduSessionResourceReleaseCommandTransferIEs) free(pduSessionResourceReleaseCommandTransferIEs);
}
void PDUSessionResourceReleaseCommandTransfer::setCauseRadioNetwork(e_Ngap_CauseRadioNetwork cause_value)
{
......
/*
* 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 "PDUSessionResourceReleaseItemCmd.hpp"
#include <iostream>
......@@ -8,7 +35,9 @@ namespace ngap{
{
pDUSessionID = NULL;
}
PDUSessionResourceReleaseItemCmd::~PDUSessionResourceReleaseItemCmd(){}
PDUSessionResourceReleaseItemCmd::~PDUSessionResourceReleaseItemCmd(){
if (pDUSessionID) delete pDUSessionID;
}
void PDUSessionResourceReleaseItemCmd::setPDUSessionResourceReleaseItemCmd(PDUSessionID *m_pDUSessionID,OCTET_STRING_t m_pDUSessionResourceReleaseCommandTransfer)
{
......
/*
* 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 _PDUSESSIONRESOURCERELEASEITEMCMD_H_
#define _PDUSESSIONRESOURCERELEASEITEMCMD_H_
......
......@@ -9,7 +9,9 @@ namespace ngap{
pduSessionResourceReleaseItemCmd = NULL;
numofpduSessionResourceReleaseItemCmd = 0;
}
PDUSessionResourceReleaseListCmd::~PDUSessionResourceReleaseListCmd(){}
PDUSessionResourceReleaseListCmd::~PDUSessionResourceReleaseListCmd(){
if (pduSessionResourceReleaseItemCmd) delete[] pduSessionResourceReleaseItemCmd;
}
void PDUSessionResourceReleaseListCmd::setPDUSessionResourceReleaseListCmd(PDUSessionResourceReleaseItemCmd *m_pduSessionResourceReleaseItemCmd,int num)
{
......
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file
/*! \file
\brief
\author niuxiansheng-niu, BUPT
\date 2020
......@@ -29,22 +29,33 @@
#include <iostream>
using namespace std;
namespace ngap {
QosFlowItemWithDataForWarding::QosFlowItemWithDataForWarding() {
namespace ngap
{
QosFlowItemWithDataForWarding::QosFlowItemWithDataForWarding()
{
qosFlowIdentifier = NULL;
}
QosFlowItemWithDataForWarding::~QosFlowItemWithDataForWarding(){}
void QosFlowItemWithDataForWarding::getQosFlowItemWithDataForWarding(Ngap_QosFlowIdentifier_t m_QosFlowIdentifier) {
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;
m_QosFlowIdentifier = (Ngap_QosFlowIdentifier_t)value;
}
}
bool QosFlowItemWithDataForWarding::decodeformQosFlowItemWithDataForWarding(Ngap_QosFlowSetupResponseItemHOReqAck_t* qosFlowItemWithDataForWarding) {
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;
}
}
\ No newline at end of file
} // namespace ngap
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file
/*! \file
\brief
\author niuxiansheng-niu, BUPT
\date 2020
......@@ -30,22 +30,25 @@
#include "QosFlowLevelQosParameters.hpp"
#include "QosFlowIdentifier.hpp"
extern "C" {
extern "C"
{
#include "Ngap_QosFlowSetupResponseItemHOReqAck.h"
}
namespace ngap {
class 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;
QosFlowIdentifier *qosFlowIdentifier;
};
}
} // namespace ngap
#endif // !_QOSFLOWITEMWITHDATAFORWARDING_H_
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -19,40 +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;
}
}
} // namespace ngap
\ No newline at end of file
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -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 "QosFlowItemWithDataForwarding.hpp"
#include "QosFlowLevelQosParameters.hpp"
extern "C" {
#include "Ngap_QosFlowSetupResponseListHOReqAck.h"
#include "QosFlowItemWithDataForwarding.hpp"
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;
};
} // namespace ngap
#endif
\ No newline at end of file
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"
{
}
#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
/*
* 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"
{
#include "Ngap_QosFlowToBeForwardedItem.h"
}
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
/*
* 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;
}
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
/*
* 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"
{
#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);
private:
QosFlowToBeForwardedItem *Qosflowtobeforwardeditem;
int numofqosflowtobeforwardeditem;
};
} // namespace ngap
#endif
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
/*
* 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
/*
* 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"
{
#include "Ngap_RANStatusTransfer-TransparentContainer.h"
}
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);
};
} // namespace ngap
#endif
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
/*
* 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 "dRBStatusDL.hpp"
#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
/*
* 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"
{
#include "Ngap_DRBStatusDL.h"
#include "Ngap_DRBStatusDL18.h"
}
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);
};
} // 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
/*
* 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"
{
#include "Ngap_DRBStatusDL18.h"
}
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
/*
* 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 "dRBStatusUL.hpp"
#include <iostream>
#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
/*
* 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"
{
#include "Ngap_DRBStatusUL.h"
}
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
/*
* 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
/*
* 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"
{
#include "Ngap_DRBStatusUL18.h"
}
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);
};
} // 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 "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
/*
* 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"
{
#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);
private:
Ngap_DRB_ID_t *drb_id;
dRBStatusUL *drb_ul;
dRBStatusDL *drb_dl;
};
} // 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 "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;
}
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
/*
* 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"
{
#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);
private:
dRBSubjectItem *drbsubjectitem;
int numofitem;
};
} // 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 "DownlinkRANStatusTransfer.hpp"
#include <iostream>
#include <vector>
using namespace std;
namespace ngap
{
DownlinkRANStatusTransfer::DownlinkRANStatusTransfer()
{
amfUeNgapId = NULL;
ranUeNgapId = NULL;
ranStatusTransfer_TransparentContainer = NULL;
DownlinkranstatustransferIEs = NULL;
DownlinkranstatustransferPDU = NULL;
}
DownlinkRANStatusTransfer::~DownlinkRANStatusTransfer()
{
}
void DownlinkRANStatusTransfer::setAmfUeNgapId(unsigned long id)
{
if (!amfUeNgapId)
amfUeNgapId = new AMF_UE_NGAP_ID();
amfUeNgapId->setAMF_UE_NGAP_ID(id);
Ngap_DownlinkRANStatusTransferIEs_t *ie = (Ngap_DownlinkRANStatusTransferIEs_t *)calloc(1, sizeof(Ngap_DownlinkRANStatusTransferIEs_t));
ie->id = Ngap_ProtocolIE_ID_id_AMF_UE_NGAP_ID;
ie->criticality = Ngap_Criticality_reject;
ie->value.present = Ngap_DownlinkRANStatusTransferIEs__value_PR_AMF_UE_NGAP_ID;
int ret = amfUeNgapId->encode2AMF_UE_NGAP_ID(ie->value.choice.AMF_UE_NGAP_ID);
if (!ret)
{
cout << "encode AMF_UE_NGAP_ID IE error" << endl;
return;
}
ret = ASN_SEQUENCE_ADD(&DownlinkranstatustransferIEs->protocolIEs.list, ie);
if (ret != 0)
cout << "encode AMF_UE_NGAP_ID IE error" << endl;
}
void DownlinkRANStatusTransfer::setRanUeNgapId(uint32_t id)
{
if (!ranUeNgapId)
ranUeNgapId = new RAN_UE_NGAP_ID();
ranUeNgapId->setRanUeNgapId(id);
Ngap_DownlinkRANStatusTransferIEs_t *ie = (Ngap_DownlinkRANStatusTransferIEs_t *)calloc(1, sizeof(Ngap_DownlinkRANStatusTransferIEs_t));
ie->id = Ngap_ProtocolIE_ID_id_RAN_UE_NGAP_ID;
ie->criticality = Ngap_Criticality_reject;
ie->value.present = Ngap_DownlinkRANStatusTransferIEs__value_PR_RAN_UE_NGAP_ID;
int ret = ranUeNgapId->encode2RAN_UE_NGAP_ID(ie->value.choice.RAN_UE_NGAP_ID);
if (!ret)
{
cout << "encode RAN_UE_NGAP_ID IE error" << endl;
return;
}
ret = ASN_SEQUENCE_ADD(&DownlinkranstatustransferIEs->protocolIEs.list, ie);
if (ret != 0)
cout << "encode RAN_UE_NGAP_ID IE error" << endl;
}
void DownlinkRANStatusTransfer::setRANStatusTransfer_TransparentContainer(long drb_id, long ul_pcdp, long ul_hfn_pdcp, long dl_pcdp, long dl_hfn_pdcp)
{
if (!ranStatusTransfer_TransparentContainer)
{
ranStatusTransfer_TransparentContainer = new RANStatusTransferTransparentContainer();
}
Ngap_DRB_ID_t *dRB_id = (Ngap_DRB_ID_t *)calloc(1, sizeof(Ngap_DRB_ID_t));
dRB_id = &drb_id;
COUNTValueForPDCP_SN18 *UL_value = (COUNTValueForPDCP_SN18 *)calloc(1, sizeof(COUNTValueForPDCP_SN18));
UL_value->setvalue(ul_pcdp, ul_hfn_pdcp);
COUNTValueForPDCP_SN18 *DL_value = (COUNTValueForPDCP_SN18 *)calloc(1, sizeof(COUNTValueForPDCP_SN18));
DL_value->setvalue(dl_pcdp, dl_hfn_pdcp);
dRBStatusUL18 *UL18 = (dRBStatusUL18 *)calloc(1, sizeof(dRBStatusUL18));
UL18->setcountvalue(UL_value);
DRBStatusDL18 *DL18 = (DRBStatusDL18 *)calloc(1, sizeof(DRBStatusDL18));
DL18->setcountvalue(DL_value);
dRBStatusDL *DL = (dRBStatusDL *)calloc(1, sizeof(dRBStatusDL));
DL->setDRBStatusDL18(DL18);
dRBStatusUL *UL = (dRBStatusUL *)calloc(1, sizeof(dRBStatusUL));
UL->setdRBStatusUL(UL18);
dRBSubjectItem *m_item = (dRBSubjectItem *)calloc(1, sizeof(dRBSubjectItem));
m_item->setdRBSubjectItem(dRB_id, UL, DL);
dRBSubjectList *m_list = (dRBSubjectList *)calloc(1, sizeof(dRBSubjectList));
m_list->setdRBSubjectItem(m_item, 1);
ranStatusTransfer_TransparentContainer->setdRBSubject_list(m_list);
Ngap_DownlinkRANStatusTransferIEs_t *ie = (Ngap_DownlinkRANStatusTransferIEs_t *)calloc(1, sizeof(Ngap_DownlinkRANStatusTransferIEs_t));
ie->id = Ngap_ProtocolIE_ID_id_RANStatusTransfer_TransparentContainer;
ie->criticality = Ngap_Criticality_reject;
ie->value.present = Ngap_DownlinkRANStatusTransferIEs__value_PR_RANStatusTransfer_TransparentContainer;
bool ret = ranStatusTransfer_TransparentContainer->encoderanstatustransfer_transparentcontainer(&ie->value.choice.RANStatusTransfer_TransparentContainer);
if (!ret)
{
cout << "encode ranstatustransfer_transparentcontainer error" << endl;
}
if (ASN_SEQUENCE_ADD(&DownlinkranstatustransferIEs->protocolIEs.list, ie) != 0)
{
cout << "encode ranstatustransfer_transparentcontainer error 2" << endl;
}
}
void DownlinkRANStatusTransfer::setmessagetype()
{
if (!DownlinkranstatustransferPDU)
{
DownlinkranstatustransferPDU = (Ngap_NGAP_PDU_t *)calloc(1, sizeof(Ngap_NGAP_PDU_t));
}
MessageType downlinkranstatustransfermessageIEs;
downlinkranstatustransfermessageIEs.setProcedureCode(Ngap_ProcedureCode_id_DownlinkRANStatusTransfer);
downlinkranstatustransfermessageIEs.setTypeOfMessage(Ngap_NGAP_PDU_PR_initiatingMessage);
downlinkranstatustransfermessageIEs.setCriticality(Ngap_Criticality_ignore);
downlinkranstatustransfermessageIEs.setValuePresent(Ngap_InitiatingMessage__value_PR_DownlinkRANStatusTransfer);
if (downlinkranstatustransfermessageIEs.getProcedureCode() == Ngap_ProcedureCode_id_DownlinkRANStatusTransfer && downlinkranstatustransfermessageIEs.getTypeOfMessage() == Ngap_NGAP_PDU_PR_initiatingMessage)
{
downlinkranstatustransfermessageIEs.encode2pdu(DownlinkranstatustransferPDU);
DownlinkranstatustransferIEs = &(DownlinkranstatustransferPDU->choice.initiatingMessage->value.choice.DownlinkRANStatusTransfer);
}
else
{
cout << "[warning] This information doesn't refer to downlinkranstatustransfer Message!!!" << endl;
}
}
int DownlinkRANStatusTransfer::encodetobuffer(uint8_t *buf, int buf_size)
{
asn_fprint(stderr, &asn_DEF_Ngap_NGAP_PDU, DownlinkranstatustransferPDU);
asn_enc_rval_t er = aper_encode_to_buffer(&asn_DEF_Ngap_NGAP_PDU, NULL, DownlinkranstatustransferPDU, buf, buf_size);
cout << "er.encoded(" << er.encoded << ")" << endl;
return er.encoded;
}
} // 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 _DOWNLINKRANSTATUSTRANSFER_H_
#define _DOWNLINKRANSTATUSTRANSFER_H_
#include "AMF-UE-NGAP-ID.hpp"
#include "RAN-UE-NGAP-ID.hpp"
#include "MessageType.hpp"
#include "RANStatusTransferTransparentContainer.hpp"
#include "dRBStatusDL18.hpp"
extern "C"
{
#include "Ngap_UplinkRANStatusTransfer.h"
#include "Ngap_RANStatusTransfer-TransparentContainer.h"
#include "Ngap_NGAP-PDU.h"
#include "Ngap_ProtocolIE-Field.h"
#include "Ngap_InitiatingMessage.h"
#include "Ngap_DRB-ID.h"
}
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);
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
This diff is collapsed.
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -19,47 +19,47 @@
* contact@openairinterface.org
*/
/*! \file ngap_message_callback.cpp
\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_
#include "NgapIEsStruct.hpp"
#include "AMF-UE-NGAP-ID.hpp"
#include "MessageType.hpp"
#include "RAN-UE-NGAP-ID.hpp"
#include "MessageType.hpp"
#include "UserLocationInformation.hpp"
extern "C" {
#include "Ngap_HandoverNotify.h"
#include "Ngap_NGAP-PDU.h"
#include "Ngap_ProtocolIE-Field.h"
#include "Ngap_HandoverNotify.h"
}
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;
};
} // namespace ngap
}
#endif
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file
\brief
\author niuxiansheng-niu, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _HANDOVERREQUESTACK_H_
#define _HANDOVERREQUESTACK_H_
#include "AMF-UE-NGAP-ID.hpp"
#include "Cause.hpp"
#include "DefaultPagingDRX.hpp"
#include "GlobalRanNodeId.hpp"
#include "MessageType.hpp"
#include "NgapIEsStruct.hpp"
#include "PDUSessionResourceAdmittedItem.hpp"
#include "PDUSessionResourceAdmittedList.hpp"
#include "RAN-UE-NGAP-ID.hpp"
#include "MessageType.hpp"
#include "GlobalRanNodeId.hpp"
#include "RanNodeName.hpp"
#include "DefaultPagingDRX.hpp"
#include "SupportedTAList.hpp"
#include "AMF-UE-NGAP-ID.hpp"
#include "RAN-UE-NGAP-ID.hpp"
#include "Cause.hpp"
extern "C" {
#include "Ngap_HandoverRequestAcknowledgeTransfer.h"
#include "Ngap_NGAP-PDU.h"
#include "Ngap_ProtocolIE-Field.h"
#include "Ngap_NGSetupRequest.h"
#include "Ngap_PDUSessionResourceAdmittedItem.h"
#include "Ngap_ProtocolIE-Field.h"
#include <arpa/inet.h>
#include "Ngap_HandoverRequestAcknowledgeTransfer.h"
#include <netinet/in.h>
#include <arpa/inet.h>
}
namespace ngap {
class HandoverRequestAck {
public:
HandoverRequestAck();
virtual ~HandoverRequestAck();
class HandoverRequestAck {
public:
HandoverRequestAck();
virtual ~HandoverRequestAck();
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;(不存在)
int encode2buffer(uint8_t* buf, int buf_size);
bool decodefrompdu(Ngap_NGAP_PDU_t* ngap_msg_pdu);
void setMessageType(); // Initialize the PDU and populate the MessageType;
OCTET_STRING_t getTargetToSource_TransparentContainer();
bool getPDUSessionResourceAdmittedList(
std::vector<PDUSessionResourceAdmittedItem_t> &list);
unsigned long getAmfUeNgapId();//return -1;(不存在)
uint32_t getRanUeNgapId();//return -1;(不存在)
private:
Ngap_NGAP_PDU_t *handoverRequestAckPdu;
Ngap_HandoverRequestAcknowledge_t *handoverRequestAckIEs;
/***************** for decoding ****************/
AMF_UE_NGAP_ID *amfUeNgapId;
RAN_UE_NGAP_ID *ranUeNgapId;
Ngap_HandoverType_t *handovertype;
void setMessageType(); //Initialize the PDU and populate the MessageType;
OCTET_STRING_t getTargetToSource_TransparentContainer();
bool getPDUSessionResourceAdmittedList(std::vector<PDUSessionResourceAdmittedItem_t>& list);
private:
Ngap_NGAP_PDU_t *handoverRequestAckPdu;
Ngap_HandoverRequestAcknowledge_t *handoverRequestAckIEs;
/***************** for decoding ****************/
AMF_UE_NGAP_ID *amfUeNgapId;
RAN_UE_NGAP_ID *ranUeNgapId;
Ngap_HandoverType_t* handovertype;
PDUSessionResourceAdmittedList *pduSessionResourceAdmittedList;
Ngap_PDUSessionResourceFailedToSetupListHOAck_t
*PDUSessionResourceFailedToSetupList;
Ngap_TargetToSource_TransparentContainer_t
*TargetToSource_TransparentContainer;
Ngap_CriticalityDiagnostics_t *CriticalityDiagnostics;
};
PDUSessionResourceAdmittedList *pduSessionResourceAdmittedList;
Ngap_PDUSessionResourceFailedToSetupListHOAck_t *PDUSessionResourceFailedToSetupList;
Ngap_TargetToSource_TransparentContainer_t *TargetToSource_TransparentContainer;
Ngap_CriticalityDiagnostics_t *CriticalityDiagnostics;
};
} // 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 Keliang Du, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "UplinkRANStatusTransfer.hpp"
#include <iostream>
#include <vector>
using namespace std;
namespace ngap
{
UplinkRANStatusTransfer::UplinkRANStatusTransfer()
{
amfUeNgapId = NULL;
ranUeNgapId = NULL;
ranStatusTransfer_TransparentContainer = NULL;
}
UplinkRANStatusTransfer::~UplinkRANStatusTransfer() {}
unsigned long UplinkRANStatusTransfer::getAmfUeNgapId()
{
return amfUeNgapId->getAMF_UE_NGAP_ID();
}
uint32_t UplinkRANStatusTransfer::getRanUeNgapId()
{
return ranUeNgapId->getRanUeNgapId();
}
void UplinkRANStatusTransfer::getRANStatusTransfer_TransparentContainer(RANStatusTransferTransparentContainer *&ranstatustransfer_transparentcontainer)
{
ranstatustransfer_transparentcontainer = ranStatusTransfer_TransparentContainer;
}
bool UplinkRANStatusTransfer::defromPDU(Ngap_NGAP_PDU_t *ngap_msg_pdu)
{
UplinkRANStatusTransferPDU = ngap_msg_pdu;
if (UplinkRANStatusTransferPDU->present == Ngap_NGAP_PDU_PR_initiatingMessage)
{
if (UplinkRANStatusTransferPDU->choice.initiatingMessage && UplinkRANStatusTransferPDU->choice.initiatingMessage->procedureCode == Ngap_ProcedureCode_id_UplinkRANStatusTransfer && UplinkRANStatusTransferPDU->choice.initiatingMessage->criticality == Ngap_Criticality_ignore && UplinkRANStatusTransferPDU->choice.initiatingMessage->value.present == Ngap_InitiatingMessage__value_PR_UplinkRANStatusTransfer)
{
UplinkRANStatusTransferIEs = &UplinkRANStatusTransferPDU->choice.initiatingMessage->value.choice.UplinkRANStatusTransfer;
}
else
{
cout << "Check uplinkranstatustransfer message error!!!" << endl;
return false;
}
}
else
{
cout << "uplinkranstatustransfer message type error" << endl;
return false;
}
for (int i = 0; i < UplinkRANStatusTransferIEs->protocolIEs.list.count; i++)
{
switch (UplinkRANStatusTransferIEs->protocolIEs.list.array[i]->id)
{
case Ngap_ProtocolIE_ID_id_AMF_UE_NGAP_ID:
{
if (UplinkRANStatusTransferIEs->protocolIEs.list.array[i]->criticality == Ngap_Criticality_reject && UplinkRANStatusTransferIEs->protocolIEs.list.array[i]->value.present == Ngap_UplinkRANStatusTransferIEs__value_PR_AMF_UE_NGAP_ID)
{
amfUeNgapId = new AMF_UE_NGAP_ID();
if (!amfUeNgapId->decodefromAMF_UE_NGAP_ID(UplinkRANStatusTransferIEs->protocolIEs.list.array[i]->value.choice.AMF_UE_NGAP_ID))
{
cout << "decoded ngap AMF_UE_NGAP_ID IE error" << endl;
return false;
}
}
else
{
cout << "decoded ngap AMF_UE_NGAP_ID IE error" << endl;
return false;
}
}
break;
case Ngap_ProtocolIE_ID_id_RAN_UE_NGAP_ID:
{
if (UplinkRANStatusTransferIEs->protocolIEs.list.array[i]->criticality == Ngap_Criticality_reject && UplinkRANStatusTransferIEs->protocolIEs.list.array[i]->value.present == Ngap_UplinkRANStatusTransferIEs__value_PR_RAN_UE_NGAP_ID)
{
ranUeNgapId = new RAN_UE_NGAP_ID();
if (!ranUeNgapId->decodefromRAN_UE_NGAP_ID(UplinkRANStatusTransferIEs->protocolIEs.list.array[i]->value.choice.RAN_UE_NGAP_ID))
{
cout << "decoded ngap RAN_UE_NGAP_ID IE error" << endl;
return false;
}
}
else
{
cout << "decoded ngap RAN_UE_NGAP_ID IE error" << endl;
return false;
}
}
break;
case Ngap_ProtocolIE_ID_id_RANStatusTransfer_TransparentContainer:
{
if (UplinkRANStatusTransferIEs->protocolIEs.list.array[i]->criticality == Ngap_Criticality_reject && UplinkRANStatusTransferIEs->protocolIEs.list.array[i]->value.present == Ngap_UplinkRANStatusTransferIEs__value_PR_RANStatusTransfer_TransparentContainer)
{
ranStatusTransfer_TransparentContainer = new RANStatusTransferTransparentContainer();
if (!ranStatusTransfer_TransparentContainer->decoderanstatustransfer_transparentcontainer(&UplinkRANStatusTransferIEs->protocolIEs.list.array[i]->value.choice.RANStatusTransfer_TransparentContainer))
{
cout << "decoded ngap ranStatusTransfer_TransparentContainer error" << endl;
return false;
}
cout << "can get the buffer of RANStatusTransfer_TransparentContainer" << endl;
}
else
{
cout << "cann't get the buffer of RANStatusTransfer_TransparentContainer" << endl;
}
}
break;
default:
{
cout << "decoded ngap message pdu 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 Keliang Du, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _UPLINKRANSTATUSTRANSFER_H_
#define _UPLINKRANSTATUSTRANSFER_H_
#include "AMF-UE-NGAP-ID.hpp"
#include "RAN-UE-NGAP-ID.hpp"
#include "NgapIEsStruct.hpp"
#include "RANStatusTransferTransparentContainer.hpp"
extern "C"
{
#include "Ngap_UplinkRANStatusTransfer.h"
#include "Ngap_RANStatusTransfer-TransparentContainer.h"
#include "Ngap_NGAP-PDU.h"
#include "Ngap_ProtocolIE-Field.h"
#include "Ngap_InitiatingMessage.h"
}
namespace ngap
{
class UplinkRANStatusTransfer
{
public:
UplinkRANStatusTransfer();
virtual ~UplinkRANStatusTransfer();
unsigned long getAmfUeNgapId(); //return -1;(不存在)
uint32_t getRanUeNgapId(); //return -1;(不存在)
void getRANStatusTransfer_TransparentContainer(RANStatusTransferTransparentContainer *&ranstatustransfer_transparentcontainer);
bool defromPDU(Ngap_NGAP_PDU_t *ngap_msg_pdu);
private:
Ngap_NGAP_PDU_t *UplinkRANStatusTransferPDU;
Ngap_UplinkRANStatusTransfer_t *UplinkRANStatusTransferIEs;
AMF_UE_NGAP_ID *amfUeNgapId;
RAN_UE_NGAP_ID *ranUeNgapId;
RANStatusTransferTransparentContainer *ranStatusTransfer_TransparentContainer;
};
} // namespace ngap
#endif
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