2 /*** <<< INCLUDES [T] >>> ***/
5 #include <OCTET_STRING.h>
7 #include <constr_SET.h>
8 #include <constr_SEQUENCE.h>
10 /*** <<< DEPS [T] >>> ***/
14 * Method of determining the components presence
16 typedef enum class_PR {
19 /*** <<< TYPE-DECLS [T] >>> ***/
26 * This type is extensible,
27 * possible extensions are below.
30 /* Presence bitmask: ASN_SET_ISPRESENT(pclass, class_PR_x) */
31 unsigned int _presence_map
32 [((0+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
34 /* Context for parsing across buffer boundaries */
35 asn_struct_ctx_t _asn_ctx;
39 /* Context for parsing across buffer boundaries */
40 asn_struct_ctx_t _asn_ctx;
43 /*** <<< FUNC-DECLS [T] >>> ***/
45 extern asn_TYPE_descriptor_t asn_DEF_T;
47 /*** <<< CODE [T] >>> ***/
50 memb_char_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
51 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
52 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
56 ASN__CTFAIL(app_key, td, sptr,
57 "%s: value not given (%s:%d)",
58 td->name, __FILE__, __LINE__);
65 /* Constraint check succeeded */
68 ASN__CTFAIL(app_key, td, sptr,
69 "%s: constraint failed (%s:%d)",
70 td->name, __FILE__, __LINE__);
76 /*** <<< STAT-DEFS [T] >>> ***/
78 static const ber_tlv_tag_t asn_DEF_class_tags_4[] = {
79 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
81 static const uint8_t asn_MAP_class_mmap_4[(0 + (8 * sizeof(unsigned int)) - 1) / 8] = {
85 asn_SET_specifics_t asn_SPC_class_specs_4 = {
87 offsetof(struct Class, _asn_ctx),
88 offsetof(struct Class, _presence_map),
89 0, /* No top level tags */
90 0, /* No tags in the map */
91 asn_MAP_class_tag2el_4, /* Same as above */
92 0, /* Count of tags in the CXER map */
93 1, /* Whether extensible */
94 (const unsigned int *)asn_MAP_class_mmap_4 /* Mandatory elements map */
96 static /* Use -fall-defs-global to expose */
97 asn_TYPE_descriptor_t asn_DEF_class_4 = {
101 asn_DEF_class_tags_4,
102 sizeof(asn_DEF_class_tags_4)
103 /sizeof(asn_DEF_class_tags_4[0]), /* 1 */
104 asn_DEF_class_tags_4, /* Same as above */
105 sizeof(asn_DEF_class_tags_4)
106 /sizeof(asn_DEF_class_tags_4[0]), /* 1 */
107 { 0, 0, SET_constraint },
108 0, 0, /* No members */
109 &asn_SPC_class_specs_4 /* Additional specs */
112 static asn_TYPE_member_t asn_MBR_T_1[] = {
113 { ATF_NOFLAGS, 0, offsetof(struct T, Int),
114 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
116 .type = &asn_DEF_INTEGER,
118 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
119 0, 0, /* No default value */
122 { ATF_NOFLAGS, 0, offsetof(struct T, Char),
123 .tag = (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
125 .type = &asn_DEF_OCTET_STRING,
127 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_char_constraint_1 },
128 0, 0, /* No default value */
131 { ATF_NOFLAGS, 0, offsetof(struct T, Class),
132 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
134 .type = &asn_DEF_class_4,
136 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
137 0, 0, /* No default value */
140 { ATF_NOFLAGS, 0, offsetof(struct T, Double),
141 .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)),
143 .type = &asn_DEF_REAL,
145 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
146 0, 0, /* No default value */
150 static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
151 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
153 static const asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
154 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* int */
155 { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* char */
156 { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 3, 0, 0 }, /* double */
157 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, 0, 0 } /* class */
159 static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
161 offsetof(struct T, _asn_ctx),
162 .tag2el = asn_MAP_T_tag2el_1,
163 .tag2el_count = 4, /* Count of tags in the map */
164 0, 0, 0, /* Optional elements (not needed) */
165 -1, /* First extension addition */
167 asn_TYPE_descriptor_t asn_DEF_T = {
172 sizeof(asn_DEF_T_tags_1)
173 /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
174 asn_DEF_T_tags_1, /* Same as above */
175 sizeof(asn_DEF_T_tags_1)
176 /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
177 { 0, 0, SEQUENCE_constraint },
179 4, /* Elements count */
180 &asn_SPC_T_specs_1 /* Additional specs */