public static DataPointsBase Instance() { if (instance == null) { instance = new DataPointsBase(); } return(instance); }
public static DataPointDef GetDataItem(ProtocolDef protocolId, DataModelType identifier) { var dataPointItem = DataPointsBase.Instance(identifier).GetItem(protocolId); if (dataPointItem == null) { return(null); } return(dataPointItem); }
public static string GetDataPoint(ProtocolDef protocolId, DataModelType identifier) { var dataPointItem = DataPointsBase.Instance(identifier).GetItem(protocolId); if (dataPointItem == null) { return(string.Empty); } return(dataPointItem.DataPath); }
public static ProtocolDef GetProtocolId(ref PathAndType item, DataModelType identifier) { var dataPointItem = DataPointsBase.Instance(identifier).GetItem(item.Path); if (dataPointItem == null) { return(0); } if (item.Type == "") { item.Type = dataPointItem.DataType; } return(dataPointItem.ProtocolId); }
private DataPointsBase() { if (dataPoints == null) { dataPoints = new List <DataPointsBase>(); DataPointsBase delta = new DataPointsBase(DataModelType.DeltaData); DataPointsBase eltek = new DataPointsBase(DataModelType.EltekData); dataPoints.Add(eltek); dataPoints.Add(delta); if (Items == null) { Items = new List <DataPointDef>(); } Items.AddRange(eltek.Items); Items.AddRange(delta.Items); } }