ningshuxia
2022-12-01 ad494f13d2ddf31f142cf7fb908b3a6e90395a1a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IStation.Untity;
 
namespace IStation.Transfer
{
    /// <summary>
    /// 
    /// </summary>
    public class DataHelper
    {
        /// <summary>
        /// 
        /// </summary>
        public static List<VibrationRecord> GetRecordList(Model.BodyWave model)
        {
            var list = new List<VibrationRecord>();
            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;
        }
 
 
    }
}