rename easyPVACPP to pvaClientCPP; this means repository and all names;
This commit is contained in:
@@ -5,52 +5,52 @@ include $(TOP)/configure/CONFIG
|
||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||
|
||||
|
||||
PROD_HOST += exampleEasyProcess
|
||||
exampleEasyProcess_SRCS += exampleEasyProcess.cpp
|
||||
exampleEasyProcess_LIBS += easyPVA
|
||||
exampleEasyProcess_LIBS += pvAccess
|
||||
exampleEasyProcess_LIBS += pvData
|
||||
exampleEasyProcess_LIBS += Com
|
||||
PROD_HOST += examplePvaClientProcess
|
||||
examplePvaClientProcess_SRCS += examplePvaClientProcess.cpp
|
||||
examplePvaClientProcess_LIBS += pvaClient
|
||||
examplePvaClientProcess_LIBS += pvAccess
|
||||
examplePvaClientProcess_LIBS += pvData
|
||||
examplePvaClientProcess_LIBS += Com
|
||||
|
||||
PROD_HOST += exampleEasyGet
|
||||
exampleEasyGet_SRCS += exampleEasyGet.cpp
|
||||
exampleEasyGet_LIBS += easyPVA
|
||||
exampleEasyGet_LIBS += pvAccess
|
||||
exampleEasyGet_LIBS += pvData
|
||||
exampleEasyGet_LIBS += Com
|
||||
PROD_HOST += examplePvaClientGet
|
||||
examplePvaClientGet_SRCS += examplePvaClientGet.cpp
|
||||
examplePvaClientGet_LIBS += pvaClient
|
||||
examplePvaClientGet_LIBS += pvAccess
|
||||
examplePvaClientGet_LIBS += pvData
|
||||
examplePvaClientGet_LIBS += Com
|
||||
|
||||
PROD_HOST += exampleEasyPut
|
||||
exampleEasyPut_SRCS += exampleEasyPut.cpp
|
||||
exampleEasyPut_LIBS += easyPVA
|
||||
exampleEasyPut_LIBS += pvAccess
|
||||
exampleEasyPut_LIBS += pvData
|
||||
exampleEasyPut_LIBS += Com
|
||||
PROD_HOST += examplePvaClientPut
|
||||
examplePvaClientPut_SRCS += examplePvaClientPut.cpp
|
||||
examplePvaClientPut_LIBS += pvaClient
|
||||
examplePvaClientPut_LIBS += pvAccess
|
||||
examplePvaClientPut_LIBS += pvData
|
||||
examplePvaClientPut_LIBS += Com
|
||||
|
||||
PROD_HOST += exampleEasyMonitor
|
||||
exampleEasyMonitor_SRCS += exampleEasyMonitor.cpp
|
||||
exampleEasyMonitor_LIBS += easyPVA
|
||||
exampleEasyMonitor_LIBS += pvAccess
|
||||
exampleEasyMonitor_LIBS += pvData
|
||||
exampleEasyMonitor_LIBS += Com
|
||||
PROD_HOST += examplePvaClientMonitor
|
||||
examplePvaClientMonitor_SRCS += examplePvaClientMonitor.cpp
|
||||
examplePvaClientMonitor_LIBS += pvaClient
|
||||
examplePvaClientMonitor_LIBS += pvAccess
|
||||
examplePvaClientMonitor_LIBS += pvData
|
||||
examplePvaClientMonitor_LIBS += Com
|
||||
|
||||
PROD_HOST += exampleEasyMultiDouble
|
||||
exampleEasyMultiDouble_SRCS += exampleEasyMultiDouble.cpp
|
||||
exampleEasyMultiDouble_LIBS += easyPVA
|
||||
exampleEasyMultiDouble_LIBS += pvAccess
|
||||
exampleEasyMultiDouble_LIBS += pvData
|
||||
exampleEasyMultiDouble_LIBS += Com
|
||||
PROD_HOST += examplePvaClientMultiDouble
|
||||
examplePvaClientMultiDouble_SRCS += examplePvaClientMultiDouble.cpp
|
||||
examplePvaClientMultiDouble_LIBS += pvaClient
|
||||
examplePvaClientMultiDouble_LIBS += pvAccess
|
||||
examplePvaClientMultiDouble_LIBS += pvData
|
||||
examplePvaClientMultiDouble_LIBS += Com
|
||||
|
||||
PROD_HOST += exampleEasyNTMultiChannel
|
||||
exampleEasyNTMultiChannel_SRCS += exampleEasyNTMultiChannel.cpp
|
||||
exampleEasyNTMultiChannel_LIBS += easyPVA
|
||||
exampleEasyNTMultiChannel_LIBS += pvAccess
|
||||
exampleEasyNTMultiChannel_LIBS += nt
|
||||
exampleEasyNTMultiChannel_LIBS += pvData
|
||||
exampleEasyNTMultiChannel_LIBS += Com
|
||||
PROD_HOST += examplePvaClientNTMultiChannel
|
||||
examplePvaClientNTMultiChannel_SRCS += examplePvaClientNTMultiChannel.cpp
|
||||
examplePvaClientNTMultiChannel_LIBS += pvaClient
|
||||
examplePvaClientNTMultiChannel_LIBS += pvAccess
|
||||
examplePvaClientNTMultiChannel_LIBS += nt
|
||||
examplePvaClientNTMultiChannel_LIBS += pvData
|
||||
examplePvaClientNTMultiChannel_LIBS += Com
|
||||
|
||||
PROD_HOST += helloWorldRPC
|
||||
helloWorldRPC_SRCS += helloWorldRPC.cpp
|
||||
helloWorldRPC_LIBS += easyPVA
|
||||
helloWorldRPC_LIBS += pvaClient
|
||||
helloWorldRPC_LIBS += pvAccess
|
||||
helloWorldRPC_LIBS += nt
|
||||
helloWorldRPC_LIBS += pvData
|
||||
@@ -58,7 +58,7 @@ helloWorldRPC_LIBS += Com
|
||||
|
||||
PROD_HOST += helloWorldPutGet
|
||||
helloWorldPutGet_SRCS += helloWorldPutGet.cpp
|
||||
helloWorldPutGet_LIBS += easyPVA
|
||||
helloWorldPutGet_LIBS += pvaClient
|
||||
helloWorldPutGet_LIBS += pvAccess
|
||||
helloWorldPutGet_LIBS += nt
|
||||
helloWorldPutGet_LIBS += pvData
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*exampleEasyGet.cpp */
|
||||
/*examplePvaClientGet.cpp */
|
||||
/**
|
||||
* Copyright - See the COPYRIGHT that is included with this distribution.
|
||||
* EPICS pvData is distributed subject to a Software License Agreement found
|
||||
@@ -12,70 +12,70 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <pv/easyPVA.h>
|
||||
#include <pv/pvaClient.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace epics::pvData;
|
||||
using namespace epics::pvAccess;
|
||||
using namespace epics::easyPVA;
|
||||
using namespace epics::pvaClient;
|
||||
|
||||
|
||||
static void exampleDouble(EasyPVAPtr const &easyPVA)
|
||||
static void exampleDouble(PvaClientPtr const &pva)
|
||||
{
|
||||
cout << "example double scalar\n";
|
||||
double value;
|
||||
try {
|
||||
cout << "short way\n";
|
||||
value = easyPVA->channel("exampleDouble")->get()->getData()->getDouble();
|
||||
value = pva->channel("exampleDouble")->get()->getData()->getDouble();
|
||||
cout << "as double " << value << endl;
|
||||
} catch (std::runtime_error e) {
|
||||
cout << "exception " << e.what() << endl;
|
||||
}
|
||||
cout << "long way\n";
|
||||
EasyChannelPtr easyChannel = easyPVA->createChannel("exampleDouble");
|
||||
easyChannel->issueConnect();
|
||||
Status status = easyChannel->waitConnect(2.0);
|
||||
PvaClientChannelPtr pvaChannel = pva->createChannel("exampleDouble");
|
||||
pvaChannel->issueConnect();
|
||||
Status status = pvaChannel->waitConnect(2.0);
|
||||
if(!status.isOK()) {cout << " connect failed\n"; return;}
|
||||
EasyGetPtr easyGet = easyChannel->createGet();
|
||||
easyGet->issueConnect();
|
||||
status = easyGet->waitConnect();
|
||||
PvaClientGetPtr pvaGet = pvaChannel->createGet();
|
||||
pvaGet->issueConnect();
|
||||
status = pvaGet->waitConnect();
|
||||
if(!status.isOK()) {cout << " createGet failed\n"; return;}
|
||||
EasyGetDataPtr easyData = easyGet->getData();
|
||||
value = easyData->getDouble();
|
||||
PvaClientGetDataPtr pvaData = pvaGet->getData();
|
||||
value = pvaData->getDouble();
|
||||
cout << "as double " << value << endl;
|
||||
}
|
||||
|
||||
static void exampleDoubleArray(EasyPVAPtr const &easyPVA)
|
||||
static void exampleDoubleArray(PvaClientPtr const &pva)
|
||||
{
|
||||
cout << "example double array\n";
|
||||
shared_vector<const double> value;
|
||||
try {
|
||||
cout << "short way\n";
|
||||
value = easyPVA->channel("exampleDoubleArray")->get()->getData()->getDoubleArray();
|
||||
value = pva->channel("exampleDoubleArray")->get()->getData()->getDoubleArray();
|
||||
cout << "as doubleArray " << value << endl;
|
||||
} catch (std::runtime_error e) {
|
||||
cout << "exception " << e.what() << endl;
|
||||
}
|
||||
try {
|
||||
cout << "long way\n";
|
||||
EasyChannelPtr easyChannel = easyPVA->createChannel("exampleDoubleArray");
|
||||
easyChannel->connect(2.0);
|
||||
EasyGetPtr easyGet = easyChannel->createGet();
|
||||
EasyGetDataPtr easyData = easyGet->getData();
|
||||
value = easyData->getDoubleArray();
|
||||
PvaClientChannelPtr pvaChannel = pva->createChannel("exampleDoubleArray");
|
||||
pvaChannel->connect(2.0);
|
||||
PvaClientGetPtr pvaGet = pvaChannel->createGet();
|
||||
PvaClientGetDataPtr pvaData = pvaGet->getData();
|
||||
value = pvaData->getDoubleArray();
|
||||
cout << "as doubleArray " << value << endl;
|
||||
} catch (std::runtime_error e) {
|
||||
cout << "exception " << e.what() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
static void examplePowerSupply(EasyPVAPtr const &easyPVA)
|
||||
static void examplePowerSupply(PvaClientPtr const &pva)
|
||||
{
|
||||
cout << "example powerSupply\n";
|
||||
PVStructurePtr pvStructure;
|
||||
try {
|
||||
cout << "short way\n";
|
||||
pvStructure = easyPVA->channel("examplePowerSupply")->
|
||||
pvStructure = pva->channel("examplePowerSupply")->
|
||||
get("field()")->getData()->getPVStructure();
|
||||
cout << pvStructure << endl;
|
||||
} catch (std::runtime_error e) {
|
||||
@@ -84,49 +84,49 @@ static void examplePowerSupply(EasyPVAPtr const &easyPVA)
|
||||
|
||||
}
|
||||
|
||||
static void exampleCADouble(EasyPVAPtr const &easyPVA)
|
||||
static void exampleCADouble(PvaClientPtr const &pva)
|
||||
{
|
||||
cout << "example double scalar\n";
|
||||
double value;
|
||||
try {
|
||||
cout << "short way\n";
|
||||
value = easyPVA->channel("double00","ca",5.0)->get()->getData()->getDouble();
|
||||
value = pva->channel("double00","ca",5.0)->get()->getData()->getDouble();
|
||||
cout << "as double " << value << endl;
|
||||
} catch (std::runtime_error e) {
|
||||
cout << "exception " << e.what() << endl;
|
||||
}
|
||||
cout << "long way\n";
|
||||
EasyChannelPtr easyChannel = easyPVA->createChannel("double00","ca");
|
||||
easyChannel->issueConnect();
|
||||
Status status = easyChannel->waitConnect(2.0);
|
||||
PvaClientChannelPtr pvaChannel = pva->createChannel("double00","ca");
|
||||
pvaChannel->issueConnect();
|
||||
Status status = pvaChannel->waitConnect(2.0);
|
||||
if(!status.isOK()) {cout << " connect failed\n"; return;}
|
||||
EasyGetPtr easyGet = easyChannel->createGet();
|
||||
easyGet->issueConnect();
|
||||
status = easyGet->waitConnect();
|
||||
PvaClientGetPtr pvaGet = pvaChannel->createGet();
|
||||
pvaGet->issueConnect();
|
||||
status = pvaGet->waitConnect();
|
||||
if(!status.isOK()) {cout << " createGet failed\n"; return;}
|
||||
EasyGetDataPtr easyData = easyGet->getData();
|
||||
value = easyData->getDouble();
|
||||
PvaClientGetDataPtr pvaData = pvaGet->getData();
|
||||
value = pvaData->getDouble();
|
||||
cout << "as double " << value << endl;
|
||||
}
|
||||
|
||||
static void exampleCADoubleArray(EasyPVAPtr const &easyPVA)
|
||||
static void exampleCADoubleArray(PvaClientPtr const &pva)
|
||||
{
|
||||
cout << "example double array\n";
|
||||
shared_vector<const double> value;
|
||||
try {
|
||||
cout << "short way\n";
|
||||
value = easyPVA->channel("doubleArray","ca",5.0)->get()->getData()->getDoubleArray();
|
||||
value = pva->channel("doubleArray","ca",5.0)->get()->getData()->getDoubleArray();
|
||||
cout << "as doubleArray " << value << endl;
|
||||
} catch (std::runtime_error e) {
|
||||
cout << "exception " << e.what() << endl;
|
||||
}
|
||||
try {
|
||||
cout << "long way\n";
|
||||
EasyChannelPtr easyChannel = easyPVA->createChannel("doubleArray","ca");
|
||||
easyChannel->connect(2.0);
|
||||
EasyGetPtr easyGet = easyChannel->createGet();
|
||||
EasyGetDataPtr easyData = easyGet->getData();
|
||||
value = easyData->getDoubleArray();
|
||||
PvaClientChannelPtr pvaChannel = pva->createChannel("doubleArray","ca");
|
||||
pvaChannel->connect(2.0);
|
||||
PvaClientGetPtr pvaGet = pvaChannel->createGet();
|
||||
PvaClientGetDataPtr pvaData = pvaGet->getData();
|
||||
value = pvaData->getDoubleArray();
|
||||
cout << "as doubleArray " << value << endl;
|
||||
} catch (std::runtime_error e) {
|
||||
cout << "exception " << e.what() << endl;
|
||||
@@ -135,12 +135,12 @@ static void exampleCADoubleArray(EasyPVAPtr const &easyPVA)
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
EasyPVAPtr easyPVA = EasyPVA::create();
|
||||
exampleDouble(easyPVA);
|
||||
exampleDoubleArray(easyPVA);
|
||||
examplePowerSupply(easyPVA);
|
||||
exampleCADouble(easyPVA);
|
||||
exampleCADoubleArray(easyPVA);
|
||||
PvaClientPtr pva= PvaClient::create();
|
||||
exampleDouble(pva);
|
||||
exampleDoubleArray(pva);
|
||||
examplePowerSupply(pva);
|
||||
exampleCADouble(pva);
|
||||
exampleCADoubleArray(pva);
|
||||
cout << "done\n";
|
||||
return 0;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
/*monitorPowerSupply.cpp */
|
||||
/*examplePvaClientClientMonitor.cpp */
|
||||
/**
|
||||
* Copyright - See the COPYRIGHT that is included with this distribution.
|
||||
* EPICS pvData is distributed subject to a Software License Agreement found
|
||||
@@ -14,24 +14,24 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <pv/easyPVA.h>
|
||||
#include <pv/pvaClient.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace epics::pvData;
|
||||
using namespace epics::pvAccess;
|
||||
using namespace epics::easyPVA;
|
||||
using namespace epics::pvaClient;
|
||||
|
||||
|
||||
static void exampleMonitor(EasyPVAPtr const &easyPVA)
|
||||
static void exampleMonitor(PvaClientPtr const &pva)
|
||||
{
|
||||
EasyMonitorPtr monitor = easyPVA->channel("examplePowerSupply")->monitor("");
|
||||
EasyMonitorDataPtr easyData = monitor->getData();
|
||||
PvaClientMonitorPtr monitor = pva->channel("examplePowerSupply")->monitor("");
|
||||
PvaClientMonitorDataPtr pvaData = monitor->getData();
|
||||
while(true) {
|
||||
monitor->waitEvent();
|
||||
cout << "changed\n";
|
||||
easyData->showChanged(cout);
|
||||
pvaData->showChanged(cout);
|
||||
cout << "overrun\n";
|
||||
easyData->showOverrun(cout);
|
||||
pvaData->showOverrun(cout);
|
||||
monitor->releaseEvent();
|
||||
}
|
||||
}
|
||||
@@ -39,8 +39,8 @@ static void exampleMonitor(EasyPVAPtr const &easyPVA)
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
EasyPVAPtr easyPVA = EasyPVA::create();
|
||||
exampleMonitor(easyPVA);
|
||||
PvaClientPtr pva = PvaClient::create();
|
||||
exampleMonitor(pva);
|
||||
cout << "done\n";
|
||||
return 0;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
/*exampleEasyMultiDouble.cpp */
|
||||
/*examplePvaClientMultiDouble.cpp */
|
||||
/**
|
||||
* Copyright - See the COPYRIGHT that is included with this distribution.
|
||||
* EPICS pvData is distributed subject to a Software License Agreement found
|
||||
@@ -12,15 +12,15 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <pv/easyMultiDouble.h>
|
||||
#include <pv/pvaClientMultiDouble.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace epics::pvData;
|
||||
using namespace epics::pvAccess;
|
||||
using namespace epics::easyPVA;
|
||||
using namespace epics::pvaClient;
|
||||
|
||||
|
||||
static void example(EasyPVAPtr const &easyPVA)
|
||||
static void example(PvaClientPtr const &pva)
|
||||
{
|
||||
cout << "example multiDouble\n";
|
||||
size_t num = 5;
|
||||
@@ -33,7 +33,7 @@ static void example(EasyPVAPtr const &easyPVA)
|
||||
PVStringArrayPtr pvNames =
|
||||
getPVDataCreate()->createPVScalarArray<PVStringArray>();
|
||||
pvNames->replace(freeze(channelNames));
|
||||
EasyMultiDoublePtr multiDouble(EasyMultiDouble::create(easyPVA,pvNames));
|
||||
PvaClientMultiDoublePtr multiDouble(PvaClientMultiDouble::create(pva,pvNames));
|
||||
try {
|
||||
shared_vector<double> data = multiDouble->get();
|
||||
cout << "initial " << data << endl;
|
||||
@@ -47,7 +47,7 @@ static void example(EasyPVAPtr const &easyPVA)
|
||||
|
||||
}
|
||||
|
||||
static void exampleCA(EasyPVAPtr const &easyPVA)
|
||||
static void exampleCA(PvaClientPtr const &pva)
|
||||
{
|
||||
cout << "example multiDouble\n";
|
||||
size_t num = 5;
|
||||
@@ -60,7 +60,7 @@ static void exampleCA(EasyPVAPtr const &easyPVA)
|
||||
PVStringArrayPtr pvNames =
|
||||
getPVDataCreate()->createPVScalarArray<PVStringArray>();
|
||||
pvNames->replace(freeze(channelNames));
|
||||
EasyMultiDoublePtr multiDouble(EasyMultiDouble::create(easyPVA,pvNames,5.0,"ca"));
|
||||
PvaClientMultiDoublePtr multiDouble(PvaClientMultiDouble::create(pva,pvNames,5.0,"ca"));
|
||||
try {
|
||||
shared_vector<double> data = multiDouble->get();
|
||||
cout << "initial " << data << endl;
|
||||
@@ -77,8 +77,8 @@ static void exampleCA(EasyPVAPtr const &easyPVA)
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
EasyPVAPtr easyPVA = EasyPVA::create();
|
||||
example(easyPVA);
|
||||
exampleCA(easyPVA);
|
||||
PvaClientPtr pva = PvaClient::create();
|
||||
example(pva);
|
||||
exampleCA(pva);
|
||||
return 0;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
/*exampleEasyNTMultiChannel.cpp */
|
||||
/*examplePvaClientNTMultiChannel.cpp */
|
||||
/**
|
||||
* Copyright - See the COPYRIGHT that is included with this distribution.
|
||||
* EPICS pvData is distributed subject to a Software License Agreement found
|
||||
@@ -12,16 +12,16 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <pv/easyNTMultiChannel.h>
|
||||
#include <pv/pvaClientNTMultiChannel.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace epics::pvData;
|
||||
using namespace epics::pvAccess;
|
||||
using namespace epics::easyPVA;
|
||||
using namespace epics::pvaClient;
|
||||
using namespace epics::nt;
|
||||
|
||||
|
||||
static void example(EasyPVAPtr const &easyPVA)
|
||||
static void example(PvaClientPtr const &pva)
|
||||
{
|
||||
cout << "example ntMultiChannel\n";
|
||||
size_t num = 5;
|
||||
@@ -44,10 +44,10 @@ static void example(EasyPVAPtr const &easyPVA)
|
||||
addNanoseconds() ->
|
||||
addUserTag() ->
|
||||
createStructure();
|
||||
EasyNTMultiChannelPtr easy = EasyNTMultiChannel::create(
|
||||
easyPVA,pvNames,structure);
|
||||
PvaClientNTMultiChannelPtr multi = PvaClientNTMultiChannel::create(
|
||||
pva,pvNames,structure);
|
||||
try {
|
||||
NTMultiChannelPtr nt = easy->get();
|
||||
NTMultiChannelPtr nt = multi->get();
|
||||
cout << "initial\n" << nt->getPVStructure() << endl;
|
||||
|
||||
} catch (std::runtime_error e) {
|
||||
@@ -56,7 +56,7 @@ static void example(EasyPVAPtr const &easyPVA)
|
||||
|
||||
}
|
||||
|
||||
static void exampleCA(EasyPVAPtr const &easyPVA)
|
||||
static void exampleCA(PvaClientPtr const &pva)
|
||||
{
|
||||
cout << "example ntMultiChannel\n";
|
||||
size_t num = 5;
|
||||
@@ -79,10 +79,10 @@ static void exampleCA(EasyPVAPtr const &easyPVA)
|
||||
addNanoseconds() ->
|
||||
addUserTag() ->
|
||||
createStructure();
|
||||
EasyNTMultiChannelPtr easy = EasyNTMultiChannel::create(
|
||||
easyPVA,pvNames,structure,5.0,"ca");
|
||||
PvaClientNTMultiChannelPtr multi = PvaClientNTMultiChannel::create(
|
||||
pva,pvNames,structure,5.0,"ca");
|
||||
try {
|
||||
NTMultiChannelPtr nt = easy->get();
|
||||
NTMultiChannelPtr nt = multi->get();
|
||||
cout << "initial\n" << nt->getPVStructure() << endl;
|
||||
|
||||
} catch (std::runtime_error e) {
|
||||
@@ -94,8 +94,8 @@ static void exampleCA(EasyPVAPtr const &easyPVA)
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
EasyPVAPtr easyPVA = EasyPVA::create();
|
||||
example(easyPVA);
|
||||
exampleCA(easyPVA);
|
||||
PvaClientPtr pva = PvaClient::create();
|
||||
example(pva);
|
||||
exampleCA(pva);
|
||||
return 0;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
/*exampleEasyProcess.cpp */
|
||||
/*examplePvaClientProcess.cpp */
|
||||
/**
|
||||
* Copyright - See the COPYRIGHT that is included with this distribution.
|
||||
* EPICS pvData is distributed subject to a Software License Agreement found
|
||||
@@ -12,19 +12,19 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <pv/easyPVA.h>
|
||||
#include <pv/pvaClient.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace epics::pvData;
|
||||
using namespace epics::pvAccess;
|
||||
using namespace epics::easyPVA;
|
||||
using namespace epics::pvaClient;
|
||||
|
||||
|
||||
static void exampleProcess(EasyPVAPtr const &easyPVA)
|
||||
static void exampleProcess(PvaClientPtr const &pva)
|
||||
{
|
||||
cout << "example process\n";
|
||||
EasyChannelPtr channel = easyPVA->channel("exampleDouble");
|
||||
EasyProcessPtr process = channel->createProcess();
|
||||
PvaClientChannelPtr channel = pva->channel("exampleDouble");
|
||||
PvaClientProcessPtr process = channel->createProcess();
|
||||
try {
|
||||
process->process();
|
||||
cout << channel->get("field()")->getData()->showChanged(cout) << endl;
|
||||
@@ -38,7 +38,7 @@ static void exampleProcess(EasyPVAPtr const &easyPVA)
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
EasyPVAPtr easyPVA = EasyPVA::create();
|
||||
exampleProcess(easyPVA);
|
||||
PvaClientPtr pva = PvaClient::create();
|
||||
exampleProcess(pva);
|
||||
return 0;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
/*exampleEasyPut.cpp */
|
||||
/*examplePvaClientPut.cpp */
|
||||
/**
|
||||
* Copyright - See the COPYRIGHT that is included with this distribution.
|
||||
* EPICS pvData is distributed subject to a Software License Agreement found
|
||||
@@ -12,20 +12,20 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <pv/easyPVA.h>
|
||||
#include <pv/pvaClient.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace epics::pvData;
|
||||
using namespace epics::pvAccess;
|
||||
using namespace epics::easyPVA;
|
||||
using namespace epics::pvaClient;
|
||||
|
||||
|
||||
static void examplePut(EasyPVAPtr const &easyPVA)
|
||||
static void examplePut(PvaClientPtr const &pva)
|
||||
{
|
||||
cout << "example put\n";
|
||||
EasyChannelPtr channel = easyPVA->channel("exampleDouble");
|
||||
EasyPutPtr put = channel->put();
|
||||
EasyPutDataPtr putData = put->getData();
|
||||
PvaClientChannelPtr channel = pva->channel("exampleDouble");
|
||||
PvaClientPutPtr put = channel->put();
|
||||
PvaClientPutDataPtr putData = put->getData();
|
||||
try {
|
||||
putData->putDouble(3.0); put->put();
|
||||
cout << channel->get("field()")->getData()->showChanged(cout) << endl;
|
||||
@@ -39,7 +39,7 @@ static void examplePut(EasyPVAPtr const &easyPVA)
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
EasyPVAPtr easyPVA = EasyPVA::create();
|
||||
examplePut(easyPVA);
|
||||
PvaClientPtr pva = PvaClient::create();
|
||||
examplePut(pva);
|
||||
return 0;
|
||||
}
|
||||
@@ -12,27 +12,27 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <pv/easyPVA.h>
|
||||
#include <pv/pvaClient.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace epics::pvData;
|
||||
using namespace epics::pvAccess;
|
||||
using namespace epics::easyPVA;
|
||||
using namespace epics::pvaClient;
|
||||
|
||||
|
||||
static void example(EasyPVAPtr const &easyPVA)
|
||||
static void example(PvaClientPtr const &pva)
|
||||
{
|
||||
cout << "helloWorldPutGet\n";
|
||||
try {
|
||||
EasyChannelPtr channel = easyPVA->channel("exampleHello");
|
||||
EasyPutGetPtr putGet = channel->createPutGet();
|
||||
PvaClientChannelPtr channel = pva->channel("exampleHello");
|
||||
PvaClientPutGetPtr putGet = channel->createPutGet();
|
||||
putGet->connect();
|
||||
EasyPutDataPtr putData = putGet->getPutData();
|
||||
PvaClientPutDataPtr putData = putGet->getPutData();
|
||||
PVStructurePtr arg = putData->getPVStructure();
|
||||
PVStringPtr pvValue = arg->getSubField<PVString>("argument.value");
|
||||
pvValue->put("World");
|
||||
putGet->putGet();
|
||||
EasyGetDataPtr getData = putGet->getGetData();
|
||||
PvaClientGetDataPtr getData = putGet->getGetData();
|
||||
cout << getData->getPVStructure() << endl;
|
||||
} catch (std::runtime_error e) {
|
||||
cout << "exception " << e.what() << endl;
|
||||
@@ -42,7 +42,7 @@ static void example(EasyPVAPtr const &easyPVA)
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
EasyPVAPtr easyPVA = EasyPVA::create();
|
||||
example(easyPVA);
|
||||
PvaClientPtr pva = PvaClient::create();
|
||||
example(pva);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*exampleChannelRPC.cpp */
|
||||
/*helloWorldRPC.cpp */
|
||||
/**
|
||||
* Copyright - See the COPYRIGHT that is included with this distribution.
|
||||
* EPICS pvData is distributed subject to a Software License Agreement found
|
||||
|
||||
Reference in New Issue
Block a user