9243403781206d71d45aa71ef82fb8c7044d8298
[ric-app/hw.git] / src / xapp-asn / e2ap / e2ap_subsdel_request.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_request.hpp
21  *
22  *  Created on: Oct 23, 2020
23  *      Author: Shraboni Jana
24  */
25
26 /*-- **************************************************************
27 --
28 -- RIC SUBSCRIPTION DELETE REQUEST
29 --
30 -- **************************************************************
31 RICsubscriptionDeleteRequest ::= SEQUENCE {
32         protocolIEs                                     ProtocolIE-Container    {{RICsubscriptionDeleteRequest-IEs}},
33         ...
34 }
35
36 RICsubscriptionDeleteRequest-IEs E2AP-PROTOCOL-IES ::= {
37         { ID id-RICrequestID                            CRITICALITY reject      TYPE RICrequestID                                       PRESENCE mandatory      }|
38         { ID id-RANfunctionID                           CRITICALITY reject      TYPE RANfunctionID                                      PRESENCE mandatory      },
39         ...
40 }*/
41 #ifndef SRC_XAPP_ASN_E2AP_E2AP_SUBSDEL_REQUEST_HPP_
42 #define SRC_XAPP_ASN_E2AP_E2AP_SUBSDEL_REQUEST_HPP_
43
44
45 #include <mdclog/mdclog.h>
46 #include <vector>
47 #include <sstream>
48 #include <memory>
49 #include <mdclog/mdclog.h>
50 #include <asn_application.h>
51 #include <E2AP-PDU.h>
52 #include <InitiatingMessage.h>
53 #include <RICsubscriptionDeleteRequest.h>
54 #include <ProtocolIE-Field.h>
55 #include "e2ap_consts.hpp"
56 class E2APSubscriptionDeleteRequest {
57 public:
58
59         class SubscriptionDeleteRequestIEs{
60         private:
61                  long int ricRequestorID, ricInstanceID, ranFunctionID;
62
63         public:
64                  SubscriptionDeleteRequestIEs(void):ricRequestorID(0), ricInstanceID(0),ranFunctionID(0){};
65                  SubscriptionDeleteRequestIEs& set_ricRequestorID(long int req_id){ricRequestorID = req_id; return *this;};
66                  SubscriptionDeleteRequestIEs& set_ranFunctionID(long int func_id){ranFunctionID = func_id; return *this;};
67                  SubscriptionDeleteRequestIEs& set_ricInstanceID(long int inst_id){ricInstanceID = inst_id; return *this;};
68
69                  long int get_ricInstanceID(){return this->ricInstanceID;};
70                  long int get_ricRequestorID(){return this->ricRequestorID;};
71                  long int get_ranFunctionID(){return this->ranFunctionID;};
72
73
74         };
75
76         E2APSubscriptionDeleteRequest(SubscriptionDeleteRequestIEs&);
77         ~E2APSubscriptionDeleteRequest();
78         bool encode(unsigned char *, size_t * );
79         std::string  get_error (void) const {return _error_string ;};
80         SubscriptionDeleteRequestIEs& getIEs(){ return *_requestIEs.get();};
81 private:
82
83         InitiatingMessage_t *initMsg;
84         E2AP_PDU_t * e2ap_pdu_obj;
85         RICsubscriptionDeleteRequest_IEs_t * IE_array;
86
87         std::unique_ptr<SubscriptionDeleteRequestIEs> _requestIEs;
88         std::string _error_string;
89     char _errbuf[128];
90         size_t _errbuf_len = 128;
91
92         bool setfields(InitiatingMessage_t *);
93
94 };
95
96
97
98
99 #endif /* SRC_XAPP_ASN_E2AP_E2AP_SUBSDEL_REQUEST_HPP_ */