2 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3 * From ASN.1 module "X2AP-IEs"
4 * found in "X2AP-15-4-0.asn1"
5 * `asn1c -D ./asn1_n1 -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example`
8 #include "ReservedSubframePattern.h"
10 #include "ProtocolExtensionContainer.h"
12 memb_reservedSubframePattern_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
13 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
14 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
18 ASN__CTFAIL(app_key, td, sptr,
19 "%s: value not given (%s:%d)",
20 td->name, __FILE__, __LINE__);
26 size = 8 * st->size - (st->bits_unused & 0x07);
31 if((size >= 10 && size <= 160)) {
32 /* Constraint check succeeded */
35 ASN__CTFAIL(app_key, td, sptr,
36 "%s: constraint failed (%s:%d)",
37 td->name, __FILE__, __LINE__);
43 memb_mBSFNControlRegionLength_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
44 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
48 ASN__CTFAIL(app_key, td, sptr,
49 "%s: value not given (%s:%d)",
50 td->name, __FILE__, __LINE__);
54 value = *(const long *)sptr;
56 if((value >= 0 && value <= 3)) {
57 /* Constraint check succeeded */
60 ASN__CTFAIL(app_key, td, sptr,
61 "%s: constraint failed (%s:%d)",
62 td->name, __FILE__, __LINE__);
67 static asn_oer_constraints_t asn_OER_memb_reservedSubframePattern_constr_3 CC_NOTUSED = {
69 -1 /* (SIZE(10..160)) */};
70 static asn_per_constraints_t asn_PER_memb_reservedSubframePattern_constr_3 CC_NOTUSED = {
71 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
72 { APC_CONSTRAINED, 8, 8, 10, 160 } /* (SIZE(10..160)) */,
73 0, 0 /* No PER value map */
75 static asn_oer_constraints_t asn_OER_memb_mBSFNControlRegionLength_constr_4 CC_NOTUSED = {
76 { 1, 1 } /* (0..3) */,
78 static asn_per_constraints_t asn_PER_memb_mBSFNControlRegionLength_constr_4 CC_NOTUSED = {
79 { APC_CONSTRAINED, 2, 2, 0, 3 } /* (0..3) */,
80 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
81 0, 0 /* No PER value map */
83 asn_TYPE_member_t asn_MBR_ReservedSubframePattern_1[] = {
84 { ATF_NOFLAGS, 0, offsetof(struct ReservedSubframePattern, subframeType),
85 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
86 -1, /* IMPLICIT tag at current level */
87 &asn_DEF_SubframeType,
90 0, 0, /* No default value */
93 { ATF_NOFLAGS, 0, offsetof(struct ReservedSubframePattern, reservedSubframePattern),
94 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
95 -1, /* IMPLICIT tag at current level */
98 { &asn_OER_memb_reservedSubframePattern_constr_3, &asn_PER_memb_reservedSubframePattern_constr_3, memb_reservedSubframePattern_constraint_1 },
99 0, 0, /* No default value */
100 "reservedSubframePattern"
102 { ATF_NOFLAGS, 0, offsetof(struct ReservedSubframePattern, mBSFNControlRegionLength),
103 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
104 -1, /* IMPLICIT tag at current level */
105 &asn_DEF_NativeInteger,
107 { &asn_OER_memb_mBSFNControlRegionLength_constr_4, &asn_PER_memb_mBSFNControlRegionLength_constr_4, memb_mBSFNControlRegionLength_constraint_1 },
108 0, 0, /* No default value */
109 "mBSFNControlRegionLength"
111 { ATF_POINTER, 1, offsetof(struct ReservedSubframePattern, iE_Extensions),
112 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
113 -1, /* IMPLICIT tag at current level */
114 &asn_DEF_ProtocolExtensionContainer_7683P185,
117 0, 0, /* No default value */
121 static const int asn_MAP_ReservedSubframePattern_oms_1[] = { 3 };
122 static const ber_tlv_tag_t asn_DEF_ReservedSubframePattern_tags_1[] = {
123 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
125 static const asn_TYPE_tag2member_t asn_MAP_ReservedSubframePattern_tag2el_1[] = {
126 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* subframeType */
127 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* reservedSubframePattern */
128 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* mBSFNControlRegionLength */
129 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
131 asn_SEQUENCE_specifics_t asn_SPC_ReservedSubframePattern_specs_1 = {
132 sizeof(struct ReservedSubframePattern),
133 offsetof(struct ReservedSubframePattern, _asn_ctx),
134 asn_MAP_ReservedSubframePattern_tag2el_1,
135 4, /* Count of tags in the map */
136 asn_MAP_ReservedSubframePattern_oms_1, /* Optional members */
137 1, 0, /* Root/Additions */
138 4, /* First extension addition */
140 asn_TYPE_descriptor_t asn_DEF_ReservedSubframePattern = {
141 "ReservedSubframePattern",
142 "ReservedSubframePattern",
144 asn_DEF_ReservedSubframePattern_tags_1,
145 sizeof(asn_DEF_ReservedSubframePattern_tags_1)
146 /sizeof(asn_DEF_ReservedSubframePattern_tags_1[0]), /* 1 */
147 asn_DEF_ReservedSubframePattern_tags_1, /* Same as above */
148 sizeof(asn_DEF_ReservedSubframePattern_tags_1)
149 /sizeof(asn_DEF_ReservedSubframePattern_tags_1[0]), /* 1 */
150 { 0, 0, SEQUENCE_constraint },
151 asn_MBR_ReservedSubframePattern_1,
152 4, /* Elements count */
153 &asn_SPC_ReservedSubframePattern_specs_1 /* Additional specs */