When a Para config _subindex is zero log is as described below: WCCOAKSKD_set4tmDrv31:WCCOAKSKD_set4tmDrv(31), 2020.12.01 15:43:37.815, WORK, "processData2Dp called: startix = 0; nofElements = 1 at 2020.12.01 15:43:37.815"
WCCOAKSKD_set4tmDrv31:WCCOAKSKD_set4tmDrv(31), 2020.12.01 15:43:37.819, WORK, "convert2Ing called for (Type: 293 Sys: 101 Dp: 3447 El: 140 : _address..)"
WCCOAKSKD_set4tmDrv31:WCCOAKSKD_set4tmDrv(31), 2020.12.01 15:43:37.821, WORK, toVar:Start
WCCOAKSKD_set4tmDrv31:WCCOAKSKD_set4tmDrv(31), 2020.12.01 15:43:37.822, WORK, toVar:dlen=2;subix=0;transType=1001
When a Para config _subindex is not zero (example 1) log is as described below: WCCOAKSKD_set4tmDrv31:WCCOAKSKD_set4tmDrv(31), 2020.12.01 15:56:12.857, WORK, "processData2Dp called: startix = 0; nofElements = 1 at 2020.12.01 15:56:12.857"
How to using subindex to read dyn types values in toVar method?
I configured subindex with value 1, but toVar called twice with subindex=0, and after with subindex=1.
In implemeted addDpPa method of HWMapper runned this code:
// Set Address and Subindex
hwObj->setConnectionId(confPtr->getConnectionId());
hwObj->setAddress(confPtr->getName()); // Resolve the HW-Address, too
hwObj->setSubindex(confPtr->getSubindex());
DEBUG_WORK("addDpPa:confPtr->getSubindex():"<< confPtr->getSubindex())
hwObj->setNumberOfElements(confPtr->getTransform()->getNumberOfElements());
// Set the data type.
hwObj->setType(confPtr->getTransform()->isA());
// Set the len needed for data from _all_ subindices of this PVSS-Address.
// Because we will deal with subix 0 only this is the Transformation::itemSize
hwObj->setDlen(confPtr->getTransform()->itemSize());
In "whilecycle" of implemeted groupQuery method of HWService I called setNumberOfElements with value 2. Dlen and itemSize allow to fit NumberOfElements.
I planed to return in toVar the dyn type value. First item of dyn type value i want to set using subindex (example 0, 1 or 2 ..), next values by using subindex+1, etc