Hi Anton,
You must be using a very old version of EPICS V4. I think 4.3 was the last release to have that API, so if that’s the case you may have to look out for a few other changes (pva network protocol changed between
4.3. and 4.4).
To create a pvRequest you just supply the request string – there’s no need to supply a requester. createRequest() simply takes the string and returns the corresponding PVStructure.
Note since 4.3 CreateRequest has moved from pvAccess to pvData and the singleton instance getCreateRequest() has been replace by a static create().
So
pvRequestP = getCreateRequest()->createRequest(request, requesterP);
becomes
pvRequestP = CreateRequest::create()->createRequest(request);
If the createRequest was the only reason for creating the requesters then you won’t need them anymore.
Note that createRequest throws std::logic_exceptions with helpful messages if something goes wrong.
Hope that helps,
Dave
Hi,
In a previous version of EPICS4 I had to use the following code at initialization
Requester::shared_pointer requesterP(new RequesterImpl("pvput"));
Requester::shared_pointer requesterG(new RequesterImpl("pvget"));
pvRequestG = getCreateRequest()->createRequest(request, requesterG);
if(pvRequestG.get()==NULL) printf("failed to parse request string\n");
pvRequestP = getCreateRequest()->createRequest(request, requesterP);
if(pvRequestP.get()==NULL) printf("failed to parse request string\n");
However in the latest version createRequest only takes one argument. How to do it now?
Best regards
Anton
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom