3336d733c3a819a4426512e98c92aac9495946a7
[ric-plt/submgr.git] / e2ap / lib / SULInformation.c
1 /*
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`
6  */
7
8 #include "SULInformation.h"
9
10 #include "ProtocolExtensionContainer.h"
11 static int
12 memb_sUL_ARFCN_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
13                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
14         long value;
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         value = *(const long *)sptr;
24         
25         if((value >= 0 && value <= 3279165)) {
26                 /* Constraint check succeeded */
27                 return 0;
28         } else {
29                 ASN__CTFAIL(app_key, td, sptr,
30                         "%s: constraint failed (%s:%d)",
31                         td->name, __FILE__, __LINE__);
32                 return -1;
33         }
34 }
35
36 static asn_oer_constraints_t asn_OER_memb_sUL_ARFCN_constr_2 CC_NOTUSED = {
37         { 4, 1 }        /* (0..3279165) */,
38         -1};
39 static asn_per_constraints_t asn_PER_memb_sUL_ARFCN_constr_2 CC_NOTUSED = {
40         { APC_CONSTRAINED,       22, -1,  0,  3279165 } /* (0..3279165) */,
41         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
42         0, 0    /* No PER value map */
43 };
44 asn_TYPE_member_t asn_MBR_SULInformation_1[] = {
45         { ATF_NOFLAGS, 0, offsetof(struct SULInformation, sUL_ARFCN),
46                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
47                 -1,     /* IMPLICIT tag at current level */
48                 &asn_DEF_NativeInteger,
49                 0,
50                 { &asn_OER_memb_sUL_ARFCN_constr_2, &asn_PER_memb_sUL_ARFCN_constr_2,  memb_sUL_ARFCN_constraint_1 },
51                 0, 0, /* No default value */
52                 "sUL-ARFCN"
53                 },
54         { ATF_NOFLAGS, 0, offsetof(struct SULInformation, sUL_TxBW),
55                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
56                 -1,     /* IMPLICIT tag at current level */
57                 &asn_DEF_NR_TxBW,
58                 0,
59                 { 0, 0, 0 },
60                 0, 0, /* No default value */
61                 "sUL-TxBW"
62                 },
63         { ATF_POINTER, 1, offsetof(struct SULInformation, iE_Extensions),
64                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
65                 -1,     /* IMPLICIT tag at current level */
66                 &asn_DEF_ProtocolExtensionContainer_7683P199,
67                 0,
68                 { 0, 0, 0 },
69                 0, 0, /* No default value */
70                 "iE-Extensions"
71                 },
72 };
73 static const int asn_MAP_SULInformation_oms_1[] = { 2 };
74 static const ber_tlv_tag_t asn_DEF_SULInformation_tags_1[] = {
75         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
76 };
77 static const asn_TYPE_tag2member_t asn_MAP_SULInformation_tag2el_1[] = {
78     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sUL-ARFCN */
79     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sUL-TxBW */
80     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
81 };
82 asn_SEQUENCE_specifics_t asn_SPC_SULInformation_specs_1 = {
83         sizeof(struct SULInformation),
84         offsetof(struct SULInformation, _asn_ctx),
85         asn_MAP_SULInformation_tag2el_1,
86         3,      /* Count of tags in the map */
87         asn_MAP_SULInformation_oms_1,   /* Optional members */
88         1, 0,   /* Root/Additions */
89         3,      /* First extension addition */
90 };
91 asn_TYPE_descriptor_t asn_DEF_SULInformation = {
92         "SULInformation",
93         "SULInformation",
94         &asn_OP_SEQUENCE,
95         asn_DEF_SULInformation_tags_1,
96         sizeof(asn_DEF_SULInformation_tags_1)
97                 /sizeof(asn_DEF_SULInformation_tags_1[0]), /* 1 */
98         asn_DEF_SULInformation_tags_1,  /* Same as above */
99         sizeof(asn_DEF_SULInformation_tags_1)
100                 /sizeof(asn_DEF_SULInformation_tags_1[0]), /* 1 */
101         { 0, 0, SEQUENCE_constraint },
102         asn_MBR_SULInformation_1,
103         3,      /* Elements count */
104         &asn_SPC_SULInformation_specs_1 /* Additional specs */
105 };
106