X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2FE2AP-c%2Fsubscription%2Fsubscription_response.hpp;fp=src%2FE2AP-c%2Fsubscription%2Fsubscription_response.hpp;h=6af149c7bbf66f682c98ffafa3601f0ea151d184;hb=36b57d809f3012375509c603c407b2cf36580af1;hp=0000000000000000000000000000000000000000;hpb=9a1a0c924b38863ca4ebe2465af975f39dd383d5;p=ric-app%2Fkpimon.git diff --git a/src/E2AP-c/subscription/subscription_response.hpp b/src/E2AP-c/subscription/subscription_response.hpp new file mode 100755 index 0000000..6af149c --- /dev/null +++ b/src/E2AP-c/subscription/subscription_response.hpp @@ -0,0 +1,82 @@ +/* +================================================================================== + Copyright (c) 2018-2019 AT&T Intellectual Property. + + Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 + + 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. +================================================================================== +*/ + +#pragma once + +#ifndef S_RESPONSE_ +#define S_RESPONSE_ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#define NUM_SUBSCRIPTION_RESPONSE_IES 4 +#define NUM_SUBSCRIPTION_FAILURE_IES 3 +#define INITIAL_LIST_SIZE 4 + +class subscription_response{ +public: + + subscription_response(void); + ~subscription_response(void); + + bool encode_e2ap_subscription_response(unsigned char *, size_t *, E2AP_PDU_t *, subscription_response_helper &, bool); + void set_fields(SuccessfulOutcome_t *, subscription_response_helper &); + void get_fields(SuccessfulOutcome_t *, subscription_response_helper &); + + void set_fields(UnsuccessfulOutcome_t *, subscription_response_helper &); + void get_fields(UnsuccessfulOutcome_t *, subscription_response_helper &); + + std::string get_error_string(void) const{ + return error_string; + } + +private: + + E2AP_PDU_t * e2ap_pdu_obj; + SuccessfulOutcome_t * successMsg; + UnsuccessfulOutcome_t * unsuccessMsg; + + + RICsubscriptionResponse_IEs_t *IE_array; + RICsubscriptionFailure_IEs_t *IE_Failure_array; + + + RICaction_Admitted_ItemIEs_t * ie_admitted_list; + RICaction_NotAdmitted_ItemIEs_t * ie_not_admitted_list; + unsigned int ie_admitted_list_size, ie_not_admitted_list_size; + + char errbuf[128]; + size_t errbuf_len = 128; + std::string error_string; +}; + + + + +#endif