EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dbFldTypes.h
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, 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 \*************************************************************************/
10 /*
11  * Author: Marty Kraimer
12  * Date: 6-1-90
13  */
14 #ifndef INCdbFldTypesh
15 #define INCdbFldTypesh 1
16 
17 #include "dbCoreAPI.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 /* field types */
24 typedef enum {
25  DBF_STRING,
26  DBF_CHAR,
27  DBF_UCHAR,
28  DBF_SHORT,
29  DBF_USHORT,
30  DBF_LONG,
31  DBF_ULONG,
32  DBF_INT64,
33  DBF_UINT64,
34  DBF_FLOAT,
35  DBF_DOUBLE,
36  DBF_ENUM,
37  DBF_MENU,
38  DBF_DEVICE,
39  DBF_INLINK,
40  DBF_OUTLINK,
41  DBF_FWDLINK,
42  DBF_NOACCESS
43 }dbfType;
44 #define DBF_NTYPES DBF_NOACCESS+1
45 
46 typedef struct mapdbfType{
47  char *strvalue;
48  dbfType value;
49 }mapdbfType;
50 
51 DBCORE_API extern mapdbfType pamapdbfType[];
52 #ifdef DBFLDTYPES_GBLSOURCE
53 mapdbfType pamapdbfType[DBF_NTYPES] = {
54  {"DBF_STRING",DBF_STRING},
55  {"DBF_CHAR",DBF_CHAR},
56  {"DBF_UCHAR",DBF_UCHAR},
57  {"DBF_SHORT",DBF_SHORT},
58  {"DBF_USHORT",DBF_USHORT},
59  {"DBF_LONG",DBF_LONG},
60  {"DBF_ULONG",DBF_ULONG},
61  {"DBF_INT64",DBF_INT64},
62  {"DBF_UINT64",DBF_UINT64},
63  {"DBF_FLOAT",DBF_FLOAT},
64  {"DBF_DOUBLE",DBF_DOUBLE},
65  {"DBF_ENUM",DBF_ENUM},
66  {"DBF_MENU",DBF_MENU},
67  {"DBF_DEVICE",DBF_DEVICE},
68  {"DBF_INLINK",DBF_INLINK},
69  {"DBF_OUTLINK",DBF_OUTLINK},
70  {"DBF_FWDLINK",DBF_FWDLINK},
71  {"DBF_NOACCESS",DBF_NOACCESS}
72 };
73 #endif /*DBFLDTYPES_GBLSOURCE*/
74 
75 /* data request buffer types */
76 #define DBR_STRING DBF_STRING
77 #define DBR_CHAR DBF_CHAR
78 #define DBR_UCHAR DBF_UCHAR
79 #define DBR_SHORT DBF_SHORT
80 #define DBR_USHORT DBF_USHORT
81 #define DBR_LONG DBF_LONG
82 #define DBR_ULONG DBF_ULONG
83 #define DBR_INT64 DBF_INT64
84 #define DBR_UINT64 DBF_UINT64
85 #define DBR_FLOAT DBF_FLOAT
86 #define DBR_DOUBLE DBF_DOUBLE
87 #define DBR_ENUM DBF_ENUM
88 #define DBR_PUT_ACKT DBR_ENUM+1
89 #define DBR_PUT_ACKS DBR_PUT_ACKT+1
90 #define DBR_NOACCESS DBF_NOACCESS
91 #define VALID_DB_REQ(x) ((x >= 0) && (x <= DBR_ENUM))
92 #define INVALID_DB_REQ(x) ((x < 0) || (x > DBR_ENUM))
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif /*INCdbFldTypesh*/
Definition: link.h:175