EPICS Base  7.0.8.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 #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(
43  DBENTRY *pdbentry, EPICS_PRINTF_FMT(const char *fmt), ...
44 ) EPICS_PRINTF_STYLE(2,3);
45 
46 void dbPutStringSuggest(DBENTRY *pdbentry, const char *pstring);
47 
48 DBCORE_API
49 const char *dbOpenFile(DBBASE *pdbbase,const char *filename,FILE **fp);
50 
51 struct jlink;
52 
53 typedef struct dbLinkInfo {
54  short ltype;
55 
56  /* full link string for CONSTANT and PV_LINK,
57  * parm string for HW links, JSON for JSON_LINK
58  */
59  char *target;
60 
61  /* for PV_LINK */
62  short modifiers;
63 
64  /* for HW links */
65  char hwid[6]; /* one extra element for a nil */
66  int hwnums[5];
67 
68  /* for JSON_LINK */
69  struct jlink *jlink;
70 } dbLinkInfo;
71 
72 long dbInitRecordLinks(dbRecordType *rtyp, struct dbCommon *prec);
73 
74 /* Parse link string. no record locks needed.
75  * on success caller must free pinfo->target
76  */
77 DBCORE_API long dbParseLink(const char *str, short ftype, dbLinkInfo *pinfo);
78 /* Check if link type allow the parsed link value pinfo
79  * to be assigned to the given link.
80  * Record containing plink must be locked.
81  * Frees pinfo->target on failure.
82  */
83 long dbCanSetLink(DBLINK *plink, dbLinkInfo *pinfo, devSup *devsup);
84 /* Set link field. source record must be locked (target record too
85  * when a DB_LINK is created)
86  * Unconditionally takes ownership of pinfo->target
87  */
88 long dbSetLink(DBLINK *plink, dbLinkInfo *pinfo, devSup *dset);
89 /* Free dbLinkInfo storage */
90 DBCORE_API void dbFreeLinkInfo(dbLinkInfo *pinfo);
91 
92 /* The following is for path */
93 typedef struct dbPathNode {
94  ELLNODE node;
95  char *directory;
96 } dbPathNode;
97 
98 /* Element of the global gui group list */
99 typedef struct dbGuiGroup {
100  ELLNODE node;
101  short key;
102  char *name;
103 } dbGuiGroup;
104 
105 /*The following are in dbPvdLib.c*/
106 /*directory*/
107 typedef struct{
108  ELLNODE node;
109  dbRecordType *precordType;
110  dbRecordNode *precnode;
111 }PVDENTRY;
112 DBCORE_API int dbPvdTableSize(int size);
113 extern int dbStaticDebug;
114 void dbPvdInitPvt(DBBASE *pdbbase);
115 PVDENTRY *dbPvdFind(DBBASE *pdbbase,const char *name,size_t lenname);
116 PVDENTRY *dbPvdAdd(DBBASE *pdbbase,dbRecordType *precordType,dbRecordNode *precnode);
117 void dbPvdDelete(DBBASE *pdbbase,dbRecordNode *precnode);
118 void dbPvdFreeMem(DBBASE *pdbbase);
119 
120 DBCORE_API
121 char** dbCompleteRecord(const char *word);
122 
123 #ifdef __cplusplus
124 }
125 #endif
126 #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:175