[Epic-ID: ODUHIGH-475][Task-ID: ODUHIGH-476]F1AP codec update
[o-du/l2.git] / src / codec_utils / F1AP / SibtypetobeupdatedListItem.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 ../F1_output/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER`
6  */
7
8 #include "SibtypetobeupdatedListItem.h"
9
10 #include "ProtocolExtensionContainer.h"
11 static int
12 memb_sIBtype_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
13                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
14         long value;
15         
16         if(!sptr) {
17                 ASN__CTFAIL(app_key, td, sptr,
18                         "%s: value not given (%s:%d)",
19                         td->name, __FILE__, __LINE__);
20                 return -1;
21         }
22         
23         value = *(const long *)sptr;
24         
25         if((value >= 2 && value <= 32)) {
26                 /* Constraint check succeeded */
27                 return 0;
28         } else {
29                 ASN__CTFAIL(app_key, td, sptr,
30                         "%s: constraint failed (%s:%d)",
31                         td->name, __FILE__, __LINE__);
32                 return -1;
33         }
34 }
35
36 static int
37 memb_valueTag_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
38                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
39         long value;
40         
41         if(!sptr) {
42                 ASN__CTFAIL(app_key, td, sptr,
43                         "%s: value not given (%s:%d)",
44                         td->name, __FILE__, __LINE__);
45                 return -1;
46         }
47         
48         value = *(const long *)sptr;
49         
50         if((value >= 0 && value <= 31)) {
51                 /* Constraint check succeeded */
52                 return 0;
53         } else {
54                 ASN__CTFAIL(app_key, td, sptr,
55                         "%s: constraint failed (%s:%d)",
56                         td->name, __FILE__, __LINE__);
57                 return -1;
58         }
59 }
60
61 static asn_oer_constraints_t asn_OER_memb_sIBtype_constr_2 CC_NOTUSED = {
62         { 0, 0 },
63         -1};
64 static asn_per_constraints_t asn_PER_memb_sIBtype_constr_2 CC_NOTUSED = {
65         { APC_CONSTRAINED | APC_EXTENSIBLE,  5,  5,  2,  32 }   /* (2..32,...) */,
66         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
67         0, 0    /* No PER value map */
68 };
69 static asn_oer_constraints_t asn_OER_memb_valueTag_constr_4 CC_NOTUSED = {
70         { 0, 0 },
71         -1};
72 static asn_per_constraints_t asn_PER_memb_valueTag_constr_4 CC_NOTUSED = {
73         { APC_CONSTRAINED | APC_EXTENSIBLE,  5,  5,  0,  31 }   /* (0..31,...) */,
74         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
75         0, 0    /* No PER value map */
76 };
77 asn_TYPE_member_t asn_MBR_SibtypetobeupdatedListItem_1[] = {
78         { ATF_NOFLAGS, 0, offsetof(struct SibtypetobeupdatedListItem, sIBtype),
79                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
80                 -1,     /* IMPLICIT tag at current level */
81                 &asn_DEF_NativeInteger,
82                 0,
83                 { &asn_OER_memb_sIBtype_constr_2, &asn_PER_memb_sIBtype_constr_2,  memb_sIBtype_constraint_1 },
84                 0, 0, /* No default value */
85                 "sIBtype"
86                 },
87         { ATF_NOFLAGS, 0, offsetof(struct SibtypetobeupdatedListItem, sIBmessage),
88                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
89                 -1,     /* IMPLICIT tag at current level */
90                 &asn_DEF_OCTET_STRING,
91                 0,
92                 { 0, 0, 0 },
93                 0, 0, /* No default value */
94                 "sIBmessage"
95                 },
96         { ATF_NOFLAGS, 0, offsetof(struct SibtypetobeupdatedListItem, valueTag),
97                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
98                 -1,     /* IMPLICIT tag at current level */
99                 &asn_DEF_NativeInteger,
100                 0,
101                 { &asn_OER_memb_valueTag_constr_4, &asn_PER_memb_valueTag_constr_4,  memb_valueTag_constraint_1 },
102                 0, 0, /* No default value */
103                 "valueTag"
104                 },
105         { ATF_POINTER, 1, offsetof(struct SibtypetobeupdatedListItem, iE_Extensions),
106                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
107                 -1,     /* IMPLICIT tag at current level */
108                 &asn_DEF_ProtocolExtensionContainer_4624P94,
109                 0,
110                 { 0, 0, 0 },
111                 0, 0, /* No default value */
112                 "iE-Extensions"
113                 },
114 };
115 static const int asn_MAP_SibtypetobeupdatedListItem_oms_1[] = { 3 };
116 static const ber_tlv_tag_t asn_DEF_SibtypetobeupdatedListItem_tags_1[] = {
117         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
118 };
119 static const asn_TYPE_tag2member_t asn_MAP_SibtypetobeupdatedListItem_tag2el_1[] = {
120     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sIBtype */
121     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sIBmessage */
122     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* valueTag */
123     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
124 };
125 asn_SEQUENCE_specifics_t asn_SPC_SibtypetobeupdatedListItem_specs_1 = {
126         sizeof(struct SibtypetobeupdatedListItem),
127         offsetof(struct SibtypetobeupdatedListItem, _asn_ctx),
128         asn_MAP_SibtypetobeupdatedListItem_tag2el_1,
129         4,      /* Count of tags in the map */
130         asn_MAP_SibtypetobeupdatedListItem_oms_1,       /* Optional members */
131         1, 0,   /* Root/Additions */
132         4,      /* First extension addition */
133 };
134 asn_TYPE_descriptor_t asn_DEF_SibtypetobeupdatedListItem = {
135         "SibtypetobeupdatedListItem",
136         "SibtypetobeupdatedListItem",
137         &asn_OP_SEQUENCE,
138         asn_DEF_SibtypetobeupdatedListItem_tags_1,
139         sizeof(asn_DEF_SibtypetobeupdatedListItem_tags_1)
140                 /sizeof(asn_DEF_SibtypetobeupdatedListItem_tags_1[0]), /* 1 */
141         asn_DEF_SibtypetobeupdatedListItem_tags_1,      /* Same as above */
142         sizeof(asn_DEF_SibtypetobeupdatedListItem_tags_1)
143                 /sizeof(asn_DEF_SibtypetobeupdatedListItem_tags_1[0]), /* 1 */
144         { 0, 0, SEQUENCE_constraint },
145         asn_MBR_SibtypetobeupdatedListItem_1,
146         4,      /* Elements count */
147         &asn_SPC_SibtypetobeupdatedListItem_specs_1     /* Additional specs */
148 };
149