2 ==================================================================================
3 Copyright (c) 2018-2019 AT&T Intellectual Property.
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 ==================================================================================
24 #include <mdclog/mdclog.h>
28 #include <asn_application.h>
29 #include <E2N_E2AP-PDU.h>
30 #include <E2N_SuccessfulOutcome.h>
31 #include <E2N_UnsuccessfulOutcome.h>
32 #include <E2N_ProtocolIE-Field.h>
33 #include <E2N_ProtocolIE-Single-Container.h>
34 #include <E2N_ProcedureCode.h>
35 #include "response_helper.hpp"
37 #define NUM_SUBSCRIPTION_RESPONSE_IES 4
38 #define NUM_SUBSCRIPTION_FAILURE_IES 3
39 #define INITIAL_RESPONSE_LIST_SIZE 4
41 class subscription_response{
44 subscription_response(void);
45 ~subscription_response(void);
47 bool encode_e2ap_subscription_response(unsigned char *, size_t *, subscription_response_helper &, bool);
48 void get_fields(E2N_SuccessfulOutcome_t *, subscription_response_helper &);
49 void get_fields(E2N_UnsuccessfulOutcome_t *, subscription_response_helper &);
51 std::string get_error(void) const{
57 void set_fields_success( subscription_response_helper &);
58 void set_fields_unsuccess( subscription_response_helper &);
60 E2N_E2AP_PDU_t * e2ap_pdu_obj;
61 E2N_SuccessfulOutcome_t * successMsg;
62 E2N_UnsuccessfulOutcome_t * unsuccessMsg;
65 E2N_RICsubscriptionResponse_IEs_t *IE_array;
66 E2N_RICsubscriptionFailure_IEs_t *IE_Failure_array;
69 E2N_RICaction_Admitted_ItemIEs_t * ie_admitted_list;
70 E2N_RICaction_NotAdmitted_ItemIEs_t * ie_not_admitted_list;
71 unsigned int ie_admitted_list_size, ie_not_admitted_list_size;
74 size_t errbuf_len = 128;
75 std::string error_string;