Merge "Cell down alarm notification [Issue-Id: ODUHIGH-430]"
[o-du/l2.git] / src / codec_utils / RRC / ConnEstFailureControl.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-RRC-Definitions"
4  *      found in "./22April22_Paging/rrc_15.3_asn.asn1"
5  *      `asn1c -D ./22April22_Paging -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "ConnEstFailureControl.h"
9
10 /*
11  * This type is implemented using NativeEnumerated,
12  * so here we adjust the DEF accordingly.
13  */
14 /*
15  * This type is implemented using NativeEnumerated,
16  * so here we adjust the DEF accordingly.
17  */
18 static int
19 memb_connEstFailOffset_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
20                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
21         long value;
22         
23         if(!sptr) {
24                 ASN__CTFAIL(app_key, td, sptr,
25                         "%s: value not given (%s:%d)",
26                         td->name, __FILE__, __LINE__);
27                 return -1;
28         }
29         
30         value = *(const long *)sptr;
31         
32         if((value >= 0 && value <= 15)) {
33                 /* Constraint check succeeded */
34                 return 0;
35         } else {
36                 ASN__CTFAIL(app_key, td, sptr,
37                         "%s: constraint failed (%s:%d)",
38                         td->name, __FILE__, __LINE__);
39                 return -1;
40         }
41 }
42
43 static asn_oer_constraints_t asn_OER_type_connEstFailCount_constr_2 CC_NOTUSED = {
44         { 0, 0 },
45         -1};
46 static asn_per_constraints_t asn_PER_type_connEstFailCount_constr_2 CC_NOTUSED = {
47         { APC_CONSTRAINED,       2,  2,  0,  3 }        /* (0..3) */,
48         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
49         0, 0    /* No PER value map */
50 };
51 static asn_oer_constraints_t asn_OER_type_connEstFailOffsetValidity_constr_7 CC_NOTUSED = {
52         { 0, 0 },
53         -1};
54 static asn_per_constraints_t asn_PER_type_connEstFailOffsetValidity_constr_7 CC_NOTUSED = {
55         { APC_CONSTRAINED,       3,  3,  0,  7 }        /* (0..7) */,
56         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
57         0, 0    /* No PER value map */
58 };
59 static asn_oer_constraints_t asn_OER_memb_connEstFailOffset_constr_16 CC_NOTUSED = {
60         { 1, 1 }        /* (0..15) */,
61         -1};
62 static asn_per_constraints_t asn_PER_memb_connEstFailOffset_constr_16 CC_NOTUSED = {
63         { APC_CONSTRAINED,       4,  4,  0,  15 }       /* (0..15) */,
64         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
65         0, 0    /* No PER value map */
66 };
67 static const asn_INTEGER_enum_map_t asn_MAP_connEstFailCount_value2enum_2[] = {
68         { 0,    2,      "n1" },
69         { 1,    2,      "n2" },
70         { 2,    2,      "n3" },
71         { 3,    2,      "n4" }
72 };
73 static const unsigned int asn_MAP_connEstFailCount_enum2value_2[] = {
74         0,      /* n1(0) */
75         1,      /* n2(1) */
76         2,      /* n3(2) */
77         3       /* n4(3) */
78 };
79 static const asn_INTEGER_specifics_t asn_SPC_connEstFailCount_specs_2 = {
80         asn_MAP_connEstFailCount_value2enum_2,  /* "tag" => N; sorted by tag */
81         asn_MAP_connEstFailCount_enum2value_2,  /* N => "tag"; sorted by N */
82         4,      /* Number of elements in the maps */
83         0,      /* Enumeration is not extensible */
84         1,      /* Strict enumeration */
85         0,      /* Native long size */
86         0
87 };
88 static const ber_tlv_tag_t asn_DEF_connEstFailCount_tags_2[] = {
89         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
90         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
91 };
92 static /* Use -fall-defs-global to expose */
93 asn_TYPE_descriptor_t asn_DEF_connEstFailCount_2 = {
94         "connEstFailCount",
95         "connEstFailCount",
96         &asn_OP_NativeEnumerated,
97         asn_DEF_connEstFailCount_tags_2,
98         sizeof(asn_DEF_connEstFailCount_tags_2)
99                 /sizeof(asn_DEF_connEstFailCount_tags_2[0]) - 1, /* 1 */
100         asn_DEF_connEstFailCount_tags_2,        /* Same as above */
101         sizeof(asn_DEF_connEstFailCount_tags_2)
102                 /sizeof(asn_DEF_connEstFailCount_tags_2[0]), /* 2 */
103         { &asn_OER_type_connEstFailCount_constr_2, &asn_PER_type_connEstFailCount_constr_2, NativeEnumerated_constraint },
104         0, 0,   /* Defined elsewhere */
105         &asn_SPC_connEstFailCount_specs_2       /* Additional specs */
106 };
107
108 static const asn_INTEGER_enum_map_t asn_MAP_connEstFailOffsetValidity_value2enum_7[] = {
109         { 0,    3,      "s30" },
110         { 1,    3,      "s60" },
111         { 2,    4,      "s120" },
112         { 3,    4,      "s240" },
113         { 4,    4,      "s300" },
114         { 5,    4,      "s420" },
115         { 6,    4,      "s600" },
116         { 7,    4,      "s900" }
117 };
118 static const unsigned int asn_MAP_connEstFailOffsetValidity_enum2value_7[] = {
119         2,      /* s120(2) */
120         3,      /* s240(3) */
121         0,      /* s30(0) */
122         4,      /* s300(4) */
123         5,      /* s420(5) */
124         1,      /* s60(1) */
125         6,      /* s600(6) */
126         7       /* s900(7) */
127 };
128 static const asn_INTEGER_specifics_t asn_SPC_connEstFailOffsetValidity_specs_7 = {
129         asn_MAP_connEstFailOffsetValidity_value2enum_7, /* "tag" => N; sorted by tag */
130         asn_MAP_connEstFailOffsetValidity_enum2value_7, /* N => "tag"; sorted by N */
131         8,      /* Number of elements in the maps */
132         0,      /* Enumeration is not extensible */
133         1,      /* Strict enumeration */
134         0,      /* Native long size */
135         0
136 };
137 static const ber_tlv_tag_t asn_DEF_connEstFailOffsetValidity_tags_7[] = {
138         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
139         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
140 };
141 static /* Use -fall-defs-global to expose */
142 asn_TYPE_descriptor_t asn_DEF_connEstFailOffsetValidity_7 = {
143         "connEstFailOffsetValidity",
144         "connEstFailOffsetValidity",
145         &asn_OP_NativeEnumerated,
146         asn_DEF_connEstFailOffsetValidity_tags_7,
147         sizeof(asn_DEF_connEstFailOffsetValidity_tags_7)
148                 /sizeof(asn_DEF_connEstFailOffsetValidity_tags_7[0]) - 1, /* 1 */
149         asn_DEF_connEstFailOffsetValidity_tags_7,       /* Same as above */
150         sizeof(asn_DEF_connEstFailOffsetValidity_tags_7)
151                 /sizeof(asn_DEF_connEstFailOffsetValidity_tags_7[0]), /* 2 */
152         { &asn_OER_type_connEstFailOffsetValidity_constr_7, &asn_PER_type_connEstFailOffsetValidity_constr_7, NativeEnumerated_constraint },
153         0, 0,   /* Defined elsewhere */
154         &asn_SPC_connEstFailOffsetValidity_specs_7      /* Additional specs */
155 };
156
157 asn_TYPE_member_t asn_MBR_ConnEstFailureControl_1[] = {
158         { ATF_NOFLAGS, 0, offsetof(struct ConnEstFailureControl, connEstFailCount),
159                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
160                 -1,     /* IMPLICIT tag at current level */
161                 &asn_DEF_connEstFailCount_2,
162                 0,
163                 { 0, 0, 0 },
164                 0, 0, /* No default value */
165                 "connEstFailCount"
166                 },
167         { ATF_NOFLAGS, 0, offsetof(struct ConnEstFailureControl, connEstFailOffsetValidity),
168                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
169                 -1,     /* IMPLICIT tag at current level */
170                 &asn_DEF_connEstFailOffsetValidity_7,
171                 0,
172                 { 0, 0, 0 },
173                 0, 0, /* No default value */
174                 "connEstFailOffsetValidity"
175                 },
176         { ATF_POINTER, 1, offsetof(struct ConnEstFailureControl, connEstFailOffset),
177                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
178                 -1,     /* IMPLICIT tag at current level */
179                 &asn_DEF_NativeInteger,
180                 0,
181                 { &asn_OER_memb_connEstFailOffset_constr_16, &asn_PER_memb_connEstFailOffset_constr_16,  memb_connEstFailOffset_constraint_1 },
182                 0, 0, /* No default value */
183                 "connEstFailOffset"
184                 },
185 };
186 static const int asn_MAP_ConnEstFailureControl_oms_1[] = { 2 };
187 static const ber_tlv_tag_t asn_DEF_ConnEstFailureControl_tags_1[] = {
188         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
189 };
190 static const asn_TYPE_tag2member_t asn_MAP_ConnEstFailureControl_tag2el_1[] = {
191     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* connEstFailCount */
192     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* connEstFailOffsetValidity */
193     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* connEstFailOffset */
194 };
195 asn_SEQUENCE_specifics_t asn_SPC_ConnEstFailureControl_specs_1 = {
196         sizeof(struct ConnEstFailureControl),
197         offsetof(struct ConnEstFailureControl, _asn_ctx),
198         asn_MAP_ConnEstFailureControl_tag2el_1,
199         3,      /* Count of tags in the map */
200         asn_MAP_ConnEstFailureControl_oms_1,    /* Optional members */
201         1, 0,   /* Root/Additions */
202         -1,     /* First extension addition */
203 };
204 asn_TYPE_descriptor_t asn_DEF_ConnEstFailureControl = {
205         "ConnEstFailureControl",
206         "ConnEstFailureControl",
207         &asn_OP_SEQUENCE,
208         asn_DEF_ConnEstFailureControl_tags_1,
209         sizeof(asn_DEF_ConnEstFailureControl_tags_1)
210                 /sizeof(asn_DEF_ConnEstFailureControl_tags_1[0]), /* 1 */
211         asn_DEF_ConnEstFailureControl_tags_1,   /* Same as above */
212         sizeof(asn_DEF_ConnEstFailureControl_tags_1)
213                 /sizeof(asn_DEF_ConnEstFailureControl_tags_1[0]), /* 1 */
214         { 0, 0, SEQUENCE_constraint },
215         asn_MBR_ConnEstFailureControl_1,
216         3,      /* Elements count */
217         &asn_SPC_ConnEstFailureControl_specs_1  /* Additional specs */
218 };
219