Coverage Report

Created: 2026-09-27 06:19

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/open5gs/lib/asn1c/ngap/NGAP_A2X-PC5-QoS-Flow-Item.c
Line
Count
Source
1
/*
2
 * Generated by asn1c-v1.4-43-gb7926896-2026-05-03 (https://github.com/mouse07410/asn1c)
3
 * From ASN.1 module "NGAP-IEs"
4
 *  found in "../support/ngap-r19.2.0/38413-j20.asn"
5
 *  `asn1c -pdu=all -fprefix=NGAP_ -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-JER -no-gen-CBOR -no-gen-OER -no-gen-UPER`
6
 */
7
8
#include "NGAP_A2X-PC5-QoS-Flow-Item.h"
9
10
#include "NGAP_A2X-PC5-FlowBitRates.h"
11
#include "NGAP_ProtocolExtensionContainer.h"
12
#ifndef ASN1C_NO_UNSUFFIXED_PDU_ALIAS
13
#if defined(__ELF__) && (defined(__GNUC__) || defined(__clang__))
14
extern asn_TYPE_descriptor_t asn_DEF_NGAP_a2X_Range __attribute__((weak, alias("asn_DEF_NGAP_a2X_Range_4")));
15
#else
16
static asn_TYPE_descriptor_t asn_DEF_NGAP_a2X_Range_4;
17
static asn_TYPE_descriptor_t asn_DEF_NGAP_a2X_Range;
18
__attribute__((constructor)) static void asn_DEF_NGAP_a2X_Range_4_alias_init(void) {
19
  asn_DEF_NGAP_a2X_Range = asn_DEF_NGAP_a2X_Range_4;
20
}
21
#endif
22
#endif /* ASN1C_NO_UNSUFFIXED_PDU_ALIAS */
23
/*
24
 * This type is implemented using NativeEnumerated,
25
 * so here we adjust the DEF accordingly.
26
 */
