using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using IStation.Untity; namespace IStation.Transfer { /// /// /// public class DataHelper { /// /// /// public static List GetRecordList(Model.BodyWave model) { var list = new List(); for (int i = 0; i < 8; i++) { var record = new VibrationRecord(); record.ObjectId = $"{model.IP}_Chan_{i}"; record.InstrumentIp = model.IP; record.InstrumentType = "SDC800"; record.DataTime = model.DataTime; record.PointLenOfGroup = model.Len; record.PointLenOfPeriod = model.PointPR; record.Rpm = model.Rpm; record.Frequency = model.Fs; record.SensorType = (int)model.ChanSenType[i]; record.ChCalParams = model.ChanCalParams[i]; record.ChCoffParams = model.CoffParams[i]; record.ChCoefficient1X = model.ChanCoefficient1x[i]; record.ChCoefficient2X = model.ChanCoefficient2x[i]; record.ChIntegType = (int)model.ChanIntegType[i]; record.ChMagnification = model.ChanMagnification[i]; record.ChSencivity = model.ChanSencivity[i]; record.DcValue = model.ChanDC[i].Average(); record.Wave = FloatListHelper.ToString(model.ChanWave[i]); list.Add(record); } return list; } } }