I'm working on a custom driver development with C++ API.
I can build the sample project and run it as a WinCC OA Manager.
For some reason the function DrvManager::getId(dpTestName, dpIdBytesTx) function is not working in a Driver project, but it works in an API Manager sample project.
Here is a code snippet. I triple-checked that the dp-name is correct.
Code: Select all
dpTestName = CharString("_MtmDriver.State.NumBytesTx:_original.._value");
DEBUG_MSG("MtmDriverIntDp::getDpName4Query dpTestName is : " << dpTestName);
if (DrvManager::getId(dpTestName, dpIdBytesTx)) {
DEBUG_MSG("MtmDriverIntDp::getDpName4Query BytesTxAddr Address: " << dpIdBytesTx.getDp());
if (!dpIdBytesTx.isNull())
DrvManager::dpSet(dpIdBytesTx, IntegerVar(2));
}
else {
DEBUG_MSG("MtmDriverIntDp::getDpName4Query BytesTxAddr GetID Failed.");
}