[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / BWP.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 "BWP.h"
9
10 /*
11  * This type is implemented using NativeEnumerated,
12  * so here we adjust the DEF accordingly.
13  */
14 static int
15 memb_locationAndBandwidth_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
16                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
17         long value;
18         
19         if(!sptr) {
20                 ASN__CTFAIL(app_key, td, sptr,
21                         "%s: value not given (%s:%d)",
22                         td->name, __FILE__, __LINE__);
23                 return -1;
24         }
25         
26         value = *(const long *)sptr;
27         
28         if((value >= 0 && value <= 37949)) {
29                 /* Constraint check succeeded */
30                 return 0;
31         } else {
32                 ASN__CTFAIL(app_key, td, sptr,
33                         "%s: constraint failed (%s:%d)",
34                         td->name, __FILE__, __LINE__);
35                 return -1;
36         }
37 }
38
39 static asn_oer_constraints_t asn_OER_type_cyclicPrefix_constr_4 CC_NOTUSED = {
40         { 0, 0 },
41         -1};
42 static asn_per_constraints_t asn_PER_type_cyclicPrefix_constr_4 CC_NOTUSED = {
43         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
44         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
45         0, 0    /* No PER value map */
46 };
47 static asn_oer_constraints_t asn_OER_memb_locationAndBandwidth_constr_2 CC_NOTUSED = {
48         { 2, 1 }        /* (0..37949) */,
49         -1};
50 static asn_per_constraints_t asn_PER_memb_locationAndBandwidth_constr_2 CC_NOTUSED = {
51         { APC_CONSTRAINED,       16,  16,  0,  37949 }  /* (0..37949) */,
52         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
53         0, 0    /* No PER value map */
54 };
55 static const asn_INTEGER_enum_map_t asn_MAP_cyclicPrefix_value2enum_4[] = {
56         { 0,    8,      "extended" }
57 };
58 static const unsigned int asn_MAP_cyclicPrefix_enum2value_4[] = {
59         0       /* extended(0) */
60 };
61 static const asn_INTEGER_specifics_t asn_SPC_cyclicPrefix_specs_4 = {
62         asn_MAP_cyclicPrefix_value2enum_4,      /* "tag" => N; sorted by tag */
63         asn_MAP_cyclicPrefix_enum2value_4,      /* N => "tag"; sorted by N */
64         1,      /* Number of elements in the maps */
65         0,      /* Enumeration is not extensible */
66         1,      /* Strict enumeration */
67         0,      /* Native long size */
68         0
69 };
70 static const ber_tlv_tag_t asn_DEF_cyclicPrefix_tags_4[] = {
71         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
72         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
73 };
74 static /* Use -fall-defs-global to expose */
75 asn_TYPE_descriptor_t asn_DEF_cyclicPrefix_4 = {
76         "cyclicPrefix",
77         "cyclicPrefix",
78         &asn_OP_NativeEnumerated,
79         asn_DEF_cyclicPrefix_tags_4,
80         sizeof(asn_DEF_cyclicPrefix_tags_4)
81                 /sizeof(asn_DEF_cyclicPrefix_tags_4[0]) - 1, /* 1 */
82         asn_DEF_cyclicPrefix_tags_4,    /* Same as above */
83         sizeof(asn_DEF_cyclicPrefix_tags_4)
84                 /sizeof(asn_DEF_cyclicPrefix_tags_4[0]), /* 2 */
85         { &asn_OER_type_cyclicPrefix_constr_4, &asn_PER_type_cyclicPrefix_constr_4, NativeEnumerated_constraint },
86         0, 0,   /* Defined elsewhere */
87         &asn_SPC_cyclicPrefix_specs_4   /* Additional specs */
88 };
89
90 asn_TYPE_member_t asn_MBR_BWP_1[] = {
91         { ATF_NOFLAGS, 0, offsetof(struct BWP, locationAndBandwidth),
92                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
93                 -1,     /* IMPLICIT tag at current level */
94                 &asn_DEF_NativeInteger,
95                 0,
96                 { &asn_OER_memb_locationAndBandwidth_constr_2, &asn_PER_memb_locationAndBandwidth_constr_2,  memb_locationAndBandwidth_constraint_1 },
97                 0, 0, /* No default value */
98                 "locationAndBandwidth"
99                 },
100         { ATF_NOFLAGS, 0, offsetof(struct BWP, subcarrierSpacing),
101                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
102                 -1,     /* IMPLICIT tag at current level */
103                 &asn_DEF_SubcarrierSpacing,
104                 0,
105                 { 0, 0, 0 },
106                 0, 0, /* No default value */
107                 "subcarrierSpacing"
108                 },
109         { ATF_POINTER, 1, offsetof(struct BWP, cyclicPrefix),
110                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
111                 -1,     /* IMPLICIT tag at current level */
112                 &asn_DEF_cyclicPrefix_4,
113                 0,
114                 { 0, 0, 0 },
115                 0, 0, /* No default value */
116                 "cyclicPrefix"
117                 },
118 };
119 static const int asn_MAP_BWP_oms_1[] = { 2 };
120 static const ber_tlv_tag_t asn_DEF_BWP_tags_1[] = {
121         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
122 };
123 static const asn_TYPE_tag2member_t asn_MAP_BWP_tag2el_1[] = {
124     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* locationAndBandwidth */
125     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* subcarrierSpacing */
126     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* cyclicPrefix */
127 };
128 asn_SEQUENCE_specifics_t asn_SPC_BWP_specs_1 = {
129         sizeof(struct BWP),
130         offsetof(struct BWP, _asn_ctx),
131         asn_MAP_BWP_tag2el_1,
132         3,      /* Count of tags in the map */
133         asn_MAP_BWP_oms_1,      /* Optional members */
134         1, 0,   /* Root/Additions */
135         -1,     /* First extension addition */
136 };
137 asn_TYPE_descriptor_t asn_DEF_BWP = {
138         "BWP",
139         "BWP",
140         &asn_OP_SEQUENCE,
141         asn_DEF_BWP_tags_1,
142         sizeof(asn_DEF_BWP_tags_1)
143                 /sizeof(asn_DEF_BWP_tags_1[0]), /* 1 */
144         asn_DEF_BWP_tags_1,     /* Same as above */
145         sizeof(asn_DEF_BWP_tags_1)
146                 /sizeof(asn_DEF_BWP_tags_1[0]), /* 1 */
147         { 0, 0, SEQUENCE_constraint },
148         asn_MBR_BWP_1,
149         3,      /* Elements count */
150         &asn_SPC_BWP_specs_1    /* Additional specs */
151 };
152