Hello, Marty,
Thanks for the example. But even with that I don't manage to run it.
#include <iostream>
#include <getopt.h>
#include <epicsThread.h>
#include <epicsTime.h>
#include <epicsExit.h>
#include <iocsh.h>
#include <iostream>
#include <pv/pvaClient.h>
#include <pv/pvData.h>
using namespace std;
using namespace epics::pvaClient;
using namespace epics::pvData;
int iChunk(char *pvName)
{
PvaClientPtr pva= PvaClient::get("pva”);
try {
PvaClientChannelPtr channel = pva->channel(pvName);
PvaClientPutGetPtr putGet = channel->createPutGet("putField(value)getField()");
putGet->connect();
PvaClientPutDataPtr putData = putGet->getPutData();
PVStructurePtr pvValue = putData->getPVStructure();
// CODE TO PUT ALL FIELDS IN value
putGet->putGet();
PvaClientGetDataPtr getData = putGet->getGetData();
cout << getData->getPVStructure() << endl
} catch (std::runtime_error e) {
cout << "exception " << e.what() << endl;
exit(1);
}
return 0;
}
int main(int argc,char *argv[])
{
epicsThreadId simpleId;
if(argc>=2) {
iocsh(argv[1]);
epicsThreadSleep(.2);
}
char pv[] = "CRYVISIL:STM:FASTSCAN:IMAGE_CHUNK";
simpleId = epicsThreadCreate("IChunkT", epicsThreadPriorityMedium,
epicsThreadGetStackSize(epicsThreadStackMedium),
(EPICSTHREADFUNC)iChunk, pv);
iocsh(NULL);
epicsExit(0);
return(0);
}
The “ putGet->connect();” raises an exception
exception channel CRYVISIL:STM:FASTSCAN:IMAGE_CHUNK PvaClientPutGet::connect
PvaClientPutGet::channelPutGetConnect)
pvRequest
structure
structure getField
structure putField
structure value
error
Not Implemented
Error: epicsMutex::invalidMutex()
the PV is available
[junkes@dune iocmyEx]$ pvinfo CRYVISIL:STM:FASTSCAN:IMAGE_CHUNK
CRYVISIL:STM:FASTSCAN:IMAGE_CHUNK epics:nt/NTTable:1.0
string[] labels
structure value
double[] x
double[] y
double[] z
int[] time_index
string descriptor
alarm_t alarm
int severity
int status
string message
time_t timeStamp
long secondsPastEpoch
int nanoseconds
int userTag
int counter
Am I doing something wrong?
Danke, Heinz
------------------------------------------------------------------------------
Fritz-Haber-Institut | Phone: (+49 30) 8413-4270
Heinz Junkes | Fax (G3+G4): (+49 30) 8413-5900
Faradayweg 4-6 |
D - 14195 Berlin | E-Mail: [email protected]
------------------------------------------------------------------------------
> On 12. Mar 2019, at 15:26, Marty Kraimer via Tech-talk <[email protected]> wrote:
>
> Using pvaClientCPP your code would be something like:
>
> PvaClientChannelPtr channel = pva->channel("CRYVISIL:STM:FASTSCAN:IMAGE_CHUNK");
> PvaClientPutGetPtr putGet = channel->createPutGet("putField(value)getField()");
> putGet->connect();
> PvaClientPutDataPtr putData = putGet->getPutData();
> PVStructurePtr pvValue = putData->getPVStructure();
> // CODE TO PUT ALL FIELDS IN value
>
> putGet->putGet();
> PvaClientGetDataPtr getData = putGet->getGetData();
> cout << getData->getPVStructure() << endl;
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
- Replies:
- Re: I'm looking for a pvacces example to read PVStructure Marty Kraimer via Tech-talk
- References:
- I'm looking for a pvacces example to read PVStructure Heinz Junkes via Tech-talk
- Re: I'm looking for a pvacces example to read PVStructure will.rogers--- via Tech-talk
- Re: I'm looking for a pvacces example to read PVStructure Marty Kraimer via Tech-talk
- Navigate by Date:
- Prev:
Re: generalTime/epicsTimeGetCurrent and casr questions Hugo Slepicka via Tech-talk
- Next:
Re: Count record that resets by date Maren Purves via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: I'm looking for a pvacces example to read PVStructure Marty Kraimer via Tech-talk
- Next:
Re: I'm looking for a pvacces example to read PVStructure Marty Kraimer via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
|