Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [T] >>> ***/ |
| 3 | |
| 4 | #include <NativeInteger.h> |
| 5 | #include <INTEGER.h> |
| 6 | #include <constr_SEQUENCE.h> |
| 7 | |
| 8 | /*** <<< TYPE-DECLS [T] >>> ***/ |
| 9 | |
| 10 | typedef struct T { |
| 11 | long unsigned8; |
| 12 | long unsigned16; |
| 13 | long unsigned16stack; |
| 14 | long unsigned16stack_ext; |
| 15 | INTEGER_t unsigned33; |
| 16 | long *minmax /* OPTIONAL */; |
| 17 | /* |
| 18 | * This type is extensible, |
| 19 | * possible extensions are below. |
| 20 | */ |
| 21 | long *signed8 /* DEFAULT 3 */; |
| 22 | long *signed16; |
| 23 | long *signed16stack; |
| 24 | long *signed16stack_ext; |
| 25 | long *signed32; |
| 26 | INTEGER_t *signed33ext; |
| 27 | |
| 28 | /* Context for parsing across buffer boundaries */ |
| 29 | asn_struct_ctx_t _asn_ctx; |
| 30 | } T_t; |
| 31 | |
| 32 | /*** <<< FUNC-DECLS [T] >>> ***/ |
| 33 | |
| 34 | extern asn_TYPE_descriptor_t asn_DEF_T; |
| 35 | |
| 36 | /*** <<< CODE [T] >>> ***/ |
| 37 | |
| 38 | static int |
| 39 | memb_unsigned8_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 40 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 41 | long value; |
| 42 | |
| 43 | if(!sptr) { |
| 44 | ASN__CTFAIL(app_key, td, sptr, |
| 45 | "%s: value not given (%s:%d)", |
| 46 | td->name, __FILE__, __LINE__); |
| 47 | return -1; |
| 48 | } |
| 49 | |
| 50 | value = *(const long *)sptr; |
| 51 | |
| 52 | if((value >= 0 && value <= 255)) { |
| 53 | /* Constraint check succeeded */ |
| 54 | return 0; |
| 55 | } else { |
| 56 | ASN__CTFAIL(app_key, td, sptr, |
| 57 | "%s: constraint failed (%s:%d)", |
| 58 | td->name, __FILE__, __LINE__); |
| 59 | return -1; |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | static int |
| 64 | memb_unsigned16_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 65 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 66 | long value; |
| 67 | |
| 68 | if(!sptr) { |
| 69 | ASN__CTFAIL(app_key, td, sptr, |
| 70 | "%s: value not given (%s:%d)", |
| 71 | td->name, __FILE__, __LINE__); |
| 72 | return -1; |
| 73 | } |
| 74 | |
| 75 | value = *(const long *)sptr; |
| 76 | |
| 77 | if((value >= 0 && value <= 65535)) { |
| 78 | /* Constraint check succeeded */ |
| 79 | return 0; |
| 80 | } else { |
| 81 | ASN__CTFAIL(app_key, td, sptr, |
| 82 | "%s: constraint failed (%s:%d)", |
| 83 | td->name, __FILE__, __LINE__); |
| 84 | return -1; |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | static int |
| 89 | memb_unsigned16stack_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 90 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 91 | long value; |
| 92 | |
| 93 | if(!sptr) { |
| 94 | ASN__CTFAIL(app_key, td, sptr, |
| 95 | "%s: value not given (%s:%d)", |
| 96 | td->name, __FILE__, __LINE__); |
| 97 | return -1; |
| 98 | } |
| 99 | |
| 100 | value = *(const long *)sptr; |
| 101 | |
| 102 | if((value >= 0 && value <= 255)) { |
| 103 | /* Constraint check succeeded */ |
| 104 | return 0; |
| 105 | } else { |
| 106 | ASN__CTFAIL(app_key, td, sptr, |
| 107 | "%s: constraint failed (%s:%d)", |
| 108 | td->name, __FILE__, __LINE__); |
| 109 | return -1; |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | static int |
| 114 | memb_unsigned16stack_ext_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 115 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 116 | long value; |
| 117 | |
| 118 | if(!sptr) { |
| 119 | ASN__CTFAIL(app_key, td, sptr, |
| 120 | "%s: value not given (%s:%d)", |
| 121 | td->name, __FILE__, __LINE__); |
| 122 | return -1; |
| 123 | } |
| 124 | |
| 125 | value = *(const long *)sptr; |
| 126 | |
| 127 | if((value >= 0 && value <= 255)) { |
| 128 | /* Constraint check succeeded */ |
| 129 | return 0; |
| 130 | } else { |
| 131 | ASN__CTFAIL(app_key, td, sptr, |
| 132 | "%s: constraint failed (%s:%d)", |
| 133 | td->name, __FILE__, __LINE__); |
| 134 | return -1; |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | static int |
| 139 | memb_unsigned33_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 140 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 141 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 142 | long value; |
| 143 | |
| 144 | if(!sptr) { |
| 145 | ASN__CTFAIL(app_key, td, sptr, |
| 146 | "%s: value not given (%s:%d)", |
| 147 | td->name, __FILE__, __LINE__); |
| 148 | return -1; |
| 149 | } |
| 150 | |
| 151 | if(asn_INTEGER2long(st, &value)) { |
| 152 | ASN__CTFAIL(app_key, td, sptr, |
| 153 | "%s: value too large (%s:%d)", |
| 154 | td->name, __FILE__, __LINE__); |
| 155 | return -1; |
| 156 | } |
| 157 | |
| 158 | if((value >= 0 && value <= 5000000000)) { |
| 159 | /* Constraint check succeeded */ |
| 160 | return 0; |
| 161 | } else { |
| 162 | ASN__CTFAIL(app_key, td, sptr, |
| 163 | "%s: constraint failed (%s:%d)", |
| 164 | td->name, __FILE__, __LINE__); |
| 165 | return -1; |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | static int |
| 170 | memb_minmax_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 171 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 172 | |
| 173 | if(!sptr) { |
| 174 | ASN__CTFAIL(app_key, td, sptr, |
| 175 | "%s: value not given (%s:%d)", |
| 176 | td->name, __FILE__, __LINE__); |
| 177 | return -1; |
| 178 | } |
| 179 | |
| 180 | |
| 181 | if(1 /* No applicable constraints whatsoever */) { |
| 182 | /* Nothing is here. See below */ |
| 183 | } |
| 184 | |
| 185 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 186 | } |
| 187 | |
| 188 | static int |
| 189 | memb_signed8_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 190 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 191 | long value; |
| 192 | |
| 193 | if(!sptr) { |
| 194 | ASN__CTFAIL(app_key, td, sptr, |
| 195 | "%s: value not given (%s:%d)", |
| 196 | td->name, __FILE__, __LINE__); |
| 197 | return -1; |
| 198 | } |
| 199 | |
| 200 | value = *(const long *)sptr; |
| 201 | |
| 202 | if((value >= -128 && value <= 127)) { |
| 203 | /* Constraint check succeeded */ |
| 204 | return 0; |
| 205 | } else { |
| 206 | ASN__CTFAIL(app_key, td, sptr, |
| 207 | "%s: constraint failed (%s:%d)", |
| 208 | td->name, __FILE__, __LINE__); |
| 209 | return -1; |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | static int |
| 214 | memb_signed16_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 215 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 216 | long value; |
| 217 | |
| 218 | if(!sptr) { |
| 219 | ASN__CTFAIL(app_key, td, sptr, |
| 220 | "%s: value not given (%s:%d)", |
| 221 | td->name, __FILE__, __LINE__); |
| 222 | return -1; |
| 223 | } |
| 224 | |
| 225 | value = *(const long *)sptr; |
| 226 | |
| 227 | if((value >= -32768 && value <= 32767)) { |
| 228 | /* Constraint check succeeded */ |
| 229 | return 0; |
| 230 | } else { |
| 231 | ASN__CTFAIL(app_key, td, sptr, |
| 232 | "%s: constraint failed (%s:%d)", |
| 233 | td->name, __FILE__, __LINE__); |
| 234 | return -1; |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | static int |
| 239 | memb_signed16stack_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 240 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 241 | long value; |
| 242 | |
| 243 | if(!sptr) { |
| 244 | ASN__CTFAIL(app_key, td, sptr, |
| 245 | "%s: value not given (%s:%d)", |
| 246 | td->name, __FILE__, __LINE__); |
| 247 | return -1; |
| 248 | } |
| 249 | |
| 250 | value = *(const long *)sptr; |
| 251 | |
| 252 | if((value >= -128 && value <= 127)) { |
| 253 | /* Constraint check succeeded */ |
| 254 | return 0; |
| 255 | } else { |
| 256 | ASN__CTFAIL(app_key, td, sptr, |
| 257 | "%s: constraint failed (%s:%d)", |
| 258 | td->name, __FILE__, __LINE__); |
| 259 | return -1; |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | static int |
| 264 | memb_signed16stack_ext_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 265 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 266 | long value; |
| 267 | |
| 268 | if(!sptr) { |
| 269 | ASN__CTFAIL(app_key, td, sptr, |
| 270 | "%s: value not given (%s:%d)", |
| 271 | td->name, __FILE__, __LINE__); |
| 272 | return -1; |
| 273 | } |
| 274 | |
| 275 | value = *(const long *)sptr; |
| 276 | |
| 277 | if((value >= -128 && value <= 127)) { |
| 278 | /* Constraint check succeeded */ |
| 279 | return 0; |
| 280 | } else { |
| 281 | ASN__CTFAIL(app_key, td, sptr, |
| 282 | "%s: constraint failed (%s:%d)", |
| 283 | td->name, __FILE__, __LINE__); |
| 284 | return -1; |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | static int |
| 289 | memb_signed32_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 290 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 291 | long value; |
| 292 | |
| 293 | if(!sptr) { |
| 294 | ASN__CTFAIL(app_key, td, sptr, |
| 295 | "%s: value not given (%s:%d)", |
| 296 | td->name, __FILE__, __LINE__); |
| 297 | return -1; |
| 298 | } |
| 299 | |
| 300 | value = *(const long *)sptr; |
| 301 | |
| 302 | if((value >= -2000000000 && value <= 2000000000)) { |
| 303 | /* Constraint check succeeded */ |
| 304 | return 0; |
| 305 | } else { |
| 306 | ASN__CTFAIL(app_key, td, sptr, |
| 307 | "%s: constraint failed (%s:%d)", |
| 308 | td->name, __FILE__, __LINE__); |
| 309 | return -1; |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | static int |
| 314 | memb_signed33ext_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 315 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 316 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 317 | long value; |
| 318 | |
| 319 | if(!sptr) { |
| 320 | ASN__CTFAIL(app_key, td, sptr, |
| 321 | "%s: value not given (%s:%d)", |
| 322 | td->name, __FILE__, __LINE__); |
| 323 | return -1; |
| 324 | } |
| 325 | |
| 326 | if(asn_INTEGER2long(st, &value)) { |
| 327 | ASN__CTFAIL(app_key, td, sptr, |
| 328 | "%s: value too large (%s:%d)", |
| 329 | td->name, __FILE__, __LINE__); |
| 330 | return -1; |
| 331 | } |
| 332 | |
| 333 | if((value >= -4000000000 && value <= 4000000000)) { |
| 334 | /* Constraint check succeeded */ |
| 335 | return 0; |
| 336 | } else { |
| 337 | ASN__CTFAIL(app_key, td, sptr, |
| 338 | "%s: constraint failed (%s:%d)", |
| 339 | td->name, __FILE__, __LINE__); |
| 340 | return -1; |
| 341 | } |
| 342 | } |
| 343 | |
| 344 | |
| 345 | /*** <<< CTDEFS [T] >>> ***/ |
| 346 | |
| 347 | static asn_oer_constraints_t asn_OER_memb_unsigned8_constr_2 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 348 | { 1, 1 } /* (0..255) */, |
| 349 | -1}; |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 350 | static asn_oer_constraints_t asn_OER_memb_unsigned16_constr_3 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 351 | { 2, 1 } /* (0..65535) */, |
| 352 | -1}; |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 353 | static asn_oer_constraints_t asn_OER_memb_unsigned16stack_constr_4 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 354 | { 1, 1 } /* (0..255) */, |
| 355 | -1}; |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 356 | static asn_oer_constraints_t asn_OER_memb_unsigned16stack_ext_constr_5 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 357 | { 2, 1 } /* (0..32767) */, |
| 358 | -1}; |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 359 | static asn_oer_constraints_t asn_OER_memb_unsigned33_constr_6 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 360 | { 8, 1 } /* (0..5000000000) */, |
| 361 | -1}; |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 362 | static asn_oer_constraints_t asn_OER_memb_minmax_constr_7 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 363 | { 0, 0 }, |
| 364 | -1}; |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 365 | static asn_oer_constraints_t asn_OER_memb_signed8_constr_9 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 366 | { 1, 0 } /* (-128..127) */, |
| 367 | -1}; |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 368 | static asn_oer_constraints_t asn_OER_memb_signed16_constr_10 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 369 | { 2, 0 } /* (-32768..32767) */, |
| 370 | -1}; |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 371 | static asn_oer_constraints_t asn_OER_memb_signed16stack_constr_11 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 372 | { 1, 0 } /* (-128..127) */, |
| 373 | -1}; |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 374 | static asn_oer_constraints_t asn_OER_memb_signed16stack_ext_constr_12 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 375 | { 2, 0 } /* (-32768..32767) */, |
| 376 | -1}; |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 377 | static asn_oer_constraints_t asn_OER_memb_signed32_constr_13 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 378 | { 4, 0 } /* (-2000000000..2000000000) */, |
| 379 | -1}; |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 380 | static asn_oer_constraints_t asn_OER_memb_signed33ext_constr_14 GCC_NOTUSED = { |
Lev Walkin | 8041fe8 | 2017-08-02 10:39:01 -0700 | [diff] [blame] | 381 | { 0, 0 }, |
| 382 | -1}; |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 383 | |
| 384 | /*** <<< STAT-DEFS [T] >>> ***/ |
| 385 | |
| 386 | static int asn_DFL_9_set_3(int set_value, void **sptr) { |
| 387 | long *st = *sptr; |
| 388 | |
| 389 | if(!st) { |
| 390 | if(!set_value) return -1; /* Not a default value */ |
| 391 | st = (*sptr = CALLOC(1, sizeof(*st))); |
| 392 | if(!st) return -1; |
| 393 | } |
| 394 | |
| 395 | if(set_value) { |
| 396 | /* Install default value 3 */ |
| 397 | *st = 3; |
| 398 | return 0; |
| 399 | } else { |
| 400 | /* Test default value 3 */ |
| 401 | return (*st == 3); |
| 402 | } |
| 403 | } |
| 404 | static asn_TYPE_member_t asn_MBR_T_1[] = { |
| 405 | { ATF_NOFLAGS, 0, offsetof(struct T, unsigned8), |
| 406 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 407 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 408 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 409 | .type_selector = 0, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 410 | .memb_constraints = memb_unsigned8_constraint_1, |
| 411 | .oer_constraints = &asn_OER_memb_unsigned8_constr_2, |
| 412 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 413 | .default_value = 0, |
| 414 | .name = "unsigned8" |
| 415 | }, |
| 416 | { ATF_NOFLAGS, 0, offsetof(struct T, unsigned16), |
| 417 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 418 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 419 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 420 | .type_selector = 0, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 421 | .memb_constraints = memb_unsigned16_constraint_1, |
| 422 | .oer_constraints = &asn_OER_memb_unsigned16_constr_3, |
| 423 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 424 | .default_value = 0, |
| 425 | .name = "unsigned16" |
| 426 | }, |
| 427 | { ATF_NOFLAGS, 0, offsetof(struct T, unsigned16stack), |
| 428 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 429 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 430 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 431 | .type_selector = 0, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 432 | .memb_constraints = memb_unsigned16stack_constraint_1, |
| 433 | .oer_constraints = &asn_OER_memb_unsigned16stack_constr_4, |
| 434 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 435 | .default_value = 0, |
| 436 | .name = "unsigned16stack" |
| 437 | }, |
| 438 | { ATF_NOFLAGS, 0, offsetof(struct T, unsigned16stack_ext), |
| 439 | .tag = (ASN_TAG_CLASS_CONTEXT | (15 << 2)), |
| 440 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 441 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 442 | .type_selector = 0, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 443 | .memb_constraints = memb_unsigned16stack_ext_constraint_1, |
| 444 | .oer_constraints = &asn_OER_memb_unsigned16stack_ext_constr_5, |
| 445 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 446 | .default_value = 0, |
| 447 | .name = "unsigned16stack-ext" |
| 448 | }, |
| 449 | { ATF_NOFLAGS, 0, offsetof(struct T, unsigned33), |
| 450 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 451 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 452 | .type = &asn_DEF_INTEGER, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 453 | .type_selector = 0, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 454 | .memb_constraints = memb_unsigned33_constraint_1, |
| 455 | .oer_constraints = &asn_OER_memb_unsigned33_constr_6, |
| 456 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 457 | .default_value = 0, |
| 458 | .name = "unsigned33" |
| 459 | }, |
| 460 | { ATF_POINTER, 7, offsetof(struct T, minmax), |
| 461 | .tag = (ASN_TAG_CLASS_CONTEXT | (6 << 2)), |
| 462 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 463 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 464 | .type_selector = 0, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 465 | .memb_constraints = memb_minmax_constraint_1, |
| 466 | .oer_constraints = &asn_OER_memb_minmax_constr_7, |
| 467 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 468 | .default_value = 0, |
| 469 | .name = "minmax" |
| 470 | }, |
| 471 | { ATF_POINTER, 6, offsetof(struct T, signed8), |
| 472 | .tag = (ASN_TAG_CLASS_CONTEXT | (10 << 2)), |
| 473 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 474 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 475 | .type_selector = 0, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 476 | .memb_constraints = memb_signed8_constraint_1, |
| 477 | .oer_constraints = &asn_OER_memb_signed8_constr_9, |
| 478 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 479 | .default_value = asn_DFL_9_set_3, /* DEFAULT 3 */ |
| 480 | .name = "signed8" |
| 481 | }, |
| 482 | { ATF_POINTER, 5, offsetof(struct T, signed16), |
| 483 | .tag = (ASN_TAG_CLASS_CONTEXT | (11 << 2)), |
| 484 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 485 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 486 | .type_selector = 0, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 487 | .memb_constraints = memb_signed16_constraint_1, |
| 488 | .oer_constraints = &asn_OER_memb_signed16_constr_10, |
| 489 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 490 | .default_value = 0, |
| 491 | .name = "signed16" |
| 492 | }, |
| 493 | { ATF_POINTER, 4, offsetof(struct T, signed16stack), |
| 494 | .tag = (ASN_TAG_CLASS_CONTEXT | (12 << 2)), |
| 495 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 496 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 497 | .type_selector = 0, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 498 | .memb_constraints = memb_signed16stack_constraint_1, |
| 499 | .oer_constraints = &asn_OER_memb_signed16stack_constr_11, |
| 500 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 501 | .default_value = 0, |
| 502 | .name = "signed16stack" |
| 503 | }, |
| 504 | { ATF_POINTER, 3, offsetof(struct T, signed16stack_ext), |
| 505 | .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)), |
| 506 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 507 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 508 | .type_selector = 0, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 509 | .memb_constraints = memb_signed16stack_ext_constraint_1, |
| 510 | .oer_constraints = &asn_OER_memb_signed16stack_ext_constr_12, |
| 511 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 512 | .default_value = 0, |
| 513 | .name = "signed16stack-ext" |
| 514 | }, |
| 515 | { ATF_POINTER, 2, offsetof(struct T, signed32), |
| 516 | .tag = (ASN_TAG_CLASS_CONTEXT | (7 << 2)), |
| 517 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 518 | .type = &asn_DEF_NativeInteger, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 519 | .type_selector = 0, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 520 | .memb_constraints = memb_signed32_constraint_1, |
| 521 | .oer_constraints = &asn_OER_memb_signed32_constr_13, |
| 522 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 523 | .default_value = 0, |
| 524 | .name = "signed32" |
| 525 | }, |
| 526 | { ATF_POINTER, 1, offsetof(struct T, signed33ext), |
| 527 | .tag = (ASN_TAG_CLASS_CONTEXT | (8 << 2)), |
| 528 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 529 | .type = &asn_DEF_INTEGER, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 530 | .type_selector = 0, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 531 | .memb_constraints = memb_signed33ext_constraint_1, |
| 532 | .oer_constraints = &asn_OER_memb_signed33ext_constr_14, |
| 533 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 534 | .default_value = 0, |
| 535 | .name = "signed33ext" |
| 536 | }, |
| 537 | }; |
| 538 | static const int asn_MAP_T_oms_1[] = { 5, 6, 7, 8, 9, 10, 11 }; |
| 539 | static const ber_tlv_tag_t asn_DEF_T_tags_1[] = { |
| 540 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 541 | }; |
| 542 | static const asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = { |
| 543 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* unsigned8 */ |
| 544 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* unsigned16 */ |
| 545 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* unsigned16stack */ |
| 546 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 4, 0, 0 }, /* unsigned33 */ |
| 547 | { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 9, 0, 0 }, /* signed16stack-ext */ |
| 548 | { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 5, 0, 0 }, /* minmax */ |
| 549 | { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 10, 0, 0 }, /* signed32 */ |
| 550 | { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 11, 0, 0 }, /* signed33ext */ |
| 551 | { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 6, 0, 0 }, /* signed8 */ |
| 552 | { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 7, 0, 0 }, /* signed16 */ |
| 553 | { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 8, 0, 0 }, /* signed16stack */ |
| 554 | { (ASN_TAG_CLASS_CONTEXT | (15 << 2)), 3, 0, 0 } /* unsigned16stack-ext */ |
| 555 | }; |
| 556 | static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = { |
| 557 | sizeof(struct T), |
| 558 | offsetof(struct T, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 559 | .tag2el = asn_MAP_T_tag2el_1, |
| 560 | .tag2el_count = 12, /* Count of tags in the map */ |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 561 | asn_MAP_T_oms_1, /* Optional members */ |
| 562 | 1, 6, /* Root/Additions */ |
| 563 | 5, /* Start extensions */ |
| 564 | 13 /* Stop extensions */ |
| 565 | }; |
| 566 | asn_TYPE_descriptor_t asn_DEF_T = { |
| 567 | "T", |
| 568 | "T", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 569 | &asn_OP_SEQUENCE, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 570 | SEQUENCE_constraint, |
Lev Walkin | 69353a3 | 2017-07-25 08:10:46 -0700 | [diff] [blame] | 571 | asn_DEF_T_tags_1, |
| 572 | sizeof(asn_DEF_T_tags_1) |
| 573 | /sizeof(asn_DEF_T_tags_1[0]), /* 1 */ |
| 574 | asn_DEF_T_tags_1, /* Same as above */ |
| 575 | sizeof(asn_DEF_T_tags_1) |
| 576 | /sizeof(asn_DEF_T_tags_1[0]), /* 1 */ |
| 577 | 0, /* No OER visible constraints */ |
| 578 | 0, /* No PER visible constraints */ |
| 579 | asn_MBR_T_1, |
| 580 | 12, /* Elements count */ |
| 581 | &asn_SPC_T_specs_1 /* Additional specs */ |
| 582 | }; |
| 583 | |