spatem_ts_CS8.c
Go to the documentation of this file.
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "AVIAEINumberingAndDataStructures"
4  * found in "/input/ISO14816_AVIAEINumberingAndDataStructures.asn"
5  * `asn1c -fcompound-names -fprefix=spatem_ts_ -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-example -gen-UPER -gen-JER`
6  */
7 
9 
10 static int
12  asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13  const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
14  size_t size;
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  if(st->size > 0) {
24  /* Size in bits */
25  size = 8 * st->size - (st->bits_unused & 0x07);
26  } else {
27  size = 0;
28  }
29 
30  if((size == 6UL)) {
31  /* Constraint check succeeded */
32  return 0;
33  } else {
34  ASN__CTFAIL(app_key, td, sptr,
35  "%s: constraint failed (%s:%d)",
36  td->name, __FILE__, __LINE__);
37  return -1;
38  }
39 }
40 
41 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
42 static asn_per_constraints_t asn_PER_memb_spatem_ts_fill_constr_2 CC_NOTUSED = {
43  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
44  { APC_CONSTRAINED, 0, 0, 6, 6 } /* (SIZE(6..6)) */,
45  0, 0 /* No PER value map */
46 };
47 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
48 #if !defined(ASN_DISABLE_JER_SUPPORT)
49 static asn_jer_constraints_t asn_JER_memb_spatem_ts_fill_constr_2 CC_NOTUSED = {
50  6};
51 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
53  { ATF_NOFLAGS, 0, offsetof(struct spatem_ts_CS8, fill),
54  (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
55  -1, /* IMPLICIT tag at current level */
57  0,
58  {
59 #if !defined(ASN_DISABLE_OER_SUPPORT)
60  0,
61 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
62 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
63  &asn_PER_memb_spatem_ts_fill_constr_2,
64 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
65 #if !defined(ASN_DISABLE_JER_SUPPORT)
66  &asn_JER_memb_spatem_ts_fill_constr_2,
67 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
69  },
70  0, 0, /* No default value */
71  "fill"
72  },
73  { ATF_NOFLAGS, 0, offsetof(struct spatem_ts_CS8, countryCode),
74  (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
75  -1, /* IMPLICIT tag at current level */
77  0,
78  {
79 #if !defined(ASN_DISABLE_OER_SUPPORT)
80  0,
81 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
82 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
83  0,
84 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
85 #if !defined(ASN_DISABLE_JER_SUPPORT)
86  0,
87 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
88  0
89  },
90  0, 0, /* No default value */
91  "countryCode"
92  },
93  { ATF_NOFLAGS, 0, offsetof(struct spatem_ts_CS8, taxCode),
94  (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
95  -1, /* IMPLICIT tag at current level */
97  0,
98  {
99 #if !defined(ASN_DISABLE_OER_SUPPORT)
100  0,
101 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
102 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
103  0,
104 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
105 #if !defined(ASN_DISABLE_JER_SUPPORT)
106  0,
107 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
108  0
109  },
110  0, 0, /* No default value */
111  "taxCode"
112  },
113 };
115  (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
116 };
118  { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* fill */
119  { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* countryCode */
120  { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* taxCode */
121 };
123  sizeof(struct spatem_ts_CS8),
126  3, /* Count of tags in the map */
127  0, 0, 0, /* Optional elements (not needed) */
128  -1, /* First extension addition */
129 };
131  "CS8",
132  "CS8",
136  /sizeof(asn_DEF_spatem_ts_CS8_tags_1[0]), /* 1 */
137  asn_DEF_spatem_ts_CS8_tags_1, /* Same as above */
139  /sizeof(asn_DEF_spatem_ts_CS8_tags_1[0]), /* 1 */
140  {
141 #if !defined(ASN_DISABLE_OER_SUPPORT)
142  0,
143 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
144 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
145  0,
146 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
147 #if !defined(ASN_DISABLE_JER_SUPPORT)
148  0,
149 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
151  },
153  3, /* Elements count */
154  &asn_SPC_spatem_ts_CS8_specs_1 /* Additional specs */
155 };
156 
asn_OP_SEQUENCE
asn_TYPE_operation_t asn_OP_SEQUENCE
Definition: constr_SEQUENCE.c:9
asn_app_constraint_failed_f
void() asn_app_constraint_failed_f(void *application_specific_key, const struct asn_TYPE_descriptor_s *type_descriptor_which_failed, const void *structure_which_failed_ptr, const char *error_message_format,...) CC_PRINTFLIKE(4
Definition: asn_application.h:167
ASN_TAG_CLASS_CONTEXT
@ ASN_TAG_CLASS_CONTEXT
Definition: ber_tlv_tag.h:15
ber_tlv_tag_t
unsigned ber_tlv_tag_t
Definition: ber_tlv_tag.h:18
CC_NOTUSED
static asn_per_constraints_t asn_PER_memb_spatem_ts_fill_constr_2 CC_NOTUSED
Definition: spatem_ts_CS8.c:42
asn_jer_constraints_s
Definition: jer_support.h:18
ASN_TAG_CLASS_UNIVERSAL
@ ASN_TAG_CLASS_UNIVERSAL
Definition: ber_tlv_tag.h:13
asn_TYPE_descriptor_s::name
const char * name
Definition: constr_TYPE.h:225
BIT_STRING_s::size
size_t size
Definition: BIT_STRING.h:16
asn_DEF_BIT_STRING
asn_TYPE_descriptor_t asn_DEF_BIT_STRING
Definition: BIT_STRING.c:77
asn_MBR_spatem_ts_CS8_1
static asn_TYPE_member_t asn_MBR_spatem_ts_CS8_1[]
Definition: spatem_ts_CS8.c:52
asn_TYPE_tag2member_s
Definition: constr_TYPE.h:289
BIT_STRING_s
Definition: BIT_STRING.h:14
asn_DEF_spatem_ts_CountryCode
asn_TYPE_descriptor_t asn_DEF_spatem_ts_CountryCode
Definition: spatem_ts_CountryCode.c:59
memb_spatem_ts_fill_constraint_1
static int memb_spatem_ts_fill_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: spatem_ts_CS8.c:11
spatem_ts_CS8.h
SEQUENCE_constraint
asn_constr_check_f SEQUENCE_constraint
Definition: constr_SEQUENCE.h:56
asn_TYPE_descriptor_s
Definition: constr_TYPE.h:224
offsetof
#define offsetof(s, m)
Definition: asn_system.h:132
asn_DEF_spatem_ts_TaxCode
asn_TYPE_descriptor_t asn_DEF_spatem_ts_TaxCode
Definition: spatem_ts_TaxCode.c:17
asn_MAP_spatem_ts_CS8_tag2el_1
static const asn_TYPE_tag2member_t asn_MAP_spatem_ts_CS8_tag2el_1[]
Definition: spatem_ts_CS8.c:117
asn_DEF_spatem_ts_CS8
asn_TYPE_descriptor_t asn_DEF_spatem_ts_CS8
Definition: spatem_ts_CS8.c:130
asn_DEF_spatem_ts_CS8_tags_1
static const ber_tlv_tag_t asn_DEF_spatem_ts_CS8_tags_1[]
Definition: spatem_ts_CS8.c:114
spatem_ts_CS8::_asn_ctx
asn_struct_ctx_t _asn_ctx
Definition: spatem_ts_CS8.h:31
asn_SPC_spatem_ts_CS8_specs_1
static asn_SEQUENCE_specifics_t asn_SPC_spatem_ts_CS8_specs_1
Definition: spatem_ts_CS8.c:122
ATF_NOFLAGS
@ ATF_NOFLAGS
Definition: constr_TYPE.h:267
asn_SEQUENCE_specifics_s
Definition: constr_SEQUENCE.h:14
ASN__CTFAIL
#define ASN__CTFAIL
Definition: constraints.h:57
spatem_ts_CS8
Definition: spatem_ts_CS8.h:25
asn_per_constraints_s
Definition: per_support.h:30
asn_TYPE_member_s
Definition: constr_TYPE.h:272
BIT_STRING_s::bits_unused
int bits_unused
Definition: BIT_STRING.h:18


etsi_its_spatem_ts_coding
Author(s): Jean-Pierre Busch , Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:29:28