EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dbUnitTest.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2013 Brookhaven National Laboratory.
3 * Copyright (c) 2013 ITER Organization.
4 * SPDX-License-Identifier: EPICS
5 * EPICS BASE is distributed subject to a Software License Agreement found
6 * in file LICENSE that is included with this distribution.
7  \*************************************************************************/
8 
16 #ifndef EPICSUNITTESTDB_H
17 #define EPICSUNITTESTDB_H
18 
19 #include <stdarg.h>
20 
21 #include "epicsUnitTest.h"
22 #include "dbAddr.h"
23 #include "dbCommon.h"
24 
25 #include "dbCoreAPI.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 DBCORE_API void testdbPrepare(void);
40 DBCORE_API void testdbReadDatabase(const char* file,
41  const char* path,
42  const char* substitutions);
47 DBCORE_API void testIocInitOk(void);
54 DBCORE_API void testIocShutdownOk(void);
59 DBCORE_API void testdbCleanup(void);
60 
69 DBCORE_API void testdbPutFieldOk(const char* pv, int dbrType, ...);
70 
75 DBCORE_API void testdbPutFieldFail(long status, const char* pv, int dbrType, ...);
76 
81 DBCORE_API long testdbVPutField(const char* pv, short dbrType, va_list ap);
82 
91 DBCORE_API void testdbGetFieldEqual(const char* pv, int dbrType, ...);
92 
97 DBCORE_API void testdbVGetFieldEqual(const char* pv, short dbrType, va_list ap);
98 
113 DBCORE_API void testdbPutArrFieldOk(const char* pv, short dbrType, unsigned long count, const void *pbuf);
114 
130 DBCORE_API void testdbGetArrFieldEqual(const char* pv, short dbfType, long nRequest, unsigned long pbufcnt, const void *pbuf);
131 
138 DBCORE_API dbCommon* testdbRecordPtr(const char* pv);
139 
140 typedef struct testMonitor testMonitor;
141 
143 DBCORE_API testMonitor* testMonitorCreate(const char* pvname, unsigned dbe_mask, unsigned opt);
145 DBCORE_API void testMonitorDestroy(testMonitor*);
150 DBCORE_API void testMonitorWait(testMonitor*);
158 DBCORE_API unsigned testMonitorCount(testMonitor*, unsigned reset);
159 
165 DBCORE_API void testSyncCallback(void);
166 
171 DBCORE_API void testGlobalLock(void);
172 
177 DBCORE_API void testGlobalUnlock(void);
178 
179 #ifdef __cplusplus
180 }
181 #endif
182 
341 #endif // EPICSUNITTESTDB_H
DBCORE_API void testGlobalUnlock(void)
DBCORE_API void testdbPutFieldFail(long status, const char *pv, int dbrType,...)
DBCORE_API testMonitor * testMonitorCreate(const char *pvname, unsigned dbe_mask, unsigned opt)
DBCORE_API void testdbVGetFieldEqual(const char *pv, short dbrType, va_list ap)
DBCORE_API void testdbGetArrFieldEqual(const char *pv, short dbfType, long nRequest, unsigned long pbufcnt, const void *pbuf)
Unit test routines.
DBCORE_API void testIocShutdownOk(void)
DBCORE_API void testMonitorDestroy(testMonitor *)
DBCORE_API dbCommon * testdbRecordPtr(const char *pv)
Declaration of dbCommon.
Definition: dbCommon.h:18
DBCORE_API void testdbPrepare(void)
DBCORE_API void testIocInitOk(void)
DBCORE_API void testSyncCallback(void)
DBCORE_API void testdbGetFieldEqual(const char *pv, int dbrType,...)
DBCORE_API long testdbVPutField(const char *pv, short dbrType, va_list ap)
DBCORE_API void testdbPutArrFieldOk(const char *pv, short dbrType, unsigned long count, const void *pbuf)
DBCORE_API void testGlobalLock(void)
Declarations for the dbCommon record type.
DBCORE_API void testMonitorWait(testMonitor *)
DBCORE_API void testdbCleanup(void)
DBCORE_API void testdbReadDatabase(const char *file, const char *path, const char *substitutions)
DBCORE_API unsigned testMonitorCount(testMonitor *, unsigned reset)
DBCORE_API void testdbPutFieldOk(const char *pv, int dbrType,...)