4a4e166b8113eb181358e53b15a890addad13762
[o-du/l2.git] / src / codec_utils / F1AP / UEIdentityIndexValue.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "F1AP-IEs"
4  *      found in "F1.asn1"
5  *      `asn1c -D ./out -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "UEIdentityIndexValue.h"
9
10 #include "ProtocolIE-SingleContainer.h"
11 static int
12 memb_indexLength10_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
13                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
14         const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
15         size_t size;
16         
17         if(!sptr) {
18                 ASN__CTFAIL(app_key, td, sptr,
19                         "%s: value not given (%s:%d)",
20                         td->name, __FILE__, __LINE__);
21                 return -1;
22         }
23         
24         if(st->size > 0) {
25                 /* Size in bits */
26                 size = 8 * st->size - (st->bits_unused & 0x07);
27         } else {
28                 size = 0;
29         }
30         
31         if((size == 10)) {
32                 /* Constraint check succeeded */
33                 return 0;
34         } else {
35                 ASN__CTFAIL(app_key, td, sptr,
36                         "%s: constraint failed (%s:%d)",
37                         td->name, __FILE__, __LINE__);
38                 return -1;
39         }
40 }
41
42 static asn_oer_constraints_t asn_OER_memb_indexLength10_constr_2 CC_NOTUSED = {
43         { 0, 0 },
44         10      /* (SIZE(10..10)) */};
45 static asn_per_constraints_t asn_PER_memb_indexLength10_constr_2 CC_NOTUSED = {
46         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
47         { APC_CONSTRAINED,       0,  0,  10,  10 }      /* (SIZE(10..10)) */,
48         0, 0    /* No PER value map */
49 };
50 static asn_oer_constraints_t asn_OER_type_UEIdentityIndexValue_constr_1 CC_NOTUSED = {
51         { 0, 0 },
52         -1};
53 static asn_per_constraints_t asn_PER_type_UEIdentityIndexValue_constr_1 CC_NOTUSED = {
54         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
55         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
56         0, 0    /* No PER value map */
57 };
58 static asn_TYPE_member_t asn_MBR_UEIdentityIndexValue_1[] = {
59         { ATF_NOFLAGS, 0, offsetof(struct UEIdentityIndexValue, choice.indexLength10),
60                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
61                 -1,     /* IMPLICIT tag at current level */
62                 &asn_DEF_BIT_STRING,
63                 0,
64                 { &asn_OER_memb_indexLength10_constr_2, &asn_PER_memb_indexLength10_constr_2,  memb_indexLength10_constraint_1 },
65                 0, 0, /* No default value */
66                 "indexLength10"
67                 },
68         { ATF_POINTER, 0, offsetof(struct UEIdentityIndexValue, choice.choice_extension),
69                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
70                 -1,     /* IMPLICIT tag at current level */
71                 &asn_DEF_ProtocolIE_SingleContainer_4590P68,
72                 0,
73                 { 0, 0, 0 },
74                 0, 0, /* No default value */
75                 "choice-extension"
76                 },
77 };
78 static const asn_TYPE_tag2member_t asn_MAP_UEIdentityIndexValue_tag2el_1[] = {
79     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* indexLength10 */
80     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* choice-extension */
81 };
82 static asn_CHOICE_specifics_t asn_SPC_UEIdentityIndexValue_specs_1 = {
83         sizeof(struct UEIdentityIndexValue),
84         offsetof(struct UEIdentityIndexValue, _asn_ctx),
85         offsetof(struct UEIdentityIndexValue, present),
86         sizeof(((struct UEIdentityIndexValue *)0)->present),
87         asn_MAP_UEIdentityIndexValue_tag2el_1,
88         2,      /* Count of tags in the map */
89         0, 0,
90         -1      /* Extensions start */
91 };
92 asn_TYPE_descriptor_t asn_DEF_UEIdentityIndexValue = {
93         "UEIdentityIndexValue",
94         "UEIdentityIndexValue",
95         &asn_OP_CHOICE,
96         0,      /* No effective tags (pointer) */
97         0,      /* No effective tags (count) */
98         0,      /* No tags (pointer) */
99         0,      /* No tags (count) */
100         { &asn_OER_type_UEIdentityIndexValue_constr_1, &asn_PER_type_UEIdentityIndexValue_constr_1, CHOICE_constraint },
101         asn_MBR_UEIdentityIndexValue_1,
102         2,      /* Elements count */
103         &asn_SPC_UEIdentityIndexValue_specs_1   /* Additional specs */
104 };
105