ISSUE ID:- RICAPP-216
[ric-app/bouncer.git] / Bouncer / e2sm_kpm / lib / 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 "kpmv2.asn"
5  *      `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -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_per_constraints_t asn_PER_type_integer_constr_2 CC_NOTUSED = {
47         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
48         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
49         0, 0    /* No PER value map */
50 };
51 static asn_per_constraints_t asn_PER_memb_integer_constr_2 CC_NOTUSED = {
52         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
53         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
54         0, 0    /* No PER value map */
55 };
56 asn_per_constraints_t asn_PER_type_MeasurementRecordItem_constr_1 CC_NOTUSED = {
57         { APC_CONSTRAINED | APC_EXTENSIBLE,  2,  2,  0,  2 }    /* (0..2,...) */,
58         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
59         0, 0    /* No PER value map */
60 };
61 static const asn_INTEGER_specifics_t asn_SPC_integer_specs_2 = {
62         0,      0,      0,      0,      0,
63         0,      /* Native long size */
64         1       /* Unsigned representation */
65 };
66 static const ber_tlv_tag_t asn_DEF_integer_tags_2[] = {
67         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
68         (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
69 };
70 static /* Use -fall-defs-global to expose */
71 asn_TYPE_descriptor_t asn_DEF_integer_2 = {
72         "integer",
73         "integer",
74         &asn_OP_NativeInteger,
75         asn_DEF_integer_tags_2,
76         sizeof(asn_DEF_integer_tags_2)
77                 /sizeof(asn_DEF_integer_tags_2[0]) - 1, /* 1 */
78         asn_DEF_integer_tags_2, /* Same as above */
79         sizeof(asn_DEF_integer_tags_2)
80                 /sizeof(asn_DEF_integer_tags_2[0]), /* 2 */
81         { 0, &asn_PER_type_integer_constr_2, integer_2_constraint },
82         0, 0,   /* No members */
83         &asn_SPC_integer_specs_2        /* Additional specs */
84 };
85
86 asn_TYPE_member_t asn_MBR_MeasurementRecordItem_1[] = {
87         { ATF_NOFLAGS, 0, offsetof(struct MeasurementRecordItem, choice.integer),
88                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
89                 -1,     /* IMPLICIT tag at current level */
90                 &asn_DEF_integer_2,
91                 0,
92                 { 0, &asn_PER_memb_integer_constr_2,  memb_integer_constraint_1 },
93                 0, 0, /* No default value */
94                 "integer"
95                 },
96         { ATF_NOFLAGS, 0, offsetof(struct MeasurementRecordItem, choice.real),
97                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
98                 -1,     /* IMPLICIT tag at current level */
99                 &asn_DEF_NativeReal,
100                 0,
101                 { 0, 0, 0 },
102                 0, 0, /* No default value */
103                 "real"
104                 },
105         { ATF_NOFLAGS, 0, offsetof(struct MeasurementRecordItem, choice.noValue),
106                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
107                 -1,     /* IMPLICIT tag at current level */
108                 &asn_DEF_NULL,
109                 0,
110                 { 0, 0, 0 },
111                 0, 0, /* No default value */
112                 "noValue"
113                 },
114 };
115 static const asn_TYPE_tag2member_t asn_MAP_MeasurementRecordItem_tag2el_1[] = {
116     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* integer */
117     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* real */
118     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* noValue */
119 };
120 asn_CHOICE_specifics_t asn_SPC_MeasurementRecordItem_specs_1 = {
121         sizeof(struct MeasurementRecordItem),
122         offsetof(struct MeasurementRecordItem, _asn_ctx),
123         offsetof(struct MeasurementRecordItem, present),
124         sizeof(((struct MeasurementRecordItem *)0)->present),
125         asn_MAP_MeasurementRecordItem_tag2el_1,
126         3,      /* Count of tags in the map */
127         0, 0,
128         3       /* Extensions start */
129 };
130 asn_TYPE_descriptor_t asn_DEF_MeasurementRecordItem = {
131         "MeasurementRecordItem",
132         "MeasurementRecordItem",
133         &asn_OP_CHOICE,
134         0,      /* No effective tags (pointer) */
135         0,      /* No effective tags (count) */
136         0,      /* No tags (pointer) */
137         0,      /* No tags (count) */
138         { 0, &asn_PER_type_MeasurementRecordItem_constr_1, CHOICE_constraint },
139         asn_MBR_MeasurementRecordItem_1,
140         3,      /* Elements count */
141         &asn_SPC_MeasurementRecordItem_specs_1  /* Additional specs */
142 };
143