Coverage Report

Created: 2026-06-30 06:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/open5gs/lib/asn1c/ngap/NGAP_TimeSyncAssistanceInfo.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_TimeSyncAssistanceInfo.h"
9
10
#include "NGAP_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_NGAP_timeDistributionIndication __attribute__((weak, alias("asn_DEF_NGAP_timeDistributionIndication_2")));
14
#else
15
static asn_TYPE_descriptor_t asn_DEF_NGAP_timeDistributionIndication_2;
16
static asn_TYPE_descriptor_t asn_DEF_NGAP_timeDistributionIndication;
17
__attribute__((constructor)) static void asn_DEF_NGAP_timeDistributionIndication_2_alias_init(void) {
18
  asn_DEF_NGAP_timeDistributionIndication = asn_DEF_NGAP_timeDistributionIndication_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_NGAP_uUTimeSyncErrorBudget_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 >= 1L && value <= 1000000L)) {
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_NGAP_timeDistributionIndication_constr_2 CC_NOTUSED = {
53
  { APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }  /* (0..1,...) */,
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_NGAP_uUTimeSyncErrorBudget_constr_6 CC_NOTUSED = {
60
  { APC_CONSTRAINED | APC_EXTENSIBLE,  20, -1,  1,  1000000 } /* (1..1000000,...) */,
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_NGAP_timeDistributionIndication_value2enum_2[] = {
66
  { 0,  7,  "enabled" },
67
  { 1,  8,  "disabled" }
68
  /* This list is extensible */
69
};
70
static int asn_validate_NGAP_timeDistributionIndication_2(const asn_TYPE_descriptor_t *td,
71
                       const void *sptr,
72
                       asn_app_constraint_failed_f *ctfailcb,
73
0
                       void* app_key) {
74
0
    if(! sptr) { return -1; }
75
0
    e_NGAP_TimeSyncAssistanceInfo__timeDistributionIndication value = *(e_NGAP_TimeSyncAssistanceInfo__timeDistributionIndication*)sptr;
76
0
    switch(value) {
77
0
    case NGAP_TimeSyncAssistanceInfo__timeDistributionIndication_enabled:
78
0
    case NGAP_TimeSyncAssistanceInfo__timeDistributionIndication_disabled:
79
0
        return 0;
80
0
    }
81
0
    return -1;
82
0
}
83
static const unsigned int asn_MAP_NGAP_timeDistributionIndication_enum2value_2[] = {
84
  1,  /* disabled(1) */
85
  0 /* enabled(0) */
86
  /* This list is extensible */
87
};
88
static const asn_INTEGER_specifics_t asn_SPC_NGAP_timeDistributionIndication_specs_2 = {
89
  asn_MAP_NGAP_timeDistributionIndication_value2enum_2, /* "tag" => N; sorted by tag */
90
  asn_MAP_NGAP_timeDistributionIndication_enum2value_2, /* N => "tag"; sorted by N */
91
  2,  /* Number of elements in the maps */
92
  3,  /* Extensions before this member */
93
  1,  /* Strict enumeration */
94
  0,  /* Native long size */
95
  0
96
};
97
static const ber_tlv_tag_t asn_DEF_NGAP_timeDistributionIndication_tags_2[] = {
98
  (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
99
  (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
100
};
101
static /* Use -fall-defs-global to expose */
102
asn_TYPE_descriptor_t asn_DEF_NGAP_timeDistributionIndication_2 = {
103
  "timeDistributionIndication",
104
  "timeDistributionIndication",
105
  &asn_OP_NativeEnumerated,
106
  asn_DEF_NGAP_timeDistributionIndication_tags_2,
107
  sizeof(asn_DEF_NGAP_timeDistributionIndication_tags_2)
108
    /sizeof(asn_DEF_NGAP_timeDistributionIndication_tags_2[0]) - 1, /* 1 */
109
  asn_DEF_NGAP_timeDistributionIndication_tags_2, /* Same as above */
110
  sizeof(asn_DEF_NGAP_timeDistributionIndication_tags_2)
111
    /sizeof(asn_DEF_NGAP_timeDistributionIndication_tags_2[0]), /* 2 */
112
  {
113
#if !defined(ASN_DISABLE_OER_SUPPORT)
114
    0,
115
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
116
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
117
    &asn_PER_type_NGAP_timeDistributionIndication_constr_2,
118
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
119
#if !defined(ASN_DISABLE_JER_SUPPORT)
120
    0,
121
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
122
    asn_validate_NGAP_timeDistributionIndication_2
123
  },
124
  0, 0, /* Defined elsewhere */
125
  &asn_SPC_NGAP_timeDistributionIndication_specs_2  /* Additional specs */
126
};
127
128
asn_TYPE_member_t asn_MBR_NGAP_TimeSyncAssistanceInfo_1[] = {
129
  { ATF_NOFLAGS, 0, offsetof(struct NGAP_TimeSyncAssistanceInfo, timeDistributionIndication),
130
    (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
131
    -1, /* IMPLICIT tag at current level */
132
    &asn_DEF_NGAP_timeDistributionIndication_2,
133
    0,
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
      0,
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
      0
145
    },
146
    0, 0, /* No default value */
147
    "timeDistributionIndication"
148
    },
149
  { ATF_POINTER, 2, offsetof(struct NGAP_TimeSyncAssistanceInfo, uUTimeSyncErrorBudget),
150
    (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
151
    -1, /* IMPLICIT tag at current level */
152
    &asn_DEF_NativeInteger,
153
    0,
154
    {
155
#if !defined(ASN_DISABLE_OER_SUPPORT)
156
      0,
157
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
158
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
159
      &asn_PER_memb_NGAP_uUTimeSyncErrorBudget_constr_6,
160
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
161
#if !defined(ASN_DISABLE_JER_SUPPORT)
162
      0,
163
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
164
      memb_NGAP_uUTimeSyncErrorBudget_constraint_1
165
    },
166
    0, 0, /* No default value */
167
    "uUTimeSyncErrorBudget"
168
    },
169
  { ATF_POINTER, 1, offsetof(struct NGAP_TimeSyncAssistanceInfo, iE_Extensions),
170
    (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
171
    -1, /* IMPLICIT tag at current level */
172
    &asn_DEF_NGAP_ProtocolExtensionContainer_14713P424,
173
    0,
174
    {
175
#if !defined(ASN_DISABLE_OER_SUPPORT)
176
      0,
177
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
178
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
179
      0,
180
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
181
#if !defined(ASN_DISABLE_JER_SUPPORT)
182
      0,
183
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
184
      0
185
    },
186
    0, 0, /* No default value */
187
    "iE-Extensions"
188
    },
189
};
190
static const int asn_MAP_NGAP_TimeSyncAssistanceInfo_oms_1[] = { 1, 2 };
191
static const ber_tlv_tag_t asn_DEF_NGAP_TimeSyncAssistanceInfo_tags_1[] = {
192
  (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
193
};
194
static const asn_TYPE_tag2member_t asn_MAP_NGAP_TimeSyncAssistanceInfo_tag2el_1[] = {
195
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* timeDistributionIndication */
196
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* uUTimeSyncErrorBudget */
197
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
198
};
199
asn_SEQUENCE_specifics_t asn_SPC_NGAP_TimeSyncAssistanceInfo_specs_1 = {
200
  sizeof(struct NGAP_TimeSyncAssistanceInfo),
201
  offsetof(struct NGAP_TimeSyncAssistanceInfo, _asn_ctx),
202
  asn_MAP_NGAP_TimeSyncAssistanceInfo_tag2el_1,
203
  3,  /* Count of tags in the map */
204
  asn_MAP_NGAP_TimeSyncAssistanceInfo_oms_1,  /* Optional members */
205
  2, 0, /* Root/Additions */
206
  3,  /* First extension addition */
207
};
208
asn_TYPE_descriptor_t asn_DEF_NGAP_TimeSyncAssistanceInfo = {
209
  "TimeSyncAssistanceInfo",
210
  "TimeSyncAssistanceInfo",
211
  &asn_OP_SEQUENCE,
212
  asn_DEF_NGAP_TimeSyncAssistanceInfo_tags_1,
213
  sizeof(asn_DEF_NGAP_TimeSyncAssistanceInfo_tags_1)
214
    /sizeof(asn_DEF_NGAP_TimeSyncAssistanceInfo_tags_1[0]), /* 1 */
215
  asn_DEF_NGAP_TimeSyncAssistanceInfo_tags_1, /* Same as above */
216
  sizeof(asn_DEF_NGAP_TimeSyncAssistanceInfo_tags_1)
217
    /sizeof(asn_DEF_NGAP_TimeSyncAssistanceInfo_tags_1[0]), /* 1 */
218
  {
219
#if !defined(ASN_DISABLE_OER_SUPPORT)
220
    0,
221
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
222
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
223
    0,
224
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
225
#if !defined(ASN_DISABLE_JER_SUPPORT)
226
    0,
227
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
228
    SEQUENCE_constraint
229
  },
230
  asn_MBR_NGAP_TimeSyncAssistanceInfo_1,
231
  3,  /* Elements count */
232
  &asn_SPC_NGAP_TimeSyncAssistanceInfo_specs_1  /* Additional specs */
233
};
234