protected override void HistoryReadRawModified(
ServerSystemContext context,
ReadRawModifiedDetails details,
TimestampsToReturn timestampsToReturn,
IList<HistoryReadValueId> nodesToRead,
IList<HistoryReadResult> results,
IList<ServiceResult> errors,
List<NodeHandle> nodesToProcess,
IDictionary<NodeId, NodeState> cache)
{
ComHdaClientManager system = (ComHdaClientManager)this.SystemContext.SystemHandle;
ComHdaClient client = (ComHdaClient)system.SelectClient((ServerSystemContext)SystemContext, false);
for (int ii = 0; ii < nodesToProcess.Count; ii++)
{
NodeHandle handle = nodesToProcess[ii];
HistoryReadValueId nodeToRead = nodesToRead[handle.Index];
HistoryReadResult result = results[handle.Index];
// check if the node id has been parsed.
HdaParsedNodeId parsedNodeId = handle.ParsedNodeId as HdaParsedNodeId;
if (parsedNodeId == null)
{
errors[handle.Index] = StatusCodes.BadNodeIdInvalid;
continue;
}
// read the history of an item.
if (parsedNodeId.RootType == HdaModelUtils.HdaItem)
{
errors[handle.Index] = HistoryReadItem(
context,
client,
details,
timestampsToReturn,
nodeToRead,
parsedNodeId,
result);
continue;
}
// read the history of an attribute.
if (parsedNodeId.RootType == HdaModelUtils.HdaItemAttribute)
{
errors[handle.Index] = HistoryReadAttribute(
context,
client,
details,
timestampsToReturn,
nodeToRead,
parsedNodeId,
result);
continue;
}
// read the annotations of an item.
if (parsedNodeId.RootType == HdaModelUtils.HdaItemAnnotations)
{
errors[handle.Index] = HistoryReadAnnotations(
context,
client,
details,
timestampsToReturn,
nodeToRead,
parsedNodeId,
result);
continue;
}
errors[handle.Index] = StatusCodes.BadHistoryOperationUnsupported;
}
}