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