2 * Generated by asn1c-0.9.29 n1 (http://lionet.info/asn1c)
3 * From ASN.1 module "X2AP-IEs"
4 * found in "../../asn_defs/asn1/x2ap-15-04.asn"
5 * `asn1c -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-OER`
8 #include "X2N_ScheduledCommunicationTime.h"
10 #include "X2N_ProtocolExtensionContainer.h"
12 memb_X2N_dayofWeek_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);
32 /* Constraint check succeeded */
35 ASN__CTFAIL(app_key, td, sptr,
36 "%s: constraint failed (%s:%d)",
37 td->name, __FILE__, __LINE__);
43 memb_X2N_timeofDayStart_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 <= 86399)) {
57 /* Constraint check succeeded */
60 ASN__CTFAIL(app_key, td, sptr,
61 "%s: constraint failed (%s:%d)",
62 td->name, __FILE__, __LINE__);
68 memb_X2N_timeofDayEnd_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
69 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
73 ASN__CTFAIL(app_key, td, sptr,
74 "%s: value not given (%s:%d)",
75 td->name, __FILE__, __LINE__);
79 value = *(const long *)sptr;
81 if((value >= 0 && value <= 86399)) {
82 /* Constraint check succeeded */
85 ASN__CTFAIL(app_key, td, sptr,
86 "%s: constraint failed (%s:%d)",
87 td->name, __FILE__, __LINE__);
92 static asn_per_constraints_t asn_PER_memb_X2N_dayofWeek_constr_2 CC_NOTUSED = {
93 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
94 { APC_CONSTRAINED, 0, 0, 7, 7 } /* (SIZE(7..7)) */,
95 0, 0 /* No PER value map */
97 static asn_per_constraints_t asn_PER_memb_X2N_timeofDayStart_constr_3 CC_NOTUSED = {
98 { APC_CONSTRAINED | APC_EXTENSIBLE, 17, -1, 0, 86399 } /* (0..86399,...) */,
99 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
100 0, 0 /* No PER value map */
102 static asn_per_constraints_t asn_PER_memb_X2N_timeofDayEnd_constr_4 CC_NOTUSED = {
103 { APC_CONSTRAINED | APC_EXTENSIBLE, 17, -1, 0, 86399 } /* (0..86399,...) */,
104 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
105 0, 0 /* No PER value map */
107 asn_TYPE_member_t asn_MBR_X2N_ScheduledCommunicationTime_1[] = {
108 { ATF_POINTER, 4, offsetof(struct X2N_ScheduledCommunicationTime, dayofWeek),
109 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
110 -1, /* IMPLICIT tag at current level */
113 { 0, &asn_PER_memb_X2N_dayofWeek_constr_2, memb_X2N_dayofWeek_constraint_1 },
114 0, 0, /* No default value */
117 { ATF_POINTER, 3, offsetof(struct X2N_ScheduledCommunicationTime, timeofDayStart),
118 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
119 -1, /* IMPLICIT tag at current level */
120 &asn_DEF_NativeInteger,
122 { 0, &asn_PER_memb_X2N_timeofDayStart_constr_3, memb_X2N_timeofDayStart_constraint_1 },
123 0, 0, /* No default value */
126 { ATF_POINTER, 2, offsetof(struct X2N_ScheduledCommunicationTime, timeofDayEnd),
127 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
128 -1, /* IMPLICIT tag at current level */
129 &asn_DEF_NativeInteger,
131 { 0, &asn_PER_memb_X2N_timeofDayEnd_constr_4, memb_X2N_timeofDayEnd_constraint_1 },
132 0, 0, /* No default value */
135 { ATF_POINTER, 1, offsetof(struct X2N_ScheduledCommunicationTime, iE_Extensions),
136 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
137 -1, /* IMPLICIT tag at current level */
138 &asn_DEF_X2N_ProtocolExtensionContainer_8231P197,
141 0, 0, /* No default value */
145 static const int asn_MAP_X2N_ScheduledCommunicationTime_oms_1[] = { 0, 1, 2, 3 };
146 static const ber_tlv_tag_t asn_DEF_X2N_ScheduledCommunicationTime_tags_1[] = {
147 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
149 static const asn_TYPE_tag2member_t asn_MAP_X2N_ScheduledCommunicationTime_tag2el_1[] = {
150 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* dayofWeek */
151 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* timeofDayStart */
152 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* timeofDayEnd */
153 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
155 asn_SEQUENCE_specifics_t asn_SPC_X2N_ScheduledCommunicationTime_specs_1 = {
156 sizeof(struct X2N_ScheduledCommunicationTime),
157 offsetof(struct X2N_ScheduledCommunicationTime, _asn_ctx),
158 asn_MAP_X2N_ScheduledCommunicationTime_tag2el_1,
159 4, /* Count of tags in the map */
160 asn_MAP_X2N_ScheduledCommunicationTime_oms_1, /* Optional members */
161 4, 0, /* Root/Additions */
162 4, /* First extension addition */
164 asn_TYPE_descriptor_t asn_DEF_X2N_ScheduledCommunicationTime = {
165 "ScheduledCommunicationTime",
166 "ScheduledCommunicationTime",
168 asn_DEF_X2N_ScheduledCommunicationTime_tags_1,
169 sizeof(asn_DEF_X2N_ScheduledCommunicationTime_tags_1)
170 /sizeof(asn_DEF_X2N_ScheduledCommunicationTime_tags_1[0]), /* 1 */
171 asn_DEF_X2N_ScheduledCommunicationTime_tags_1, /* Same as above */
172 sizeof(asn_DEF_X2N_ScheduledCommunicationTime_tags_1)
173 /sizeof(asn_DEF_X2N_ScheduledCommunicationTime_tags_1[0]), /* 1 */
174 { 0, 0, SEQUENCE_constraint },
175 asn_MBR_X2N_ScheduledCommunicationTime_1,
176 4, /* Elements count */
177 &asn_SPC_X2N_ScheduledCommunicationTime_specs_1 /* Additional specs */