Updated documentation for mock a1 tool
[ric-app/admin.git] / asn1c_defs / X2N_SupportedSULFreqBandItem.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_SupportedSULFreqBandItem.h"
9
10 #include "X2N_ProtocolExtensionContainer.h"
11 static int
12 memb_X2N_freqBandIndicatorNr_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 >= 1 && value <= 1024)) {
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 asn_per_constraints_t asn_PER_memb_X2N_freqBandIndicatorNr_constr_2 CC_NOTUSED = {
37         { APC_CONSTRAINED | APC_EXTENSIBLE,  10,  10,  1,  1024 }       /* (1..1024,...) */,
38         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
39         0, 0    /* No PER value map */
40 };
41 asn_TYPE_member_t asn_MBR_X2N_SupportedSULFreqBandItem_1[] = {
42         { ATF_NOFLAGS, 0, offsetof(struct X2N_SupportedSULFreqBandItem, freqBandIndicatorNr),
43                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
44                 -1,     /* IMPLICIT tag at current level */
45                 &asn_DEF_NativeInteger,
46                 0,
47                 { 0, &asn_PER_memb_X2N_freqBandIndicatorNr_constr_2,  memb_X2N_freqBandIndicatorNr_constraint_1 },
48                 0, 0, /* No default value */
49                 "freqBandIndicatorNr"
50                 },
51         { ATF_POINTER, 1, offsetof(struct X2N_SupportedSULFreqBandItem, iE_Extensions),
52                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
53                 -1,     /* IMPLICIT tag at current level */
54                 &asn_DEF_X2N_ProtocolExtensionContainer_8231P200,
55                 0,
56                 { 0, 0, 0 },
57                 0, 0, /* No default value */
58                 "iE-Extensions"
59                 },
60 };
61 static const int asn_MAP_X2N_SupportedSULFreqBandItem_oms_1[] = { 1 };
62 static const ber_tlv_tag_t asn_DEF_X2N_SupportedSULFreqBandItem_tags_1[] = {
63         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
64 };
65 static const asn_TYPE_tag2member_t asn_MAP_X2N_SupportedSULFreqBandItem_tag2el_1[] = {
66     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* freqBandIndicatorNr */
67     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */
68 };
69 asn_SEQUENCE_specifics_t asn_SPC_X2N_SupportedSULFreqBandItem_specs_1 = {
70         sizeof(struct X2N_SupportedSULFreqBandItem),
71         offsetof(struct X2N_SupportedSULFreqBandItem, _asn_ctx),
72         asn_MAP_X2N_SupportedSULFreqBandItem_tag2el_1,
73         2,      /* Count of tags in the map */
74         asn_MAP_X2N_SupportedSULFreqBandItem_oms_1,     /* Optional members */
75         1, 0,   /* Root/Additions */
76         2,      /* First extension addition */
77 };
78 asn_TYPE_descriptor_t asn_DEF_X2N_SupportedSULFreqBandItem = {
79         "SupportedSULFreqBandItem",
80         "SupportedSULFreqBandItem",
81         &asn_OP_SEQUENCE,
82         asn_DEF_X2N_SupportedSULFreqBandItem_tags_1,
83         sizeof(asn_DEF_X2N_SupportedSULFreqBandItem_tags_1)
84                 /sizeof(asn_DEF_X2N_SupportedSULFreqBandItem_tags_1[0]), /* 1 */
85         asn_DEF_X2N_SupportedSULFreqBandItem_tags_1,    /* Same as above */
86         sizeof(asn_DEF_X2N_SupportedSULFreqBandItem_tags_1)
87                 /sizeof(asn_DEF_X2N_SupportedSULFreqBandItem_tags_1[0]), /* 1 */
88         { 0, 0, SEQUENCE_constraint },
89         asn_MBR_X2N_SupportedSULFreqBandItem_1,
90         2,      /* Elements count */
91         &asn_SPC_X2N_SupportedSULFreqBandItem_specs_1   /* Additional specs */
92 };
93