compatibility with vxWorks
This commit is contained in:
@@ -45,3 +45,4 @@ INSTALL_INCLUDE = $(INSTALL_LOCATION)/include/pv
|
||||
USR_INCLUDES += -I $(INSTALL_LOCATION)/include
|
||||
|
||||
-include $(TOP)/configure/CONFIG_SITE.local
|
||||
-include $(TOP)/../CONFIG.local
|
||||
|
||||
@@ -39,3 +39,4 @@ TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top
|
||||
#RULES=/path/to/epics/support/module/rules/x-y
|
||||
|
||||
-include $(TOP)/configure/RELEASE.local
|
||||
-include $(TOP)/../RELEASE.local
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <pv/pvType.h>
|
||||
#include <pv/noDefaultMethods.h>
|
||||
#include <ostream>
|
||||
|
||||
namespace epics {
|
||||
namespace pvAccess {
|
||||
|
||||
@@ -333,7 +333,7 @@ namespace epics {
|
||||
#ifdef __vxworks
|
||||
(sockaddr*)
|
||||
#endif
|
||||
&(_sendAddresses->at(i).sa),
|
||||
&((*_sendAddresses)[i].sa),
|
||||
sizeof(sockaddr));
|
||||
if(unlikely(retval<0))
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ class SimpleChannelSearchManagerImpl :
|
||||
* Constructor.
|
||||
* @param context
|
||||
*/
|
||||
static SimpleChannelSearchManagerImpl::shared_pointer create(Context::shared_pointer const & context);
|
||||
static shared_pointer create(Context::shared_pointer const & context);
|
||||
/**
|
||||
* Constructor.
|
||||
* @param context
|
||||
|
||||
@@ -1850,11 +1850,11 @@ namespace epics {
|
||||
}
|
||||
|
||||
Status start() {
|
||||
return Status::OK;
|
||||
return Status::Ok;
|
||||
}
|
||||
|
||||
Status stop() {
|
||||
return Status::OK;
|
||||
return Status::Ok;
|
||||
}
|
||||
|
||||
void destroy() {
|
||||
@@ -1930,11 +1930,11 @@ namespace epics {
|
||||
Status start() {
|
||||
Lock guard(m_mutex);
|
||||
m_gotMonitor = false;
|
||||
return Status::OK;
|
||||
return Status::Ok;
|
||||
}
|
||||
|
||||
Status stop() {
|
||||
return Status::OK;
|
||||
return Status::Ok;
|
||||
}
|
||||
|
||||
void destroy() {
|
||||
@@ -2049,11 +2049,11 @@ namespace epics {
|
||||
m_gotMonitor = false;
|
||||
m_monitorElement->changedBitSet->clear();
|
||||
m_monitorElement->overrunBitSet->clear();
|
||||
return Status::OK;
|
||||
return Status::Ok;
|
||||
}
|
||||
|
||||
Status stop() {
|
||||
return Status::OK;
|
||||
return Status::Ok;
|
||||
}
|
||||
|
||||
void destroy() {
|
||||
@@ -2276,11 +2276,11 @@ namespace epics {
|
||||
//monitorQueue.clear();
|
||||
//m_monitorElement = monitorQueue.getFree();
|
||||
m_needToReleaseFirst = false;
|
||||
return Status::OK;
|
||||
return Status::Ok;
|
||||
}
|
||||
|
||||
Status stop() {
|
||||
return Status::OK;
|
||||
return Status::Ok;
|
||||
}
|
||||
|
||||
void destroy() {
|
||||
@@ -2474,7 +2474,7 @@ namespace epics {
|
||||
}
|
||||
else
|
||||
{
|
||||
normalResponse(transport, version, payloadBuffer, qos, Status::OK);
|
||||
normalResponse(transport, version, payloadBuffer, qos, Status::Ok);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2498,7 +2498,7 @@ namespace epics {
|
||||
{
|
||||
m_channel->checkAndGetTransport()->enqueueSendRequest(shared_from_this());
|
||||
m_started = true;
|
||||
return Status::OK;
|
||||
return Status::Ok;
|
||||
} catch (std::runtime_error &rte) {
|
||||
stopRequest();
|
||||
return BaseRequestImpl::channelNotConnected;
|
||||
@@ -2524,7 +2524,7 @@ namespace epics {
|
||||
{
|
||||
m_channel->checkAndGetTransport()->enqueueSendRequest(shared_from_this());
|
||||
m_started = false;
|
||||
return Status::OK;
|
||||
return Status::Ok;
|
||||
} catch (std::runtime_error &rte) {
|
||||
stopRequest();
|
||||
return BaseRequestImpl::channelNotConnected;
|
||||
@@ -3082,7 +3082,7 @@ namespace epics {
|
||||
auto_ptr<InetAddrVector> addresses;
|
||||
Channel::shared_pointer channel = context->createChannelInternal(channelName, channelRequester, priority, addresses);
|
||||
if (channel.get())
|
||||
channelRequester->channelCreated(Status::OK, channel);
|
||||
channelRequester->channelCreated(Status::Ok, channel);
|
||||
return channel;
|
||||
|
||||
// NOTE it's up to internal code to respond w/ error to requester and return 0 in case of errors
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
|
||||
#include <stdexcept>
|
||||
#include <rpcServer.h>
|
||||
#ifdef __vxworks
|
||||
#include <envLib.h>
|
||||
#endif
|
||||
|
||||
using namespace epics::pvData;
|
||||
|
||||
@@ -36,7 +39,7 @@ class ChannelRPCServiceImpl : public ChannelRPC
|
||||
void processRequest(epics::pvData::PVStructure::shared_pointer const & pvArgument, bool lastRequest)
|
||||
{
|
||||
epics::pvData::PVStructure::shared_pointer result;
|
||||
Status status = Status::OK;
|
||||
Status status = Status::Ok;
|
||||
bool ok = true;
|
||||
try
|
||||
{
|
||||
@@ -233,7 +236,7 @@ public:
|
||||
}
|
||||
|
||||
ChannelRPC::shared_pointer channelRPCImpl(new ChannelRPCServiceImpl(channelRPCRequester, m_rpcService));
|
||||
channelRPCRequester->channelRPCConnect(Status::OK, channelRPCImpl);
|
||||
channelRPCRequester->channelRPCConnect(Status::Ok, channelRPCImpl);
|
||||
return channelRPCImpl;
|
||||
}
|
||||
|
||||
@@ -331,7 +334,7 @@ public:
|
||||
found = (m_services.find(channelName) != m_services.end());
|
||||
}
|
||||
ChannelFind::shared_pointer thisPtr(shared_from_this());
|
||||
channelFindRequester->channelFindResult(Status::OK, thisPtr, found);
|
||||
channelFindRequester->channelFindResult(Status::Ok, thisPtr, found);
|
||||
return thisPtr;
|
||||
}
|
||||
|
||||
@@ -359,7 +362,7 @@ public:
|
||||
channelName,
|
||||
channelRequester,
|
||||
iter->second));
|
||||
channelRequester->channelCreated(Status::OK, rpcChannel);
|
||||
channelRequester->channelCreated(Status::Ok, rpcChannel);
|
||||
return rpcChannel;
|
||||
}
|
||||
|
||||
@@ -400,8 +403,11 @@ RPCServer::RPCServer()
|
||||
m_channelProviderImpl.reset(new RPCChannelProvider());
|
||||
registerChannelProvider(m_channelProviderImpl);
|
||||
|
||||
#ifdef __vxworks
|
||||
putenv(const_cast<char*>(("EPICS4_CAS_PROVIDER_NAMES=" + m_channelProviderImpl->getProviderName()).c_str()));
|
||||
#else
|
||||
setenv("EPICS4_CAS_PROVIDER_NAMES", m_channelProviderImpl->getProviderName().c_str(), 1);
|
||||
|
||||
#endif
|
||||
m_serverContext = ServerContextImpl::create();
|
||||
|
||||
m_serverContext->initialize(getChannelAccess());
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
protected:
|
||||
ServerContextImpl();
|
||||
public:
|
||||
static ServerContextImpl::shared_pointer create();
|
||||
static shared_pointer create();
|
||||
|
||||
virtual ~ServerContextImpl();
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ void Properties::load()
|
||||
#endif
|
||||
while(!_infile->eof())
|
||||
{
|
||||
line.clear();
|
||||
line.erase();
|
||||
std::getline(*_infile,line);
|
||||
|
||||
#ifdef NO_STREAM_EXCEPTIONS
|
||||
|
||||
@@ -64,7 +64,7 @@ class MockChannelProcess :
|
||||
ChannelProcess::shared_pointer thisPtr(new MockChannelProcess(channelProcessRequester, pvStructure, pvRequest));
|
||||
|
||||
// TODO pvRequest
|
||||
channelProcessRequester->channelProcessConnect(Status::OK, thisPtr);
|
||||
channelProcessRequester->channelProcessConnect(Status::Ok, thisPtr);
|
||||
|
||||
return thisPtr;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ class MockChannelProcess :
|
||||
break;
|
||||
|
||||
}
|
||||
m_channelProcessRequester->processDone(Status::OK);
|
||||
m_channelProcessRequester->processDone(Status::Ok);
|
||||
|
||||
if (lastRequest)
|
||||
destroy();
|
||||
@@ -197,7 +197,7 @@ class MockChannelGet : public ChannelGet
|
||||
{
|
||||
ChannelGet::shared_pointer thisPtr(new MockChannelGet(channelGetRequester, pvStructure, pvRequest));
|
||||
// TODO pvRequest
|
||||
channelGetRequester->channelGetConnect(Status::OK, thisPtr, pvStructure, static_cast<MockChannelGet*>(thisPtr.get())->m_bitSet);
|
||||
channelGetRequester->channelGetConnect(Status::Ok, thisPtr, pvStructure, static_cast<MockChannelGet*>(thisPtr.get())->m_bitSet);
|
||||
|
||||
return thisPtr;
|
||||
}
|
||||
@@ -209,7 +209,7 @@ class MockChannelGet : public ChannelGet
|
||||
|
||||
virtual void get(bool lastRequest)
|
||||
{
|
||||
m_channelGetRequester->getDone(Status::OK);
|
||||
m_channelGetRequester->getDone(Status::Ok);
|
||||
if (m_first)
|
||||
{
|
||||
m_first = false;
|
||||
@@ -260,7 +260,7 @@ class MockChannelPut : public ChannelPut
|
||||
{
|
||||
ChannelPut::shared_pointer thisPtr(new MockChannelPut(channelPutRequester, pvStructure, pvRequest));
|
||||
// TODO pvRequest
|
||||
channelPutRequester->channelPutConnect(Status::OK, thisPtr, pvStructure, static_cast<MockChannelPut*>(thisPtr.get())->m_bitSet);
|
||||
channelPutRequester->channelPutConnect(Status::Ok, thisPtr, pvStructure, static_cast<MockChannelPut*>(thisPtr.get())->m_bitSet);
|
||||
|
||||
return thisPtr;
|
||||
}
|
||||
@@ -273,14 +273,14 @@ class MockChannelPut : public ChannelPut
|
||||
|
||||
virtual void put(bool lastRequest)
|
||||
{
|
||||
m_channelPutRequester->putDone(Status::OK);
|
||||
m_channelPutRequester->putDone(Status::Ok);
|
||||
if (lastRequest)
|
||||
destroy();
|
||||
}
|
||||
|
||||
virtual void get()
|
||||
{
|
||||
m_channelPutRequester->getDone(Status::OK);
|
||||
m_channelPutRequester->getDone(Status::Ok);
|
||||
}
|
||||
|
||||
virtual void destroy()
|
||||
@@ -321,7 +321,7 @@ class MockChannelPutGet : public ChannelPutGet
|
||||
{
|
||||
ChannelPutGet::shared_pointer thisPtr(new MockChannelPutGet(channelPutGetRequester, pvStructure, pvRequest));
|
||||
// TODO pvRequest
|
||||
channelPutGetRequester->channelPutGetConnect(Status::OK, thisPtr, pvStructure, pvStructure);
|
||||
channelPutGetRequester->channelPutGetConnect(Status::Ok, thisPtr, pvStructure, pvStructure);
|
||||
|
||||
return thisPtr;
|
||||
}
|
||||
@@ -333,19 +333,19 @@ class MockChannelPutGet : public ChannelPutGet
|
||||
|
||||
virtual void putGet(bool lastRequest)
|
||||
{
|
||||
m_channelPutGetRequester->putGetDone(Status::OK);
|
||||
m_channelPutGetRequester->putGetDone(Status::Ok);
|
||||
if (lastRequest)
|
||||
destroy();
|
||||
}
|
||||
|
||||
virtual void getGet()
|
||||
{
|
||||
m_channelPutGetRequester->getGetDone(Status::OK);
|
||||
m_channelPutGetRequester->getGetDone(Status::Ok);
|
||||
}
|
||||
|
||||
virtual void getPut()
|
||||
{
|
||||
m_channelPutGetRequester->getPutDone(Status::OK);
|
||||
m_channelPutGetRequester->getPutDone(Status::Ok);
|
||||
}
|
||||
|
||||
virtual void destroy()
|
||||
@@ -389,7 +389,7 @@ class MockChannelRPC : public ChannelRPC
|
||||
{
|
||||
ChannelRPC::shared_pointer thisPtr(new MockChannelRPC(channelRPCRequester, channelName, pvStructure, pvRequest));
|
||||
// TODO pvRequest
|
||||
channelRPCRequester->channelRPCConnect(Status::OK, thisPtr);
|
||||
channelRPCRequester->channelRPCConnect(Status::Ok, thisPtr);
|
||||
return thisPtr;
|
||||
}
|
||||
|
||||
@@ -451,7 +451,7 @@ class MockChannelRPC : public ChannelRPC
|
||||
FILL_VALUES;
|
||||
static_pointer_cast<PVDoubleArray>(result->getScalarArrayField(*iter, pvDouble))->put(0, ROWS, values, 0);
|
||||
}
|
||||
m_channelRPCRequester->requestDone(Status::OK, result);
|
||||
m_channelRPCRequester->requestDone(Status::Ok, result);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -461,7 +461,7 @@ class MockChannelRPC : public ChannelRPC
|
||||
pvArgument->toString(&s);
|
||||
std::cout << "RPC" << std::endl << s << std::endl;
|
||||
*/
|
||||
m_channelRPCRequester->requestDone(Status::OK, m_pvStructure);
|
||||
m_channelRPCRequester->requestDone(Status::Ok, m_pvStructure);
|
||||
}
|
||||
|
||||
if (lastRequest)
|
||||
@@ -514,7 +514,7 @@ class MockChannelArray : public ChannelArray
|
||||
ChannelArray::shared_pointer thisPtr(new MockChannelArray(channelArrayRequester, pvStructure, pvRequest));
|
||||
|
||||
// TODO pvRequest
|
||||
channelArrayRequester->channelArrayConnect(Status::OK, thisPtr, static_cast<MockChannelArray*>(thisPtr.get())->m_pvArray);
|
||||
channelArrayRequester->channelArrayConnect(Status::Ok, thisPtr, static_cast<MockChannelArray*>(thisPtr.get())->m_pvArray);
|
||||
|
||||
return thisPtr;
|
||||
}
|
||||
@@ -527,7 +527,7 @@ class MockChannelArray : public ChannelArray
|
||||
virtual void putArray(bool lastRequest, int offset, int count)
|
||||
{
|
||||
// TODO offset, count
|
||||
m_channelArrayRequester->putArrayDone(Status::OK);
|
||||
m_channelArrayRequester->putArrayDone(Status::Ok);
|
||||
if (lastRequest)
|
||||
destroy();
|
||||
}
|
||||
@@ -535,7 +535,7 @@ class MockChannelArray : public ChannelArray
|
||||
virtual void getArray(bool lastRequest, int offset, int count)
|
||||
{
|
||||
// TODO offset, count
|
||||
m_channelArrayRequester->getArrayDone(Status::OK);
|
||||
m_channelArrayRequester->getArrayDone(Status::Ok);
|
||||
if (lastRequest)
|
||||
destroy();
|
||||
}
|
||||
@@ -543,7 +543,7 @@ class MockChannelArray : public ChannelArray
|
||||
virtual void setLength(bool lastRequest, int length, int capacity)
|
||||
{
|
||||
// TODO offset, capacity
|
||||
m_channelArrayRequester->setLengthDone(Status::OK);
|
||||
m_channelArrayRequester->setLengthDone(Status::Ok);
|
||||
if (lastRequest)
|
||||
destroy();
|
||||
}
|
||||
@@ -605,7 +605,7 @@ class MockMonitor : public Monitor, public MonitorElement, public std::tr1::enab
|
||||
|
||||
// TODO pvRequest
|
||||
StructureConstPtr structurePtr = static_cast<MockMonitor*>(thisPtr.get())->m_pvStructure->getStructure();
|
||||
monitorRequester->monitorConnect(Status::OK, thisPtr, structurePtr);
|
||||
monitorRequester->monitorConnect(Status::Ok, thisPtr, structurePtr);
|
||||
|
||||
return thisPtr;
|
||||
}
|
||||
@@ -621,12 +621,12 @@ class MockMonitor : public Monitor, public MonitorElement, public std::tr1::enab
|
||||
Monitor::shared_pointer thisPtr = shared_from_this();
|
||||
m_monitorRequester->monitorEvent(thisPtr);
|
||||
|
||||
return Status::OK;
|
||||
return Status::Ok;
|
||||
}
|
||||
|
||||
virtual Status stop()
|
||||
{
|
||||
return Status::OK;
|
||||
return Status::Ok;
|
||||
}
|
||||
|
||||
virtual MonitorElement::shared_pointer poll()
|
||||
@@ -899,7 +899,7 @@ class MockChannel : public Channel {
|
||||
return;
|
||||
}
|
||||
FieldConstPtr fieldPtr = pvField->getField();
|
||||
requester->getDone(Status::OK, fieldPtr);
|
||||
requester->getDone(Status::Ok, fieldPtr);
|
||||
}
|
||||
|
||||
virtual ChannelProcess::shared_pointer createChannelProcess(
|
||||
@@ -1037,7 +1037,7 @@ class MockServerChannelProvider : public ChannelProvider,
|
||||
ChannelFindRequester::shared_pointer const & channelFindRequester)
|
||||
{
|
||||
// channel always exists
|
||||
channelFindRequester->channelFindResult(Status::OK, m_mockChannelFind, true);
|
||||
channelFindRequester->channelFindResult(Status::Ok, m_mockChannelFind, true);
|
||||
return m_mockChannelFind;
|
||||
}
|
||||
|
||||
@@ -1059,7 +1059,7 @@ class MockServerChannelProvider : public ChannelProvider,
|
||||
{
|
||||
ChannelProvider::shared_pointer chProviderPtr = shared_from_this();
|
||||
Channel::shared_pointer channel = MockChannel::create(chProviderPtr, channelRequester, channelName, address);
|
||||
channelRequester->channelCreated(Status::OK, channel);
|
||||
channelRequester->channelCreated(Status::Ok, channel);
|
||||
return channel;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
ChannelFindRequester::shared_pointer const & channelFindRequester)
|
||||
{
|
||||
ChannelFind::shared_pointer nullCF;
|
||||
channelFindRequester->channelFindResult(Status::OK, nullCF, false);
|
||||
channelFindRequester->channelFindResult(Status::Ok, nullCF, false);
|
||||
return nullCF;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
short priority, epics::pvData::String const & address)
|
||||
{
|
||||
Channel::shared_pointer nullC;
|
||||
channelRequester->channelCreated(Status::OK, nullC);
|
||||
channelRequester->channelCreated(Status::Ok, nullC);
|
||||
return nullC;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user