blob: 5c06295eb9bf5ed1b68f8160d3ea2bb1646e2050 [file] [log] [blame]
Juha Hyttinenff8dccd2019-12-10 14:34:07 +02001/*
2 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3 * From ASN.1 module "X2AP-IEs"
4 * found in "Spec/e2_and_x2-combined-and-minimized.asn1"
5 * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example`
6 */
7
8#include "CoMPHypothesisSetItem.h"
9
10#include "ProtocolExtensionContainer.h"
11static int
12memb_coMPHypothesis_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;
15 size_t size;
16
17 if(!sptr) {
18 ASN__CTFAIL(app_key, td, sptr,
19 "%s: value not given (%s:%d)",
20 td->name, __FILE__, __LINE__);
21 return -1;
22 }
23
24 if(st->size > 0) {
25 /* Size in bits */
26 size = 8 * st->size - (st->bits_unused & 0x07);
27 } else {
28 size = 0;
29 }
30
31 if((size >= 6 && size <= 4400)) {
32 /* Constraint check succeeded */
33 return 0;
34 } else {
35 ASN__CTFAIL(app_key, td, sptr,
36 "%s: constraint failed (%s:%d)",
37 td->name, __FILE__, __LINE__);
38 return -1;
39 }
40}
41
42static asn_per_constraints_t asn_PER_memb_coMPHypothesis_constr_3 CC_NOTUSED = {
43 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
44 { APC_CONSTRAINED | APC_EXTENSIBLE, 13, 13, 6, 4400 } /* (SIZE(6..4400,...)) */,
45 0, 0 /* No PER value map */
46};
47asn_TYPE_member_t asn_MBR_CoMPHypothesisSetItem_1[] = {
48 { ATF_NOFLAGS, 0, offsetof(struct CoMPHypothesisSetItem, coMPCellID),
49 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
50 -1, /* IMPLICIT tag at current level */
51 &asn_DEF_ECGI,
52 0,
53 { 0, 0, 0 },
54 0, 0, /* No default value */
55 "coMPCellID"
56 },
57 { ATF_NOFLAGS, 0, offsetof(struct CoMPHypothesisSetItem, coMPHypothesis),
58 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
59 -1, /* IMPLICIT tag at current level */
60 &asn_DEF_BIT_STRING,
61 0,
62 { 0, &asn_PER_memb_coMPHypothesis_constr_3, memb_coMPHypothesis_constraint_1 },
63 0, 0, /* No default value */
64 "coMPHypothesis"
65 },
66 { ATF_POINTER, 1, offsetof(struct CoMPHypothesisSetItem, iE_Extensions),
67 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
68 -1, /* IMPLICIT tag at current level */
69 &asn_DEF_ProtocolExtensionContainer_8858P27,
70 0,
71 { 0, 0, 0 },
72 0, 0, /* No default value */
73 "iE-Extensions"
74 },
75};
76static const int asn_MAP_CoMPHypothesisSetItem_oms_1[] = { 2 };
77static const ber_tlv_tag_t asn_DEF_CoMPHypothesisSetItem_tags_1[] = {
78 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
79};
80static const asn_TYPE_tag2member_t asn_MAP_CoMPHypothesisSetItem_tag2el_1[] = {
81 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* coMPCellID */
82 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* coMPHypothesis */
83 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
84};
85asn_SEQUENCE_specifics_t asn_SPC_CoMPHypothesisSetItem_specs_1 = {
86 sizeof(struct CoMPHypothesisSetItem),
87 offsetof(struct CoMPHypothesisSetItem, _asn_ctx),
88 asn_MAP_CoMPHypothesisSetItem_tag2el_1,
89 3, /* Count of tags in the map */
90 asn_MAP_CoMPHypothesisSetItem_oms_1, /* Optional members */
91 1, 0, /* Root/Additions */
92 3, /* First extension addition */
93};
94asn_TYPE_descriptor_t asn_DEF_CoMPHypothesisSetItem = {
95 "CoMPHypothesisSetItem",
96 "CoMPHypothesisSetItem",
97 &asn_OP_SEQUENCE,
98 asn_DEF_CoMPHypothesisSetItem_tags_1,
99 sizeof(asn_DEF_CoMPHypothesisSetItem_tags_1)
100 /sizeof(asn_DEF_CoMPHypothesisSetItem_tags_1[0]), /* 1 */
101 asn_DEF_CoMPHypothesisSetItem_tags_1, /* Same as above */
102 sizeof(asn_DEF_CoMPHypothesisSetItem_tags_1)
103 /sizeof(asn_DEF_CoMPHypothesisSetItem_tags_1[0]), /* 1 */
104 { 0, 0, SEQUENCE_constraint },
105 asn_MBR_CoMPHypothesisSetItem_1,
106 3, /* Elements count */
107 &asn_SPC_CoMPHypothesisSetItem_specs_1 /* Additional specs */
108};
109