Enhanced SIM for E2AP v1 for TS UC
[sim/e2-interface.git] / e2sim / e2apv1sim / ASN1c / FQIPERSlicesPerPlmnListItem.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "E2SM-KPM-IEs"
4  *      found in "/home/rshacham/e2sm_kpm_approved.asn"
5  *      `asn1c -fcompound-names`
6  */
7
8 #include "FQIPERSlicesPerPlmnListItem.h"
9
10 static int
11 memb_fiveQI_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13         long value;
14         
15         if(!sptr) {
16                 ASN__CTFAIL(app_key, td, sptr,
17                         "%s: value not given (%s:%d)",
18                         td->name, __FILE__, __LINE__);
19                 return -1;
20         }
21         
22         value = *(const long *)sptr;
23         
24         if((value >= 0 && value <= 255)) {
25                 /* Constraint check succeeded */
26                 return 0;
27         } else {
28                 ASN__CTFAIL(app_key, td, sptr,
29                         "%s: constraint failed (%s:%d)",
30                         td->name, __FILE__, __LINE__);
31                 return -1;
32         }
33 }
34
35 static int
36 memb_pDCPBytesDL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
37                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
38         const INTEGER_t *st = (const INTEGER_t *)sptr;
39         long value;
40         
41         if(!sptr) {
42                 ASN__CTFAIL(app_key, td, sptr,
43                         "%s: value not given (%s:%d)",
44                         td->name, __FILE__, __LINE__);
45                 return -1;
46         }
47         
48         if(asn_INTEGER2long(st, &value)) {
49                 ASN__CTFAIL(app_key, td, sptr,
50                         "%s: value too large (%s:%d)",
51                         td->name, __FILE__, __LINE__);
52                 return -1;
53         }
54         
55         if((value >= 0 && value <= 10000000000)) {
56                 /* Constraint check succeeded */
57                 return 0;
58         } else {
59                 ASN__CTFAIL(app_key, td, sptr,
60                         "%s: constraint failed (%s:%d)",
61                         td->name, __FILE__, __LINE__);
62                 return -1;
63         }
64 }
65
66 static int
67 memb_pDCPBytesUL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
68                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
69         const INTEGER_t *st = (const INTEGER_t *)sptr;
70         long value;
71         
72         if(!sptr) {
73                 ASN__CTFAIL(app_key, td, sptr,
74                         "%s: value not given (%s:%d)",
75                         td->name, __FILE__, __LINE__);
76                 return -1;
77         }
78         
79         if(asn_INTEGER2long(st, &value)) {
80                 ASN__CTFAIL(app_key, td, sptr,
81                         "%s: value too large (%s:%d)",
82                         td->name, __FILE__, __LINE__);
83                 return -1;
84         }
85         
86         if((value >= 0 && value <= 10000000000)) {
87                 /* Constraint check succeeded */
88                 return 0;
89         } else {
90                 ASN__CTFAIL(app_key, td, sptr,
91                         "%s: constraint failed (%s:%d)",
92                         td->name, __FILE__, __LINE__);
93                 return -1;
94         }
95 }
96
97 static asn_oer_constraints_t asn_OER_memb_fiveQI_constr_2 CC_NOTUSED = {
98         { 1, 1 }        /* (0..255) */,
99         -1};
100 static asn_per_constraints_t asn_PER_memb_fiveQI_constr_2 CC_NOTUSED = {
101         { APC_CONSTRAINED,       8,  8,  0,  255 }      /* (0..255) */,
102         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
103         0, 0    /* No PER value map */
104 };
105 static asn_oer_constraints_t asn_OER_memb_pDCPBytesDL_constr_3 CC_NOTUSED = {
106         { 0, 0 },
107         -1};
108 static asn_per_constraints_t asn_PER_memb_pDCPBytesDL_constr_3 CC_NOTUSED = {
109         { APC_CONSTRAINED | APC_EXTENSIBLE,  34, -1,  0,  10000000000 } /* (0..10000000000,...) */,
110         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
111         0, 0    /* No PER value map */
112 };
113 static asn_oer_constraints_t asn_OER_memb_pDCPBytesUL_constr_4 CC_NOTUSED = {
114         { 0, 0 },
115         -1};
116 static asn_per_constraints_t asn_PER_memb_pDCPBytesUL_constr_4 CC_NOTUSED = {
117         { APC_CONSTRAINED | APC_EXTENSIBLE,  34, -1,  0,  10000000000 } /* (0..10000000000,...) */,
118         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
119         0, 0    /* No PER value map */
120 };
121 asn_TYPE_member_t asn_MBR_FQIPERSlicesPerPlmnListItem_1[] = {
122         { ATF_NOFLAGS, 0, offsetof(struct FQIPERSlicesPerPlmnListItem, fiveQI),
123                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
124                 -1,     /* IMPLICIT tag at current level */
125                 &asn_DEF_NativeInteger,
126                 0,
127                 { &asn_OER_memb_fiveQI_constr_2, &asn_PER_memb_fiveQI_constr_2,  memb_fiveQI_constraint_1 },
128                 0, 0, /* No default value */
129                 "fiveQI"
130                 },
131         { ATF_POINTER, 2, offsetof(struct FQIPERSlicesPerPlmnListItem, pDCPBytesDL),
132                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
133                 -1,     /* IMPLICIT tag at current level */
134                 &asn_DEF_INTEGER,
135                 0,
136                 { &asn_OER_memb_pDCPBytesDL_constr_3, &asn_PER_memb_pDCPBytesDL_constr_3,  memb_pDCPBytesDL_constraint_1 },
137                 0, 0, /* No default value */
138                 "pDCPBytesDL"
139                 },
140         { ATF_POINTER, 1, offsetof(struct FQIPERSlicesPerPlmnListItem, pDCPBytesUL),
141                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
142                 -1,     /* IMPLICIT tag at current level */
143                 &asn_DEF_INTEGER,
144                 0,
145                 { &asn_OER_memb_pDCPBytesUL_constr_4, &asn_PER_memb_pDCPBytesUL_constr_4,  memb_pDCPBytesUL_constraint_1 },
146                 0, 0, /* No default value */
147                 "pDCPBytesUL"
148                 },
149 };
150 static const int asn_MAP_FQIPERSlicesPerPlmnListItem_oms_1[] = { 1, 2 };
151 static const ber_tlv_tag_t asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1[] = {
152         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
153 };
154 static const asn_TYPE_tag2member_t asn_MAP_FQIPERSlicesPerPlmnListItem_tag2el_1[] = {
155     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* fiveQI */
156     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* pDCPBytesDL */
157     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* pDCPBytesUL */
158 };
159 asn_SEQUENCE_specifics_t asn_SPC_FQIPERSlicesPerPlmnListItem_specs_1 = {
160         sizeof(struct FQIPERSlicesPerPlmnListItem),
161         offsetof(struct FQIPERSlicesPerPlmnListItem, _asn_ctx),
162         asn_MAP_FQIPERSlicesPerPlmnListItem_tag2el_1,
163         3,      /* Count of tags in the map */
164         asn_MAP_FQIPERSlicesPerPlmnListItem_oms_1,      /* Optional members */
165         2, 0,   /* Root/Additions */
166         3,      /* First extension addition */
167 };
168 asn_TYPE_descriptor_t asn_DEF_FQIPERSlicesPerPlmnListItem = {
169         "FQIPERSlicesPerPlmnListItem",
170         "FQIPERSlicesPerPlmnListItem",
171         &asn_OP_SEQUENCE,
172         asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1,
173         sizeof(asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1)
174                 /sizeof(asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1[0]), /* 1 */
175         asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1,     /* Same as above */
176         sizeof(asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1)
177                 /sizeof(asn_DEF_FQIPERSlicesPerPlmnListItem_tags_1[0]), /* 1 */
178         { 0, 0, SEQUENCE_constraint },
179         asn_MBR_FQIPERSlicesPerPlmnListItem_1,
180         3,      /* Elements count */
181         &asn_SPC_FQIPERSlicesPerPlmnListItem_specs_1    /* Additional specs */
182 };
183