ce61f4d9eae03d1cb8458717a7913f938972cc2a
[ric-app/kpimon.git] / asn1c_defs / all-defs / SubbandCQICodeword0.c
1 /*\r
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)\r
3  * From ASN.1 module "X2AP-IEs"\r
4  *      found in "../../asn_defs/asn1/x2ap-modified-15-05.asn"\r
5  *      `asn1c -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-OER`\r
6  */\r
7 \r
8 #include "SubbandCQICodeword0.h"\r
9 \r
10 static int\r
11 memb_four_bitCQI_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,\r
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {\r
13         long value;\r
14         \r
15         if(!sptr) {\r
16                 ASN__CTFAIL(app_key, td, sptr,\r
17                         "%s: value not given (%s:%d)",\r
18                         td->name, __FILE__, __LINE__);\r
19                 return -1;\r
20         }\r
21         \r
22         value = *(const long *)sptr;\r
23         \r
24         if((value >= 0 && value <= 15)) {\r
25                 /* Constraint check succeeded */\r
26                 return 0;\r
27         } else {\r
28                 ASN__CTFAIL(app_key, td, sptr,\r
29                         "%s: constraint failed (%s:%d)",\r
30                         td->name, __FILE__, __LINE__);\r
31                 return -1;\r
32         }\r
33 }\r
34 \r
35 static int\r
36 memb_two_bitSubbandDifferentialCQI_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,\r
37                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {\r
38         long value;\r
39         \r
40         if(!sptr) {\r
41                 ASN__CTFAIL(app_key, td, sptr,\r
42                         "%s: value not given (%s:%d)",\r
43                         td->name, __FILE__, __LINE__);\r
44                 return -1;\r
45         }\r
46         \r
47         value = *(const long *)sptr;\r
48         \r
49         if((value >= 0 && value <= 3)) {\r
50                 /* Constraint check succeeded */\r
51                 return 0;\r
52         } else {\r
53                 ASN__CTFAIL(app_key, td, sptr,\r
54                         "%s: constraint failed (%s:%d)",\r
55                         td->name, __FILE__, __LINE__);\r
56                 return -1;\r
57         }\r
58 }\r
59 \r
60 static int\r
61 memb_two_bitDifferentialCQI_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,\r
62                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {\r
63         long value;\r
64         \r
65         if(!sptr) {\r
66                 ASN__CTFAIL(app_key, td, sptr,\r
67                         "%s: value not given (%s:%d)",\r
68                         td->name, __FILE__, __LINE__);\r
69                 return -1;\r
70         }\r
71         \r
72         value = *(const long *)sptr;\r
73         \r
74         if((value >= 0 && value <= 3)) {\r
75                 /* Constraint check succeeded */\r
76                 return 0;\r
77         } else {\r
78                 ASN__CTFAIL(app_key, td, sptr,\r
79                         "%s: constraint failed (%s:%d)",\r
80                         td->name, __FILE__, __LINE__);\r
81                 return -1;\r
82         }\r
83 }\r
84 \r
85 static asn_per_constraints_t asn_PER_memb_four_bitCQI_constr_2 CC_NOTUSED = {\r
86         { APC_CONSTRAINED | APC_EXTENSIBLE,  4,  4,  0,  15 }   /* (0..15,...) */,\r
87         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },\r
88         0, 0    /* No PER value map */\r
89 };\r
90 static asn_per_constraints_t asn_PER_memb_two_bitSubbandDifferentialCQI_constr_3 CC_NOTUSED = {\r
91         { APC_CONSTRAINED | APC_EXTENSIBLE,  2,  2,  0,  3 }    /* (0..3,...) */,\r
92         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },\r
93         0, 0    /* No PER value map */\r
94 };\r
95 static asn_per_constraints_t asn_PER_memb_two_bitDifferentialCQI_constr_4 CC_NOTUSED = {\r
96         { APC_CONSTRAINED | APC_EXTENSIBLE,  2,  2,  0,  3 }    /* (0..3,...) */,\r
97         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },\r
98         0, 0    /* No PER value map */\r
99 };\r
100 asn_per_constraints_t asn_PER_type_SubbandCQICodeword0_constr_1 CC_NOTUSED = {\r
101         { APC_CONSTRAINED | APC_EXTENSIBLE,  2,  2,  0,  2 }    /* (0..2,...) */,\r
102         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },\r
103         0, 0    /* No PER value map */\r
104 };\r
105 asn_TYPE_member_t asn_MBR_SubbandCQICodeword0_1[] = {\r
106         { ATF_NOFLAGS, 0, offsetof(struct SubbandCQICodeword0, choice.four_bitCQI),\r
107                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),\r
108                 -1,     /* IMPLICIT tag at current level */\r
109                 &asn_DEF_NativeInteger,\r
110                 0,\r
111                 { 0, &asn_PER_memb_four_bitCQI_constr_2,  memb_four_bitCQI_constraint_1 },\r
112                 0, 0, /* No default value */\r
113                 "four-bitCQI"\r
114                 },\r
115         { ATF_NOFLAGS, 0, offsetof(struct SubbandCQICodeword0, choice.two_bitSubbandDifferentialCQI),\r
116                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),\r
117                 -1,     /* IMPLICIT tag at current level */\r
118                 &asn_DEF_NativeInteger,\r
119                 0,\r
120                 { 0, &asn_PER_memb_two_bitSubbandDifferentialCQI_constr_3,  memb_two_bitSubbandDifferentialCQI_constraint_1 },\r
121                 0, 0, /* No default value */\r
122                 "two-bitSubbandDifferentialCQI"\r
123                 },\r
124         { ATF_NOFLAGS, 0, offsetof(struct SubbandCQICodeword0, choice.two_bitDifferentialCQI),\r
125                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),\r
126                 -1,     /* IMPLICIT tag at current level */\r
127                 &asn_DEF_NativeInteger,\r
128                 0,\r
129                 { 0, &asn_PER_memb_two_bitDifferentialCQI_constr_4,  memb_two_bitDifferentialCQI_constraint_1 },\r
130                 0, 0, /* No default value */\r
131                 "two-bitDifferentialCQI"\r
132                 },\r
133 };\r
134 static const asn_TYPE_tag2member_t asn_MAP_SubbandCQICodeword0_tag2el_1[] = {\r
135     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* four-bitCQI */\r
136     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* two-bitSubbandDifferentialCQI */\r
137     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* two-bitDifferentialCQI */\r
138 };\r
139 asn_CHOICE_specifics_t asn_SPC_SubbandCQICodeword0_specs_1 = {\r
140         sizeof(struct SubbandCQICodeword0),\r
141         offsetof(struct SubbandCQICodeword0, _asn_ctx),\r
142         offsetof(struct SubbandCQICodeword0, present),\r
143         sizeof(((struct SubbandCQICodeword0 *)0)->present),\r
144         asn_MAP_SubbandCQICodeword0_tag2el_1,\r
145         3,      /* Count of tags in the map */\r
146         0, 0,\r
147         3       /* Extensions start */\r
148 };\r
149 asn_TYPE_descriptor_t asn_DEF_SubbandCQICodeword0 = {\r
150         "SubbandCQICodeword0",\r
151         "SubbandCQICodeword0",\r
152         &asn_OP_CHOICE,\r
153         0,      /* No effective tags (pointer) */\r
154         0,      /* No effective tags (count) */\r
155         0,      /* No tags (pointer) */\r
156         0,      /* No tags (count) */\r
157         { 0, &asn_PER_type_SubbandCQICodeword0_constr_1, CHOICE_constraint },\r
158         asn_MBR_SubbandCQICodeword0_1,\r
159         3,      /* Elements count */\r
160         &asn_SPC_SubbandCQICodeword0_specs_1    /* Additional specs */\r
161 };\r
162 \r