27
static int
28
memb_NGAP_a2X_PQI_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
29
0
      asn_app_constraint_failed_f *ctfailcb, void *app_key) {
30
0
  long value;
31
  
32
0
  if(!sptr) {
33
0
    ASN__CTFAIL(app_key, td, sptr,
34
0
      "%s: value not given (%s:%d)",
35
0
      td->name, __FILE__, __LINE__);
36
0
    return -1;
37
0
  }
38
  
39
0
  value = *(const long *)sptr;
40
  
41
0
  if((value >= 0L && value <= 255L)) {
42
    /* Constraint check succeeded */
43
0
    return 0;
44
0
  } else {
45
0
    ASN__CTFAIL(app_key, td, sptr,
46
0
      "%s: constraint failed (%s:%d)",
47
0
      td->name, __FILE__, __LINE__);
48
0
    return -1;
49
0
  }
50
0
}
51
52
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
53
static asn_per_constraints_t asn_PER_type_NGAP_a2X_Range_constr_4 CC_NOTUSED = {
54
  { APC_CONSTRAINED | APC_EXTENSIBLE,  4,  4,  0,  8 }  /* (0..8,...) */,
55
  { APC_UNCONSTRAINED,  -1, -1,  0,  0 },
56
  0, 0  /* No PER value map */
57
};
58
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
59
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
60
static asn_per_constraints_t asn_PER_memb_NGAP_a2X_PQI_constr_2 CC_NOTUSED = {
61
  { APC_CONSTRAINED | APC_EXTENSIBLE,  8,  8,  0,  255 }  /* (0..255,...) */,
62
  { APC_UNCONSTRAINED,  -1, -1,  0,  0 },
63
  0, 0  /* No PER value map */
64
};
65
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
66
static const asn_INTEGER_enum_map_t asn_MAP_NGAP_a2X_Range_value2enum_4[] = {
67
  { 0,  3,  "m50" },
68
  { 1,  3,  "m80" },
69
  { 2,  4,  "m180" },
70
  { 3,  4,  "m200" },
71
  { 4,  4,  "m350" },
72
  { 5,  4,  "m400" },
73
  { 6,  4,  "m500" },
74
  { 7,  4,  "m700" },
75
  { 8,  5,  "m1000" }
76
  /* This list is extensible */
77
};
78
static int asn_validate_NGAP_a2X_Range_4(const asn_TYPE_descriptor_t *td,
79
                       const void *sptr,
80
                       asn_app_constraint_failed_f *ctfailcb,
81
0
                       void* app_key) {
82
0
    if(! sptr) { return -1; }
83
0
    e_NGAP_A2X_PC5_QoS_Flow_Item__a2X_Range value = *(e_NGAP_A2X_PC5_QoS_Flow_Item__a2X_Range*)sptr;
84
0
    switch(value) {
85
0
    case NGAP_A2X_PC5_QoS_Flow_Item__a2X_Range_m50:
86
0
    case NGAP_A2X_PC5_QoS_Flow_Item__a2X_Range_m80:
87
0
    case NGAP_A2X_PC5_QoS_Flow_Item__a2X_Range_m180:
88
0
    case NGAP_A2X_PC5_QoS_Flow_Item__a2X_Range_m200:
89
0
    case NGAP_A2X_PC5_QoS_Flow_Item__a2X_Range_m350:
90
0
    case NGAP_A2X_PC5_QoS_Flow_Item__a2X_Range_m400:
91
0
    case NGAP_A2X_PC5_QoS_Flow_Item__a2X_Range_m500:
92
0
    case NGAP_A2X_PC5_QoS_Flow_Item__a2X_Range_m700:
93
0
    case NGAP_A2X_PC5_QoS_Flow_Item__a2X_Range_m1000:
94
0
        return 0;
95
0
    }
96
0
    return -1;
97
0
}
98
static const unsigned int asn_MAP_NGAP_a2X_Range_enum2value_4[] = {
99
  8,  /* m1000(8) */
100
  2,  /* m180(2) */
101
  3,  /* m200(3) */
102
  4,  /* m350(4) */
103
  5,  /* m400(5) */
104
  0,  /* m50(0) */
105
  6,  /* m500(6) */
106
  7,  /* m700(7) */
107
  1 /* m80(1) */
108
  /* This list is extensible */
109
};
110
static const asn_INTEGER_specifics_t asn_SPC_NGAP_a2X_Range_specs_4 = {
111
  asn_MAP_NGAP_a2X_Range_value2enum_4,  /* "tag" => N; sorted by tag */
112
  asn_MAP_NGAP_a2X_Range_enum2value_4,  /* N => "tag"; sorted by N */
113
  9,  /* Number of elements in the maps */
114
  10, /* Extensions before this member */
115
  1,  /* Strict enumeration */
116
  0,  /* Native long size */
117
  0
118
};
119
static const ber_tlv_tag_t asn_DEF_NGAP_a2X_Range_tags_4[] = {
120
  (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
121
  (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
122
};
123
static /* Use -fall-defs-global to expose */
124
asn_TYPE_descriptor_t asn_DEF_NGAP_a2X_Range_4 = {
125
  "a2X-Range",
126
  "a2X-Range",
127
  &asn_OP_NativeEnumerated,
128
  asn_DEF_NGAP_a2X_Range_tags_4,
129
  sizeof(asn_DEF_NGAP_a2X_Range_tags_4)
130
    /sizeof(asn_DEF_NGAP_a2X_Range_tags_4[0]) - 1, /* 1 */
131
  asn_DEF_NGAP_a2X_Range_tags_4,  /* Same as above */
132
  sizeof(asn_DEF_NGAP_a2X_Range_tags_4)
133
    /sizeof(asn_DEF_NGAP_a2X_Range_tags_4[0]), /* 2 */
134
  {
135
#if !defined(ASN_DISABLE_OER_SUPPORT)
136
    0,
137
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
138
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
139
    &asn_PER_type_NGAP_a2X_Range_constr_4,
140
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
141
#if !defined(ASN_DISABLE_JER_SUPPORT)
142
    0,
143
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
144
    asn_validate_NGAP_a2X_Range_4
145
  },
146
  0, 0, /* Defined elsewhere */
147
  &asn_SPC_NGAP_a2X_Range_specs_4 /* Additional specs */
148
};
149
150
asn_TYPE_member_t asn_MBR_NGAP_A2X_PC5_QoS_Flow_Item_1[] = {
151
  { ATF_NOFLAGS, 0, offsetof(struct NGAP_A2X_PC5_QoS_Flow_Item, a2X_PQI),
152
    (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
153
    -1, /* IMPLICIT tag at current level */
154
    &asn_DEF_NativeInteger,
155
    0,
156
    {
157
#if !defined(ASN_DISABLE_OER_SUPPORT)
158
      0,
159
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
160
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
161
      &asn_PER_memb_NGAP_a2X_PQI_constr_2,
162
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
163
#if !defined(ASN_DISABLE_JER_SUPPORT)
164
      0,
165
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
166
      memb_NGAP_a2X_PQI_constraint_1
167
    },
168
    0, 0, /* No default value */
169
    "a2X-PQI"
170
    },
171
  { ATF_POINTER, 3, offsetof(struct NGAP_A2X_PC5_QoS_Flow_Item, a2X_PC5_FlowBitRates),
172
    (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
173
    -1, /* IMPLICIT tag at current level */
174
    &asn_DEF_NGAP_A2X_PC5_FlowBitRates,
175
    0,
176
    {
177
#if !defined(ASN_DISABLE_OER_SUPPORT)
178
      0,
179
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
180
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
181
      0,
182
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
183
#if !defined(ASN_DISABLE_JER_SUPPORT)
184
      0,
185
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
186
      0
187
    },
188
    0, 0, /* No default value */
189
    "a2X-PC5-FlowBitRates"
190
    },
191
  { ATF_POINTER, 2, offsetof(struct NGAP_A2X_PC5_QoS_Flow_Item, a2X_Range),
192
    (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
193
    -1, /* IMPLICIT tag at current level */
194
    &asn_DEF_NGAP_a2X_Range_4,
195
    0,
196
    {
197
#if !defined(ASN_DISABLE_OER_SUPPORT)
198
      0,
199
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
200
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
201
      0,
202
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
203
#if !defined(ASN_DISABLE_JER_SUPPORT)
204
      0,
205
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
206
      0
207
    },
208
    0, 0, /* No default value */
209
    "a2X-Range"
210
    },
211
  { ATF_POINTER, 1, offsetof(struct NGAP_A2X_PC5_QoS_Flow_Item, iE_Extensions),
212
    (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
213
    -1, /* IMPLICIT tag at current level */
214
    &asn_DEF_NGAP_ProtocolExtensionContainer_14713P3,
215
    0,
216
    {
217
#if !defined(ASN_DISABLE_OER_SUPPORT)
218
      0,
219
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
220
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
221
      0,
222
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
223
#if !defined(ASN_DISABLE_JER_SUPPORT)
224
      0,
225
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
226
      0
227
    },
228
    0, 0, /* No default value */
229
    "iE-Extensions"
230
    },
231
};
232
static const int asn_MAP_NGAP_A2X_PC5_QoS_Flow_Item_oms_1[] = { 1, 2, 3 };
233
static const ber_tlv_tag_t asn_DEF_NGAP_A2X_PC5_QoS_Flow_Item_tags_1[] = {
234
  (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
235
};
236
static const asn_TYPE_tag2member_t asn_MAP_NGAP_A2X_PC5_QoS_Flow_Item_tag2el_1[] = {
237
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a2X-PQI */
238
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* a2X-PC5-FlowBitRates */
239
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* a2X-Range */
240
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
241
};
242
asn_SEQUENCE_specifics_t asn_SPC_NGAP_A2X_PC5_QoS_Flow_Item_specs_1 = {
243
  sizeof(struct NGAP_A2X_PC5_QoS_Flow_Item),
244
  offsetof(struct NGAP_A2X_PC5_QoS_Flow_Item, _asn_ctx),
245
  asn_MAP_NGAP_A2X_PC5_QoS_Flow_Item_tag2el_1,
246
  4,  /* Count of tags in the map */
247
  asn_MAP_NGAP_A2X_PC5_QoS_Flow_Item_oms_1, /* Optional members */
248
  3, 0, /* Root/Additions */
249
  4,  /* First extension addition */
250
};
251
asn_TYPE_descriptor_t asn_DEF_NGAP_A2X_PC5_QoS_Flow_Item = {
252
  "A2X-PC5-QoS-Flow-Item",
253
  "A2X-PC5-QoS-Flow-Item",
254
  &asn_OP_SEQUENCE,
255
  asn_DEF_NGAP_A2X_PC5_QoS_Flow_Item_tags_1,
256
  sizeof(asn_DEF_NGAP_A2X_PC5_QoS_Flow_Item_tags_1)
257
    /sizeof(asn_DEF_NGAP_A2X_PC5_QoS_Flow_Item_tags_1[0]), /* 1 */
258
  asn_DEF_NGAP_A2X_PC5_QoS_Flow_Item_tags_1,  /* Same as above */
259
  sizeof(asn_DEF_NGAP_A2X_PC5_QoS_Flow_Item_tags_1)
260
    /sizeof(asn_DEF_NGAP_A2X_PC5_QoS_Flow_Item_tags_1[0]), /* 1 */
261
  {
262
#if !defined(ASN_DISABLE_OER_SUPPORT)
263
    0,
264
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
265
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
266
    0,
267
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
268
#if !defined(ASN_DISABLE_JER_SUPPORT)
269
    0,
270
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
271
    SEQUENCE_constraint
272
  },
273
  asn_MBR_NGAP_A2X_PC5_QoS_Flow_Item_1,
274
  4,  /* Elements count */
275
  &asn_SPC_NGAP_A2X_PC5_QoS_Flow_Item_specs_1 /* Additional specs */
276
};
277