1. Learn from example project "GettingStarted_VS2010", I trying to override the method Read(...) like below in MyNodeManager.cs. But however, when I click that item in UAExpert, and going into VS breakpoint, the operationHandles.Count always be 0... So I don't know how to implement real data publish in my UA server.
BTW, I didn't use UaModoler...
Code: Select all
protected override void Read(
RequestContext context,
TransactionHandle transaction,
IList<NodeAttributeOperationHandle> operationHandles,
IList<ReadValueId> settings)
{ ...}
2. Then I learn another example of "UaDemoServer_VS2010". I find another version of Read(...) works as below.
Code: Select all
protected override DataValue Read(
RequestContext context,
NodeAttributeHandle nodeHandle,
string indexRange,
QualifiedName dataEncoding)
{ ... }
Code: Select all
if (/*context.RequestType != ServiceType.Read || */nodeHandle.AttributeId != 13)
{
return base.Read(context, nodeHandle, indexRange, dataEncoding);
}
else
{
dv = new DataValue(value, DateTime.UtcNow);
return dv;
}