ITS
constr_CHOICE.c File Reference
#include <asn_internal.h>
#include <constr_CHOICE.h>
#include <per_opentype.h>
Include dependency graph for constr_CHOICE.c:

Go to the source code of this file.

Macros

#define LEFT   ((size<(size_t)ctx->left)?size:(size_t)ctx->left)
 
#define SIZE_VIOLATION   (ctx->left >= 0 && (size_t)ctx->left <= size)
 
#define ADVANCE(num_bytes)
 
#define NEXT_PHASE(ctx)
 
#define RETURN(_code)
 
#define XER_ADVANCE(num_bytes)
 

Functions

static int _fetch_present_idx (const void *struct_ptr, int off, int size)
 
static void _set_present_idx (void *sptr, int offset, int size, int pres)
 
static int _search4tag (const void *ap, const void *bp)
 
asn_dec_rval_t CHOICE_decode_ber (asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, void **struct_ptr, const void *ptr, size_t size, int tag_mode)
 
asn_enc_rval_t CHOICE_encode_der (asn_TYPE_descriptor_t *td, void *sptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key)
 
ber_tlv_tag_t CHOICE_outmost_tag (asn_TYPE_descriptor_t *td, const void *ptr, int tag_mode, ber_tlv_tag_t tag)
 
int CHOICE_constraint (asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
 
asn_dec_rval_t CHOICE_decode_xer (asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, void **struct_ptr, const char *opt_mname, const void *buf_ptr, size_t size)
 
asn_enc_rval_t CHOICE_encode_xer (asn_TYPE_descriptor_t *td, void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key)
 
asn_dec_rval_t CHOICE_decode_uper (asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd)
 
asn_enc_rval_t CHOICE_encode_uper (asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void *sptr, asn_per_outp_t *po)
 
int CHOICE_print (asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key)
 
void CHOICE_free (asn_TYPE_descriptor_t *td, void *ptr, int contents_only)
 

Macro Definition Documentation

◆ ADVANCE

#define ADVANCE (   num_bytes)
Value:
do { \
size_t num = num_bytes; \
ptr = ((const char *)ptr) + num;\
size -= num; \
if(ctx->left >= 0) \
ctx->left -= num; \
consumed_myself += num; \
} while(0)

Definition at line 35 of file constr_CHOICE.c.

Referenced by CHOICE_decode_ber().

◆ LEFT

#define LEFT   ((size<(size_t)ctx->left)?size:(size_t)ctx->left)

Definition at line 15 of file constr_CHOICE.c.

Referenced by CHOICE_decode_ber().

◆ NEXT_PHASE

#define NEXT_PHASE (   ctx)
Value:
do { \
ctx->phase++; \
ctx->step = 0; \
} while(0)

Definition at line 48 of file constr_CHOICE.c.

Referenced by CHOICE_decode_ber().

◆ RETURN

#define RETURN (   _code)
Value:
do { \
rval.code = _code; \
rval.consumed = consumed_myself;\
return rval; \
} while(0)

Definition at line 57 of file constr_CHOICE.c.

Referenced by CHOICE_decode_ber(), and CHOICE_decode_xer().

◆ SIZE_VIOLATION

#define SIZE_VIOLATION   (ctx->left >= 0 && (size_t)ctx->left <= size)

Definition at line 28 of file constr_CHOICE.c.

Referenced by CHOICE_decode_ber().

◆ XER_ADVANCE

#define XER_ADVANCE (   num_bytes)
Value:
do { \
size_t num = num_bytes; \
buf_ptr = (const void *)(((const char *)buf_ptr) + num); \
size -= num; \
consumed_myself += num; \
} while(0)

Definition at line 536 of file constr_CHOICE.c.

Referenced by CHOICE_decode_xer().

Function Documentation

◆ _fetch_present_idx()

static int _fetch_present_idx ( const void *  struct_ptr,
int  off,
int  size 
)
static

Definition at line 1081 of file constr_CHOICE.c.

Referenced by CHOICE_constraint(), CHOICE_decode_xer(), CHOICE_encode_der(), CHOICE_encode_uper(), CHOICE_encode_xer(), CHOICE_free(), CHOICE_outmost_tag(), and CHOICE_print().

Here is the caller graph for this function:

◆ _search4tag()

static int _search4tag ( const void *  ap,
const void *  bp 
)
static

Definition at line 73 of file constr_CHOICE.c.

References BER_TAG_CLASS, BER_TAG_VALUE, and asn_TYPE_tag2member_s::el_tag.

Referenced by CHOICE_decode_ber().

Here is the caller graph for this function:

◆ _set_present_idx()

static void _set_present_idx ( void *  sptr,
int  offset,
int  size,
int  pres 
)
static

Definition at line 1101 of file constr_CHOICE.c.

Referenced by CHOICE_decode_ber(), CHOICE_decode_uper(), and CHOICE_decode_xer().

Here is the caller graph for this function:

◆ CHOICE_constraint()

◆ CHOICE_decode_ber()

◆ CHOICE_decode_uper()

◆ CHOICE_decode_xer()

◆ CHOICE_encode_der()

asn_enc_rval_t CHOICE_encode_der ( asn_TYPE_descriptor_t td,
void *  sptr,
int  tag_mode,
ber_tlv_tag_t  tag,
asn_app_consume_bytes_f cb,
void *  app_key 
)

◆ CHOICE_encode_uper()

◆ CHOICE_encode_xer()

◆ CHOICE_free()

void CHOICE_free ( asn_TYPE_descriptor_t td,
void *  ptr,
int  contents_only 
)

◆ CHOICE_outmost_tag()

ber_tlv_tag_t CHOICE_outmost_tag ( asn_TYPE_descriptor_t td,
const void *  ptr,
int  tag_mode,
ber_tlv_tag_t  tag 
)

◆ CHOICE_print()

int CHOICE_print ( asn_TYPE_descriptor_t td,
const void *  sptr,
int  ilevel,
asn_app_consume_bytes_f cb,
void *  app_key 
)