2017-10-18 04:27:33 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
|
2004-06-03 03:38:44 +00:00
|
|
|
* Redistribution and modifications are permitted subject to BSD license.
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* This type differs from the standard ENUMERATED in that it is modelled using
|
|
|
|
* the fixed machine type (long, int, short), so it can hold only values of
|
|
|
|
* limited length. There is no type (i.e., NativeEnumerated_t, any integer type
|
|
|
|
* will do).
|
|
|
|
* This type may be used when integer range is limited by subtype constraints.
|
|
|
|
*/
|
|
|
|
#ifndef _NativeEnumerated_H_
|
|
|
|
#define _NativeEnumerated_H_
|
|
|
|
|
|
|
|
#include <NativeInteger.h>
|
|
|
|
|
2005-07-24 09:03:44 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2004-09-29 13:26:15 +00:00
|
|
|
extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated;
|
Move type operations to another structure
Every type has free, print, check_constraints, ber_decoder, der_encoder,
xer_decoder, xer_encoder, uper_decoder, uper_encoder and outmost_tag
operations. We move them out to a separate structure asn_TYPE_operation_t.
Combined with previous logic simplification, these operations are based
on ASN.1 basic types, constructed types and string types. So we can
reduce the space occupied by asn_TYPE_descriptor_t variables.
2017-08-19 17:25:45 +00:00
|
|
|
extern asn_TYPE_operation_t asn_OP_NativeEnumerated;
|
2004-06-03 03:38:44 +00:00
|
|
|
|
2005-03-29 17:19:53 +00:00
|
|
|
xer_type_encoder_f NativeEnumerated_encode_xer;
|
2017-08-28 03:34:58 +00:00
|
|
|
oer_type_decoder_f NativeEnumerated_decode_oer;
|
|
|
|
oer_type_encoder_f NativeEnumerated_encode_oer;
|
2005-11-26 11:25:14 +00:00
|
|
|
per_type_decoder_f NativeEnumerated_decode_uper;
|
2006-08-18 01:34:18 +00:00
|
|
|
per_type_encoder_f NativeEnumerated_encode_uper;
|
2005-03-29 17:19:53 +00:00
|
|
|
|
2016-05-16 05:50:09 +00:00
|
|
|
#define NativeEnumerated_free NativeInteger_free
|
|
|
|
#define NativeEnumerated_print NativeInteger_print
|
2017-08-10 09:14:59 +00:00
|
|
|
#define NativeEnumerated_compare NativeInteger_compare
|
2017-09-30 06:15:58 +00:00
|
|
|
#define NativeEnumerated_random_fill NativeInteger_random_fill
|
2016-05-16 05:50:09 +00:00
|
|
|
#define NativeEnumerated_constraint asn_generic_no_constraint
|
|
|
|
#define NativeEnumerated_decode_ber NativeInteger_decode_ber
|
|
|
|
#define NativeEnumerated_encode_der NativeInteger_encode_der
|
|
|
|
#define NativeEnumerated_decode_xer NativeInteger_decode_xer
|
|
|
|
|
2005-07-24 09:03:44 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2004-06-03 03:38:44 +00:00
|
|
|
#endif /* _NativeEnumerated_H_ */
|