Adding new comments for Oran in all files with licenses
[ric-plt/resource-status-manager.git] / RSM / 3rdparty / asn1codec / e2ap_engine / E2SM-gNB-X2-eventTriggerDefinition.c
1 /*
2  * Copyright 2019 AT&T Intellectual Property
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /*
18  * This source code is part of the near-RT RIC (RAN Intelligent Controller)
19  * platform project (RICP).
20  */
21
22
23
24 /*
25  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
26  * From ASN.1 module "E2SM-gNB-X2-IEs"
27  *      found in "../../asnFiles/e2sm-gNB-X2-release-1-v041.asn"
28  *      `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
29  */
30
31 #include "E2SM-gNB-X2-eventTriggerDefinition.h"
32
33 #include "InterfaceProtocolIE-Item.h"
34 static int
35 memb_interfaceProtocolIE_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
36                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
37         size_t size;
38         
39         if(!sptr) {
40                 ASN__CTFAIL(app_key, td, sptr,
41                         "%s: value not given (%s:%d)",
42                         td->name, __FILE__, __LINE__);
43                 return -1;
44         }
45         
46         /* Determine the number of elements */
47         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
48         
49         if((size >= 1 && size <= 15)) {
50                 /* Perform validation of the inner elements */
51                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
52         } else {
53                 ASN__CTFAIL(app_key, td, sptr,
54                         "%s: constraint failed (%s:%d)",
55                         td->name, __FILE__, __LINE__);
56                 return -1;
57         }
58 }
59
60 static asn_per_constraints_t asn_PER_type_interfaceProtocolIE_List_constr_5 CC_NOTUSED = {
61         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
62         { APC_CONSTRAINED,       4,  4,  1,  15 }       /* (SIZE(1..15)) */,
63         0, 0    /* No PER value map */
64 };
65 static asn_per_constraints_t asn_PER_memb_interfaceProtocolIE_List_constr_5 CC_NOTUSED = {
66         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
67         { APC_CONSTRAINED,       4,  4,  1,  15 }       /* (SIZE(1..15)) */,
68         0, 0    /* No PER value map */
69 };
70 static asn_TYPE_member_t asn_MBR_interfaceProtocolIE_List_5[] = {
71         { ATF_POINTER, 0, 0,
72                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
73                 0,
74                 &asn_DEF_InterfaceProtocolIE_Item,
75                 0,
76                 { 0, 0, 0 },
77                 0, 0, /* No default value */
78                 ""
79                 },
80 };
81 static const ber_tlv_tag_t asn_DEF_interfaceProtocolIE_List_tags_5[] = {
82         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
83         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
84 };
85 static asn_SET_OF_specifics_t asn_SPC_interfaceProtocolIE_List_specs_5 = {
86         sizeof(struct E2SM_gNB_X2_eventTriggerDefinition__interfaceProtocolIE_List),
87         offsetof(struct E2SM_gNB_X2_eventTriggerDefinition__interfaceProtocolIE_List, _asn_ctx),
88         0,      /* XER encoding is XMLDelimitedItemList */
89 };
90 static /* Use -fall-defs-global to expose */
91 asn_TYPE_descriptor_t asn_DEF_interfaceProtocolIE_List_5 = {
92         "interfaceProtocolIE-List",
93         "interfaceProtocolIE-List",
94         &asn_OP_SEQUENCE_OF,
95         asn_DEF_interfaceProtocolIE_List_tags_5,
96         sizeof(asn_DEF_interfaceProtocolIE_List_tags_5)
97                 /sizeof(asn_DEF_interfaceProtocolIE_List_tags_5[0]) - 1, /* 1 */
98         asn_DEF_interfaceProtocolIE_List_tags_5,        /* Same as above */
99         sizeof(asn_DEF_interfaceProtocolIE_List_tags_5)
100                 /sizeof(asn_DEF_interfaceProtocolIE_List_tags_5[0]), /* 2 */
101         { 0, &asn_PER_type_interfaceProtocolIE_List_constr_5, SEQUENCE_OF_constraint },
102         asn_MBR_interfaceProtocolIE_List_5,
103         1,      /* Single element */
104         &asn_SPC_interfaceProtocolIE_List_specs_5       /* Additional specs */
105 };
106
107 static asn_TYPE_member_t asn_MBR_E2SM_gNB_X2_eventTriggerDefinition_1[] = {
108         { ATF_NOFLAGS, 0, offsetof(struct E2SM_gNB_X2_eventTriggerDefinition, interface_ID),
109                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
110                 +1,     /* EXPLICIT tag at current level */
111                 &asn_DEF_Interface_ID,
112                 0,
113                 { 0, 0, 0 },
114                 0, 0, /* No default value */
115                 "interface-ID"
116                 },
117         { ATF_NOFLAGS, 0, offsetof(struct E2SM_gNB_X2_eventTriggerDefinition, interfaceDirection),
118                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
119                 -1,     /* IMPLICIT tag at current level */
120                 &asn_DEF_InterfaceDirection,
121                 0,
122                 { 0, 0, 0 },
123                 0, 0, /* No default value */
124                 "interfaceDirection"
125                 },
126         { ATF_NOFLAGS, 0, offsetof(struct E2SM_gNB_X2_eventTriggerDefinition, interfaceMessageType),
127                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
128                 -1,     /* IMPLICIT tag at current level */
129                 &asn_DEF_InterfaceMessageType,
130                 0,
131                 { 0, 0, 0 },
132                 0, 0, /* No default value */
133                 "interfaceMessageType"
134                 },
135         { ATF_POINTER, 1, offsetof(struct E2SM_gNB_X2_eventTriggerDefinition, interfaceProtocolIE_List),
136                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
137                 0,
138                 &asn_DEF_interfaceProtocolIE_List_5,
139                 0,
140                 { 0, &asn_PER_memb_interfaceProtocolIE_List_constr_5,  memb_interfaceProtocolIE_List_constraint_1 },
141                 0, 0, /* No default value */
142                 "interfaceProtocolIE-List"
143                 },
144 };
145 static const int asn_MAP_E2SM_gNB_X2_eventTriggerDefinition_oms_1[] = { 3 };
146 static const ber_tlv_tag_t asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1[] = {
147         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
148 };
149 static const asn_TYPE_tag2member_t asn_MAP_E2SM_gNB_X2_eventTriggerDefinition_tag2el_1[] = {
150     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* interface-ID */
151     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* interfaceDirection */
152     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* interfaceMessageType */
153     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* interfaceProtocolIE-List */
154 };
155 static asn_SEQUENCE_specifics_t asn_SPC_E2SM_gNB_X2_eventTriggerDefinition_specs_1 = {
156         sizeof(struct E2SM_gNB_X2_eventTriggerDefinition),
157         offsetof(struct E2SM_gNB_X2_eventTriggerDefinition, _asn_ctx),
158         asn_MAP_E2SM_gNB_X2_eventTriggerDefinition_tag2el_1,
159         4,      /* Count of tags in the map */
160         asn_MAP_E2SM_gNB_X2_eventTriggerDefinition_oms_1,       /* Optional members */
161         1, 0,   /* Root/Additions */
162         4,      /* First extension addition */
163 };
164 asn_TYPE_descriptor_t asn_DEF_E2SM_gNB_X2_eventTriggerDefinition = {
165         "E2SM-gNB-X2-eventTriggerDefinition",
166         "E2SM-gNB-X2-eventTriggerDefinition",
167         &asn_OP_SEQUENCE,
168         asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1,
169         sizeof(asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1)
170                 /sizeof(asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1[0]), /* 1 */
171         asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1,      /* Same as above */
172         sizeof(asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1)
173                 /sizeof(asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1[0]), /* 1 */
174         { 0, 0, SEQUENCE_constraint },
175         asn_MBR_E2SM_gNB_X2_eventTriggerDefinition_1,
176         4,      /* Elements count */
177         &asn_SPC_E2SM_gNB_X2_eventTriggerDefinition_specs_1     /* Additional specs */
178 };
179