Fixing Memory leak in E2
[ric-plt/e2.git] / RIC-E2-TERMINATION / 3rdparty / oranE2SM / E2SM-gNB-NRT-IndicationMessage-Format1.c
1 /*
2  *
3  * Copyright 2020 AT&T Intellectual Property
4  *
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
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
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  *
17  */
18
19 /*
20  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
21  * From ASN.1 module "E2SM-gNB-NRT-IEs"
22  *      found in "../asnTextFiles/e2sm-gNB-NRT-v401.asn"
23  *      `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
24  */
25
26 #include "E2SM-gNB-NRT-IndicationMessage-Format1.h"
27
28 #include "NRT-Record-List-item.h"
29 static int
30 memb_nrt_Record_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
31                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
32         size_t size;
33         
34         if(!sptr) {
35                 ASN__CTFAIL(app_key, td, sptr,
36                         "%s: value not given (%s:%d)",
37                         td->name, __FILE__, __LINE__);
38                 return -1;
39         }
40         
41         /* Determine the number of elements */
42         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
43         
44         if((size >= 1 && size <= 16384)) {
45                 /* Perform validation of the inner elements */
46                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
47         } else {
48                 ASN__CTFAIL(app_key, td, sptr,
49                         "%s: constraint failed (%s:%d)",
50                         td->name, __FILE__, __LINE__);
51                 return -1;
52         }
53 }
54
55 static asn_per_constraints_t asn_PER_type_nrt_Record_List_constr_2 CC_NOTUSED = {
56         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
57         { APC_CONSTRAINED,       14,  14,  1,  16384 }  /* (SIZE(1..16384)) */,
58         0, 0    /* No PER value map */
59 };
60 static asn_per_constraints_t asn_PER_memb_nrt_Record_List_constr_2 CC_NOTUSED = {
61         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
62         { APC_CONSTRAINED,       14,  14,  1,  16384 }  /* (SIZE(1..16384)) */,
63         0, 0    /* No PER value map */
64 };
65 static asn_TYPE_member_t asn_MBR_nrt_Record_List_2[] = {
66         { ATF_POINTER, 0, 0,
67                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
68                 0,
69                 &asn_DEF_NRT_Record_List_item,
70                 0,
71                 { 0, 0, 0 },
72                 0, 0, /* No default value */
73                 ""
74                 },
75 };
76 static const ber_tlv_tag_t asn_DEF_nrt_Record_List_tags_2[] = {
77         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
78         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
79 };
80 static asn_SET_OF_specifics_t asn_SPC_nrt_Record_List_specs_2 = {
81         sizeof(struct E2SM_gNB_NRT_IndicationMessage_Format1__nrt_Record_List),
82         offsetof(struct E2SM_gNB_NRT_IndicationMessage_Format1__nrt_Record_List, _asn_ctx),
83         0,      /* XER encoding is XMLDelimitedItemList */
84 };
85 static /* Use -fall-defs-global to expose */
86 asn_TYPE_descriptor_t asn_DEF_nrt_Record_List_2 = {
87         "nrt-Record-List",
88         "nrt-Record-List",
89         &asn_OP_SEQUENCE_OF,
90         asn_DEF_nrt_Record_List_tags_2,
91         sizeof(asn_DEF_nrt_Record_List_tags_2)
92                 /sizeof(asn_DEF_nrt_Record_List_tags_2[0]) - 1, /* 1 */
93         asn_DEF_nrt_Record_List_tags_2, /* Same as above */
94         sizeof(asn_DEF_nrt_Record_List_tags_2)
95                 /sizeof(asn_DEF_nrt_Record_List_tags_2[0]), /* 2 */
96         { 0, &asn_PER_type_nrt_Record_List_constr_2, SEQUENCE_OF_constraint },
97         asn_MBR_nrt_Record_List_2,
98         1,      /* Single element */
99         &asn_SPC_nrt_Record_List_specs_2        /* Additional specs */
100 };
101
102 asn_TYPE_member_t asn_MBR_E2SM_gNB_NRT_IndicationMessage_Format1_1[] = {
103         { ATF_NOFLAGS, 0, offsetof(struct E2SM_gNB_NRT_IndicationMessage_Format1, nrt_Record_List),
104                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
105                 0,
106                 &asn_DEF_nrt_Record_List_2,
107                 0,
108                 { 0, &asn_PER_memb_nrt_Record_List_constr_2,  memb_nrt_Record_List_constraint_1 },
109                 0, 0, /* No default value */
110                 "nrt-Record-List"
111                 },
112 };
113 static const ber_tlv_tag_t asn_DEF_E2SM_gNB_NRT_IndicationMessage_Format1_tags_1[] = {
114         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
115 };
116 static const asn_TYPE_tag2member_t asn_MAP_E2SM_gNB_NRT_IndicationMessage_Format1_tag2el_1[] = {
117     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* nrt-Record-List */
118 };
119 asn_SEQUENCE_specifics_t asn_SPC_E2SM_gNB_NRT_IndicationMessage_Format1_specs_1 = {
120         sizeof(struct E2SM_gNB_NRT_IndicationMessage_Format1),
121         offsetof(struct E2SM_gNB_NRT_IndicationMessage_Format1, _asn_ctx),
122         asn_MAP_E2SM_gNB_NRT_IndicationMessage_Format1_tag2el_1,
123         1,      /* Count of tags in the map */
124         0, 0, 0,        /* Optional elements (not needed) */
125         1,      /* First extension addition */
126 };
127 asn_TYPE_descriptor_t asn_DEF_E2SM_gNB_NRT_IndicationMessage_Format1 = {
128         "E2SM-gNB-NRT-IndicationMessage-Format1",
129         "E2SM-gNB-NRT-IndicationMessage-Format1",
130         &asn_OP_SEQUENCE,
131         asn_DEF_E2SM_gNB_NRT_IndicationMessage_Format1_tags_1,
132         sizeof(asn_DEF_E2SM_gNB_NRT_IndicationMessage_Format1_tags_1)
133                 /sizeof(asn_DEF_E2SM_gNB_NRT_IndicationMessage_Format1_tags_1[0]), /* 1 */
134         asn_DEF_E2SM_gNB_NRT_IndicationMessage_Format1_tags_1,  /* Same as above */
135         sizeof(asn_DEF_E2SM_gNB_NRT_IndicationMessage_Format1_tags_1)
136                 /sizeof(asn_DEF_E2SM_gNB_NRT_IndicationMessage_Format1_tags_1[0]), /* 1 */
137         { 0, 0, SEQUENCE_constraint },
138         asn_MBR_E2SM_gNB_NRT_IndicationMessage_Format1_1,
139         1,      /* Elements count */
140         &asn_SPC_E2SM_gNB_NRT_IndicationMessage_Format1_specs_1 /* Additional specs */
141 };
142