c8c77e6254869a246c02323fc2f59d3d190dac62
[o-du/l2.git] / src / codec_utils / E2SMKPM / E2SM-KPM-IndicationHeader-Format1.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "E2SM-KPM-IEs"
4  *      found in "codeathon/E2SM_KPM.asn1"
5  *      `asn1c -D ./codeathon/e2smkpm/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "E2SM-KPM-IndicationHeader-Format1.h"
9
10 #include "GlobalKPMnode-ID.h"
11 #include "NRCGI.h"
12 #include "SNSSAI.h"
13 static int
14 memb_fiveQI_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
15                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
16         long value;
17         
18         if(!sptr) {
19                 ASN__CTFAIL(app_key, td, sptr,
20                         "%s: value not given (%s:%d)",
21                         td->name, __FILE__, __LINE__);
22                 return -1;
23         }
24         
25         value = *(const long *)sptr;
26         
27         if((value >= 0 && value <= 255)) {
28                 /* Constraint check succeeded */
29                 return 0;
30         } else {
31                 ASN__CTFAIL(app_key, td, sptr,
32                         "%s: constraint failed (%s:%d)",
33                         td->name, __FILE__, __LINE__);
34                 return -1;
35         }
36 }
37
38 static int
39 memb_qci_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
40                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
41         long value;
42         
43         if(!sptr) {
44                 ASN__CTFAIL(app_key, td, sptr,
45                         "%s: value not given (%s:%d)",
46                         td->name, __FILE__, __LINE__);
47                 return -1;
48         }
49         
50         value = *(const long *)sptr;
51         
52         if((value >= 0 && value <= 255)) {
53                 /* Constraint check succeeded */
54                 return 0;
55         } else {
56                 ASN__CTFAIL(app_key, td, sptr,
57                         "%s: constraint failed (%s:%d)",
58                         td->name, __FILE__, __LINE__);
59                 return -1;
60         }
61 }
62
63 static asn_oer_constraints_t asn_OER_memb_fiveQI_constr_6 CC_NOTUSED = {
64         { 1, 1 }        /* (0..255) */,
65         -1};
66 static asn_per_constraints_t asn_PER_memb_fiveQI_constr_6 CC_NOTUSED = {
67         { APC_CONSTRAINED,       8,  8,  0,  255 }      /* (0..255) */,
68         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
69         0, 0    /* No PER value map */
70 };
71 static asn_oer_constraints_t asn_OER_memb_qci_constr_7 CC_NOTUSED = {
72         { 1, 1 }        /* (0..255) */,
73         -1};
74 static asn_per_constraints_t asn_PER_memb_qci_constr_7 CC_NOTUSED = {
75         { APC_CONSTRAINED,       8,  8,  0,  255 }      /* (0..255) */,
76         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
77         0, 0    /* No PER value map */
78 };
79 asn_TYPE_member_t asn_MBR_E2SM_KPM_IndicationHeader_Format1_1[] = {
80         { ATF_POINTER, 6, offsetof(struct E2SM_KPM_IndicationHeader_Format1, id_GlobalKPMnode_ID),
81                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
82                 +1,     /* EXPLICIT tag at current level */
83                 &asn_DEF_GlobalKPMnode_ID,
84                 0,
85                 { 0, 0, 0 },
86                 0, 0, /* No default value */
87                 "id-GlobalKPMnode-ID"
88                 },
89         { ATF_POINTER, 5, offsetof(struct E2SM_KPM_IndicationHeader_Format1, nRCGI),
90                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
91                 -1,     /* IMPLICIT tag at current level */
92                 &asn_DEF_NRCGI,
93                 0,
94                 { 0, 0, 0 },
95                 0, 0, /* No default value */
96                 "nRCGI"
97                 },
98         { ATF_POINTER, 4, offsetof(struct E2SM_KPM_IndicationHeader_Format1, pLMN_Identity),
99                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
100                 -1,     /* IMPLICIT tag at current level */
101                 &asn_DEF_PLMN_Identity,
102                 0,
103                 { 0, 0, 0 },
104                 0, 0, /* No default value */
105                 "pLMN-Identity"
106                 },
107         { ATF_POINTER, 3, offsetof(struct E2SM_KPM_IndicationHeader_Format1, sliceID),
108                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
109                 -1,     /* IMPLICIT tag at current level */
110                 &asn_DEF_SNSSAI,
111                 0,
112                 { 0, 0, 0 },
113                 0, 0, /* No default value */
114                 "sliceID"
115                 },
116         { ATF_POINTER, 2, offsetof(struct E2SM_KPM_IndicationHeader_Format1, fiveQI),
117                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
118                 -1,     /* IMPLICIT tag at current level */
119                 &asn_DEF_NativeInteger,
120                 0,
121                 { &asn_OER_memb_fiveQI_constr_6, &asn_PER_memb_fiveQI_constr_6,  memb_fiveQI_constraint_1 },
122                 0, 0, /* No default value */
123                 "fiveQI"
124                 },
125         { ATF_POINTER, 1, offsetof(struct E2SM_KPM_IndicationHeader_Format1, qci),
126                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
127                 -1,     /* IMPLICIT tag at current level */
128                 &asn_DEF_NativeInteger,
129                 0,
130                 { &asn_OER_memb_qci_constr_7, &asn_PER_memb_qci_constr_7,  memb_qci_constraint_1 },
131                 0, 0, /* No default value */
132                 "qci"
133                 },
134 };
135 static const int asn_MAP_E2SM_KPM_IndicationHeader_Format1_oms_1[] = { 0, 1, 2, 3, 4, 5 };
136 static const ber_tlv_tag_t asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1[] = {
137         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
138 };
139 static const asn_TYPE_tag2member_t asn_MAP_E2SM_KPM_IndicationHeader_Format1_tag2el_1[] = {
140     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id-GlobalKPMnode-ID */
141     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* nRCGI */
142     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* pLMN-Identity */
143     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* sliceID */
144     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* fiveQI */
145     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* qci */
146 };
147 asn_SEQUENCE_specifics_t asn_SPC_E2SM_KPM_IndicationHeader_Format1_specs_1 = {
148         sizeof(struct E2SM_KPM_IndicationHeader_Format1),
149         offsetof(struct E2SM_KPM_IndicationHeader_Format1, _asn_ctx),
150         asn_MAP_E2SM_KPM_IndicationHeader_Format1_tag2el_1,
151         6,      /* Count of tags in the map */
152         asn_MAP_E2SM_KPM_IndicationHeader_Format1_oms_1,        /* Optional members */
153         6, 0,   /* Root/Additions */
154         6,      /* First extension addition */
155 };
156 asn_TYPE_descriptor_t asn_DEF_E2SM_KPM_IndicationHeader_Format1 = {
157         "E2SM-KPM-IndicationHeader-Format1",
158         "E2SM-KPM-IndicationHeader-Format1",
159         &asn_OP_SEQUENCE,
160         asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1,
161         sizeof(asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1)
162                 /sizeof(asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1[0]), /* 1 */
163         asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1,       /* Same as above */
164         sizeof(asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1)
165                 /sizeof(asn_DEF_E2SM_KPM_IndicationHeader_Format1_tags_1[0]), /* 1 */
166         { 0, 0, SEQUENCE_constraint },
167         asn_MBR_E2SM_KPM_IndicationHeader_Format1_1,
168         6,      /* Elements count */
169         &asn_SPC_E2SM_KPM_IndicationHeader_Format1_specs_1      /* Additional specs */
170 };
171