Updated documentation for mock a1 tool
[ric-app/admin.git] / asn1c_defs / X2N_CoMPInformationStartTime.c
1 /*
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`
6  */
7
8 #include "X2N_CoMPInformationStartTime.h"
9
10 #include "X2N_ProtocolExtensionContainer.h"
11 static int
12 memb_X2N_startSFN_constraint_2(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
36 static int
37 memb_X2N_startSubframeNumber_constraint_2(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
61 static asn_per_constraints_t asn_PER_memb_X2N_startSFN_constr_3 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 };
66 static asn_per_constraints_t asn_PER_memb_X2N_startSubframeNumber_constr_4 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 };
71 asn_per_constraints_t asn_PER_type_X2N_CoMPInformationStartTime_constr_1 CC_NOTUSED = {
72         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
73         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (SIZE(0..1)) */,
74         0, 0    /* No PER value map */
75 };
76 static asn_TYPE_member_t asn_MBR_X2N_Member_2[] = {
77         { ATF_NOFLAGS, 0, offsetof(struct X2N_CoMPInformationStartTime__Member, startSFN),
78                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
79                 -1,     /* IMPLICIT tag at current level */
80                 &asn_DEF_NativeInteger,
81                 0,
82                 { 0, &asn_PER_memb_X2N_startSFN_constr_3,  memb_X2N_startSFN_constraint_2 },
83                 0, 0, /* No default value */
84                 "startSFN"
85                 },
86         { ATF_NOFLAGS, 0, offsetof(struct X2N_CoMPInformationStartTime__Member, startSubframeNumber),
87                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
88                 -1,     /* IMPLICIT tag at current level */
89                 &asn_DEF_NativeInteger,
90                 0,
91                 { 0, &asn_PER_memb_X2N_startSubframeNumber_constr_4,  memb_X2N_startSubframeNumber_constraint_2 },
92                 0, 0, /* No default value */
93                 "startSubframeNumber"
94                 },
95         { ATF_POINTER, 1, offsetof(struct X2N_CoMPInformationStartTime__Member, iE_Extensions),
96                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
97                 -1,     /* IMPLICIT tag at current level */
98                 &asn_DEF_X2N_ProtocolExtensionContainer_8231P120,
99                 0,
100                 { 0, 0, 0 },
101                 0, 0, /* No default value */
102                 "iE-Extensions"
103                 },
104 };
105 static const int asn_MAP_X2N_Member_oms_2[] = { 2 };
106 static const ber_tlv_tag_t asn_DEF_X2N_Member_tags_2[] = {
107         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
108 };
109 static const asn_TYPE_tag2member_t asn_MAP_X2N_Member_tag2el_2[] = {
110     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* startSFN */
111     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* startSubframeNumber */
112     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
113 };
114 static asn_SEQUENCE_specifics_t asn_SPC_X2N_Member_specs_2 = {
115         sizeof(struct X2N_CoMPInformationStartTime__Member),
116         offsetof(struct X2N_CoMPInformationStartTime__Member, _asn_ctx),
117         asn_MAP_X2N_Member_tag2el_2,
118         3,      /* Count of tags in the map */
119         asn_MAP_X2N_Member_oms_2,       /* Optional members */
120         1, 0,   /* Root/Additions */
121         3,      /* First extension addition */
122 };
123 static /* Use -fall-defs-global to expose */
124 asn_TYPE_descriptor_t asn_DEF_X2N_Member_2 = {
125         "SEQUENCE",
126         "SEQUENCE",
127         &asn_OP_SEQUENCE,
128         asn_DEF_X2N_Member_tags_2,
129         sizeof(asn_DEF_X2N_Member_tags_2)
130                 /sizeof(asn_DEF_X2N_Member_tags_2[0]), /* 1 */
131         asn_DEF_X2N_Member_tags_2,      /* Same as above */
132         sizeof(asn_DEF_X2N_Member_tags_2)
133                 /sizeof(asn_DEF_X2N_Member_tags_2[0]), /* 1 */
134         { 0, 0, SEQUENCE_constraint },
135         asn_MBR_X2N_Member_2,
136         3,      /* Elements count */
137         &asn_SPC_X2N_Member_specs_2     /* Additional specs */
138 };
139
140 asn_TYPE_member_t asn_MBR_X2N_CoMPInformationStartTime_1[] = {
141         { ATF_POINTER, 0, 0,
142                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
143                 0,
144                 &asn_DEF_X2N_Member_2,
145                 0,
146                 { 0, 0, 0 },
147                 0, 0, /* No default value */
148                 ""
149                 },
150 };
151 static const ber_tlv_tag_t asn_DEF_X2N_CoMPInformationStartTime_tags_1[] = {
152         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
153 };
154 asn_SET_OF_specifics_t asn_SPC_X2N_CoMPInformationStartTime_specs_1 = {
155         sizeof(struct X2N_CoMPInformationStartTime),
156         offsetof(struct X2N_CoMPInformationStartTime, _asn_ctx),
157         0,      /* XER encoding is XMLDelimitedItemList */
158 };
159 asn_TYPE_descriptor_t asn_DEF_X2N_CoMPInformationStartTime = {
160         "CoMPInformationStartTime",
161         "CoMPInformationStartTime",
162         &asn_OP_SEQUENCE_OF,
163         asn_DEF_X2N_CoMPInformationStartTime_tags_1,
164         sizeof(asn_DEF_X2N_CoMPInformationStartTime_tags_1)
165                 /sizeof(asn_DEF_X2N_CoMPInformationStartTime_tags_1[0]), /* 1 */
166         asn_DEF_X2N_CoMPInformationStartTime_tags_1,    /* Same as above */
167         sizeof(asn_DEF_X2N_CoMPInformationStartTime_tags_1)
168                 /sizeof(asn_DEF_X2N_CoMPInformationStartTime_tags_1[0]), /* 1 */
169         { 0, &asn_PER_type_X2N_CoMPInformationStartTime_constr_1, SEQUENCE_OF_constraint },
170         asn_MBR_X2N_CoMPInformationStartTime_1,
171         1,      /* Single element */
172         &asn_SPC_X2N_CoMPInformationStartTime_specs_1   /* Additional specs */
173 };
174