public CurveGroup(int type, int index,DateTime time, int sampleRate, float[] data) { this.Type = type; this.Index = index; StationCurve curve = new StationCurve(time, sampleRate, data); listCurve.Add(curve); }
public CurveGroup(int type, int index, DateTime time, int sampleRate, float[] data) { this.Type = type; this.Index = index; StationCurve curve = new StationCurve(time, sampleRate, data); listCurve.Add(curve); }
public void AddCurve(int phase, DateTime time, int sampleRate, float[] data) { listCurve[phase] = new StationCurve(time, sampleRate, data); }
public List<StationCurve> GetCurveHistory(int curveType, int curveindex, DateTime time) { List<StationCurve> list = new List<StationCurve>(); //排列顺序为动作曲线(A,B,C)+参考曲线定位到反位(A,B,C)+参考曲线反位到定位(A,B,C)+摩擦曲线定位到X位(A,B,C)+摩擦曲线反位到X位(A,B,C) for (int i = 0; i < 3 ; i++) { list.Add(null); } IList<CurveIndex> listRecord = fileIndex.AllIndex; for (int i = listRecord.Count - 1; i >= 0; i--) { CurveIndex rcd = listRecord[i]; byte mark = rcd.CurveMark; byte phase = rcd.CurvePhase; if (phase > 3) { phase = 3; }//不允许超过3个相位 if ((rcd.CurveType == curveType) && (rcd.CrvIndex == curveindex)) //曲线类型匹配 { if (Math.Abs((rcd.CurveTime-time).TotalSeconds)<2) { float[] pt = this.GetCurvePoint(rcd); int index = (phase == 0) ? 0 : phase - 1; //CurveRecord cr = new CurveRecord(time, "", McType.None, curveType, curveindex, phase, rcd.Direction, rcd.SampleRate, pt); StationCurve cr = new StationCurve(rcd.CurveTime,rcd.SampleRate,pt); list[index] = cr; } } } return list; }