rajalakshmisv | 21b61dd | 2021-12-07 04:53:03 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) |
rajalakshmisv | 960885a | 2022-05-31 14:59:10 +0000 | [diff] [blame] | 3 | * From ASN.1 module "E2SM-RC-IEs" |
| 4 | * found in "e2sm-rc-nov2021.asn" |
rajalakshmisv | 21b61dd | 2021-12-07 04:53:03 +0000 | [diff] [blame] | 5 | * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example -D .` |
| 6 | */ |
| 7 | |
rajalakshmisv | 960885a | 2022-05-31 14:59:10 +0000 | [diff] [blame] | 8 | #include "GNB-ID.h" |
rajalakshmisv | 21b61dd | 2021-12-07 04:53:03 +0000 | [diff] [blame] | 9 | |
| 10 | static int |
| 11 | memb_gNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, |
| 12 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 13 | const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; |
| 14 | size_t size; |
| 15 | |
| 16 | if(!sptr) { |
| 17 | ASN__CTFAIL(app_key, td, sptr, |
| 18 | "%s: value not given (%s:%d)", |
| 19 | td->name, __FILE__, __LINE__); |
| 20 | return -1; |
| 21 | } |
| 22 | |
| 23 | if(st->size > 0) { |
| 24 | /* Size in bits */ |
| 25 | size = 8 * st->size - (st->bits_unused & 0x07); |
| 26 | } else { |
| 27 | size = 0; |
| 28 | } |
| 29 | |
| 30 | if((size >= 22 && size <= 32)) { |
| 31 | /* Constraint check succeeded */ |
| 32 | return 0; |
| 33 | } else { |
| 34 | ASN__CTFAIL(app_key, td, sptr, |
| 35 | "%s: constraint failed (%s:%d)", |
| 36 | td->name, __FILE__, __LINE__); |
| 37 | return -1; |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | static asn_oer_constraints_t asn_OER_memb_gNB_ID_constr_2 CC_NOTUSED = { |
| 42 | { 0, 0 }, |
| 43 | -1 /* (SIZE(22..32)) */}; |
| 44 | static asn_per_constraints_t asn_PER_memb_gNB_ID_constr_2 CC_NOTUSED = { |
| 45 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 46 | { APC_CONSTRAINED, 4, 4, 22, 32 } /* (SIZE(22..32)) */, |
| 47 | 0, 0 /* No PER value map */ |
| 48 | }; |
rajalakshmisv | 960885a | 2022-05-31 14:59:10 +0000 | [diff] [blame] | 49 | static asn_oer_constraints_t asn_OER_type_GNB_ID_constr_1 CC_NOTUSED = { |
rajalakshmisv | 21b61dd | 2021-12-07 04:53:03 +0000 | [diff] [blame] | 50 | { 0, 0 }, |
| 51 | -1}; |
rajalakshmisv | 960885a | 2022-05-31 14:59:10 +0000 | [diff] [blame] | 52 | asn_per_constraints_t asn_PER_type_GNB_ID_constr_1 CC_NOTUSED = { |
rajalakshmisv | 21b61dd | 2021-12-07 04:53:03 +0000 | [diff] [blame] | 53 | { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, |
| 54 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 55 | 0, 0 /* No PER value map */ |
| 56 | }; |
rajalakshmisv | 960885a | 2022-05-31 14:59:10 +0000 | [diff] [blame] | 57 | asn_TYPE_member_t asn_MBR_GNB_ID_1[] = { |
| 58 | { ATF_NOFLAGS, 0, offsetof(struct GNB_ID, choice.gNB_ID), |
rajalakshmisv | 21b61dd | 2021-12-07 04:53:03 +0000 | [diff] [blame] | 59 | (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 60 | -1, /* IMPLICIT tag at current level */ |
| 61 | &asn_DEF_BIT_STRING, |
| 62 | 0, |
| 63 | { &asn_OER_memb_gNB_ID_constr_2, &asn_PER_memb_gNB_ID_constr_2, memb_gNB_ID_constraint_1 }, |
| 64 | 0, 0, /* No default value */ |
| 65 | "gNB-ID" |
| 66 | }, |
| 67 | }; |
rajalakshmisv | 960885a | 2022-05-31 14:59:10 +0000 | [diff] [blame] | 68 | static const asn_TYPE_tag2member_t asn_MAP_GNB_ID_tag2el_1[] = { |
rajalakshmisv | 21b61dd | 2021-12-07 04:53:03 +0000 | [diff] [blame] | 69 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* gNB-ID */ |
| 70 | }; |
rajalakshmisv | 960885a | 2022-05-31 14:59:10 +0000 | [diff] [blame] | 71 | asn_CHOICE_specifics_t asn_SPC_GNB_ID_specs_1 = { |
| 72 | sizeof(struct GNB_ID), |
| 73 | offsetof(struct GNB_ID, _asn_ctx), |
| 74 | offsetof(struct GNB_ID, present), |
| 75 | sizeof(((struct GNB_ID *)0)->present), |
| 76 | asn_MAP_GNB_ID_tag2el_1, |
rajalakshmisv | 21b61dd | 2021-12-07 04:53:03 +0000 | [diff] [blame] | 77 | 1, /* Count of tags in the map */ |
| 78 | 0, 0, |
| 79 | 1 /* Extensions start */ |
| 80 | }; |
rajalakshmisv | 960885a | 2022-05-31 14:59:10 +0000 | [diff] [blame] | 81 | asn_TYPE_descriptor_t asn_DEF_GNB_ID = { |
| 82 | "GNB-ID", |
| 83 | "GNB-ID", |
rajalakshmisv | 21b61dd | 2021-12-07 04:53:03 +0000 | [diff] [blame] | 84 | &asn_OP_CHOICE, |
| 85 | 0, /* No effective tags (pointer) */ |
| 86 | 0, /* No effective tags (count) */ |
| 87 | 0, /* No tags (pointer) */ |
| 88 | 0, /* No tags (count) */ |
rajalakshmisv | 960885a | 2022-05-31 14:59:10 +0000 | [diff] [blame] | 89 | { &asn_OER_type_GNB_ID_constr_1, &asn_PER_type_GNB_ID_constr_1, CHOICE_constraint }, |
| 90 | asn_MBR_GNB_ID_1, |
rajalakshmisv | 21b61dd | 2021-12-07 04:53:03 +0000 | [diff] [blame] | 91 | 1, /* Elements count */ |
rajalakshmisv | 960885a | 2022-05-31 14:59:10 +0000 | [diff] [blame] | 92 | &asn_SPC_GNB_ID_specs_1 /* Additional specs */ |
rajalakshmisv | 21b61dd | 2021-12-07 04:53:03 +0000 | [diff] [blame] | 93 | }; |
| 94 | |