Closed soulzhao closed 5 years ago
Thanks for investing the time to explain your use case. Indeed I think it might be a pretty common issue.
So I tried to fix it by adding struct AdsSymbolEntry
and struct AdsSymbolInfoByName
to AdsLib.h.
AdsSymbolInfoByName
should be the same as TDataPair
, but I found the name better.
I think now it's time to add a ADS SUM example #53 , too ;-). But today I hadn't time to implement more.
When we want to load symbols Info from AdsServer on a linux platform, we will use AdsSyncReadWriteReqEx2 to do that, a typical code snippet would be like below:
With the TDataPair returned, we can use a
TDataPair *symbalInfoPairs = new TDataPair[unKnownNames.size()];
to request a batch of variables' values in one time:The key data structs here are AdsSymbolEntry and TDataPair, we should pay more attention to these two structs as on linux and windows, they should have different definitions due to the different platform related data-type defines:
This is the reason I found to most 1794 & 1797 issues reported on Linux platform