Beispiel #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);

            }
        }
Beispiel #2
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);
            }
        }