src/V3IOC removed, moved to pvAccessCPP

This commit is contained in:
Matej Sekoranja
2014-02-13 00:00:23 +01:00
parent a21189cfda
commit 51f4820c24
6 changed files with 0 additions and 268 deletions

View File

@ -23,13 +23,6 @@ LIBSRCS += monitorFactory.cpp
LIBSRCS += channelLocal.cpp
LIBSRCS += registerChannelProviderLocal.cpp
SRC_DIRS += $(DATABASE)/V3IOC
INC += syncChannelFind.h
DBD += PVAServerRegister.dbd
DBD += PVAClientRegister.dbd
LIBSRCS += PVAServerRegister.cpp
LIBSRCS += PVAClientRegister.cpp
SRC_DIRS += $(DATABASE)/special
INC += recordList.h
INC += traceRecord.h

View File

@ -1,72 +0,0 @@
/*PVAClientRegister.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.08.05
*/
/* Author: Marty Kraimer */
#include <cstddef>
#include <cstdlib>
#include <cstddef>
#include <string>
#include <cstdio>
#include <memory>
#include <iostream>
#include <iocsh.h>
#include <epicsExport.h>
#include <pv/pvAccess.h>
#include <pv/clientFactory.h>
using std::cout;
using std::endl;
using namespace epics::pvData;
using namespace epics::pvAccess;
static const iocshFuncDef startPVAClientFuncDef = {
"startPVAClient", 0, 0
};
extern "C" void startPVAClient(const iocshArgBuf *args)
{
ClientFactory::start();
}
static const iocshFuncDef stopPVAClientFuncDef = {
"stopPVAClient", 0, 0
};
extern "C" void stopPVAClient(const iocshArgBuf *args)
{
ClientFactory::stop();
}
static void startPVAClientRegister(void)
{
static int firstTime = 1;
if (firstTime) {
firstTime = 0;
iocshRegister(&startPVAClientFuncDef, startPVAClient);
}
}
static void stopPVAClientRegister(void)
{
static int firstTime = 1;
if (firstTime) {
firstTime = 0;
iocshRegister(&stopPVAClientFuncDef, stopPVAClient);
}
}
epicsExportRegistrar(startPVAClientRegister);
epicsExportRegistrar(stopPVAClientRegister);

View File

@ -1,2 +0,0 @@
registrar("startPVAClientRegister")
registrar("stopPVAClientRegister")

View File

@ -1,129 +0,0 @@
/*PVAServerRegister.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 <iostream>
#include <cantProceed.h>
#include <epicsStdio.h>
#include <epicsMutex.h>
#include <epicsEvent.h>
#include <epicsThread.h>
#include <iocsh.h>
#include <epicsExport.h>
#include <pv/pvAccess.h>
#include <pv/serverContext.h>
using std::cout;
using std::endl;
using namespace epics::pvData;
using namespace epics::pvAccess;
class PVAServerCTX;
typedef std::tr1::shared_ptr<PVAServerCTX> PVAServerCTXPtr;
class PVAServerCTX :
public std::tr1::enable_shared_from_this<PVAServerCTX>
{
public:
POINTER_DEFINITIONS(PVAServerCTX);
static PVAServerCTXPtr getPVAServerCTX();
void start();
void stop();
virtual ~PVAServerCTX() {}
private:
PVAServerCTX() {}
shared_pointer getPtrSelf()
{
return shared_from_this();
}
ServerContext::shared_pointer ctx;
};
void PVAServerCTX::start()
{
if(ctx!=NULL) {
cout<< "PVAServer already started" << endl;
return;
}
ctx = startPVAServer(PVACCESS_ALL_PROVIDERS,0,true,true);
}
void PVAServerCTX::stop()
{
if(ctx==NULL) {
cout<< "PVAServer already stopped" << endl;
return;
}
ctx->destroy();
ctx.reset();
epicsThreadSleep(1.0);
}
PVAServerCTXPtr PVAServerCTX::getPVAServerCTX()
{
static PVAServerCTXPtr pvPVAServerCTX;
static Mutex mutex;
Lock xx(mutex);
if(pvPVAServerCTX==NULL) {
pvPVAServerCTX = PVAServerCTXPtr(new PVAServerCTX());
}
return pvPVAServerCTX;
}
static const iocshFuncDef startPVAServerFuncDef = {
"startPVAServer", 0, 0
};
extern "C" void startPVAServer(const iocshArgBuf *args)
{
PVAServerCTX::getPVAServerCTX()->start();
}
static const iocshFuncDef stopPVAServerFuncDef = {
"stopPVAServer", 0, 0
};
extern "C" void stopPVAServer(const iocshArgBuf *args)
{
PVAServerCTX::getPVAServerCTX()->stop();
}
static void startPVAServerRegister(void)
{
static int firstTime = 1;
if (firstTime) {
firstTime = 0;
iocshRegister(&startPVAServerFuncDef, startPVAServer);
}
}
static void stopPVAServerRegister(void)
{
static int firstTime = 1;
if (firstTime) {
firstTime = 0;
iocshRegister(&stopPVAServerFuncDef, stopPVAServer);
}
}
epicsExportRegistrar(startPVAServerRegister);
epicsExportRegistrar(stopPVAServerRegister);

View File

@ -1,2 +0,0 @@
registrar("startPVAServerRegister")
registrar("stopPVAServerRegister")

View File

@ -1,56 +0,0 @@
/* syncChannelFind.h */
/**
* 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 Marty Kraimer
* @date 2014.02
*/
/**
* This is an implementation of ChannelFind that is appropriate for all channel
* providers that can synchronously determine if the provider has the channel.
*/
#ifndef SYNCCHANNElFIND_H
#define SYNCCHANNElFIND_H
#include <string>
#include <cstring>
#include <stdexcept>
#include <memory>
#include <pv/pvData.h>
#include <pv/pvAccess.h>
namespace epics { namespace pvAccess {
class SyncChannelFind : public ChannelFind
{
public:
typedef std::tr1::shared_ptr<SyncChannelFind> shared_pointer;
SyncChannelFind(ChannelProvider::shared_pointer &provider) : m_provider(provider)
{
}
virtual ~SyncChannelFind() {}
virtual void destroy(){}
virtual ChannelProvider::shared_pointer getChannelProvider()
{
return m_provider.lock();
};
virtual void cancelChannelFind() {}
private:
ChannelProvider::weak_pointer m_provider;
};
}}
#endif /* SYNCCHANNElFIND_H */