Clarification on OPC UA Read for Registered Nodes
Posted: 03 Jun 2020, 09:39
Hi Support Team,
We are using Unified Automation UA SDK C++ Server Professional 1.6.3 in our OPC UA server. We use visual studio 2015 for our development.
We are following sample server “server_com_da_migration” for our OPC server development.
We have our own NodeManager implementation.
Below is code snippet in the executeRead() method. We want to perform OPV UA read for registered nodes using UaExpert performance view.
void OPCUAIOManagerJob::executeRead()
{
UaDataValue dataValue;
------
-----
----
dataValue.setServerTimestamp(UaDateTime::now());
m_pTransactionContext->m_pCallback->finishRead(
m_pTransactionContext->m_hTransaction,
m_pTransactionContext->m_arrCallbackHandles,
dataValue,
OpcUa_True,
OpcUa_True);
VariantClear(&pValues);
-----
-----
}
Question:
1. We understand that the executeMonitorStop() has the RemoveItems() call
hr = m_availableGroups[groupIndex].m_pGroup->RemoveItems(
count,
pServerHandles,
&pErrors);
I think we need do the same for read and write also. But the executeRead() from “server_com_da_migration” sample server does not call RemoveItems() method.
How this is handled in SDK?
Please help us on this.Thanks in advance for the help.
Thanks
Antoni
We are using Unified Automation UA SDK C++ Server Professional 1.6.3 in our OPC UA server. We use visual studio 2015 for our development.
We are following sample server “server_com_da_migration” for our OPC server development.
We have our own NodeManager implementation.
Below is code snippet in the executeRead() method. We want to perform OPV UA read for registered nodes using UaExpert performance view.
void OPCUAIOManagerJob::executeRead()
{
UaDataValue dataValue;
------
-----
----
dataValue.setServerTimestamp(UaDateTime::now());
m_pTransactionContext->m_pCallback->finishRead(
m_pTransactionContext->m_hTransaction,
m_pTransactionContext->m_arrCallbackHandles,
dataValue,
OpcUa_True,
OpcUa_True);
VariantClear(&pValues);
-----
-----
}
Question:
1. We understand that the executeMonitorStop() has the RemoveItems() call
hr = m_availableGroups[groupIndex].m_pGroup->RemoveItems(
count,
pServerHandles,
&pErrors);
I think we need do the same for read and write also. But the executeRead() from “server_com_da_migration” sample server does not call RemoveItems() method.
How this is handled in SDK?
Please help us on this.Thanks in advance for the help.
Thanks
Antoni