EPICS Base  7.0.7.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Classes | Functions
dbServer.h File Reference

The IOC's interface to the server layers that publish its PVs. More...

#include <stddef.h>
#include "ellLib.h"
#include "dbCoreAPI.h"
Include dependency graph for dbServer.h:

Go to the source code of this file.

Classes

struct  dbServer
 Server information structure. More...
 

Functions

DBCORE_API int dbRegisterServer (dbServer *psrv)
 Register a server layer with the IOC. More...
 
DBCORE_API int dbUnregisterServer (dbServer *psrv)
 Unregister a server layer. More...
 
DBCORE_API void dbsr (unsigned level)
 Print dbServer Reports. More...
 
DBCORE_API int dbServerClient (char *pBuf, size_t bufSize)
 Query servers for client's identity. More...
 
DBCORE_API void dbInitServers (void)
 Initialize all registered servers. More...
 
DBCORE_API void dbRunServers (void)
 Run all registered servers. More...
 
DBCORE_API void dbPauseServers (void)
 Pause all registered servers. More...
 
DBCORE_API void dbStopServers (void)
 Stop all registered servers. More...
 

Detailed Description

Author
Andrew Johnson anj@a.nosp@m.ps.a.nosp@m.nl.go.nosp@m.v

All server layers which publish IOC record data should initialize a dbServer structure and register it with the IOC. The methods that the dbServer interface provides allow the IOC to start, pause and stop the servers together, and to provide status and debugging information to the IOC user/developer through a common set of commands.

Todo:
No API is provided yet for calling stats() methods. Nothing in the IOC calls dbStopServers(), not sure where it should go.

Definition in file dbServer.h.

Function Documentation

DBCORE_API int dbRegisterServer ( dbServer psrv)

This should only be called once for each server layer.

Parameters
psrvServer information structure for the server
DBCORE_API int dbUnregisterServer ( dbServer psrv)

This should only be called when the servers are inactive.

Parameters
psrvServer information structure for the server
DBCORE_API void dbsr ( unsigned  level)

Calls the report methods of all registered servers. This routine is provided as an IOC Shell command.

Parameters
levelInterest level, specifies how much detail to print.
DBCORE_API int dbServerClient ( char *  pBuf,
size_t  bufSize 
)

This routine is called by code that wants to identify who (or what) is responsible for the thread which is currently running. Setting the TPRO field of a record is one way to trigger this; the identity of the calling thread is printed along with the record name whenever the record is subsequently processed.

DBCORE_API void dbInitServers ( void  )

Calls all dbServer::init() methods.

DBCORE_API void dbRunServers ( void  )

Calls all dbServer::run() methods.

DBCORE_API void dbPauseServers ( void  )

Calls all dbServer::pause() methods.

DBCORE_API void dbStopServers ( void  )

Calls all dbServer::stop() methods.