Exemplo n.º 1
0
        public void AddCurves(CurveGroup grp)
        {
            List<StationCurve> listCurve = grp.Curves;
            if ((listCurve == null) || (listCurve.Count <= 0)) return;

            DateTime tmCurve = DateTime.Now;
            for (int i = 0; i < listCurve.Count; i++)
            {
                if (listCurve[i] != null)
                {
                    tmCurve = listCurve[i].OccurTime;
                    break;
                }
            }
            for (int i = 0; i < listCurve.Count; i++)
            {
                int ptNum = (listCurve[i] == null) ? 0 : listCurve[i].Points.Length;
                CurveIndex indexRecord = fileIndex.NewRecord(ptNum);

                indexRecord.CurveTime = tmCurve;
                indexRecord.CurveType = (Int16)grp.Type;
                indexRecord.CrvIndex = (Int16)grp.Index;
                indexRecord.CurvePhase = (byte)((listCurve.Count == 1) ? 0 : (i + 1));
                indexRecord.Direction = (listCurve[i] == null) ? (byte)0 : listCurve[i].Dir;
                indexRecord.CurveMark = 0;
                indexRecord.SampleRate = (listCurve[i] == null) ? (Int16)0 : (Int16)listCurve[i].SampleRate;

                CurveStoreBlock blk = new CurveStoreBlock(this, indexRecord,  (listCurve[i] == null) ? null:listCurve[i].Points);

                manager.AddBlock(blk);

            }
        }
Exemplo n.º 2
0
        public void AddCurve(CurveGroup scf)
        {
            if (scf == null) return;

            curveFile.AddCurves(scf);
        }
Exemplo n.º 3
0
        public void AddCurve(int type, int index,DateTime time, int sampleRate, float[] data)
        {
            CurveGroup grp=new CurveGroup(type,index,time,sampleRate,data);

            CurveManager.GetInstance().AddCurve(grp);
        }
Exemplo n.º 4
0
        public void AddCurve(CurveGroup cg)
        {
            CurveManager manager = CurveManager.GetInstance();

            manager.AddCurve(cg);
        }