Commit 19226bab authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

update Server APIs

parent e4745976
......@@ -32,6 +32,8 @@
#include "SmContextUpdateData.h"
#include "SmContextUpdateError.h"
#include "SmContextUpdatedData.h"
#include "SmContextUpdateMessage.h"
#include "SmContextReleaseMessage.h"
#include <string>
namespace oai {
......@@ -66,7 +68,7 @@ private:
/// </remarks>
/// <param name="smContextRef">SM context reference</param>
/// <param name="smContextReleaseData">representation of the data to be sent to the SMF when releasing the SM context (optional)</param>
virtual void release_sm_context(const std::string &smContextRef, const SmContextReleaseData &smContextReleaseData, Pistache::Http::ResponseWriter &response) = 0;
virtual void release_sm_context(const std::string &smContextRef, const SmContextReleaseMessage &smContextReleaseMessage, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Retrieve SM Context
......@@ -86,7 +88,7 @@ private:
/// </remarks>
/// <param name="smContextRef">SM context reference</param>
/// <param name="smContextUpdateData">representation of the updates to apply to the SM context</param>
virtual void update_sm_context(const std::string &smContextRef, const SmContextUpdateData &smContextUpdateData, Pistache::Http::ResponseWriter &response) = 0;
virtual void update_sm_context(const std::string &smContextRef, const SmContextUpdateMessage &smContextUpdateMessage, Pistache::Http::ResponseWriter &response) = 0;
};
......
......@@ -46,88 +46,6 @@ extern "C" {
#include <map>
#include <string>
#define BOUNDARY "----Boundary"
typedef struct part {
std::map<std::string,std::string> headers;
std::string body;
} part;
static multipartparser_callbacks g_callbacks;
static bool g_body_begin_called;
static std::string g_header_name;
static std::string g_header_value;
static std::list<part> g_parts;
static bool g_body_end_called;
static void init_globals()
{
g_body_begin_called = false;
g_header_name.clear();
g_header_value.clear();
g_parts.clear();
g_body_end_called = false;
}
static int on_body_begin(multipartparser* /*parser*/)
{
g_body_begin_called = true;
return 0;
}
static int on_part_begin(multipartparser* /*parser*/)
{
g_parts.push_back(part());
return 0;
}
static void on_header_done()
{
g_parts.back().headers[g_header_name] = g_header_value;
g_header_name.clear();
g_header_value.clear();
}
static int on_header_field(multipartparser* /*parser*/, const char* data, size_t size)
{
if (g_header_value.size() > 0)
on_header_done();
g_header_name.append(data, size);
return 0;
}
static int on_header_value(multipartparser* /*parser*/, const char* data, size_t size)
{
g_header_value.append(data, size);
return 0;
}
static int on_headers_complete(multipartparser* /*parser*/)
{
if (g_header_value.size() > 0)
on_header_done();
return 0;
}
static int on_data(multipartparser* /*parser*/, const char* data, size_t size)
{
g_parts.back().body.append(data, size);
return 0;
}
static int on_part_end(multipartparser* /*parser*/)
{
return 0;
}
static int on_body_end(multipartparser* /*parser*/)
{
g_body_end_called = true;
return 0;
}
namespace oai {
namespace smf_server {
namespace api {
......
/**
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
......@@ -33,6 +33,7 @@
#include "IndividualSMContextApiImpl.h"
namespace oai {
namespace smf_server {
namespace api {
......@@ -40,42 +41,107 @@ namespace api {
using namespace oai::smf_server::model;
IndividualSMContextApiImpl::IndividualSMContextApiImpl(std::shared_ptr<Pistache::Rest::Router> rtr, smf::smf_app *smf_app_inst, std::string address)
: IndividualSMContextApi(rtr), m_smf_app(smf_app_inst), m_address(address)
{ }
: IndividualSMContextApi(rtr), m_smf_app(smf_app_inst), m_address(address)
{ }
void IndividualSMContextApiImpl::release_sm_context(const std::string &smContextRef, const SmContextReleaseMessage &smContextReleaseMessage, Pistache::Http::ResponseWriter &response) {
Logger::smf_api_server().info("release_sm_context...");
//handle Nsmf_PDUSession_UpdateSMContext Request
Logger::smf_api_server().info("Received a PDUSession_UpdateSMContext Request: PDU Session Release request from AMF.");
//Get the SmContextUpdateData from this message and process in smf_app
smf::pdu_session_update_sm_context_request sm_context_req_msg = {};
SmContextReleaseData smContextReleaseData = smContextReleaseMessage.getJsonData();
if (smContextReleaseData.n2SmInfoIsSet()){
//N2 SM (for Session establishment)
std::string n2_sm_information = smContextReleaseMessage.getBinaryDataN2SmInformation();
//std::string n2_sm_information = (smContextUpdateData.getN2SmInfo()).getContentId();
std::string n2_sm_msg_hex;
m_smf_app->convert_string_2_hex(n2_sm_information, n2_sm_msg_hex);
Logger::smf_api_server().debug("smContextMessage, n2 sm information %s", n2_sm_information.c_str());
std::string n2_sm_info_type = smContextReleaseData.getN2SmInfoType();
sm_context_req_msg.set_n2_sm_information(n2_sm_msg_hex);
sm_context_req_msg.set_n2_sm_info_type(n2_sm_info_type);
}
//Step 2. TODO: initialize necessary values for sm context req from smContextReleaseData
//Step 3. Handle the itti_n11_update_sm_context_request message in smf_app
//std::shared_ptr<itti_n11_update_sm_context_request> itti_msg = std::make_shared<itti_n11_update_sm_context_request>(TASK_SMF_N11, TASK_SMF_APP, response, smContextRef);
//itti_msg->req = sm_context_req_msg;
//itti_msg->scid = smContextRef;
//m_smf_app->handle_pdu_session_update_sm_context_request(itti_msg);
void IndividualSMContextApiImpl::release_sm_context(const std::string &smContextRef, const SmContextReleaseData &smContextReleaseData, Pistache::Http::ResponseWriter &response) {
Logger::smf_api_server().info("release_sm_context...");
response.send(Pistache::Http::Code::Ok, "Release_sm_context API has not been implemented yet!\n");
}
void IndividualSMContextApiImpl::retrieve_sm_context(const std::string &smContextRef, const SmContextRetrieveData &smContextRetrieveData, Pistache::Http::ResponseWriter &response) {
Logger::smf_api_server().info("retrieve_sm_context...");
response.send(Pistache::Http::Code::Ok, "Retrieve_sm_context API has not been implemented yet!\n");
Logger::smf_api_server().info("retrieve_sm_context...");
response.send(Pistache::Http::Code::Ok, "Retrieve_sm_context API has not been implemented yet!\n");
}
void IndividualSMContextApiImpl::update_sm_context(const std::string &smContextRef, const SmContextUpdateData &smContextUpdateData, Pistache::Http::ResponseWriter &response) {
//handle Nsmf_PDUSession_UpdateSMContext Request
Logger::smf_api_server().info("Received a PDUSession_UpdateSMContext Request from AMF.");
//Get the SmContextUpdateData from this message and process in smf_app
smf::pdu_session_update_sm_context_request sm_context_req_msg = {};
std::string n2_sm_information = (smContextUpdateData.getN2SmInfo()).getContentId();
std::string n2_sm_msg_hex;
m_smf_app->convert_string_2_hex(n2_sm_information, n2_sm_msg_hex);
Logger::smf_api_server().debug("smContextMessage, n2 sm information %s",n2_sm_information.c_str());
std::string n2_sm_info_type = smContextUpdateData.getN2SmInfoType();
sm_context_req_msg.set_n2_sm_information(n2_sm_msg_hex);
sm_context_req_msg.set_n2_sm_info_type(n2_sm_info_type);
//Step 2. TODO: initialize necessary values for sm context req from smContextUpdateData
//Step 3. Handle the itti_n11_update_sm_context_request message in smf_app
std::shared_ptr<itti_n11_update_sm_context_request> itti_msg = std::make_shared<itti_n11_update_sm_context_request>(TASK_SMF_N11, TASK_SMF_APP, response, smContextRef);
itti_msg->req = sm_context_req_msg;
itti_msg->scid = smContextRef;
m_smf_app->handle_amf_msg(itti_msg);
void IndividualSMContextApiImpl::update_sm_context(const std::string &smContextRef, const SmContextUpdateMessage &smContextUpdateMessage, Pistache::Http::ResponseWriter &response) {
//Get the SmContextUpdateData from this message and process in smf_app
Logger::smf_api_server().info("Received a PDUSession_UpdateSMContext Request from AMF.");
smf::pdu_session_update_sm_context_request sm_context_req_msg = {};
SmContextUpdateData smContextUpdateData = smContextUpdateMessage.getJsonData();
if (smContextUpdateData.n2SmInfoIsSet()){
//N2 SM (for Session establishment)
std::string n2_sm_information = smContextUpdateMessage.getBinaryDataN2SmInformation();
//std::string n2_sm_information = (smContextUpdateData.getN2SmInfo()).getContentId();
std::string n2_sm_msg_hex;
m_smf_app->convert_string_2_hex(n2_sm_information, n2_sm_msg_hex);
Logger::smf_api_server().debug("smContextMessage, n2 sm information %s", n2_sm_information.c_str());
std::string n2_sm_info_type = smContextUpdateData.getN2SmInfoType();
sm_context_req_msg.set_n2_sm_information(n2_sm_msg_hex);
sm_context_req_msg.set_n2_sm_info_type(n2_sm_info_type);
} else if (smContextUpdateData.n1SmMsgIsSet()){
//N1 SM (for session modification)
std::string n1_sm_message = smContextUpdateMessage.getBinaryDataN1SmMessage();
std::string n1_sm_msg_hex;
m_smf_app->convert_string_2_hex(n1_sm_message, n1_sm_msg_hex);
Logger::smf_api_server().debug("smContextMessage, n1 sm message %s", n1_sm_message.c_str());
sm_context_req_msg.set_n1_sm_message(n1_sm_msg_hex);
}
//Step 2. TODO: initialize necessary values for sm context req from smContextUpdateData
/* UE-initiated Service Request Operation, section 4.2.3.2@3GPP TS 23.502 */
//Step 4: PDU Session IDs, Operation Type, UE location Info, Access Type, RAT Type, UE presence in LADN service area, Indication of Access Type can be changed
//PDU Session IDs
//UpCnxState, for activation of user plane (see 5.2.2.3.2.2@3GPP TS 29.502)
if(smContextUpdateData.upCnxStateIsSet()) sm_context_req_msg.set_upCnx_state(smContextUpdateData.getUpCnxState());
//Access Type
if (smContextUpdateData.anTypeIsSet()) sm_context_req_msg.set_an_type(smContextUpdateData.getAnType());
//RAT Type
if (smContextUpdateData.ratTypeIsSet()) sm_context_req_msg.set_rat_type(smContextUpdateData.getRatType());
//TODO:
//UE presence in LADN service area
//UE location information
//Indication of Access Type can be changed
//if (smContextUpdateData.anTypeCanBeChangedIsSet()) sm_context_req_msg.set_access_type_can_be_changed(smContextUpdateData.isAnTypeCanBeChanged());
//Step 15: N2 SM Info (AN Tunnel Info, List of accepted QoS Flow, List of rejected Qos Flows, PDU Session ID), RAT Type, Access Type
/* UE-initiated PDU Session Establishment Operation - section 4.3.2.2.1@3GPP TS 23.502 */
//TODO: Existing PDU session, step 3, SUPI, DNN, S-NSSAIs, SM Context ID, AMF ID, Request Type, N1 SM Container (PDU Session Establishment Request), User location, Access Type, RAT Type, PEI
//step 15. (SM Context ID -> SCID, N2 SM, Request Type)(Initial Request)
//TODO: verify why Request Type is not define in smContextUpdateData
/* PDU Session Modification (SM Context ID -> SCID, N1/N2), section 4.3.3.2@3GPP TS 23.502: */
//step 1.a,UE-initiated: SM Context ID + N1 (PDU Session Modification Request)
//step 1.e (AN initiated modification): SM Context ID, N2 SM information (QFI, User location Information and an indication that the QoS Flow is released)
//step 7a, SM Context ID, N2 SM information, UE location information
//Step 11, SM Context ID, N1 SM (PDU Session Modification Command ACK), User location
//Step 3. Handle the itti_n11_update_sm_context_request message in smf_app
std::shared_ptr<itti_n11_update_sm_context_request> itti_msg = std::make_shared<itti_n11_update_sm_context_request>(TASK_SMF_N11, TASK_SMF_APP, response, smContextRef);
itti_msg->req = sm_context_req_msg;
itti_msg->scid = smContextRef;
m_smf_app->handle_pdu_session_update_sm_context_request(itti_msg);
}
......
......@@ -36,6 +36,8 @@
#include "SmContextUpdateData.h"
#include "SmContextUpdateError.h"
#include "SmContextUpdatedData.h"
#include "SmContextUpdateMessage.h"
#include "SmContextReleaseMessage.h"
#include <string>
#include "smf_app.hpp"
......@@ -50,9 +52,9 @@ public:
IndividualSMContextApiImpl(std::shared_ptr<Pistache::Rest::Router>, smf::smf_app *smf_app_inst, std::string address);
~IndividualSMContextApiImpl() {}
void release_sm_context(const std::string &smContextRef, const SmContextReleaseData &smContextReleaseData, Pistache::Http::ResponseWriter &response);
void release_sm_context(const std::string &smContextRef, const SmContextReleaseMessage &smContextReleaseMessage, Pistache::Http::ResponseWriter &response);
void retrieve_sm_context(const std::string &smContextRef, const SmContextRetrieveData &smContextRetrieveData, Pistache::Http::ResponseWriter &response);
void update_sm_context(const std::string &smContextRef, const SmContextUpdateData &smContextUpdateData, Pistache::Http::ResponseWriter &response);
void update_sm_context(const std::string &smContextRef, const SmContextUpdateMessage &smContextUpdateMessage, Pistache::Http::ResponseWriter &response);
private:
smf::smf_app *m_smf_app;
std::string m_address;
......
......@@ -51,90 +51,90 @@ SMContextsCollectionApiImpl::SMContextsCollectionApiImpl(std::shared_ptr<Pistach
void SMContextsCollectionApiImpl::post_sm_contexts(const SmContextMessage &smContextMessage, Pistache::Http::ResponseWriter &response) {
Logger::smf_api_server().info("Process SmContextMessage ...");
//Assign the necessary informations to smf::pdu_session_create_sm_context_request
//and pass this message to SMF to handle this message
//decode NAS should be done in SMF APP
SmContextCreateData smContextCreateData = smContextMessage.getJsonData();
std::string n1_sm_msg = smContextMessage.getBinaryDataN1SmMessage();
std::string n1_sm_msg_hex;
m_smf_app->convert_string_2_hex(n1_sm_msg, n1_sm_msg_hex);
Logger::smf_api_server().debug("smContextMessage, N1 SM message: %s",n1_sm_msg.c_str());
//Step 2. Create a pdu_session_create_sm_context_request message and store the necessary information
Logger::smf_api_server().debug("Create a pdu_session_create_sm_context_request message and store the necessary information\n");
smf::pdu_session_create_sm_context_request sm_context_req_msg = {};
//set N1 SM Message
sm_context_req_msg.set_n1_sm_message(n1_sm_msg_hex);
//set api root to be used as location header in HTTP response
sm_context_req_msg.set_api_root(m_address + base + "/sm-contexts");
//supi
supi_t supi = {.length = 0};
std::size_t pos = smContextCreateData.getSupi().find("-");
std::string supi_str = smContextCreateData.getSupi().substr(pos +1);
std::string supi_prefix = smContextCreateData.getSupi().substr(0, pos);
smf_string_to_supi(&supi, supi_str.c_str());
sm_context_req_msg.set_supi(supi);
sm_context_req_msg.set_supi_prefix(supi_prefix);
Logger::smf_api_server().debug("SmContextCreateData, supi %s, prefix %s, imsi %s \n", smContextCreateData.getSupi().c_str(), supi_prefix.c_str(), supi_str.c_str());
//dnn
Logger::smf_api_server().debug("SmContextCreateData, dnn %s \n", smContextCreateData.getDnn().c_str());
sm_context_req_msg.set_dnn(smContextCreateData.getDnn().c_str());
//S-Nssai
Logger::smf_api_server().debug("SmContextCreateData, S-NSSAI sst %d, sd %s\n", smContextCreateData.getSNssai().getSst(), smContextCreateData.getSNssai().getSd().c_str());
snssai_t snssai(smContextCreateData.getSNssai().getSst(), smContextCreateData.getSNssai().getSd().c_str());
sm_context_req_msg.set_snssai(snssai);
//PDU session ID
Logger::smf_api_server().debug("SmContextCreateData, PDU SessionID %d \n", smContextCreateData.getPduSessionId());
sm_context_req_msg.set_pdu_session_id(smContextCreateData.getPduSessionId());
//AMF ID (ServingNFId)
Logger::smf_api_server().debug("SmContextCreateDatea, ServingNfId %s\n", smContextCreateData.getServingNfId().c_str());
sm_context_req_msg.set_serving_nf_id(smContextCreateData.getServingNfId().c_str()); //TODO: should be verified that AMF ID is stored in GUAMI or ServingNfId
//Request Type
Logger::smf_api_server().debug("SmContextCreateData, RequestType %s\n", smContextCreateData.getRequestType().c_str());
sm_context_req_msg.set_request_type(smContextCreateData.getRequestType());
//PCF ID
// Priority Access
//User Location Information
//Access Type
// PEI
// GPSI
// UE presence in LADN service area
//Guami
//servingNetwork
//anType
//UETimeZone
//SMContextStatusUri
//PCFId
// DNN Selection Mode
Logger::smf_api_server().debug("SmContextCreateData, SelMode %s\n", smContextCreateData.getSelMode().c_str());
sm_context_req_msg.set_dnn_selection_mode(smContextCreateData.getSelMode().c_str());
//Subscription for PDU Session Status Notification
// Trace requirement
//SSC mode (Optional)
//5GSM capability (Optional)
//Maximum number of supported (Optional)
//Maximum number of supported packet filters (Optional)
//Always-on PDU session requested (Optional)
//SM PDU DN request container (Optional)
//Extended protocol configuration options (Optional) e.g, FOR DHCP
//Step 3. Handle the pdu_session_create_sm_context_request message in smf_app
std::shared_ptr<itti_n11_create_sm_context_request> itti_msg = std::make_shared<itti_n11_create_sm_context_request>(TASK_SMF_N11, TASK_SMF_APP, response);
itti_msg->req = sm_context_req_msg;
m_smf_app->handle_amf_msg(itti_msg);
Logger::smf_api_server().info("PDU Session Create SM Context Request ...");
//Assign the necessary informations to smf::pdu_session_create_sm_context_request
//and pass this message to SMF to handle this message
//decode NAS should be done in SMF APP
SmContextCreateData smContextCreateData = smContextMessage.getJsonData();
std::string n1_sm_msg = smContextMessage.getBinaryDataN1SmMessage();
std::string n1_sm_msg_hex;
m_smf_app->convert_string_2_hex(n1_sm_msg, n1_sm_msg_hex);
Logger::smf_api_server().debug("smContextMessage, N1 SM message: %s",n1_sm_msg.c_str());
//Step 2. Create a pdu_session_create_sm_context_request message and store the necessary information
Logger::smf_api_server().debug("Create a pdu_session_create_sm_context_request message and store the necessary information\n");
smf::pdu_session_create_sm_context_request sm_context_req_msg = {};
//set N1 SM Message
sm_context_req_msg.set_n1_sm_message(n1_sm_msg_hex);
//set api root to be used as location header in HTTP response
sm_context_req_msg.set_api_root(m_address + base + "/sm-contexts");
//supi
supi_t supi = {.length = 0};
std::size_t pos = smContextCreateData.getSupi().find("-");
std::string supi_str = smContextCreateData.getSupi().substr(pos +1);
std::string supi_prefix = smContextCreateData.getSupi().substr(0, pos);
smf_string_to_supi(&supi, supi_str.c_str());
sm_context_req_msg.set_supi(supi);
sm_context_req_msg.set_supi_prefix(supi_prefix);
Logger::smf_api_server().debug("SmContextCreateData, supi %s, prefix %s, imsi %s \n", smContextCreateData.getSupi().c_str(), supi_prefix.c_str(), supi_str.c_str());
//dnn
Logger::smf_api_server().debug("SmContextCreateData, dnn %s \n", smContextCreateData.getDnn().c_str());
sm_context_req_msg.set_dnn(smContextCreateData.getDnn().c_str());
//S-Nssai
Logger::smf_api_server().debug("SmContextCreateData, S-NSSAI sst %d, sd %s\n", smContextCreateData.getSNssai().getSst(), smContextCreateData.getSNssai().getSd().c_str());
snssai_t snssai(smContextCreateData.getSNssai().getSst(), smContextCreateData.getSNssai().getSd().c_str());
sm_context_req_msg.set_snssai(snssai);
//PDU session ID
Logger::smf_api_server().debug("SmContextCreateData, PDU SessionID %d \n", smContextCreateData.getPduSessionId());
sm_context_req_msg.set_pdu_session_id(smContextCreateData.getPduSessionId());
//AMF ID (ServingNFId)
Logger::smf_api_server().debug("SmContextCreateDatea, ServingNfId %s\n", smContextCreateData.getServingNfId().c_str());
sm_context_req_msg.set_serving_nf_id(smContextCreateData.getServingNfId().c_str()); //TODO: should be verified that AMF ID is stored in GUAMI or ServingNfId
//Request Type
Logger::smf_api_server().debug("SmContextCreateData, RequestType %s\n", smContextCreateData.getRequestType().c_str());
sm_context_req_msg.set_request_type(smContextCreateData.getRequestType());
//PCF ID
// Priority Access
//User Location Information
//Access Type
// PEI
// GPSI
// UE presence in LADN service area
//Guami
//servingNetwork
//anType
//UETimeZone
//SMContextStatusUri
//PCFId
// DNN Selection Mode
Logger::smf_api_server().debug("SmContextCreateData, SelMode %s\n", smContextCreateData.getSelMode().c_str());
sm_context_req_msg.set_dnn_selection_mode(smContextCreateData.getSelMode().c_str());
//Subscription for PDU Session Status Notification
// Trace requirement
//SSC mode (Optional)
//5GSM capability (Optional)
//Maximum number of supported (Optional)
//Maximum number of supported packet filters (Optional)
//Always-on PDU session requested (Optional)
//SM PDU DN request container (Optional)
//Extended protocol configuration options (Optional) e.g, FOR DHCP
//Step 3. Handle the pdu_session_create_sm_context_request message in smf_app
std::shared_ptr<itti_n11_create_sm_context_request> itti_msg = std::make_shared<itti_n11_create_sm_context_request>(TASK_SMF_N11, TASK_SMF_APP, response);
itti_msg->req = sm_context_req_msg;
m_smf_app->handle_pdu_session_create_sm_context_request(itti_msg);
}
......
......@@ -260,11 +260,11 @@ void SmContextReleaseData::unsetN2SmInfo()
{
m_N2SmInfoIsSet = false;
}
N2SmInfoType SmContextReleaseData::getN2SmInfoType() const
std::string SmContextReleaseData::getN2SmInfoType() const
{
return m_N2SmInfoType;
}
void SmContextReleaseData::setN2SmInfoType(N2SmInfoType const& value)
void SmContextReleaseData::setN2SmInfoType(std::string const& value)
{
m_N2SmInfoType = value;
m_N2SmInfoTypeIsSet = true;
......
......@@ -104,8 +104,8 @@ public:
/// <summary>
///
/// </summary>
N2SmInfoType getN2SmInfoType() const;
void setN2SmInfoType(N2SmInfoType const& value);
std::string getN2SmInfoType() const;
void setN2SmInfoType(std::string const& value);
bool n2SmInfoTypeIsSet() const;
void unsetN2SmInfoType();
/// <summary>
......@@ -135,7 +135,7 @@ protected:
bool m_VsmfReleaseOnlyIsSet;
RefToBinaryData m_N2SmInfo;
bool m_N2SmInfoIsSet;
N2SmInfoType m_N2SmInfoType;
std::string m_N2SmInfoType;
bool m_N2SmInfoTypeIsSet;
bool m_IsmfReleaseOnly;
bool m_IsmfReleaseOnlyIsSet;
......
/**
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include <iostream>
#include "SmContextReleaseMessage.h"
namespace oai {
namespace smf_server {
namespace model {
SmContextReleaseMessage::SmContextReleaseMessage()
{
m_JsonDataIsSet = false;
m_BinaryDataN2SmInformationIsSet = false;
}
SmContextReleaseMessage::~SmContextReleaseMessage()
{
}
void SmContextReleaseMessage::validate()
{
// TODO: implement validation
}
void to_json(nlohmann::json& j, const SmContextReleaseMessage& o)
{
j = nlohmann::json();
if(o.jsonDataIsSet())
j["jsonData"] = o.m_JsonData;
if(o.binaryDataN2SmInformationIsSet())
j["binaryDataN2SmInformation"] = o.m_BinaryDataN2SmInformation;
}
void from_json(const nlohmann::json& j, SmContextReleaseMessage& o)
{
if(j.find("jsonData") != j.end())
{
j.at("jsonData").get_to(o.m_JsonData);
o.m_JsonDataIsSet = true;
}
if(j.find("binaryDataN2SmInformation") != j.end())
{
j.at("binaryDataN2SmInformation").get_to(o.m_BinaryDataN2SmInformation);
o.m_BinaryDataN2SmInformationIsSet = true;
}
}
SmContextReleaseData SmContextReleaseMessage::getJsonData() const
{
return m_JsonData;
}
void SmContextReleaseMessage::setJsonData(SmContextReleaseData const& value)
{
m_JsonData = value;
m_JsonDataIsSet = true;
}
bool SmContextReleaseMessage::jsonDataIsSet() const
{
return m_JsonDataIsSet;
}
void SmContextReleaseMessage::unsetJsonData()
{
m_JsonDataIsSet = false;
}
std::string SmContextReleaseMessage::getBinaryDataN2SmInformation() const
{
return m_BinaryDataN2SmInformation;
}
void SmContextReleaseMessage::setBinaryDataN2SmInformation(std::string const& value)
{
m_BinaryDataN2SmInformation = value;
m_BinaryDataN2SmInformationIsSet = true;
}
bool SmContextReleaseMessage::binaryDataN2SmInformationIsSet() const
{
return m_BinaryDataN2SmInformationIsSet;
}
void SmContextReleaseMessage::unsetBinaryDataN2SmInformation()
{
m_BinaryDataN2SmInformationIsSet = false;
}
}
}
}
/**
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Inline_object.h
*
*
*/
#ifndef Sm_Context_Release_Message_H_
#define Sm_Context_Release_Message_H_
#include "SmContextReleaseData.h"
#include <string>
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class SmContextReleaseMessage
{
public:
SmContextReleaseMessage();
virtual ~SmContextReleaseMessage();
void validate();
/////////////////////////////////////////////
/// Inline_object members
/// <summary>
///
/// </summary>
SmContextReleaseData getJsonData() const;
void setJsonData(SmContextReleaseData const& value);
bool jsonDataIsSet() const;
void unsetJsonData();
/// </summary>
std::string getBinaryDataN2SmInformation() const;
void setBinaryDataN2SmInformation(std::string const& value);
bool binaryDataN2SmInformationIsSet() const;
void unsetBinaryDataN2SmInformation();
friend void to_json(nlohmann::json& j, const SmContextReleaseMessage& o);
friend void from_json(const nlohmann::json& j, SmContextReleaseMessage& o);
protected:
SmContextReleaseData m_JsonData;
bool m_JsonDataIsSet;
std::string m_BinaryDataN2SmInformation;
bool m_BinaryDataN2SmInformationIsSet;
};
}
}
}
#endif /* Sm_Context_Release_Message_H_ */
......@@ -427,11 +427,11 @@ void SmContextUpdateData::unsetBackupAmfInfo()
{
m_BackupAmfInfoIsSet = false;
}
AccessType SmContextUpdateData::getAnType() const
std::string SmContextUpdateData::getAnType() const
{
return m_AnType;
}
void SmContextUpdateData::setAnType(AccessType const& value)
void SmContextUpdateData::setAnType(std::string const& value)
{
m_AnType = value;
m_AnTypeIsSet = true;
......@@ -461,11 +461,11 @@ void SmContextUpdateData::unsetSecondAnType()
{
m_SecondAnTypeIsSet = false;
}
RatType SmContextUpdateData::getRatType() const
std::string SmContextUpdateData::getRatType() const
{
return m_RatType;
}
void SmContextUpdateData::setRatType(RatType const& value)
void SmContextUpdateData::setRatType(std::string const& value)
{
m_RatType = value;
m_RatTypeIsSet = true;
......@@ -546,11 +546,11 @@ void SmContextUpdateData::unsetAddUeLocation()
{
m_AddUeLocationIsSet = false;
}
UpCnxState SmContextUpdateData::getUpCnxState() const
std::string SmContextUpdateData::getUpCnxState() const
{
return m_UpCnxState;
}
void SmContextUpdateData::setUpCnxState(UpCnxState const& value)
void SmContextUpdateData::setUpCnxState(std::string const& value)
{
m_UpCnxState = value;
m_UpCnxStateIsSet = true;
......
......@@ -97,8 +97,9 @@ public:
/// <summary>
///
/// </summary>
AccessType getAnType() const;
void setAnType(AccessType const& value);
//AccessType getAnType() const;
std::string getAnType() const;
void setAnType(std::string const& value);
bool anTypeIsSet() const;
void unsetAnType();
/// <summary>
......@@ -111,8 +112,9 @@ public:
/// <summary>
///
/// </summary>
RatType getRatType() const;
void setRatType(RatType const& value);
//RatType getRatType() const;
std::string getRatType() const;
void setRatType(std::string const& value);
bool ratTypeIsSet() const;
void unsetRatType();
/// <summary>
......@@ -146,8 +148,9 @@ public:
/// <summary>
///
/// </summary>
UpCnxState getUpCnxState() const;
void setUpCnxState(UpCnxState const& value);
//UpCnxState getUpCnxState() const;
std::string getUpCnxState() const;
void setUpCnxState(std::string const& value);
bool upCnxStateIsSet() const;
void unsetUpCnxState();
/// <summary>
......@@ -333,11 +336,11 @@ protected:
bool m_ServingNetworkIsSet;
std::vector<BackupAmfInfo> m_BackupAmfInfo;
bool m_BackupAmfInfoIsSet;
AccessType m_AnType;
std::string m_AnType;
bool m_AnTypeIsSet;
AccessType m_SecondAnType;
bool m_SecondAnTypeIsSet;
RatType m_RatType;
std::string m_RatType;
bool m_RatTypeIsSet;
PresenceState m_PresenceInLadn;
bool m_PresenceInLadnIsSet;
......@@ -347,7 +350,8 @@ protected:
bool m_UeTimeZoneIsSet;
UserLocation m_AddUeLocation;
bool m_AddUeLocationIsSet;
UpCnxState m_UpCnxState;
//UpCnxState m_UpCnxState;
std::string m_UpCnxState;
bool m_UpCnxStateIsSet;
HoState m_HoState;
bool m_HoStateIsSet;
......
/**
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include <iostream>
#include "SmContextUpdateMessage.h"
namespace oai {
namespace smf_server {
namespace model {
SmContextUpdateMessage::SmContextUpdateMessage()
{
m_JsonDataIsSet = false;
m_BinaryDataN1SmMessageIsSet = false;
m_BinaryDataN2SmInformationIsSet = false;
}
SmContextUpdateMessage::~SmContextUpdateMessage()
{
}
void SmContextUpdateMessage::validate()
{
// TODO: implement validation
}
void to_json(nlohmann::json& j, const SmContextUpdateMessage& o)
{
j = nlohmann::json();
if(o.jsonDataIsSet())
j["jsonData"] = o.m_JsonData;
if(o.binaryDataN1SmMessageIsSet())
j["binaryDataN1SmMessage"] = o.m_BinaryDataN1SmMessage;
if(o.binaryDataN2SmInformationIsSet())
j["binaryDataN2SmInformation"] = o.m_BinaryDataN2SmInformation;
}
void from_json(const nlohmann::json& j, SmContextUpdateMessage& o)
{
if(j.find("jsonData") != j.end())
{
j.at("jsonData").get_to(o.m_JsonData);
o.m_JsonDataIsSet = true;
}
if(j.find("binaryDataN1SmMessage") != j.end())
{
j.at("binaryDataN1SmMessage").get_to(o.m_BinaryDataN1SmMessage);
o.m_BinaryDataN1SmMessageIsSet = true;
}
if(j.find("binaryDataN2SmInformation") != j.end())
{
j.at("binaryDataN2SmInformation").get_to(o.m_BinaryDataN2SmInformation);
o.m_BinaryDataN2SmInformationIsSet = true;
}
}
SmContextUpdateData SmContextUpdateMessage::getJsonData() const
{
return m_JsonData;
}
void SmContextUpdateMessage::setJsonData(SmContextUpdateData const& value)
{
m_JsonData = value;
m_JsonDataIsSet = true;
}
bool SmContextUpdateMessage::jsonDataIsSet() const
{
return m_JsonDataIsSet;
}
void SmContextUpdateMessage::unsetJsonData()
{
m_JsonDataIsSet = false;
}
std::string SmContextUpdateMessage::getBinaryDataN1SmMessage() const
{
return m_BinaryDataN1SmMessage;
}
void SmContextUpdateMessage::setBinaryDataN1SmMessage(std::string const& value)
{
m_BinaryDataN1SmMessage = value;
m_BinaryDataN1SmMessageIsSet = true;
}
bool SmContextUpdateMessage::binaryDataN1SmMessageIsSet() const
{
return m_BinaryDataN1SmMessageIsSet;
}
void SmContextUpdateMessage::unsetBinaryDataN1SmMessage()
{
m_BinaryDataN1SmMessageIsSet = false;
}
std::string SmContextUpdateMessage::getBinaryDataN2SmInformation() const
{
return m_BinaryDataN2SmInformation;
}
void SmContextUpdateMessage::setBinaryDataN2SmInformation(std::string const& value)
{
m_BinaryDataN2SmInformation = value;
m_BinaryDataN2SmInformationIsSet = true;
}
bool SmContextUpdateMessage::binaryDataN2SmInformationIsSet() const
{
return m_BinaryDataN2SmInformationIsSet;
}
void SmContextUpdateMessage::unsetBinaryDataN2SmInformation()
{
m_BinaryDataN2SmInformationIsSet = false;
}
}
}
}
/**
* Nsmf_PDUSession
* SMF PDU Session Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Inline_object.h
*
*
*/
#ifndef Sm_Context_Update_Message_H_
#define Sm_Context_Update_Message_H_
#include "SmContextUpdateData.h"
#include <string>
#include <nlohmann/json.hpp>
namespace oai {
namespace smf_server {
namespace model {
/// <summary>
///
/// </summary>
class SmContextUpdateMessage
{
public:
SmContextUpdateMessage();
virtual ~SmContextUpdateMessage();
void validate();
/////////////////////////////////////////////
/// Inline_object members
/// <summary>
///
/// </summary>
SmContextUpdateData getJsonData() const;
void setJsonData(SmContextUpdateData const& value);
bool jsonDataIsSet() const;
void unsetJsonData();
/// <summary>
///
/// </summary>
std::string getBinaryDataN1SmMessage() const;
void setBinaryDataN1SmMessage(std::string const& value);
bool binaryDataN1SmMessageIsSet() const;
void unsetBinaryDataN1SmMessage();
/// <summary>
///
/// </summary>
std::string getBinaryDataN2SmInformation() const;
void setBinaryDataN2SmInformation(std::string const& value);
bool binaryDataN2SmInformationIsSet() const;
void unsetBinaryDataN2SmInformation();
friend void to_json(nlohmann::json& j, const SmContextUpdateMessage& o);
friend void from_json(const nlohmann::json& j, SmContextUpdateMessage& o);
protected:
SmContextUpdateData m_JsonData;
bool m_JsonDataIsSet;
std::string m_BinaryDataN1SmMessage;
bool m_BinaryDataN1SmMessageIsSet;
std::string m_BinaryDataN2SmInformation;
bool m_BinaryDataN2SmInformationIsSet;
};
}
}
}
#endif /* Sm_Context_Update_Message_H_ */
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