EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dbStaticPvt.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 /* dbStaticPvt.h */
11 /*
12  * Author: Marty Kraimer
13  * Date: 06Jun95
14  */
15 
16 #ifndef INCdbStaticPvth
17 #define INCdbStaticPvth 1
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 /*Following are not intended for client code */
24 dbDeviceMenu *dbGetDeviceMenu(DBENTRY *pdbentry);
25 void dbFreeLinkContents(struct link *plink);
26 void dbFreePath(DBBASE *pdbbase);
27 int dbIsMacroOk(DBENTRY *pdbentry);
28 
29 /*The following routines have different versions for run-time no-run-time*/
30 long dbAllocRecord(DBENTRY *pdbentry,const char *precordName);
31 long dbFreeRecord(DBENTRY *pdbentry);
32 
33 long dbGetFieldAddress(DBENTRY *pdbentry);
34 char *dbRecordName(DBENTRY *pdbentry);
35 
36 char *dbGetStringNum(DBENTRY *pdbentry);
37 long dbPutStringNum(DBENTRY *pdbentry,const char *pstring);
38 
39 void dbMsgPrint(DBENTRY *pdbentry, const char *fmt, ...) EPICS_PRINTF_STYLE(2,3);
40 
41 void dbPutStringSuggest(DBENTRY *pdbentry, const char *pstring);
42 
43 struct jlink;
44 
45 typedef struct dbLinkInfo {
46  short ltype;
47 
48  /* full link string for CONSTANT and PV_LINK,
49  * parm string for HW links, JSON for JSON_LINK
50  */
51  char *target;
52 
53  /* for PV_LINK */
54  short modifiers;
55 
56  /* for HW links */
57  char hwid[6]; /* one extra element for a nil */
58  int hwnums[5];
59 
60  /* for JSON_LINK */
61  struct jlink *jlink;
62 } dbLinkInfo;
63 
64 long dbInitRecordLinks(dbRecordType *rtyp, struct dbCommon *prec);
65 
66 /* Parse link string. no record locks needed.
67  * on success caller must free pinfo->target
68  */
69 DBCORE_API long dbParseLink(const char *str, short ftype, dbLinkInfo *pinfo);
70 /* Check if link type allow the parsed link value pinfo
71  * to be assigned to the given link.
72  * Record containing plink must be locked.
73  * Frees pinfo->target on failure.
74  */
75 long dbCanSetLink(DBLINK *plink, dbLinkInfo *pinfo, devSup *devsup);
76 /* Set link field. source record must be locked (target record too
77  * when a DB_LINK is created)
78  * Unconditionally takes ownership of pinfo->target
79  */
80 long dbSetLink(DBLINK *plink, dbLinkInfo *pinfo, devSup *dset);
81 /* Free dbLinkInfo storage */
82 DBCORE_API void dbFreeLinkInfo(dbLinkInfo *pinfo);
83 
84 /* The following is for path */
85 typedef struct dbPathNode {
86  ELLNODE node;
87  char *directory;
88 } dbPathNode;
89 
90 /* Element of the global gui group list */
91 typedef struct dbGuiGroup {
92  ELLNODE node;
93  short key;
94  char *name;
95 } dbGuiGroup;
96 
97 /*The following are in dbPvdLib.c*/
98 /*directory*/
99 typedef struct{
100  ELLNODE node;
101  dbRecordType *precordType;
102  dbRecordNode *precnode;
103 }PVDENTRY;
104 DBCORE_API int dbPvdTableSize(int size);
105 extern int dbStaticDebug;
106 void dbPvdInitPvt(DBBASE *pdbbase);
107 PVDENTRY *dbPvdFind(DBBASE *pdbbase,const char *name,size_t lenname);
108 PVDENTRY *dbPvdAdd(DBBASE *pdbbase,dbRecordType *precordType,dbRecordNode *precnode);
109 void dbPvdDelete(DBBASE *pdbbase,dbRecordNode *precnode);
110 void dbPvdFreeMem(DBBASE *pdbbase);
111 
112 #ifdef __cplusplus
113 }
114 #endif
115 #endif /*INCdbStaticPvth*/
List node type.
Definition: ellLib.h:46
Declaration of dbCommon.
Definition: dbCommon.h:18
Definition: devSup.h:141
Definition: dbBase.h:39
Definition: dbBase.h:171