E2AP Wrapper Implementation
[ric-app/hw.git] / src / xapp-asn / e2ap / e2ap_subsdel_response.hpp
1 /*
2 ==================================================================================
3
4         Copyright (c) 2019-2020 AT&T Intellectual Property.
5
6    Licensed under the Apache License, Version 2.0 (the "License");
7    you may not use this file except in compliance with the License.
8    You may obtain a copy of the License at
9
10        http://www.apache.org/licenses/LICENSE-2.0
11
12    Unless required by applicable law or agreed to in writing, software
13    distributed under the License is distributed on an "AS IS" BASIS,
14    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15    See the License for the specific language governing permissions and
16    limitations under the License.
17 ==================================================================================
18 */
19 /*
20  * e2ap_subsdel_response.hpp
21  *
22  *  Created on: Oct 28, 2020
23  *      Author: Shraboni Jana
24  */
25 /*-- **************************************************************
26 --
27 -- RIC SUBSCRIPTION DELETE RESPONSE
28 --
29 -- **************************************************************
30 RICsubscriptionDeleteResponse ::= SEQUENCE {
31         protocolIEs                                     ProtocolIE-Container    {{RICsubscriptionDeleteResponse-IEs}},
32         ...
33 }
34
35 RICsubscriptionDeleteResponse-IEs E2AP-PROTOCOL-IES ::= {
36         { ID id-RICrequestID                            CRITICALITY reject      TYPE RICrequestID                                       PRESENCE mandatory      }|
37         { ID id-RANfunctionID                           CRITICALITY reject      TYPE RANfunctionID                                      PRESENCE mandatory      },
38         ...
39 }
40 */
41 #ifndef SRC_XAPP_ASN_E2AP_E2AP_SUBSDEL_RESPONSE_HPP_
42 #define SRC_XAPP_ASN_E2AP_E2AP_SUBSDEL_RESPONSE_HPP_
43
44 #include <mdclog/mdclog.h>
45 #include <vector>
46 #include <sstream>
47 #include <memory>
48 #include <mdclog/mdclog.h>
49 #include <asn_application.h>
50 #include <E2AP-PDU.h>
51 #include <SuccessfulOutcome.h>
52 #include <RICsubscriptionDeleteResponse.h>
53 #include <ProtocolIE-Field.h>
54 #include "e2ap_consts.hpp"
55 class E2APSubscriptionDeleteResponse {
56 public:
57
58         class SubscriptionDeleteResponseIEs{
59         private:
60                  long int ricRequestorID, ricInstanceID, ranFunctionID;
61
62         public:
63                  SubscriptionDeleteResponseIEs(void):ricRequestorID(0), ricInstanceID(0),ranFunctionID(0){};
64                  SubscriptionDeleteResponseIEs& set_ricRequestorID(long int req_id){ricRequestorID = req_id; return *this;};
65                  SubscriptionDeleteResponseIEs& set_ranFunctionID(long int func_id){ranFunctionID = func_id; return *this;};
66                  SubscriptionDeleteResponseIEs& set_ricInstanceID(long int inst_id){ricInstanceID = inst_id; return *this;};
67
68                  long int get_ricInstanceID(){return this->ricInstanceID;};
69                  long int get_ricRequestorID(){return this->ricRequestorID;};
70                  long int get_ranFunctionID(){return this->ranFunctionID;};
71
72
73         };
74
75         E2APSubscriptionDeleteResponse(SubscriptionDeleteResponseIEs&);
76         E2APSubscriptionDeleteResponse(unsigned char *, size_t *);
77         ~E2APSubscriptionDeleteResponse();
78         bool encode(unsigned char *, size_t * );
79         bool decode(unsigned char*, size_t *);
80         std::string  get_error (void) const {return _error_string ;};
81         SubscriptionDeleteResponseIEs& getIEs(){ return *_responseIEs.get();};
82 private:
83
84         bool setfields(SuccessfulOutcome_t *);
85
86         SuccessfulOutcome_t * _successMsg;
87         E2AP_PDU_t * _e2ap_pdu_obj;
88         RICsubscriptionDeleteResponse_IEs_t * IE_array;
89
90         std::unique_ptr<SubscriptionDeleteResponseIEs> _responseIEs;
91
92         std::string _error_string;
93     char _errbuf[ERR_LEN];
94         size_t _errbuf_len = ERR_LEN;
95
96 };
97
98
99
100
101
102 #endif /* SRC_XAPP_ASN_E2AP_E2AP_SUBSDEL_RESPONSE_HPP_ */