Ejemplo n.º 1
0
        public static DataPointsBase Instance()
        {
            if (instance == null)
            {
                instance = new DataPointsBase();
            }

            return(instance);
        }
Ejemplo n.º 2
0
        public static DataPointDef GetDataItem(ProtocolDef protocolId, DataModelType identifier)
        {
            var dataPointItem = DataPointsBase.Instance(identifier).GetItem(protocolId);

            if (dataPointItem == null)
            {
                return(null);
            }
            return(dataPointItem);
        }
Ejemplo n.º 3
0
        public static string GetDataPoint(ProtocolDef protocolId, DataModelType identifier)
        {
            var dataPointItem = DataPointsBase.Instance(identifier).GetItem(protocolId);

            if (dataPointItem == null)
            {
                return(string.Empty);
            }
            return(dataPointItem.DataPath);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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);
            }
        }