4d1025dd62eb004219010b3ac1795cd670271db0
[ric-app/kpimon.git] / asn1c_defs / all-defs / WidebandCQI.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 "WidebandCQI.h"\r
9 \r
10 #include "WidebandCQICodeword1.h"\r
11 #include "ProtocolExtensionContainer.h"\r
12 static int\r
13 memb_widebandCQICodeword0_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,\r
14                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {\r
15         long value;\r
16         \r
17         if(!sptr) {\r
18                 ASN__CTFAIL(app_key, td, sptr,\r
19                         "%s: value not given (%s:%d)",\r
20                         td->name, __FILE__, __LINE__);\r
21                 return -1;\r
22         }\r
23         \r
24         value = *(const long *)sptr;\r
25         \r
26         if((value >= 0 && value <= 15)) {\r
27                 /* Constraint check succeeded */\r
28                 return 0;\r
29         } else {\r
30                 ASN__CTFAIL(app_key, td, sptr,\r
31                         "%s: constraint failed (%s:%d)",\r
32                         td->name, __FILE__, __LINE__);\r
33                 return -1;\r
34         }\r
35 }\r
36 \r
37 static asn_per_constraints_t asn_PER_memb_widebandCQICodeword0_constr_2 CC_NOTUSED = {\r
38         { APC_CONSTRAINED | APC_EXTENSIBLE,  4,  4,  0,  15 }   /* (0..15,...) */,\r
39         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },\r
40         0, 0    /* No PER value map */\r
41 };\r
42 asn_TYPE_member_t asn_MBR_WidebandCQI_1[] = {\r
43         { ATF_NOFLAGS, 0, offsetof(struct WidebandCQI, widebandCQICodeword0),\r
44                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),\r
45                 -1,     /* IMPLICIT tag at current level */\r
46                 &asn_DEF_NativeInteger,\r
47                 0,\r
48                 { 0, &asn_PER_memb_widebandCQICodeword0_constr_2,  memb_widebandCQICodeword0_constraint_1 },\r
49                 0, 0, /* No default value */\r
50                 "widebandCQICodeword0"\r
51                 },\r
52         { ATF_POINTER, 2, offsetof(struct WidebandCQI, widebandCQICodeword1),\r
53                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),\r
54                 +1,     /* EXPLICIT tag at current level */\r
55                 &asn_DEF_WidebandCQICodeword1,\r
56                 0,\r
57                 { 0, 0, 0 },\r
58                 0, 0, /* No default value */\r
59                 "widebandCQICodeword1"\r
60                 },\r
61         { ATF_POINTER, 1, offsetof(struct WidebandCQI, iE_Extensions),\r
62                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),\r
63                 -1,     /* IMPLICIT tag at current level */\r
64                 &asn_DEF_ProtocolExtensionContainer_8231P221,\r
65                 0,\r
66                 { 0, 0, 0 },\r
67                 0, 0, /* No default value */\r
68                 "iE-Extensions"\r
69                 },\r
70 };\r
71 static const int asn_MAP_WidebandCQI_oms_1[] = { 1, 2 };\r
72 static const ber_tlv_tag_t asn_DEF_WidebandCQI_tags_1[] = {\r
73         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))\r
74 };\r
75 static const asn_TYPE_tag2member_t asn_MAP_WidebandCQI_tag2el_1[] = {\r
76     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* widebandCQICodeword0 */\r
77     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* widebandCQICodeword1 */\r
78     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */\r
79 };\r
80 asn_SEQUENCE_specifics_t asn_SPC_WidebandCQI_specs_1 = {\r
81         sizeof(struct WidebandCQI),\r
82         offsetof(struct WidebandCQI, _asn_ctx),\r
83         asn_MAP_WidebandCQI_tag2el_1,\r
84         3,      /* Count of tags in the map */\r
85         asn_MAP_WidebandCQI_oms_1,      /* Optional members */\r
86         2, 0,   /* Root/Additions */\r
87         3,      /* First extension addition */\r
88 };\r
89 asn_TYPE_descriptor_t asn_DEF_WidebandCQI = {\r
90         "WidebandCQI",\r
91         "WidebandCQI",\r
92         &asn_OP_SEQUENCE,\r
93         asn_DEF_WidebandCQI_tags_1,\r
94         sizeof(asn_DEF_WidebandCQI_tags_1)\r
95                 /sizeof(asn_DEF_WidebandCQI_tags_1[0]), /* 1 */\r
96         asn_DEF_WidebandCQI_tags_1,     /* Same as above */\r
97         sizeof(asn_DEF_WidebandCQI_tags_1)\r
98                 /sizeof(asn_DEF_WidebandCQI_tags_1[0]), /* 1 */\r
99         { 0, 0, SEQUENCE_constraint },\r
100         asn_MBR_WidebandCQI_1,\r
101         3,      /* Elements count */\r
102         &asn_SPC_WidebandCQI_specs_1    /* Additional specs */\r
103 };\r
104 \r