using Opc.Ua; namespace ZB.MOM.WW.OtOpcUa.Host.Historian { /// /// Maps OPC UA aggregate NodeIds to the Wonderware Historian AnalogSummary column names /// consumed by the historian plugin. Kept in Host so HistoryReadProcessed can validate /// aggregate support without requiring the plugin to be loaded. /// public static class HistorianAggregateMap { public static string? MapAggregateToColumn(NodeId aggregateId) { if (aggregateId == ObjectIds.AggregateFunction_Average) return "Average"; if (aggregateId == ObjectIds.AggregateFunction_Minimum) return "Minimum"; if (aggregateId == ObjectIds.AggregateFunction_Maximum) return "Maximum"; if (aggregateId == ObjectIds.AggregateFunction_Count) return "ValueCount"; if (aggregateId == ObjectIds.AggregateFunction_Start) return "First"; if (aggregateId == ObjectIds.AggregateFunction_End) return "Last"; if (aggregateId == ObjectIds.AggregateFunction_StandardDeviationPopulation) return "StdDev"; return null; } } }