epics-base / pvaClientCPP

pvaClientCPP is an EPICS V4 C++ module
http://epics-pvdata.sourceforge.net/index.html
Other
2 stars 8 forks source link

PvaClientNTMultiMonitor lacks a method to check which channels returned with change after poll #66

Open marciodo opened 3 years ago

marciodo commented 3 years ago

I have the impression that, after a poll, I have to examine the contents of the "values" array if I want to check which channels have changed. For the ones that return as none, I know they had no change during the last poll. I would say that this is an indirect and unclear way of checking this. I may be wrong, but I couldn't find this explanation in the documentation.

sveseli commented 3 years ago

This issue should be resolved with PR #67

mrkraimer commented 3 years ago

marciodo's comment is correct. Thanks for raising this issue.

After private discussion with sveseli, it was decided that no code change is necessary. I will close PR #67

I agree that documentation should be better. I will work on it. When I tried to run doxygen in pcaClientCPP it failed. Looks like I have some work to do.

Marty

mrkraimer commented 3 years ago

I am going to start work on improving documentation. I will also review code while working on documentation.

mrkraimer commented 3 years ago

Sinisa Veseli prepared a test case that shows that PvaClientNTMuiliMonitor does not work properly. I am going add a method like Sinisa suggested but the implementation will be different. I will also carefully look at the PvaClientNTMuiliMonitor code.

mrkraimer commented 3 years ago

I made changes on branch pvaClientChannel_changes. 1) Added method PvaClientNTMultiData::getChannelChangeFlags. 2) In pvaClientMultiChannel, methods not intended for client are now protected. 3) Fixed many connection related problems. 4) Cleaned up doxygen.

I also pushed changes to https://github.com/epics-base/exampleCPP 1) multiGetDouble, multiMonitorDouble, and multiPutDouble are new. 2) ntMulti* have default for multiple channelNames. 3) ntMultiMonitor has #ifndef that uses previous monitor semantics. If this is changed to #ifdef than the new pvaClient getChannelChangeFlags is used. This results in only channels that changed since the last put show new values.

It would be great if both of You get a chance to try the new version before I merge the branch into master

sveseli commented 3 years ago

I just took a brief look at the new pvaClientNTMultiData.cpp, and it seems that line 146 will cause the same problem that PR#67 addressed (commit fe74c599).

mrkraimer commented 3 years ago

I will remove lines 145 and 146. Note that if a value field does not exists in the channel then I suspect that this code will never be executed. But the lines should be removed. I want to do more testing before I push this change.