d10cd9b364a3727f4666c22cbf298cf7712eda00
[o-du/l2.git] / src / codec_utils / F1AP / CNUEPagingIdentity.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 "CNUEPagingIdentity.h"
9
10 #include "ProtocolIE-SingleContainer.h"
11 static int
12 memb_fiveG_S_TMSI_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 == 48)) {
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_fiveG_S_TMSI_constr_2 CC_NOTUSED = {
43         { 0, 0 },
44         48      /* (SIZE(48..48)) */};
45 static asn_per_constraints_t asn_PER_memb_fiveG_S_TMSI_constr_2 CC_NOTUSED = {
46         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
47         { APC_CONSTRAINED,       0,  0,  48,  48 }      /* (SIZE(48..48)) */,
48         0, 0    /* No PER value map */
49 };
50 static asn_oer_constraints_t asn_OER_type_CNUEPagingIdentity_constr_1 CC_NOTUSED = {
51         { 0, 0 },
52         -1};
53 asn_per_constraints_t asn_PER_type_CNUEPagingIdentity_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 asn_TYPE_member_t asn_MBR_CNUEPagingIdentity_1[] = {
59         { ATF_NOFLAGS, 0, offsetof(struct CNUEPagingIdentity, choice.fiveG_S_TMSI),
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_fiveG_S_TMSI_constr_2, &asn_PER_memb_fiveG_S_TMSI_constr_2,  memb_fiveG_S_TMSI_constraint_1 },
65                 0, 0, /* No default value */
66                 "fiveG-S-TMSI"
67                 },
68         { ATF_POINTER, 0, offsetof(struct CNUEPagingIdentity, choice.choice_extension),
69                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
70                 -1,     /* IMPLICIT tag at current level */
71                 &asn_DEF_ProtocolIE_SingleContainer_4590P60,
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_CNUEPagingIdentity_tag2el_1[] = {
79     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* fiveG-S-TMSI */
80     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* choice-extension */
81 };
82 asn_CHOICE_specifics_t asn_SPC_CNUEPagingIdentity_specs_1 = {
83         sizeof(struct CNUEPagingIdentity),
84         offsetof(struct CNUEPagingIdentity, _asn_ctx),
85         offsetof(struct CNUEPagingIdentity, present),
86         sizeof(((struct CNUEPagingIdentity *)0)->present),
87         asn_MAP_CNUEPagingIdentity_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_CNUEPagingIdentity = {
93         "CNUEPagingIdentity",
94         "CNUEPagingIdentity",
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_CNUEPagingIdentity_constr_1, &asn_PER_type_CNUEPagingIdentity_constr_1, CHOICE_constraint },
101         asn_MBR_CNUEPagingIdentity_1,
102         2,      /* Elements count */
103         &asn_SPC_CNUEPagingIdentity_specs_1     /* Additional specs */
104 };
105