Coverage Report

Created: 2026-07-14 06:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/open5gs/lib/asn1c/ngap/NGAP_NgENB-ID.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_NgENB-ID.h"
9
10
#include "NGAP_ProtocolIE-SingleContainer.h"
11
static int
12
memb_NGAP_macroNgENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
13
0
      asn_app_constraint_failed_f *ctfailcb, void *app_key) {
14
0
  const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
15
0
  size_t size;
16
  
17
0
  if(!sptr) {
18
0
    ASN__CTFAIL(app_key, td, sptr,
19
0
      "%s: value not given (%s:%d)",
20
0
      td->name, __FILE__, __LINE__);
21
0
    return -1;
22
0
  }
23
  
24
0
  if(st->size > 0) {
25
    /* Size in bits */
26
0
    size = 8 * st->size - (st->bits_unused & 0x07);
27
0
  } else {
28
0
    size = 0;
29
0
  }
30
  
31
0
  if((size == 20UL)) {
32
    /* Constraint check succeeded */
33
0
    return 0;
34
0
  } else {
35
0
    ASN__CTFAIL(app_key, td, sptr,
36
0
      "%s: constraint failed (%s:%d)",
37
0
      td->name, __FILE__, __LINE__);
38
0
    return -1;
39
0
  }
40
0
}
41
42
static int
43
memb_NGAP_shortMacroNgENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
44
0
      asn_app_constraint_failed_f *ctfailcb, void *app_key) {
45
0
  const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
46
0
  size_t size;
47
  
48
0
  if(!sptr) {
49
0
    ASN__CTFAIL(app_key, td, sptr,
50
0
      "%s: value not given (%s:%d)",
51
0
      td->name, __FILE__, __LINE__);
52
0
    return -1;
53
0
  }
54
  
55
0
  if(st->size > 0) {
56
    /* Size in bits */
57
0
    size = 8 * st->size - (st->bits_unused & 0x07);
58
0
  } else {
59
0
    size = 0;
60
0
  }
61
  
62
0
  if((size == 18UL)) {
63
    /* Constraint check succeeded */
64
0
    return 0;
65
0
  } else {
66
0
    ASN__CTFAIL(app_key, td, sptr,
67
0
      "%s: constraint failed (%s:%d)",
68
0
      td->name, __FILE__, __LINE__);
69
0
    return -1;
70
0
  }
71
0
}
72
73
static int
74
memb_NGAP_longMacroNgENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
75
0
      asn_app_constraint_failed_f *ctfailcb, void *app_key) {
76
0
  const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
77
0
  size_t size;
78
  
79
0
  if(!sptr) {
80
0
    ASN__CTFAIL(app_key, td, sptr,
81
0
      "%s: value not given (%s:%d)",
82
0
      td->name, __FILE__, __LINE__);
83
0
    return -1;
84
0
  }
85
  
86
0
  if(st->size > 0) {
87
    /* Size in bits */
88
0
    size = 8 * st->size - (st->bits_unused & 0x07);
89
0
  } else {
90
0
    size = 0;
91
0
  }
92
  
93
0
  if((size == 21UL)) {
94
    /* Constraint check succeeded */
95
0
    return 0;
96
0
  } else {
97
0
    ASN__CTFAIL(app_key, td, sptr,
98
0
      "%s: constraint failed (%s:%d)",
99
0
      td->name, __FILE__, __LINE__);
100
0
    return -1;
101
0
  }
102
0
}
103
104
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
105
static asn_per_constraints_t asn_PER_memb_NGAP_macroNgENB_ID_constr_2 CC_NOTUSED = {
106
  { APC_UNCONSTRAINED,  -1, -1,  0,  0 },
107
  { APC_CONSTRAINED,   0,  0,  20,  20 }  /* (SIZE(20..20)) */,
108
  0, 0  /* No PER value map */
109
};
110
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
111
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
112
static asn_per_constraints_t asn_PER_memb_NGAP_shortMacroNgENB_ID_constr_3 CC_NOTUSED = {
113
  { APC_UNCONSTRAINED,  -1, -1,  0,  0 },
114
  { APC_CONSTRAINED,   0,  0,  18,  18 }  /* (SIZE(18..18)) */,
115
  0, 0  /* No PER value map */
116
};
117
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
118
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
119
static asn_per_constraints_t asn_PER_memb_NGAP_longMacroNgENB_ID_constr_4 CC_NOTUSED = {
120
  { APC_UNCONSTRAINED,  -1, -1,  0,  0 },
121
  { APC_CONSTRAINED,   0,  0,  21,  21 }  /* (SIZE(21..21)) */,
122
  0, 0  /* No PER value map */
123
};
124
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
125
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
126
asn_per_constraints_t asn_PER_type_NGAP_NgENB_ID_constr_1 CC_NOTUSED = {
127
  { APC_CONSTRAINED,   2,  2,  0,  3 }  /* (0..3) */,
128
  { APC_UNCONSTRAINED,  -1, -1,  0,  0 },
129
  0, 0  /* No PER value map */
130
};
131
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
132
asn_TYPE_member_t asn_MBR_NGAP_NgENB_ID_1[] = {
133
  { ATF_NOFLAGS, 0, offsetof(struct NGAP_NgENB_ID, choice.macroNgENB_ID),
134
    (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
135
    -1, /* IMPLICIT tag at current level */
136
    &asn_DEF_BIT_STRING,
137
    0,
138
    {
139
#if !defined(ASN_DISABLE_OER_SUPPORT)
140
      0,
141
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
142
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
143
      &asn_PER_memb_NGAP_macroNgENB_ID_constr_2,
144
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
145
#if !defined(ASN_DISABLE_JER_SUPPORT)
146
      0,
147
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
148
      memb_NGAP_macroNgENB_ID_constraint_1
149
    },
150
    0, 0, /* No default value */
151
    "macroNgENB-ID"
152
    },
153
  { ATF_NOFLAGS, 0, offsetof(struct NGAP_NgENB_ID, choice.shortMacroNgENB_ID),
154
    (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
155
    -1, /* IMPLICIT tag at current level */
156
    &asn_DEF_BIT_STRING,
157
    0,
158
    {
159
#if !defined(ASN_DISABLE_OER_SUPPORT)
160
      0,
161
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
162
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
163
      &asn_PER_memb_NGAP_shortMacroNgENB_ID_constr_3,
164
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
165
#if !defined(ASN_DISABLE_JER_SUPPORT)
166
      0,
167
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
168
      memb_NGAP_shortMacroNgENB_ID_constraint_1
169
    },
170
    0, 0, /* No default value */
171
    "shortMacroNgENB-ID"
172
    },
173
  { ATF_NOFLAGS, 0, offsetof(struct NGAP_NgENB_ID, choice.longMacroNgENB_ID),
174
    (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
175
    -1, /* IMPLICIT tag at current level */
176
    &asn_DEF_BIT_STRING,
177
    0,
178
    {
179
#if !defined(ASN_DISABLE_OER_SUPPORT)
180
      0,
181
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
182
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
183
      &asn_PER_memb_NGAP_longMacroNgENB_ID_constr_4,
184
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
185
#if !defined(ASN_DISABLE_JER_SUPPORT)
186
      0,
187
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
188
      memb_NGAP_longMacroNgENB_ID_constraint_1
189
    },
190
    0, 0, /* No default value */
191
    "longMacroNgENB-ID"
192
    },
193
  { ATF_POINTER, 0, offsetof(struct NGAP_NgENB_ID, choice.choice_Extensions),
194
    (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
195
    -1, /* IMPLICIT tag at current level */
196
    &asn_DEF_NGAP_ProtocolIE_SingleContainer_14665P46,
197
    0,
198
    {
199
#if !defined(ASN_DISABLE_OER_SUPPORT)
200
      0,
201
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
202
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
203
      0,
204
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
205
#if !defined(ASN_DISABLE_JER_SUPPORT)
206
      0,
207
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
208
      0
209
    },
210
    0, 0, /* No default value */
211
    "choice-Extensions"
212
    },
213
};
214
static const asn_TYPE_tag2member_t asn_MAP_NGAP_NgENB_ID_tag2el_1[] = {
215
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* macroNgENB-ID */
216
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* shortMacroNgENB-ID */
217
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* longMacroNgENB-ID */
218
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* choice-Extensions */
219
};
220
asn_CHOICE_specifics_t asn_SPC_NGAP_NgENB_ID_specs_1 = {
221
  sizeof(struct NGAP_NgENB_ID),
222
  offsetof(struct NGAP_NgENB_ID, _asn_ctx),
223
  offsetof(struct NGAP_NgENB_ID, present),
224
  sizeof(((struct NGAP_NgENB_ID *)0)->present),
225
  asn_MAP_NGAP_NgENB_ID_tag2el_1,
226
  4,  /* Count of tags in the map */
227
  0, 0,
228
  -1  /* Extensions start */
229
};
230
asn_TYPE_descriptor_t asn_DEF_NGAP_NgENB_ID = {
231
  "NgENB-ID",
232
  "NgENB-ID",
233
  &asn_OP_CHOICE,
234
  0,  /* No effective tags (pointer) */
235
  0,  /* No effective tags (count) */
236
  0,  /* No tags (pointer) */
237
  0,  /* No tags (count) */
238
  {
239
#if !defined(ASN_DISABLE_OER_SUPPORT)
240
    0,
241
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
242
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
243
    &asn_PER_type_NGAP_NgENB_ID_constr_1,
244
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
245
#if !defined(ASN_DISABLE_JER_SUPPORT)
246
    0,
247
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
248
    CHOICE_constraint
249
  },
250
  asn_MBR_NGAP_NgENB_ID_1,
251
  4,  /* Elements count */
252
  &asn_SPC_NGAP_NgENB_ID_specs_1  /* Additional specs */
253
};
254