Updated documentation for mock a1 tool
[ric-app/admin.git] / asn1c_defs / X2N_DataTrafficResourceIndication.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_DataTrafficResourceIndication.h"
9
10 #include "X2N_ReservedSubframePattern.h"
11 #include "X2N_ProtocolExtensionContainer.h"
12 static int
13 memb_X2N_activationSFN_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
14                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
15         long value;
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         value = *(const long *)sptr;
25         
26         if((value >= 0 && value <= 1023)) {
27                 /* Constraint check succeeded */
28                 return 0;
29         } else {
30                 ASN__CTFAIL(app_key, td, sptr,
31                         "%s: constraint failed (%s:%d)",
32                         td->name, __FILE__, __LINE__);
33                 return -1;
34         }
35 }
36
37 static asn_per_constraints_t asn_PER_memb_X2N_activationSFN_constr_2 CC_NOTUSED = {
38         { APC_CONSTRAINED,       10,  10,  0,  1023 }   /* (0..1023) */,
39         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
40         0, 0    /* No PER value map */
41 };
42 static asn_TYPE_member_t asn_MBR_X2N_DataTrafficResourceIndication_1[] = {
43         { ATF_NOFLAGS, 0, offsetof(struct X2N_DataTrafficResourceIndication, activationSFN),
44                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
45                 -1,     /* IMPLICIT tag at current level */
46                 &asn_DEF_NativeInteger,
47                 0,
48                 { 0, &asn_PER_memb_X2N_activationSFN_constr_2,  memb_X2N_activationSFN_constraint_1 },
49                 0, 0, /* No default value */
50                 "activationSFN"
51                 },
52         { ATF_NOFLAGS, 0, offsetof(struct X2N_DataTrafficResourceIndication, sharedResourceType),
53                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
54                 +1,     /* EXPLICIT tag at current level */
55                 &asn_DEF_X2N_SharedResourceType,
56                 0,
57                 { 0, 0, 0 },
58                 0, 0, /* No default value */
59                 "sharedResourceType"
60                 },
61         { ATF_POINTER, 2, offsetof(struct X2N_DataTrafficResourceIndication, reservedSubframePattern),
62                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
63                 -1,     /* IMPLICIT tag at current level */
64                 &asn_DEF_X2N_ReservedSubframePattern,
65                 0,
66                 { 0, 0, 0 },
67                 0, 0, /* No default value */
68                 "reservedSubframePattern"
69                 },
70         { ATF_POINTER, 1, offsetof(struct X2N_DataTrafficResourceIndication, iE_Extensions),
71                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
72                 -1,     /* IMPLICIT tag at current level */
73                 &asn_DEF_X2N_ProtocolExtensionContainer_8231P131,
74                 0,
75                 { 0, 0, 0 },
76                 0, 0, /* No default value */
77                 "iE-Extensions"
78                 },
79 };
80 static const int asn_MAP_X2N_DataTrafficResourceIndication_oms_1[] = { 2, 3 };
81 static const ber_tlv_tag_t asn_DEF_X2N_DataTrafficResourceIndication_tags_1[] = {
82         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
83 };
84 static const asn_TYPE_tag2member_t asn_MAP_X2N_DataTrafficResourceIndication_tag2el_1[] = {
85     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* activationSFN */
86     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sharedResourceType */
87     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* reservedSubframePattern */
88     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
89 };
90 static asn_SEQUENCE_specifics_t asn_SPC_X2N_DataTrafficResourceIndication_specs_1 = {
91         sizeof(struct X2N_DataTrafficResourceIndication),
92         offsetof(struct X2N_DataTrafficResourceIndication, _asn_ctx),
93         asn_MAP_X2N_DataTrafficResourceIndication_tag2el_1,
94         4,      /* Count of tags in the map */
95         asn_MAP_X2N_DataTrafficResourceIndication_oms_1,        /* Optional members */
96         2, 0,   /* Root/Additions */
97         4,      /* First extension addition */
98 };
99 asn_TYPE_descriptor_t asn_DEF_X2N_DataTrafficResourceIndication = {
100         "DataTrafficResourceIndication",
101         "DataTrafficResourceIndication",
102         &asn_OP_SEQUENCE,
103         asn_DEF_X2N_DataTrafficResourceIndication_tags_1,
104         sizeof(asn_DEF_X2N_DataTrafficResourceIndication_tags_1)
105                 /sizeof(asn_DEF_X2N_DataTrafficResourceIndication_tags_1[0]), /* 1 */
106         asn_DEF_X2N_DataTrafficResourceIndication_tags_1,       /* Same as above */
107         sizeof(asn_DEF_X2N_DataTrafficResourceIndication_tags_1)
108                 /sizeof(asn_DEF_X2N_DataTrafficResourceIndication_tags_1[0]), /* 1 */
109         { 0, 0, SEQUENCE_constraint },
110         asn_MBR_X2N_DataTrafficResourceIndication_1,
111         4,      /* Elements count */
112         &asn_SPC_X2N_DataTrafficResourceIndication_specs_1      /* Additional specs */
113 };
114