EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cvtFast.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2013 UChicago Argonne LLC, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * SPDX-License-Identifier: EPICS
7 * EPICS BASE is distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
23 #ifndef INCcvtFasth
24 #define INCcvtFasth
25 
26 #include <stddef.h>
27 
28 #include "epicsTypes.h"
29 #include "libComAPI.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 LIBCOM_API int
36  cvtFloatToString(float val, char *pdest, epicsUInt16 prec);
37 LIBCOM_API int
38  cvtDoubleToString(double val, char *pdest, epicsUInt16 prec);
39 
40 LIBCOM_API int
41  cvtFloatToExpString(float val, char *pdest, epicsUInt16 prec);
42 LIBCOM_API int
43  cvtDoubleToExpString(double val, char *pdest, epicsUInt16 prec);
44 LIBCOM_API int
45  cvtFloatToCompactString(float val, char *pdest, epicsUInt16 prec);
46 LIBCOM_API int
47  cvtDoubleToCompactString(double val, char *pdest, epicsUInt16 prec);
48 
49 LIBCOM_API size_t
50  cvtInt32ToString(epicsInt32 val, char *pdest);
51 LIBCOM_API size_t
52  cvtUInt32ToString(epicsUInt32 val, char *pdest);
53 LIBCOM_API size_t
54  cvtInt64ToString(epicsInt64 val, char *pdest);
55 LIBCOM_API size_t
56  cvtUInt64ToString(epicsUInt64 val, char *pdest);
57 
58 LIBCOM_API size_t
59  cvtInt32ToHexString(epicsInt32 val, char *pdest);
60 LIBCOM_API size_t
61  cvtUInt32ToHexString(epicsUInt32 val, char *pdest);
62 LIBCOM_API size_t
63  cvtInt32ToOctalString(epicsInt32 val, char *pdest);
64 LIBCOM_API size_t
65  cvtInt64ToHexString(epicsInt64 val, char *pdest);
66 LIBCOM_API size_t
67  cvtUInt64ToHexString(epicsUInt64 val, char *pdest);
68 
69 /* Support the original names */
70 
71 #define cvtCharToString(val, str) cvtInt32ToString(val, str)
72 #define cvtUcharToString(val, str) cvtUInt32ToString(val, str)
73 #define cvtShortToString(val, str) cvtInt32ToString(val, str)
74 #define cvtUshortToString(val, str) cvtUInt32ToString(val, str)
75 #define cvtLongToString(val, str) cvtInt32ToString(val, str)
76 #define cvtUlongToString(val, str) cvtUInt32ToString(val, str)
77 
78 #define cvtLongToHexString(val, str) cvtInt32ToHexString(val, str)
79 #define cvtULongToHexString(val, str) cvtUInt32ToHexString(val, str)
80 #define cvtLongToOctalString(val, str) cvtInt32ToOctalString(val, str)
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif /*INCcvtFasth*/
The core data types used by epics.