make compatible with pvDataCPP-md; channelArray implemented; can be part of v3IOC.

This commit is contained in:
Marty Kraimer
2013-07-25 10:27:17 -04:00
parent 255f58aeb8
commit e40fe7b0ac
57 changed files with 2595 additions and 318 deletions

View File

@@ -0,0 +1,48 @@
TOP=../../../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
#==================================================
# Build an IOC support library
#
DBD += exampleServer.dbd
LIBRARY_IOC += exampleServerSupport
exampleServerSupport_SRCS += exampleServer.cpp
exampleServerSupport_LIBS += pvData
exampleServerSupport_LIBS += pvAccess
exampleServerSupport_LIBS += pvDatabase
exampleServerSupport_LIBS += pvDatabaseExample
exampleServerSupport_LIBS += $(EPICS_BASE_IOC_LIBS)
#=============================
# build an ioc application
PROD_IOC += exampleServer
# <name>_registerRecordDeviceDriver.cpp will be created from <name>.dbd
exampleServer_SRCS += exampleServer_registerRecordDeviceDriver.cpp
exampleServer_SRCS_DEFAULT += exampleServerMain.cpp
exampleServer_SRCS_vxWorks += -nil-
# The following adds support from base/src/vxWorks
exampleServer_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
exampleServer_LIBS += pvData pvAccess
exampleServer_LIBS += pvDatabase
exampleServer_LIBS += pvDatabaseExample
exampleServer_LIBS += exampleServerSupport
exampleServer_LIBS += $(EPICS_BASE_IOC_LIBS)
#===========================
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE

View File

@@ -0,0 +1,61 @@
/*exampleServer.cpp */
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* EPICS pvData is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
/**
* @author mrk
* @date 2013.07.24
*/
/* Author: Marty Kraimer */
#include <cstddef>
#include <cstdlib>
#include <cstddef>
#include <string>
#include <cstdio>
#include <memory>
#include <cantProceed.h>
#include <epicsStdio.h>
#include <epicsMutex.h>
#include <epicsEvent.h>
#include <epicsThread.h>
#include <iocsh.h>
#include <epicsExport.h>
#include <pv/pvIntrospect.h>
#include <pv/pvData.h>
#include <pv/pvAccess.h>
#include <pv/pvDatabase.h>
#include <pv/exampleServerCreateRecords.h>
using namespace epics::pvData;
using namespace epics::pvAccess;
using namespace epics::pvDatabase;
static const iocshArg testArg0 = { "prefix", iocshArgString };
static const iocshArg *testArgs[] = {
&testArg0};
static const iocshFuncDef exampleServerFuncDef = {
"exampleServerCreateRecords", 1, testArgs};
static void exampleServerCallFunc(const iocshArgBuf *args)
{
char *prefix = args[0].sval;
ExampleServerCreateRecords::create();
}
static void exampleServerRegister(void)
{
static int firstTime = 1;
if (firstTime) {
firstTime = 0;
iocshRegister(&exampleServerFuncDef, exampleServerCallFunc);
}
}
epicsExportRegistrar(exampleServerRegister);

View File

@@ -0,0 +1,3 @@
include "base.dbd"
include "PVAServerRegister.dbd"
registrar("exampleServerRegister")

View File

@@ -0,0 +1,31 @@
/* exampleServerMain.cpp */
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* EPICS pvData is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
/**
* @author mrk
* @date 2013.07.24
*/
#include <stddef.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include "epicsExit.h"
#include "epicsThread.h"
#include "iocsh.h"
int main(int argc,char *argv[])
{
if(argc>=2) {
iocsh(argv[1]);
epicsThreadSleep(.2);
}
iocsh(NULL);
epicsExit(0);
return(0);
}