EPICS Base  7.0.8.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dbServer.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2014 UChicago Argonne LLC, as Operator of Argonne
3 * National Laboratory.
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 
25 #ifndef INC_dbServer_H
26 #define INC_dbServer_H
27 
28 #include <stddef.h>
29 
30 #include "ellLib.h"
31 #include "dbCoreAPI.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
47 typedef struct dbServer {
50 
52  const char *name;
53 
58  void (* report) (unsigned level);
59 
65  void (* stats) (unsigned *channels, unsigned *clients);
66 
77  int (* client) (char *pBuf, size_t bufSize);
78 
91  void (* init) (void);
92 
97  void (* run) (void);
98 
103  void (* pause) (void);
104 
109  void (* stop) (void);
110 
113 } dbServer;
114 
115 
121 DBCORE_API int dbRegisterServer(dbServer *psrv);
122 
128 DBCORE_API int dbUnregisterServer(dbServer *psrv);
129 
136 DBCORE_API void dbsr(unsigned level);
137 
146 DBCORE_API int dbServerClient(char *pBuf, size_t bufSize);
147 
152 DBCORE_API void dbInitServers(void);
153 
158 DBCORE_API void dbRunServers(void);
159 
164 DBCORE_API void dbPauseServers(void);
165 
170 DBCORE_API void dbStopServers(void);
171 
172 #ifdef __cplusplus
173 }
174 #endif
175 
176 #endif /* INC_dbServer_H */
void(* pause)(void)
Server pause method.
Definition: dbServer.h:103
List node type.
Definition: ellLib.h:46
int(* client)(char *pBuf, size_t bufSize)
Get identity of client initiating the calling thread.
Definition: dbServer.h:77
void(* stats)(unsigned *channels, unsigned *clients)
Get number of channels and clients currently connected.
Definition: dbServer.h:65
DBCORE_API void dbInitServers(void)
Initialize all registered servers.
A doubly-linked list library.
void(* run)(void)
Server run method.
Definition: dbServer.h:97
void(* report)(unsigned level)
Print level-dependent status report to stdout.
Definition: dbServer.h:58
DBCORE_API void dbsr(unsigned level)
Print dbServer Reports.
Server information structure.
Definition: dbServer.h:47
DBCORE_API int dbUnregisterServer(dbServer *psrv)
Unregister a server layer.
DBCORE_API int dbRegisterServer(dbServer *psrv)
Register a server layer with the IOC.
const char * name
A short server identifier; printable, with no spaces.
Definition: dbServer.h:52
DBCORE_API void dbRunServers(void)
Run all registered servers.
void(* init)(void)
Server init method.
Definition: dbServer.h:91
ELLNODE node
Linked list node; initialize to ELLNODE_INIT.
Definition: dbServer.h:49
void(* stop)(void)
Server stop method.
Definition: dbServer.h:109
DBCORE_API int dbServerClient(char *pBuf, size_t bufSize)
Query servers for client&#39;s identity.
DBCORE_API void dbStopServers(void)
Stop all registered servers.
DBCORE_API void dbPauseServers(void)
Pause all registered servers.