Coverage Report

Created: 2026-08-14 06:04

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/open5gs/lib/asn1c/s1ap/S1AP_MutingPatternInformation.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 "S1AP-IEs"
4
 *  found in "../support/s1ap-r19.1.0/36413-j10.asn"
5
 *  `asn1c -pdu=all -fprefix=S1AP_ -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 "S1AP_MutingPatternInformation.h"
9
10
#include "S1AP_ProtocolExtensionContainer.h"
11
#ifndef ASN1C_NO_UNSUFFIXED_PDU_ALIAS
12
#if defined(__ELF__) && (defined(__GNUC__) || defined(__clang__))
13
extern asn_TYPE_descriptor_t asn_DEF_S1AP_muting_pattern_period __attribute__((weak, alias("asn_DEF_S1AP_muting_pattern_period_2")));
14
#else
15
static asn_TYPE_descriptor_t asn_DEF_S1AP_muting_pattern_period_2;
16
static asn_TYPE_descriptor_t asn_DEF_S1AP_muting_pattern_period;
17
__attribute__((constructor)) static void asn_DEF_S1AP_muting_pattern_period_2_alias_init(void) {
18
  asn_DEF_S1AP_muting_pattern_period = asn_DEF_S1AP_muting_pattern_period_2;
19
}
20
#endif
21
#endif /* ASN1C_NO_UNSUFFIXED_PDU_ALIAS */
22
/*
23
 * This type is implemented using NativeEnumerated,
24
 * so here we adjust the DEF accordingly.
25
 */
26
static int
27
memb_S1AP_muting_pattern_offset_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
28
0
      asn_app_constraint_failed_f *ctfailcb, void *app_key) {
29
0
  long value;
30
  
31
0
  if(!sptr) {
32
0
    ASN__CTFAIL(app_key, td, sptr,
33
0
      "%s: value not given (%s:%d)",
34
0
      td->name, __FILE__, __LINE__);
35
0
    return -1;
36
0
  }
37
  
38
0
  value = *(const long *)sptr;
39
  
40
0
  if((value >= 0L && value <= 10239L)) {
41
    /* Constraint check succeeded */
42
0
    return 0;
43
0
  } else {
44
0
    ASN__CTFAIL(app_key, td, sptr,
45
0
      "%s: constraint failed (%s:%d)",
46
0
      td->name, __FILE__, __LINE__);
47
0
    return -1;
48
0
  }
49
0
}
50
51
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
52
static asn_per_constraints_t asn_PER_type_S1AP_muting_pattern_period_constr_2 CC_NOTUSED = {
53
  { APC_CONSTRAINED | APC_EXTENSIBLE,  3,  3,  0,  4 }  /* (0..4,...) */,
54
  { APC_UNCONSTRAINED,  -1, -1,  0,  0 },
55
  0, 0  /* No PER value map */
56
};
57
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
58
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
59
static asn_per_constraints_t asn_PER_memb_S1AP_muting_pattern_offset_constr_9 CC_NOTUSED = {
60
  { APC_CONSTRAINED | APC_EXTENSIBLE,  14,  14,  0,  10239 }  /* (0..10239,...) */,
61
  { APC_UNCONSTRAINED,  -1, -1,  0,  0 },
62
  0, 0  /* No PER value map */
63
};
64
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
65
static const asn_INTEGER_enum_map_t asn_MAP_S1AP_muting_pattern_period_value2enum_2[] = {
66
  { 0,  3,  "ms0" },
67
  { 1,  6,  "ms1280" },
68
  { 2,  6,  "ms2560" },
69
  { 3,  6,  "ms5120" },
70
  { 4,  7,  "ms10240" }
71
  /* This list is extensible */
72
};
73
static int asn_validate_S1AP_muting_pattern_period_2(const asn_TYPE_descriptor_t *td,
74
                       const void *sptr,
75
                       asn_app_constraint_failed_f *ctfailcb,
76
0
                       void* app_key) {
77
0
    if(! sptr) { return -1; }
78
0
    e_S1AP_MutingPatternInformation__muting_pattern_period value = *(e_S1AP_MutingPatternInformation__muting_pattern_period*)sptr;
79
0
    switch(value) {
80
0
    case S1AP_MutingPatternInformation__muting_pattern_period_ms0:
81
0
    case S1AP_MutingPatternInformation__muting_pattern_period_ms1280:
82
0
    case S1AP_MutingPatternInformation__muting_pattern_period_ms2560:
83
0
    case S1AP_MutingPatternInformation__muting_pattern_period_ms5120:
84
0
    case S1AP_MutingPatternInformation__muting_pattern_period_ms10240:
85
0
        return 0;
86
0
    }
87
0
    return -1;
88
0
}
89
static const unsigned int asn_MAP_S1AP_muting_pattern_period_enum2value_2[] = {
90
  0,  /* ms0(0) */
91
  4,  /* ms10240(4) */
92
  1,  /* ms1280(1) */
93
  2,  /* ms2560(2) */
94
  3 /* ms5120(3) */
95
  /* This list is extensible */
96
};
97
static const asn_INTEGER_specifics_t asn_SPC_S1AP_muting_pattern_period_specs_2 = {
98
  asn_MAP_S1AP_muting_pattern_period_value2enum_2,  /* "tag" => N; sorted by tag */
99
  asn_MAP_S1AP_muting_pattern_period_enum2value_2,  /* N => "tag"; sorted by N */
100
  5,  /* Number of elements in the maps */
101
  6,  /* Extensions before this member */
102
  1,  /* Strict enumeration */
103
  0,  /* Native long size */
104
  0
105
};
106
static const ber_tlv_tag_t asn_DEF_S1AP_muting_pattern_period_tags_2[] = {
107
  (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
108
  (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
109
};
110
static /* Use -fall-defs-global to expose */
111
asn_TYPE_descriptor_t asn_DEF_S1AP_muting_pattern_period_2 = {
112
  "muting-pattern-period",
113
  "muting-pattern-period",
114
  &asn_OP_NativeEnumerated,
115
  asn_DEF_S1AP_muting_pattern_period_tags_2,
116
  sizeof(asn_DEF_S1AP_muting_pattern_period_tags_2)
117
    /sizeof(asn_DEF_S1AP_muting_pattern_period_tags_2[0]) - 1, /* 1 */
118
  asn_DEF_S1AP_muting_pattern_period_tags_2,  /* Same as above */
119
  sizeof(asn_DEF_S1AP_muting_pattern_period_tags_2)
120
    /sizeof(asn_DEF_S1AP_muting_pattern_period_tags_2[0]), /* 2 */
121
  {
122
#if !defined(ASN_DISABLE_OER_SUPPORT)
123
    0,
124
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
125
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
126
    &asn_PER_type_S1AP_muting_pattern_period_constr_2,
127
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
128
#if !defined(ASN_DISABLE_JER_SUPPORT)
129
    0,
130
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
131
    asn_validate_S1AP_muting_pattern_period_2
132
  },
133
  0, 0, /* Defined elsewhere */
134
  &asn_SPC_S1AP_muting_pattern_period_specs_2 /* Additional specs */
135
};
136
137
asn_TYPE_member_t asn_MBR_S1AP_MutingPatternInformation_1[] = {
138
  { ATF_NOFLAGS, 0, offsetof(struct S1AP_MutingPatternInformation, muting_pattern_period),
139
    (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
140
    -1, /* IMPLICIT tag at current level */
141
    &asn_DEF_S1AP_muting_pattern_period_2,
142
    0,
143
    {
144
#if !defined(ASN_DISABLE_OER_SUPPORT)
145
      0,
146
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
147
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
148
      0,
149
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
150
#if !defined(ASN_DISABLE_JER_SUPPORT)
151
      0,
152
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
153
      0
154
    },
155
    0, 0, /* No default value */
156
    "muting-pattern-period"
157
    },
158
  { ATF_POINTER, 2, offsetof(struct S1AP_MutingPatternInformation, muting_pattern_offset),
159
    (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
160
    -1, /* IMPLICIT tag at current level */
161
    &asn_DEF_NativeInteger,
162
    0,
163
    {
164
#if !defined(ASN_DISABLE_OER_SUPPORT)
165
      0,
166
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
167
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
168
      &asn_PER_memb_S1AP_muting_pattern_offset_constr_9,
169
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
170
#if !defined(ASN_DISABLE_JER_SUPPORT)
171
      0,
172
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
173
      memb_S1AP_muting_pattern_offset_constraint_1
174
    },
175
    0, 0, /* No default value */
176
    "muting-pattern-offset"
177
    },
178
  { ATF_POINTER, 1, offsetof(struct S1AP_MutingPatternInformation, iE_Extensions),
179
    (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
180
    -1, /* IMPLICIT tag at current level */
181
    &asn_DEF_S1AP_ProtocolExtensionContainer_8386P101,
182
    0,
183
    {
184
#if !defined(ASN_DISABLE_OER_SUPPORT)
185
      0,
186
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
187
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
188
      0,
189
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
190
#if !defined(ASN_DISABLE_JER_SUPPORT)
191
      0,
192
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
193
      0
194
    },
195
    0, 0, /* No default value */
196
    "iE-Extensions"
197
    },
198
};
199
static const int asn_MAP_S1AP_MutingPatternInformation_oms_1[] = { 1, 2 };
200
static const ber_tlv_tag_t asn_DEF_S1AP_MutingPatternInformation_tags_1[] = {
201
  (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
202
};
203
static const asn_TYPE_tag2member_t asn_MAP_S1AP_MutingPatternInformation_tag2el_1[] = {
204
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* muting-pattern-period */
205
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* muting-pattern-offset */
206
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
207
};
208
asn_SEQUENCE_specifics_t asn_SPC_S1AP_MutingPatternInformation_specs_1 = {
209
  sizeof(struct S1AP_MutingPatternInformation),
210
  offsetof(struct S1AP_MutingPatternInformation, _asn_ctx),
211
  asn_MAP_S1AP_MutingPatternInformation_tag2el_1,
212
  3,  /* Count of tags in the map */
213
  asn_MAP_S1AP_MutingPatternInformation_oms_1,  /* Optional members */
214
  2, 0, /* Root/Additions */
215
  3,  /* First extension addition */
216
};
217
asn_TYPE_descriptor_t asn_DEF_S1AP_MutingPatternInformation = {
218
  "MutingPatternInformation",
219
  "MutingPatternInformation",
220
  &asn_OP_SEQUENCE,
221
  asn_DEF_S1AP_MutingPatternInformation_tags_1,
222
  sizeof(asn_DEF_S1AP_MutingPatternInformation_tags_1)
223
    /sizeof(asn_DEF_S1AP_MutingPatternInformation_tags_1[0]), /* 1 */
224
  asn_DEF_S1AP_MutingPatternInformation_tags_1, /* Same as above */
225
  sizeof(asn_DEF_S1AP_MutingPatternInformation_tags_1)
226
    /sizeof(asn_DEF_S1AP_MutingPatternInformation_tags_1[0]), /* 1 */
227
  {
228
#if !defined(ASN_DISABLE_OER_SUPPORT)
229
    0,
230
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
231
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
232
    0,
233
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
234
#if !defined(ASN_DISABLE_JER_SUPPORT)
235
    0,
236
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
237
    SEQUENCE_constraint
238
  },
239
  asn_MBR_S1AP_MutingPatternInformation_1,
240
  3,  /* Elements count */
241
  &asn_SPC_S1AP_MutingPatternInformation_specs_1  /* Additional specs */
242
};
243