2ac825a4c4a0de7e9cd9d3ba6e3882981c2a114e
[ric-plt/resource-status-manager.git] / RSM / asn1codec / e2ap_engine / E2SM-gNB-X2-eventTriggerDefinition.c
1 /*
2  *
3  * Copyright 2019 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 /*
21  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
22  * From ASN.1 module "E2SM-gNB-X2-IEs"
23  *      found in "../../asnFiles/e2sm-gNB-X2-release-1-v041.asn"
24  *      `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
25  */
26
27 #include "E2SM-gNB-X2-eventTriggerDefinition.h"
28
29 #include "InterfaceProtocolIE-Item.h"
30 static int
31 memb_interfaceProtocolIE_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
32                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
33         size_t size;
34         
35         if(!sptr) {
36                 ASN__CTFAIL(app_key, td, sptr,
37                         "%s: value not given (%s:%d)",
38                         td->name, __FILE__, __LINE__);
39                 return -1;
40         }
41         
42         /* Determine the number of elements */
43         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
44         
45         if((size >= 1 && size <= 15)) {
46                 /* Perform validation of the inner elements */
47                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
48         } else {
49                 ASN__CTFAIL(app_key, td, sptr,
50                         "%s: constraint failed (%s:%d)",
51                         td->name, __FILE__, __LINE__);
52                 return -1;
53         }
54 }
55
56 static asn_per_constraints_t asn_PER_type_interfaceProtocolIE_List_constr_5 CC_NOTUSED = {
57         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
58         { APC_CONSTRAINED,       4,  4,  1,  15 }       /* (SIZE(1..15)) */,
59         0, 0    /* No PER value map */
60 };
61 static asn_per_constraints_t asn_PER_memb_interfaceProtocolIE_List_constr_5 CC_NOTUSED = {
62         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
63         { APC_CONSTRAINED,       4,  4,  1,  15 }       /* (SIZE(1..15)) */,
64         0, 0    /* No PER value map */
65 };
66 static asn_TYPE_member_t asn_MBR_interfaceProtocolIE_List_5[] = {
67         { ATF_POINTER, 0, 0,
68                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
69                 0,
70                 &asn_DEF_InterfaceProtocolIE_Item,
71                 0,
72                 { 0, 0, 0 },
73                 0, 0, /* No default value */
74                 ""
75                 },
76 };
77 static const ber_tlv_tag_t asn_DEF_interfaceProtocolIE_List_tags_5[] = {
78         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
79         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
80 };
81 static asn_SET_OF_specifics_t asn_SPC_interfaceProtocolIE_List_specs_5 = {
82         sizeof(struct E2SM_gNB_X2_eventTriggerDefinition__interfaceProtocolIE_List),
83         offsetof(struct E2SM_gNB_X2_eventTriggerDefinition__interfaceProtocolIE_List, _asn_ctx),
84         0,      /* XER encoding is XMLDelimitedItemList */
85 };
86 static /* Use -fall-defs-global to expose */
87 asn_TYPE_descriptor_t asn_DEF_interfaceProtocolIE_List_5 = {
88         "interfaceProtocolIE-List",
89         "interfaceProtocolIE-List",
90         &asn_OP_SEQUENCE_OF,
91         asn_DEF_interfaceProtocolIE_List_tags_5,
92         sizeof(asn_DEF_interfaceProtocolIE_List_tags_5)
93                 /sizeof(asn_DEF_interfaceProtocolIE_List_tags_5[0]) - 1, /* 1 */
94         asn_DEF_interfaceProtocolIE_List_tags_5,        /* Same as above */
95         sizeof(asn_DEF_interfaceProtocolIE_List_tags_5)
96                 /sizeof(asn_DEF_interfaceProtocolIE_List_tags_5[0]), /* 2 */
97         { 0, &asn_PER_type_interfaceProtocolIE_List_constr_5, SEQUENCE_OF_constraint },
98         asn_MBR_interfaceProtocolIE_List_5,
99         1,      /* Single element */
100         &asn_SPC_interfaceProtocolIE_List_specs_5       /* Additional specs */
101 };
102
103 static asn_TYPE_member_t asn_MBR_E2SM_gNB_X2_eventTriggerDefinition_1[] = {
104         { ATF_NOFLAGS, 0, offsetof(struct E2SM_gNB_X2_eventTriggerDefinition, interface_ID),
105                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
106                 +1,     /* EXPLICIT tag at current level */
107                 &asn_DEF_Interface_ID,
108                 0,
109                 { 0, 0, 0 },
110                 0, 0, /* No default value */
111                 "interface-ID"
112                 },
113         { ATF_NOFLAGS, 0, offsetof(struct E2SM_gNB_X2_eventTriggerDefinition, interfaceDirection),
114                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
115                 -1,     /* IMPLICIT tag at current level */
116                 &asn_DEF_InterfaceDirection,
117                 0,
118                 { 0, 0, 0 },
119                 0, 0, /* No default value */
120                 "interfaceDirection"
121                 },
122         { ATF_NOFLAGS, 0, offsetof(struct E2SM_gNB_X2_eventTriggerDefinition, interfaceMessageType),
123                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
124                 -1,     /* IMPLICIT tag at current level */
125                 &asn_DEF_InterfaceMessageType,
126                 0,
127                 { 0, 0, 0 },
128                 0, 0, /* No default value */
129                 "interfaceMessageType"
130                 },
131         { ATF_POINTER, 1, offsetof(struct E2SM_gNB_X2_eventTriggerDefinition, interfaceProtocolIE_List),
132                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
133                 0,
134                 &asn_DEF_interfaceProtocolIE_List_5,
135                 0,
136                 { 0, &asn_PER_memb_interfaceProtocolIE_List_constr_5,  memb_interfaceProtocolIE_List_constraint_1 },
137                 0, 0, /* No default value */
138                 "interfaceProtocolIE-List"
139                 },
140 };
141 static const int asn_MAP_E2SM_gNB_X2_eventTriggerDefinition_oms_1[] = { 3 };
142 static const ber_tlv_tag_t asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1[] = {
143         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
144 };
145 static const asn_TYPE_tag2member_t asn_MAP_E2SM_gNB_X2_eventTriggerDefinition_tag2el_1[] = {
146     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* interface-ID */
147     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* interfaceDirection */
148     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* interfaceMessageType */
149     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* interfaceProtocolIE-List */
150 };
151 static asn_SEQUENCE_specifics_t asn_SPC_E2SM_gNB_X2_eventTriggerDefinition_specs_1 = {
152         sizeof(struct E2SM_gNB_X2_eventTriggerDefinition),
153         offsetof(struct E2SM_gNB_X2_eventTriggerDefinition, _asn_ctx),
154         asn_MAP_E2SM_gNB_X2_eventTriggerDefinition_tag2el_1,
155         4,      /* Count of tags in the map */
156         asn_MAP_E2SM_gNB_X2_eventTriggerDefinition_oms_1,       /* Optional members */
157         1, 0,   /* Root/Additions */
158         4,      /* First extension addition */
159 };
160 asn_TYPE_descriptor_t asn_DEF_E2SM_gNB_X2_eventTriggerDefinition = {
161         "E2SM-gNB-X2-eventTriggerDefinition",
162         "E2SM-gNB-X2-eventTriggerDefinition",
163         &asn_OP_SEQUENCE,
164         asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1,
165         sizeof(asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1)
166                 /sizeof(asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1[0]), /* 1 */
167         asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1,      /* Same as above */
168         sizeof(asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1)
169                 /sizeof(asn_DEF_E2SM_gNB_X2_eventTriggerDefinition_tags_1[0]), /* 1 */
170         { 0, 0, SEQUENCE_constraint },
171         asn_MBR_E2SM_gNB_X2_eventTriggerDefinition_1,
172         4,      /* Elements count */
173         &asn_SPC_E2SM_gNB_X2_eventTriggerDefinition_specs_1     /* Additional specs */
174 };
175