/src/open5gs/lib/asn1c/ngap/NGAP_ClockAccuracy.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_ClockAccuracy.h" |
9 | | |
10 | | #include "NGAP_ProtocolIE-SingleContainer.h" |
11 | | static int |
12 | | memb_NGAP_clockAccuracyValue_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
13 | 0 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
14 | 0 | long value; |
15 | | |
16 | 0 | if(!sptr) { |
17 | 0 | ASN__CTFAIL(app_key, td, sptr, |
18 | 0 | "%s: value not given (%s:%d)", |
19 | 0 | td->name, __FILE__, __LINE__); |
20 | 0 | return -1; |
21 | 0 | } |
22 | | |
23 | 0 | value = *(const long *)sptr; |
24 | | |
25 | 0 | if((value >= 1L && value <= 40000000L)) { |
26 | | /* Constraint check succeeded */ |
27 | 0 | return 0; |
28 | 0 | } else { |
29 | 0 | ASN__CTFAIL(app_key, td, sptr, |
30 | 0 | "%s: constraint failed (%s:%d)", |
31 | 0 | td->name, __FILE__, __LINE__); |
32 | 0 | return -1; |
33 | 0 | } |
34 | 0 | } |
35 | | |
36 | | static int |
37 | | memb_NGAP_clockAccuracyIndex_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
38 | 0 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
39 | 0 | long value; |
40 | | |
41 | 0 | if(!sptr) { |
42 | 0 | ASN__CTFAIL(app_key, td, sptr, |
43 | 0 | "%s: value not given (%s:%d)", |
44 | 0 | td->name, __FILE__, __LINE__); |
45 | 0 | return -1; |
46 | 0 | } |
47 | | |
48 | 0 | value = *(const long *)sptr; |
49 | | |
50 | 0 | if((value >= 32L && value <= 47L)) { |
51 | | /* Constraint check succeeded */ |
52 | 0 | return 0; |
53 | 0 | } else { |
54 | 0 | ASN__CTFAIL(app_key, td, sptr, |
55 | 0 | "%s: constraint failed (%s:%d)", |
56 | 0 | td->name, __FILE__, __LINE__); |
57 | 0 | return -1; |
58 | 0 | } |
59 | 0 | } |
60 | | |
61 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
62 | | static asn_per_constraints_t asn_PER_memb_NGAP_clockAccuracyValue_constr_2 CC_NOTUSED = { |
63 | | { APC_CONSTRAINED | APC_EXTENSIBLE, 26, -1, 1, 40000000 } /* (1..40000000,...) */, |
64 | | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
65 | | 0, 0 /* No PER value map */ |
66 | | }; |
67 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
68 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
69 | | static asn_per_constraints_t asn_PER_memb_NGAP_clockAccuracyIndex_constr_3 CC_NOTUSED = { |
70 | | { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 32, 47 } /* (32..47,...) */, |
71 | | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
72 | | 0, 0 /* No PER value map */ |
73 | | }; |
74 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
75 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
76 | | asn_per_constraints_t asn_PER_type_NGAP_ClockAccuracy_constr_1 CC_NOTUSED = { |
77 | | { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, |
78 | | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
79 | | 0, 0 /* No PER value map */ |
80 | | }; |
81 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
82 | | asn_TYPE_member_t asn_MBR_NGAP_ClockAccuracy_1[] = { |
83 | | { ATF_NOFLAGS, 0, offsetof(struct NGAP_ClockAccuracy, choice.clockAccuracyValue), |
84 | | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
85 | | -1, /* IMPLICIT tag at current level */ |
86 | | &asn_DEF_NativeInteger, |
87 | | 0, |
88 | | { |
89 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
90 | | 0, |
91 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
92 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
93 | | &asn_PER_memb_NGAP_clockAccuracyValue_constr_2, |
94 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
95 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
96 | | 0, |
97 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
98 | | memb_NGAP_clockAccuracyValue_constraint_1 |
99 | | }, |
100 | | 0, 0, /* No default value */ |
101 | | "clockAccuracyValue" |
102 | | }, |
103 | | { ATF_NOFLAGS, 0, offsetof(struct NGAP_ClockAccuracy, choice.clockAccuracyIndex), |
104 | | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
105 | | -1, /* IMPLICIT tag at current level */ |
106 | | &asn_DEF_NativeInteger, |
107 | | 0, |
108 | | { |
109 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
110 | | 0, |
111 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
112 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
113 | | &asn_PER_memb_NGAP_clockAccuracyIndex_constr_3, |
114 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
115 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
116 | | 0, |
117 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
118 | | memb_NGAP_clockAccuracyIndex_constraint_1 |
119 | | }, |
120 | | 0, 0, /* No default value */ |
121 | | "clockAccuracyIndex" |
122 | | }, |
123 | | { ATF_POINTER, 0, offsetof(struct NGAP_ClockAccuracy, choice.choice_Extensions), |
124 | | (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
125 | | -1, /* IMPLICIT tag at current level */ |
126 | | &asn_DEF_NGAP_ProtocolIE_SingleContainer_14665P11, |
127 | | 0, |
128 | | { |
129 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
130 | | 0, |
131 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
132 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
133 | | 0, |
134 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
135 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
136 | | 0, |
137 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
138 | | 0 |
139 | | }, |
140 | | 0, 0, /* No default value */ |
141 | | "choice-Extensions" |
142 | | }, |
143 | | }; |
144 | | static const asn_TYPE_tag2member_t asn_MAP_NGAP_ClockAccuracy_tag2el_1[] = { |
145 | | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* clockAccuracyValue */ |
146 | | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* clockAccuracyIndex */ |
147 | | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* choice-Extensions */ |
148 | | }; |
149 | | asn_CHOICE_specifics_t asn_SPC_NGAP_ClockAccuracy_specs_1 = { |
150 | | sizeof(struct NGAP_ClockAccuracy), |
151 | | offsetof(struct NGAP_ClockAccuracy, _asn_ctx), |
152 | | offsetof(struct NGAP_ClockAccuracy, present), |
153 | | sizeof(((struct NGAP_ClockAccuracy *)0)->present), |
154 | | asn_MAP_NGAP_ClockAccuracy_tag2el_1, |
155 | | 3, /* Count of tags in the map */ |
156 | | 0, 0, |
157 | | -1 /* Extensions start */ |
158 | | }; |
159 | | asn_TYPE_descriptor_t asn_DEF_NGAP_ClockAccuracy = { |
160 | | "ClockAccuracy", |
161 | | "ClockAccuracy", |
162 | | &asn_OP_CHOICE, |
163 | | 0, /* No effective tags (pointer) */ |
164 | | 0, /* No effective tags (count) */ |
165 | | 0, /* No tags (pointer) */ |
166 | | 0, /* No tags (count) */ |
167 | | { |
168 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
169 | | 0, |
170 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
171 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
172 | | &asn_PER_type_NGAP_ClockAccuracy_constr_1, |
173 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
174 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
175 | | 0, |
176 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
177 | | CHOICE_constraint |
178 | | }, |
179 | | asn_MBR_NGAP_ClockAccuracy_1, |
180 | | 3, /* Elements count */ |
181 | | &asn_SPC_NGAP_ClockAccuracy_specs_1 /* Additional specs */ |
182 | | }; |
183 | | |