blob: 658ae760b81d76e2f77cba659663b4dd01dbb740 [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 "EnhancedRNTPStartTime.h"
9
10#include "ProtocolExtensionContainer.h"
11static int
12memb_startSFN_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 <= 1023)) {
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
36static int
37memb_startSubframeNumber_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
38 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
39 long value;
40
41 if(!sptr) {
42 ASN__CTFAIL(app_key, td, sptr,
43 "%s: value not given (%s:%d)",
44 td->name, __FILE__, __LINE__);
45 return -1;
46 }
47
48 value = *(const long *)sptr;
49
50 if((value >= 0 && value <= 9)) {
51 /* Constraint check succeeded */
52 return 0;
53 } else {
54 ASN__CTFAIL(app_key, td, sptr,
55 "%s: constraint failed (%s:%d)",
56 td->name, __FILE__, __LINE__);
57 return -1;
58 }
59}
60
61static asn_per_constraints_t asn_PER_memb_startSFN_constr_2 CC_NOTUSED = {
62 { APC_CONSTRAINED | APC_EXTENSIBLE, 10, 10, 0, 1023 } /* (0..1023,...) */,
63 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
64 0, 0 /* No PER value map */
65};
66static asn_per_constraints_t asn_PER_memb_startSubframeNumber_constr_3 CC_NOTUSED = {
67 { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 9 } /* (0..9,...) */,
68 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
69 0, 0 /* No PER value map */
70};
71asn_TYPE_member_t asn_MBR_EnhancedRNTPStartTime_1[] = {
72 { ATF_NOFLAGS, 0, offsetof(struct EnhancedRNTPStartTime, startSFN),
73 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
74 -1, /* IMPLICIT tag at current level */
75 &asn_DEF_NativeInteger,
76 0,
77 { 0, &asn_PER_memb_startSFN_constr_2, memb_startSFN_constraint_1 },
78 0, 0, /* No default value */
79 "startSFN"
80 },
81 { ATF_NOFLAGS, 0, offsetof(struct EnhancedRNTPStartTime, startSubframeNumber),
82 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
83 -1, /* IMPLICIT tag at current level */
84 &asn_DEF_NativeInteger,
85 0,
86 { 0, &asn_PER_memb_startSubframeNumber_constr_3, memb_startSubframeNumber_constraint_1 },
87 0, 0, /* No default value */
88 "startSubframeNumber"
89 },
90 { ATF_POINTER, 1, offsetof(struct EnhancedRNTPStartTime, iE_Extensions),
91 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
92 -1, /* IMPLICIT tag at current level */
93 &asn_DEF_ProtocolExtensionContainer_8858P41,
94 0,
95 { 0, 0, 0 },
96 0, 0, /* No default value */
97 "iE-Extensions"
98 },
99};
100static const int asn_MAP_EnhancedRNTPStartTime_oms_1[] = { 2 };
101static const ber_tlv_tag_t asn_DEF_EnhancedRNTPStartTime_tags_1[] = {
102 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
103};
104static const asn_TYPE_tag2member_t asn_MAP_EnhancedRNTPStartTime_tag2el_1[] = {
105 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* startSFN */
106 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* startSubframeNumber */
107 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
108};
109asn_SEQUENCE_specifics_t asn_SPC_EnhancedRNTPStartTime_specs_1 = {
110 sizeof(struct EnhancedRNTPStartTime),
111 offsetof(struct EnhancedRNTPStartTime, _asn_ctx),
112 asn_MAP_EnhancedRNTPStartTime_tag2el_1,
113 3, /* Count of tags in the map */
114 asn_MAP_EnhancedRNTPStartTime_oms_1, /* Optional members */
115 1, 0, /* Root/Additions */
116 3, /* First extension addition */
117};
118asn_TYPE_descriptor_t asn_DEF_EnhancedRNTPStartTime = {
119 "EnhancedRNTPStartTime",
120 "EnhancedRNTPStartTime",
121 &asn_OP_SEQUENCE,
122 asn_DEF_EnhancedRNTPStartTime_tags_1,
123 sizeof(asn_DEF_EnhancedRNTPStartTime_tags_1)
124 /sizeof(asn_DEF_EnhancedRNTPStartTime_tags_1[0]), /* 1 */
125 asn_DEF_EnhancedRNTPStartTime_tags_1, /* Same as above */
126 sizeof(asn_DEF_EnhancedRNTPStartTime_tags_1)
127 /sizeof(asn_DEF_EnhancedRNTPStartTime_tags_1[0]), /* 1 */
128 { 0, 0, SEQUENCE_constraint },
129 asn_MBR_EnhancedRNTPStartTime_1,
130 3, /* Elements count */
131 &asn_SPC_EnhancedRNTPStartTime_specs_1 /* Additional specs */
132};
133