cu link failure fix
[o-du/l2.git] / src / codec_utils / F1AP / SNSSAI.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "F1AP-IEs"
4  *      found in "F1.asn1"
5  *      `asn1c -D ./out -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "SNSSAI.h"
9
10 #include "ProtocolExtensionContainer.h"
11 static int
12 memb_sST_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
13                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
14         const OCTET_STRING_t *st = (const OCTET_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         size = st->size;
25         
26         if((size == 1)) {
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 int
38 memb_sD_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
39                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
40         const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
41         size_t size;
42         
43         if(!sptr) {
44                 ASN__CTFAIL(app_key, td, sptr,
45                         "%s: value not given (%s:%d)",
46                         td->name, __FILE__, __LINE__);
47                 return -1;
48         }
49         
50         size = st->size;
51         
52         if((size == 3)) {
53                 /* Constraint check succeeded */
54                 return 0;
55         } else {
56                 ASN__CTFAIL(app_key, td, sptr,
57                         "%s: constraint failed (%s:%d)",
58                         td->name, __FILE__, __LINE__);
59                 return -1;
60         }
61 }
62
63 static asn_oer_constraints_t asn_OER_memb_sST_constr_2 CC_NOTUSED = {
64         { 0, 0 },
65         1       /* (SIZE(1..1)) */};
66 static asn_per_constraints_t asn_PER_memb_sST_constr_2 CC_NOTUSED = {
67         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
68         { APC_CONSTRAINED,       0,  0,  1,  1 }        /* (SIZE(1..1)) */,
69         0, 0    /* No PER value map */
70 };
71 static asn_oer_constraints_t asn_OER_memb_sD_constr_3 CC_NOTUSED = {
72         { 0, 0 },
73         3       /* (SIZE(3..3)) */};
74 static asn_per_constraints_t asn_PER_memb_sD_constr_3 CC_NOTUSED = {
75         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
76         { APC_CONSTRAINED,       0,  0,  3,  3 }        /* (SIZE(3..3)) */,
77         0, 0    /* No PER value map */
78 };
79 asn_TYPE_member_t asn_MBR_SNSSAI_1[] = {
80         { ATF_NOFLAGS, 0, offsetof(struct SNSSAI, sST),
81                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
82                 -1,     /* IMPLICIT tag at current level */
83                 &asn_DEF_OCTET_STRING,
84                 0,
85                 { &asn_OER_memb_sST_constr_2, &asn_PER_memb_sST_constr_2,  memb_sST_constraint_1 },
86                 0, 0, /* No default value */
87                 "sST"
88                 },
89         { ATF_POINTER, 2, offsetof(struct SNSSAI, sD),
90                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
91                 -1,     /* IMPLICIT tag at current level */
92                 &asn_DEF_OCTET_STRING,
93                 0,
94                 { &asn_OER_memb_sD_constr_3, &asn_PER_memb_sD_constr_3,  memb_sD_constraint_1 },
95                 0, 0, /* No default value */
96                 "sD"
97                 },
98         { ATF_POINTER, 1, offsetof(struct SNSSAI, iE_Extensions),
99                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
100                 -1,     /* IMPLICIT tag at current level */
101                 &asn_DEF_ProtocolExtensionContainer_4624P96,
102                 0,
103                 { 0, 0, 0 },
104                 0, 0, /* No default value */
105                 "iE-Extensions"
106                 },
107 };
108 static const int asn_MAP_SNSSAI_oms_1[] = { 1, 2 };
109 static const ber_tlv_tag_t asn_DEF_SNSSAI_tags_1[] = {
110         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
111 };
112 static const asn_TYPE_tag2member_t asn_MAP_SNSSAI_tag2el_1[] = {
113     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sST */
114     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sD */
115     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
116 };
117 asn_SEQUENCE_specifics_t asn_SPC_SNSSAI_specs_1 = {
118         sizeof(struct SNSSAI),
119         offsetof(struct SNSSAI, _asn_ctx),
120         asn_MAP_SNSSAI_tag2el_1,
121         3,      /* Count of tags in the map */
122         asn_MAP_SNSSAI_oms_1,   /* Optional members */
123         2, 0,   /* Root/Additions */
124         -1,     /* First extension addition */
125 };
126 asn_TYPE_descriptor_t asn_DEF_SNSSAI = {
127         "SNSSAI",
128         "SNSSAI",
129         &asn_OP_SEQUENCE,
130         asn_DEF_SNSSAI_tags_1,
131         sizeof(asn_DEF_SNSSAI_tags_1)
132                 /sizeof(asn_DEF_SNSSAI_tags_1[0]), /* 1 */
133         asn_DEF_SNSSAI_tags_1,  /* Same as above */
134         sizeof(asn_DEF_SNSSAI_tags_1)
135                 /sizeof(asn_DEF_SNSSAI_tags_1[0]), /* 1 */
136         { 0, 0, SEQUENCE_constraint },
137         asn_MBR_SNSSAI_1,
138         3,      /* Elements count */
139         &asn_SPC_SNSSAI_specs_1 /* Additional specs */
140 };
141