Beispiel #1
0
 BankZoneDataA GetNextZoneA(EUnit _Tp)
 {
     lock (cs)
     {
         BankCLUnitA MUnit = null;
         if (_Tp == EUnit.Cross)
         {
             MUnit = MCross;
         }
         else if (_Tp == EUnit.Line)
         {
             MUnit = MLine;
         }
         if (MUnit != null)
         {
             BankZoneDataA z = MUnit.GetNextDataUnitZoneA(TubeLength, MTP);
             if (z != null)
             {
                 MZR.confirmed = GetConfirmed();
                 pr("!!!GetNextZoneA: " + z.ToString());
             }
             return(z);
         }
         return(null);
     }
 }
Beispiel #2
0
 public BankZoneDataA GetLineZoneACalibr(bool _check)
 {
     lock (cs)
     {
         if (MLine != null)
         {
             BankZoneDataA z = MLine.GetDataUnitZoneACalibr(_check);
             if (z != null)
             {
                 pr("!!!GetNextLineZoneACalibr: " + z.ToString());
             }
             return(z);
         }
         return(null);
     }
 }
Beispiel #3
0
        public BankZoneDataA GetNextDataUnitZoneA(int?_TubeLength, L_TickPosition _MTP)
        {
            if (IsComplete())
            {
                return(null);
            }
            BankZoneDataA z = new BankZoneDataA(BankZone.EUnitToEType(Tp), Sensors, prevZone == null ? 0 : prevZone.index + 1);

            for (int i = 0; i < Sensors; i++)
            {
                BankZoneData zi = GetNextZone(i, _TubeLength, _MTP);
                if (zi == null)
                {
                    return(null);
                }
                z.Add(i, zi);
            }
            //            BankZoneData2 z = BankZoneData2.Create(GetNextZone02(false, _TubeLength, _MTP), GetNextZone02(true, _TubeLength, _MTP));
            if (z == null)
            {
                return(null);
            }
            if (z.last)
            {
                GotZones = true;
            }
            //				pr(AnsiString("z.index=") + z.index);
            //				pr(AnsiString("z1.data=") + (unsigned long)(z1.data));
            //				pr(AnsiString("z1.data2=") + (unsigned long)
            //					(z1.data + z1.size));
            //				pr(AnsiString("z2.data=") + (unsigned long)(z2.data));
            //				pr(AnsiString("z2.data2=") + (unsigned long)
            //					(z2.data + z2.size));
            //				pr(AnsiString("deltaZ2Z1=") + ((int)(z2.data - z1.data)));
            //				pr(AnsiString("SensorsPosition=") + _dataUnit->SensorsPosition);
            //				pr(AnsiString("SensorsPosition2=") +
            //					_dataUnit->SensorsPosition2);
            //				pr(z.ToString());
            prevZone = z;
            if (z.last)
            {
                complete = true;
            }
            return(z);
        }
Beispiel #4
0
        public BankZoneDataA GetDataUnitZoneACalibr(bool _check)
        {
            if (IsComplete())
            {
                return(null);
            }
            BankZoneDataA z = new BankZoneDataA(BankZone.EUnitToEType(Tp), Sensors, prevZone == null ? 0 : prevZone.index + 1);

            for (int i = 0; i < Sensors; i++)
            {
                BankZoneData zi = new BankZoneData(BankZone.EType.LINE);
                zi.index  = 0;
                zi.idata  = 0;
                zi.size   = Count;
                zi.size  /= Sensors;
                zi.size  *= Sensors;
                zi.length = ZoneLength;
                zi.last   = true;
                z.Add(i, zi);
            }
            GotZones = true;
            if (!_check)
            {
                //				pr(AnsiString("z.index=") + z.index);
                //				pr(AnsiString("z1.data=") + (unsigned long)(z1.data));
                //				pr(AnsiString("z1.data2=") + (unsigned long)
                //					(z1.data + z1.size));
                //				pr(AnsiString("z2.data=") + (unsigned long)(z2.data));
                //				pr(AnsiString("z2.data2=") + (unsigned long)
                //					(z2.data + z2.size));
                //				pr(AnsiString("deltaZ2Z1=") + ((int)(z2.data - z1.data)));
                //				pr(AnsiString("SensorsPosition=") + _dataUnit->SensorsPosition);
                //				pr(AnsiString("SensorsPosition2=") +
                //					_dataUnit->SensorsPosition2);
                //				pr(z.ToString());
                if (z.last)
                {
                    complete = true;
                }
            }
            return(z);
        }
Beispiel #5
0
 public new void Clear()
 {
     base.Clear();
     prevZone = null;
     GotZones = false;
 }