added support for privider ca; many minor changes; note exampleDatabaseEasyPVA.zip changed

This commit is contained in:
Marty Kraimer
2015-03-25 10:38:22 -04:00
parent 6a351cb5a2
commit 6b6f4bd2a9
15 changed files with 575 additions and 29 deletions

View File

@@ -0,0 +1,48 @@
/*helloWorldPutGet.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
*/
/* Author: Marty Kraimer */
#include <iostream>
#include <pv/easyPVA.h>
using namespace std;
using namespace epics::pvData;
using namespace epics::pvAccess;
using namespace epics::easyPVA;
static void example(EasyPVAPtr const &easyPVA)
{
cout << "helloWorldPutGet\n";
try {
EasyChannelPtr channel = easyPVA->channel("exampleHello");
EasyPutGetPtr putGet = channel->createPutGet();
putGet->connect();
EasyPutDataPtr putData = putGet->getPutData();
PVStructurePtr arg = putData->getPVStructure();
PVStringPtr pvValue = arg->getSubField<PVString>("argument.value");
pvValue->put("World");
putGet->putGet();
EasyGetDataPtr getData = putGet->getGetData();
cout << getData->getPVStructure() << endl;
} catch (std::runtime_error e) {
cout << "exception " << e.what() << endl;
}
}
int main(int argc,char *argv[])
{
EasyPVAPtr easyPVA = EasyPVA::create();
example(easyPVA);
return 0;
}