added register functions
This commit is contained in:
@@ -5,9 +5,10 @@ include $(TOP)/configure/CONFIG
|
||||
#
|
||||
|
||||
INC += registry.h
|
||||
INC += registryRecordType.h
|
||||
INC += registryDeviceSupport.h
|
||||
INC += registryDriverSupport.h
|
||||
INC += registryRecordType.h
|
||||
INC += registryFunction.h
|
||||
|
||||
|
||||
# general contents of library on all platforms
|
||||
@@ -23,6 +24,7 @@ LIBSRCS += registry.c
|
||||
LIBSRCS += registryRecordType.c
|
||||
LIBSRCS += registryDeviceSupport.c
|
||||
LIBSRCS += registryDriverSupport.c
|
||||
LIBSRCS += registryFunction.c
|
||||
|
||||
LIBRARY_IOC = registryIoc
|
||||
registryIoc_DLL_LIBS = Com
|
||||
|
||||
@@ -13,9 +13,9 @@ of this distribution.
|
||||
|
||||
#include "dbBase.h"
|
||||
#include "devSup.h"
|
||||
#include "registry.h"
|
||||
#define epicsExportSharedSymbols
|
||||
#include "registryDeviceSupport.h"
|
||||
#include "registry.h"
|
||||
|
||||
const char *deviceSupport = "device support";
|
||||
static void *registryID = (void *)&deviceSupport;
|
||||
|
||||
@@ -13,9 +13,9 @@ of this distribution.
|
||||
|
||||
#include "dbBase.h"
|
||||
#include "drvSup.h"
|
||||
#include "registry.h"
|
||||
#define epicsExportSharedSymbols
|
||||
#include "registryDriverSupport.h"
|
||||
#include "registry.h"
|
||||
|
||||
const char *driverSupport = "driver support";
|
||||
static void *registryID = (void *)&driverSupport;
|
||||
|
||||
32
src/registry/registryFunction.c
Normal file
32
src/registry/registryFunction.c
Normal file
@@ -0,0 +1,32 @@
|
||||
/* registryFunction.c */
|
||||
|
||||
/* Author: Marty Kraimer Date: 01MAY2000 */
|
||||
|
||||
/********************COPYRIGHT NOTIFICATION**********************************
|
||||
This software was developed under a United States Government license
|
||||
described on the COPYRIGHT_UniversityOfChicago file included as part
|
||||
of this distribution.
|
||||
****************************************************************************/
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include "registry.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "registryFunction.h"
|
||||
|
||||
const char *function = "function";
|
||||
static void *registryID = (void *)&function;
|
||||
|
||||
|
||||
epicsShareFunc int epicsShareAPI registryFunctionAdd(
|
||||
const char *name,REGISTRYFUNCTION func)
|
||||
{
|
||||
return(registryAdd(registryID,name,(void *)func));
|
||||
}
|
||||
|
||||
epicsShareFunc REGISTRYFUNCTION epicsShareAPI registryFunctionFind(
|
||||
const char *name)
|
||||
{
|
||||
return((REGISTRYFUNCTION)registryFind(registryID,name));
|
||||
}
|
||||
23
src/registry/registryFunction.h
Normal file
23
src/registry/registryFunction.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef INCregistryFunctionh
|
||||
#define INCregistryFunctionh
|
||||
|
||||
#include "shareLib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*REGISTRYFUNCTION)(void);
|
||||
|
||||
/* c interface definitions */
|
||||
epicsShareFunc int epicsShareAPI registryFunctionAdd(
|
||||
const char *name,REGISTRYFUNCTION func);
|
||||
epicsShareFunc REGISTRYFUNCTION epicsShareAPI registryFunctionFind(
|
||||
const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* INCregistryFunctionh */
|
||||
@@ -12,9 +12,9 @@ of this distribution.
|
||||
#include <stddef.h>
|
||||
|
||||
#include "dbBase.h"
|
||||
#include "registry.h"
|
||||
#define epicsExportSharedSymbols
|
||||
#include "registryRecordType.h"
|
||||
#include "registry.h"
|
||||
|
||||
const char *recordType = "record type";
|
||||
static void *registryID = (void *)&recordType;
|
||||
|
||||
Reference in New Issue
Block a user