/src/open5gs/lib/asn1c/s1ap/S1AP_ScheduledCommunicationTime.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_ScheduledCommunicationTime.h" |
9 | | |
10 | | #include "S1AP_ProtocolExtensionContainer.h" |
11 | | static int |
12 | | memb_S1AP_dayofWeek_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 == 7UL)) { |
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_S1AP_timeofDayStart_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
44 | 0 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
45 | 0 | long value; |
46 | | |
47 | 0 | if(!sptr) { |
48 | 0 | ASN__CTFAIL(app_key, td, sptr, |
49 | 0 | "%s: value not given (%s:%d)", |
50 | 0 | td->name, __FILE__, __LINE__); |
51 | 0 | return -1; |
52 | 0 | } |
53 | | |
54 | 0 | value = *(const long *)sptr; |
55 | | |
56 | 0 | if((value >= 0L && value <= 86399L)) { |
57 | | /* Constraint check succeeded */ |
58 | 0 | return 0; |
59 | 0 | } else { |
60 | 0 | ASN__CTFAIL(app_key, td, sptr, |
61 | 0 | "%s: constraint failed (%s:%d)", |
62 | 0 | td->name, __FILE__, __LINE__); |
63 | 0 | return -1; |
64 | 0 | } |
65 | 0 | } |
66 | | |
67 | | static int |
68 | | memb_S1AP_timeofDayEnd_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
69 | 0 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
70 | 0 | long value; |
71 | | |
72 | 0 | if(!sptr) { |
73 | 0 | ASN__CTFAIL(app_key, td, sptr, |
74 | 0 | "%s: value not given (%s:%d)", |
75 | 0 | td->name, __FILE__, __LINE__); |
76 | 0 | return -1; |
77 | 0 | } |
78 | | |
79 | 0 | value = *(const long *)sptr; |
80 | | |
81 | 0 | if((value >= 0L && value <= 86399L)) { |
82 | | /* Constraint check succeeded */ |
83 | 0 | return 0; |
84 | 0 | } else { |
85 | 0 | ASN__CTFAIL(app_key, td, sptr, |
86 | 0 | "%s: constraint failed (%s:%d)", |
87 | 0 | td->name, __FILE__, __LINE__); |
88 | 0 | return -1; |
89 | 0 | } |
90 | 0 | } |
91 | | |
92 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
93 | | static asn_per_constraints_t asn_PER_memb_S1AP_dayofWeek_constr_2 CC_NOTUSED = { |
94 | | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
95 | | { APC_CONSTRAINED, 0, 0, 7, 7 } /* (SIZE(7..7)) */, |
96 | | 0, 0 /* No PER value map */ |
97 | | }; |
98 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
99 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
100 | | static asn_per_constraints_t asn_PER_memb_S1AP_timeofDayStart_constr_3 CC_NOTUSED = { |
101 | | { APC_CONSTRAINED | APC_EXTENSIBLE, 17, -1, 0, 86399 } /* (0..86399,...) */, |
102 | | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
103 | | 0, 0 /* No PER value map */ |
104 | | }; |
105 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
106 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
107 | | static asn_per_constraints_t asn_PER_memb_S1AP_timeofDayEnd_constr_4 CC_NOTUSED = { |
108 | | { APC_CONSTRAINED | APC_EXTENSIBLE, 17, -1, 0, 86399 } /* (0..86399,...) */, |
109 | | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
110 | | 0, 0 /* No PER value map */ |
111 | | }; |
112 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
113 | | asn_TYPE_member_t asn_MBR_S1AP_ScheduledCommunicationTime_1[] = { |
114 | | { ATF_POINTER, 4, offsetof(struct S1AP_ScheduledCommunicationTime, dayofWeek), |
115 | | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
116 | | -1, /* IMPLICIT tag at current level */ |
117 | | &asn_DEF_BIT_STRING, |
118 | | 0, |
119 | | { |
120 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
121 | | 0, |
122 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
123 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
124 | | &asn_PER_memb_S1AP_dayofWeek_constr_2, |
125 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
126 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
127 | | 0, |
128 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
129 | | memb_S1AP_dayofWeek_constraint_1 |
130 | | }, |
131 | | 0, 0, /* No default value */ |
132 | | "dayofWeek" |
133 | | }, |
134 | | { ATF_POINTER, 3, offsetof(struct S1AP_ScheduledCommunicationTime, timeofDayStart), |
135 | | (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
136 | | -1, /* IMPLICIT tag at current level */ |
137 | | &asn_DEF_NativeInteger, |
138 | | 0, |
139 | | { |
140 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
141 | | 0, |
142 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
143 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
144 | | &asn_PER_memb_S1AP_timeofDayStart_constr_3, |
145 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
146 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
147 | | 0, |
148 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
149 | | memb_S1AP_timeofDayStart_constraint_1 |
150 | | }, |
151 | | 0, 0, /* No default value */ |
152 | | "timeofDayStart" |
153 | | }, |
154 | | { ATF_POINTER, 2, offsetof(struct S1AP_ScheduledCommunicationTime, timeofDayEnd), |
155 | | (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
156 | | -1, /* IMPLICIT tag at current level */ |
157 | | &asn_DEF_NativeInteger, |
158 | | 0, |
159 | | { |
160 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
161 | | 0, |
162 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
163 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
164 | | &asn_PER_memb_S1AP_timeofDayEnd_constr_4, |
165 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
166 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
167 | | 0, |
168 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
169 | | memb_S1AP_timeofDayEnd_constraint_1 |
170 | | }, |
171 | | 0, 0, /* No default value */ |
172 | | "timeofDayEnd" |
173 | | }, |
174 | | { ATF_POINTER, 1, offsetof(struct S1AP_ScheduledCommunicationTime, iE_Extensions), |
175 | | (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
176 | | -1, /* IMPLICIT tag at current level */ |
177 | | &asn_DEF_S1AP_ProtocolExtensionContainer_8386P139, |
178 | | 0, |
179 | | { |
180 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
181 | | 0, |
182 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
183 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
184 | | 0, |
185 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
186 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
187 | | 0, |
188 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
189 | | 0 |
190 | | }, |
191 | | 0, 0, /* No default value */ |
192 | | "iE-Extensions" |
193 | | }, |
194 | | }; |
195 | | static const int asn_MAP_S1AP_ScheduledCommunicationTime_oms_1[] = { 0, 1, 2, 3 }; |
196 | | static const ber_tlv_tag_t asn_DEF_S1AP_ScheduledCommunicationTime_tags_1[] = { |
197 | | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
198 | | }; |
199 | | static const asn_TYPE_tag2member_t asn_MAP_S1AP_ScheduledCommunicationTime_tag2el_1[] = { |
200 | | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* dayofWeek */ |
201 | | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* timeofDayStart */ |
202 | | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* timeofDayEnd */ |
203 | | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ |
204 | | }; |
205 | | asn_SEQUENCE_specifics_t asn_SPC_S1AP_ScheduledCommunicationTime_specs_1 = { |
206 | | sizeof(struct S1AP_ScheduledCommunicationTime), |
207 | | offsetof(struct S1AP_ScheduledCommunicationTime, _asn_ctx), |
208 | | asn_MAP_S1AP_ScheduledCommunicationTime_tag2el_1, |
209 | | 4, /* Count of tags in the map */ |
210 | | asn_MAP_S1AP_ScheduledCommunicationTime_oms_1, /* Optional members */ |
211 | | 4, 0, /* Root/Additions */ |
212 | | 4, /* First extension addition */ |
213 | | }; |
214 | | asn_TYPE_descriptor_t asn_DEF_S1AP_ScheduledCommunicationTime = { |
215 | | "ScheduledCommunicationTime", |
216 | | "ScheduledCommunicationTime", |
217 | | &asn_OP_SEQUENCE, |
218 | | asn_DEF_S1AP_ScheduledCommunicationTime_tags_1, |
219 | | sizeof(asn_DEF_S1AP_ScheduledCommunicationTime_tags_1) |
220 | | /sizeof(asn_DEF_S1AP_ScheduledCommunicationTime_tags_1[0]), /* 1 */ |
221 | | asn_DEF_S1AP_ScheduledCommunicationTime_tags_1, /* Same as above */ |
222 | | sizeof(asn_DEF_S1AP_ScheduledCommunicationTime_tags_1) |
223 | | /sizeof(asn_DEF_S1AP_ScheduledCommunicationTime_tags_1[0]), /* 1 */ |
224 | | { |
225 | | #if !defined(ASN_DISABLE_OER_SUPPORT) |
226 | | 0, |
227 | | #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ |
228 | | #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) |
229 | | 0, |
230 | | #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ |
231 | | #if !defined(ASN_DISABLE_JER_SUPPORT) |
232 | | 0, |
233 | | #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ |
234 | | SEQUENCE_constraint |
235 | | }, |
236 | | asn_MBR_S1AP_ScheduledCommunicationTime_1, |
237 | | 4, /* Elements count */ |
238 | | &asn_SPC_S1AP_ScheduledCommunicationTime_specs_1 /* Additional specs */ |
239 | | }; |
240 | | |