private AnalogSignalsBase AnalogDbfData(string path) { DBFTable wDBF = new DBFTable(); var dataTable = wDBF.GetAll(path); AnalogSignalsBase signalBase = new AnalogSignalsBase(dataTable.Rows.Count, new List<string>(), new List<string>(), new List<int>(), new List<int>(), new List<float>(), new List<float>()); foreach (DataRow row in dataTable.Rows) { signalBase.SignalCodes.Add(row[1].ToString()); signalBase.IsFloat.Add(row[2].ToString()); signalBase.MinDigitalValue.Add(Convert.ToInt32(row[5].ToString())); signalBase.MaxDigitalValue.Add(Convert.ToInt32(row[6].ToString())); signalBase.MinPhysicalValue.Add(Convert.ToSingle(row[7].ToString())); signalBase.MaxPhysicalValue.Add(Convert.ToSingle(row[8].ToString())); } dataTable = null; wDBF = null; return signalBase; }
private DiscreteSignalBase DiscreteDbfData(string path) { DBFTable wDBF = new DBFTable(); var dataTable = wDBF.GetAll(path); DiscreteSignalBase signaBase = new DiscreteSignalBase(dataTable.Rows.Count, new List<string>()); foreach(DataRow row in dataTable.Rows) { signaBase.SignalCodes.Add(row[5].ToString()); } return signaBase; }