[Epic-ID: ODUHIGH-516][Task-ID: ODUHIGH-522] Generating the E2SM-KPM code
[o-du/l2.git] / src / codec_utils / E2SM_KPM / MeasurementRecordItem.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "E2SM-KPM-IEs"
4  *      found in "../../ASN1_Input/E2SM_KPM_V_3_0.asn1"
5  *      `asn1c -D ./../../E2_output/E2SM_KPM_v3.0_output -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "MeasurementRecordItem.h"
9
10 static int
11 integer_2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13         
14         if(!sptr) {
15                 ASN__CTFAIL(app_key, td, sptr,
16                         "%s: value not given (%s:%d)",
17                         td->name, __FILE__, __LINE__);
18                 return -1;
19         }
20         
21         
22         /* Constraint check succeeded */
23         return 0;
24 }
25
26 /*
27  * This type is implemented using NativeInteger,
28  * so here we adjust the DEF accordingly.
29  */
30 static int
31 memb_integer_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
32                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
33         
34         if(!sptr) {
35                 ASN__CTFAIL(app_key, td, sptr,
36                         "%s: value not given (%s:%d)",
37                         td->name, __FILE__, __LINE__);
38                 return -1;
39         }
40         
41         
42         /* Constraint check succeeded */
43         return 0;
44 }
45
46 static asn_oer_constraints_t asn_OER_type_integer_constr_2 CC_NOTUSED = {
47         { 4, 1 }        /* (0..4294967295) */,
48         -1};
49 static asn_per_constraints_t asn_PER_type_integer_constr_2 CC_NOTUSED = {
50         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
51         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
52         0, 0    /* No PER value map */
53 };
54 static asn_oer_constraints_t asn_OER_memb_integer_constr_2 CC_NOTUSED = {
55         { 4, 1 }        /* (0..4294967295) */,
56         -1};
57 static asn_per_constraints_t asn_PER_memb_integer_constr_2 CC_NOTUSED = {
58         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
59         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
60         0, 0    /* No PER value map */
61 };
62 static asn_oer_constraints_t asn_OER_type_MeasurementRecordItem_constr_1 CC_NOTUSED = {
63         { 0, 0 },
64         -1};
65 asn_per_constraints_t asn_PER_type_MeasurementRecordItem_constr_1 CC_NOTUSED = {
66         { APC_CONSTRAINED | APC_EXTENSIBLE,  2,  2,  0,  2 }    /* (0..2,...) */,
67         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
68         0, 0    /* No PER value map */
69 };
70 static const asn_INTEGER_specifics_t asn_SPC_integer_specs_2 = {
71         0,      0,      0,      0,      0,
72         0,      /* Native long size */
73         1       /* Unsigned representation */
74 };
75 static const ber_tlv_tag_t asn_DEF_integer_tags_2[] = {
76         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
77         (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
78 };
79 static /* Use -fall-defs-global to expose */
80 asn_TYPE_descriptor_t asn_DEF_integer_2 = {
81         "integer",
82         "integer",
83         &asn_OP_NativeInteger,
84         asn_DEF_integer_tags_2,
85         sizeof(asn_DEF_integer_tags_2)
86                 /sizeof(asn_DEF_integer_tags_2[0]) - 1, /* 1 */
87         asn_DEF_integer_tags_2, /* Same as above */
88         sizeof(asn_DEF_integer_tags_2)
89                 /sizeof(asn_DEF_integer_tags_2[0]), /* 2 */
90         { &asn_OER_type_integer_constr_2, &asn_PER_type_integer_constr_2, integer_2_constraint },
91         0, 0,   /* No members */
92         &asn_SPC_integer_specs_2        /* Additional specs */
93 };
94
95 asn_TYPE_member_t asn_MBR_MeasurementRecordItem_1[] = {
96         { ATF_NOFLAGS, 0, offsetof(struct MeasurementRecordItem, choice.integer),
97                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
98                 -1,     /* IMPLICIT tag at current level */
99                 &asn_DEF_integer_2,
100                 0,
101                 { &asn_OER_memb_integer_constr_2, &asn_PER_memb_integer_constr_2,  memb_integer_constraint_1 },
102                 0, 0, /* No default value */
103                 "integer"
104                 },
105         { ATF_NOFLAGS, 0, offsetof(struct MeasurementRecordItem, choice.real),
106                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
107                 -1,     /* IMPLICIT tag at current level */
108                 &asn_DEF_NativeReal,
109                 0,
110                 { 0, 0, 0 },
111                 0, 0, /* No default value */
112                 "real"
113                 },
114         { ATF_NOFLAGS, 0, offsetof(struct MeasurementRecordItem, choice.noValue),
115                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
116                 -1,     /* IMPLICIT tag at current level */
117                 &asn_DEF_NULL,
118                 0,
119                 { 0, 0, 0 },
120                 0, 0, /* No default value */
121                 "noValue"
122                 },
123 };
124 static const asn_TYPE_tag2member_t asn_MAP_MeasurementRecordItem_tag2el_1[] = {
125     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* integer */
126     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* real */
127     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* noValue */
128 };
129 asn_CHOICE_specifics_t asn_SPC_MeasurementRecordItem_specs_1 = {
130         sizeof(struct MeasurementRecordItem),
131         offsetof(struct MeasurementRecordItem, _asn_ctx),
132         offsetof(struct MeasurementRecordItem, present),
133         sizeof(((struct MeasurementRecordItem *)0)->present),
134         asn_MAP_MeasurementRecordItem_tag2el_1,
135         3,      /* Count of tags in the map */
136         0, 0,
137         3       /* Extensions start */
138 };
139 asn_TYPE_descriptor_t asn_DEF_MeasurementRecordItem = {
140         "MeasurementRecordItem",
141         "MeasurementRecordItem",
142         &asn_OP_CHOICE,
143         0,      /* No effective tags (pointer) */
144         0,      /* No effective tags (count) */
145         0,      /* No tags (pointer) */
146         0,      /* No tags (count) */
147         { &asn_OER_type_MeasurementRecordItem_constr_1, &asn_PER_type_MeasurementRecordItem_constr_1, CHOICE_constraint },
148         asn_MBR_MeasurementRecordItem_1,
149         3,      /* Elements count */
150         &asn_SPC_MeasurementRecordItem_specs_1  /* Additional specs */
151 };
152