vlm | 785435b | 2004-09-14 12:46:35 +0000 | [diff] [blame] | 1 | /*- |
| 2 | * Copyright (c) 2004 Lev Walkin <vlm@lionet.info>. All rights reserved. |
| 3 | * Redistribution and modifications are permitted subject to BSD license. |
| 4 | */ |
| 5 | #ifndef ASN_TYPE_REAL_H |
| 6 | #define ASN_TYPE_REAL_H |
| 7 | |
vlm | d157958 | 2004-09-24 21:00:50 +0000 | [diff] [blame] | 8 | #include <asn_application.h> |
vlm | 3b6e112 | 2004-10-21 11:22:12 +0000 | [diff] [blame] | 9 | #include <asn_codecs_prim.h> |
vlm | 785435b | 2004-09-14 12:46:35 +0000 | [diff] [blame] | 10 | |
vlm | 6678cb1 | 2004-09-26 13:10:40 +0000 | [diff] [blame] | 11 | typedef ASN__PRIMITIVE_TYPE_t REAL_t; |
vlm | 785435b | 2004-09-14 12:46:35 +0000 | [diff] [blame] | 12 | |
vlm | ef6355b | 2004-09-29 13:26:15 +0000 | [diff] [blame] | 13 | extern asn_TYPE_descriptor_t asn_DEF_REAL; |
vlm | 785435b | 2004-09-14 12:46:35 +0000 | [diff] [blame] | 14 | |
| 15 | asn_struct_print_f REAL_print; |
vlm | cce2ddb | 2004-10-21 13:37:57 +0000 | [diff] [blame] | 16 | xer_type_decoder_f REAL_decode_xer; |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 17 | xer_type_encoder_f REAL_encode_xer; |
vlm | 785435b | 2004-09-14 12:46:35 +0000 | [diff] [blame] | 18 | |
| 19 | /*********************************** |
| 20 | * Some handy conversion routines. * |
| 21 | ***********************************/ |
| 22 | |
vlm | 39ba4c4 | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 23 | ssize_t REAL__dump(double d, int canonical, asn_app_consume_bytes_f *cb, void *app_key); |
| 24 | |
vlm | 785435b | 2004-09-14 12:46:35 +0000 | [diff] [blame] | 25 | /* |
| 26 | * Convert between native double type and REAL representation (DER). |
| 27 | * RETURN VALUES: |
| 28 | * 0: Value converted successfully |
| 29 | * -1: An error occured while converting the value: invalid format. |
| 30 | */ |
vlm | ef6355b | 2004-09-29 13:26:15 +0000 | [diff] [blame] | 31 | int asn_REAL2double(const REAL_t *real_ptr, double *d); |
| 32 | int asn_double2REAL(REAL_t *real_ptr, double d); |
vlm | 785435b | 2004-09-14 12:46:35 +0000 | [diff] [blame] | 33 | |
| 34 | #endif /* ASN_TYPE_REAL_H */ |