Go to the documentation of this file.
13 #define RETURN(_code) \
16 rval.consumed = consumed_myself; \
21 #define JER_ADVANCE(num_bytes) \
23 size_t num = num_bytes; \
24 buf_ptr = (const void *)(((const char *)buf_ptr) + num); \
26 consumed_myself += num; \
36 void **struct_ptr,
const void *buf_ptr,
size_t size) {
45 void *st = *struct_ptr;
49 ssize_t consumed_myself = 0;
74 for(edx = ctx->step; ctx->phase <= 4;) {
87 unsigned old_present __attribute__((unused));
93 memb_ptr2 = (
void **)((
char *)st
97 memb_ptr2 = &memb_ptr;
107 ASN_DEBUG(
"JER/CHOICE: itdf: [%s] code=%d",
112 assert(old_present == 0 || old_present == edx + 1);
146 ASN_DEBUG(
"JER/CHOICE checked [%c%c%c%c] of [%s], scv=%d",
147 ch_size>0?((
const uint8_t *)buf_ptr)[0]:
'?',
148 ch_size>1?((
const uint8_t *)buf_ptr)[1]:
'?',
149 ch_size>2?((
const uint8_t *)buf_ptr)[2]:
'?',
150 ch_size>3?((
const uint8_t *)buf_ptr)[3]:
'?',
154 if(ctx->phase == 4) {
155 ASN_DEBUG(
"skip_unknown(%d, %ld)",
156 scv, (
long)ctx->left);
186 if(ctx->phase == 0) {
242 ASN_DEBUG(
"Got anticipated extension");
254 ASN_DEBUG(
"Unexpected JSON token [%c%c%c%c] in CHOICE [%s]"
256 ch_size>0?((
const uint8_t *)buf_ptr)[0]:
'?',
257 ch_size>1?((
const uint8_t *)buf_ptr)[1]:
'?',
258 ch_size>2?((
const uint8_t *)buf_ptr)[2]:
'?',
259 ch_size>3?((
const uint8_t *)buf_ptr)[3]:
'?',
260 td->
name, ctx->phase);
275 unsigned present = 0;
286 if(present == 0 || present > td->elements_count) {
291 const void *memb_ptr = NULL;
292 const char *mname = elm->
name;
293 unsigned int mlen = strlen(mname);
297 *(
const void *
const *)((
const char *)sptr + elm->
memb_offset);
300 memb_ptr = (
const void *)((
const char *)sptr + elm->
memb_offset);
316 ilevel + 1, flags, cb, app_key);
317 if(tmper.
encoded == -1)
return tmper;
#define ASN__ENCODED_OK(rval)
#define CALLOC(nmemb, size)
jer_type_encoder_f * jer_encoder
#define ASN__CALLBACK(buf, size)
asn_enc_rval_t CHOICE_encode_jer(const asn_TYPE_descriptor_t *td, const asn_jer_constraints_t *constraints, const void *sptr, int ilevel, enum jer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key)
#define ASN__CALLBACK3(buf1, size1, buf2, size2, buf3, size3)
enum pjer_chunk_type pjer_chunk_type_e
asn_dec_rval_t CHOICE_decode_jer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_jer_constraints_t *constraints, void **struct_ptr, const void *buf_ptr, size_t size)
#define ASN__ENCODE_FAILED
void _set_present_idx(void *sptr, unsigned offset, unsigned size, unsigned present)
asn_TYPE_descriptor_t * type
#define ASN__TEXT_INDENT(nl, level)
asn_TYPE_operation_t * op
const struct asn_jer_constraints_s * jer_constraints
jer_type_decoder_f * jer_decoder
#define JER_ADVANCE(num_bytes)
int jer_skip_unknown(jer_check_sym_e scv, ber_tlv_len_t *depth)
int() asn_app_consume_bytes_f(const void *buffer, size_t size, void *application_specific_key)
struct asn_TYPE_member_s * elements
unsigned _fetch_present_idx(const void *struct_ptr, unsigned off, unsigned size)
ssize_t jer_next_token(int *stateContext, const void *buffer, size_t size, pjer_chunk_type_e *_ch_type)
enum asn_TYPE_flags_e flags
enum jer_check_sym jer_check_sym_e
asn_encoding_constraints_t encoding_constraints
enum asn_dec_rval_code_e code
etsi_its_vam_ts_coding
Author(s): Jean-Pierre Busch
, Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:30:55