Updated documentation for mock a1 tool
[ric-app/admin.git] / asn1c_defs / X2N_UsableABSInformationTDD.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_UsableABSInformationTDD.h"
9
10 #include "X2N_ProtocolExtensionContainer.h"
11 static int
12 memb_X2N_usaable_abs_pattern_info_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;
15         size_t size;
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         if(st->size > 0) {
25                 /* Size in bits */
26                 size = 8 * st->size - (st->bits_unused & 0x07);
27         } else {
28                 size = 0;
29         }
30         
31         if((size >= 1 && size <= 70)) {
32                 /* Constraint check succeeded */
33                 return 0;
34         } else {
35                 ASN__CTFAIL(app_key, td, sptr,
36                         "%s: constraint failed (%s:%d)",
37                         td->name, __FILE__, __LINE__);
38                 return -1;
39         }
40 }
41
42 static asn_per_constraints_t asn_PER_memb_X2N_usaable_abs_pattern_info_constr_2 CC_NOTUSED = {
43         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
44         { APC_CONSTRAINED | APC_EXTENSIBLE,  7,  7,  1,  70 }   /* (SIZE(1..70,...)) */,
45         0, 0    /* No PER value map */
46 };
47 asn_TYPE_member_t asn_MBR_X2N_UsableABSInformationTDD_1[] = {
48         { ATF_NOFLAGS, 0, offsetof(struct X2N_UsableABSInformationTDD, usaable_abs_pattern_info),
49                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
50                 -1,     /* IMPLICIT tag at current level */
51                 &asn_DEF_BIT_STRING,
52                 0,
53                 { 0, &asn_PER_memb_X2N_usaable_abs_pattern_info_constr_2,  memb_X2N_usaable_abs_pattern_info_constraint_1 },
54                 0, 0, /* No default value */
55                 "usaable-abs-pattern-info"
56                 },
57         { ATF_POINTER, 1, offsetof(struct X2N_UsableABSInformationTDD, iE_Extensions),
58                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
59                 -1,     /* IMPLICIT tag at current level */
60                 &asn_DEF_X2N_ProtocolExtensionContainer_8231P219,
61                 0,
62                 { 0, 0, 0 },
63                 0, 0, /* No default value */
64                 "iE-Extensions"
65                 },
66 };
67 static const int asn_MAP_X2N_UsableABSInformationTDD_oms_1[] = { 1 };
68 static const ber_tlv_tag_t asn_DEF_X2N_UsableABSInformationTDD_tags_1[] = {
69         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
70 };
71 static const asn_TYPE_tag2member_t asn_MAP_X2N_UsableABSInformationTDD_tag2el_1[] = {
72     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* usaable-abs-pattern-info */
73     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */
74 };
75 asn_SEQUENCE_specifics_t asn_SPC_X2N_UsableABSInformationTDD_specs_1 = {
76         sizeof(struct X2N_UsableABSInformationTDD),
77         offsetof(struct X2N_UsableABSInformationTDD, _asn_ctx),
78         asn_MAP_X2N_UsableABSInformationTDD_tag2el_1,
79         2,      /* Count of tags in the map */
80         asn_MAP_X2N_UsableABSInformationTDD_oms_1,      /* Optional members */
81         1, 0,   /* Root/Additions */
82         2,      /* First extension addition */
83 };
84 asn_TYPE_descriptor_t asn_DEF_X2N_UsableABSInformationTDD = {
85         "UsableABSInformationTDD",
86         "UsableABSInformationTDD",
87         &asn_OP_SEQUENCE,
88         asn_DEF_X2N_UsableABSInformationTDD_tags_1,
89         sizeof(asn_DEF_X2N_UsableABSInformationTDD_tags_1)
90                 /sizeof(asn_DEF_X2N_UsableABSInformationTDD_tags_1[0]), /* 1 */
91         asn_DEF_X2N_UsableABSInformationTDD_tags_1,     /* Same as above */
92         sizeof(asn_DEF_X2N_UsableABSInformationTDD_tags_1)
93                 /sizeof(asn_DEF_X2N_UsableABSInformationTDD_tags_1[0]), /* 1 */
94         { 0, 0, SEQUENCE_constraint },
95         asn_MBR_X2N_UsableABSInformationTDD_1,
96         2,      /* Elements count */
97         &asn_SPC_X2N_UsableABSInformationTDD_specs_1    /* Additional specs */
98 };
99