protected override void Entry(TrackingUnit2 item)
 {
     if (Count < Size)
     {
         _queue.Enqueue(item);
     }
 }
Esempio n. 2
0
 override public void Entry(TrackingUnit2 Item)
 {
     if (Count < _size)
     {
         _queue.Enqueue(Item);
     }
 }
 //放入队列指定位置
 public void PutIn(Int16 Pos, TrackingUnit2 Item)
 {
     if (Count < Size)
     {
         InsertDBItem(Pos, Item.ID);
     }
     else
     {
         throw new Exception(_storageName + "进队列出错,数量已满");
     }
 }
Esempio n. 4
0
 // 进入一个指定子区域
 public void EntrySubGroup(Int16 SubGroupID, TrackingUnit2 Item)
 {
     try
     {
         SubStorages[SubGroupID].Entry(Item);
     }
     catch (Exception ex)
     {
         LOG.Error(string.Format("进入SubGroup出错;{0}", ex));
     }
 }
 public void Entry(int pos, TrackingUnit2 item)
 {
     if (Count < Size)
     {
         _queue.Insert(pos, item);
     }
     else
     {
         throw new Exception(StorageName + "进队列出错,数量已满");
     }
 }
        //放入队列指定位置
        override public void PutIn(StoragePosition Pos, TrackingUnit2 Item)
        {
            if (Pos.DimensionCount == 1)
            {
                Int16 PosX = Pos.GetDiemensionValue(StoragePositionDimension.X);

                PutIn(PosX, Item);
            }
            else
            {
                throw new Exception(_storageName + "位置坐标维度错误");
            }
        }
        public override void PutIn(StoragePosition pos, TrackingUnit2 item)
        {
            if (pos.DimensionCount == 1)
            {
                int posX = pos.GetDiemensionValue(StoragePositionDimension.X);

                Entry(posX, item);
            }
            else
            {
                throw new Exception(StorageName + "位置坐标维度错误");
            }
        }
        //进入队列
        override public void Entry(TrackingUnit2 Item)
        {
            int   _count  = Count;
            Int16 lastPos = (Int16)((_count > 0)? LastPosition:0);

            if (lastPos >= Size)
            {
                throw new Exception(string.Format("队列{0}已满,无法插入", ResourceName));
            }

            Int16 insertPos = (Int16)(_count == 0 ? 0:(Int16)(lastPos + 1));

            PutIn(insertPos, Item);
        }
Esempio n. 9
0
 public override void Execute(RedundancyMode Mode)
 {
     if (InParameters["EntryItem"].HasValue)
     {
         TrackingUnit2 item = (TrackingUnit2)InParameters["EntryItem"].GetValue();
         if (item != null)
         {
             if (item.ID != null && item.ID != string.Empty && item.ID != "")
             {
                 _ownerStorage.Entry(item);
             }
         }
     }
 }
Esempio n. 10
0
        public override void Execute(RedundancyMode Mode)
        {
            TrackingUnit2 _vehicle = _ownerStorage.Exit();

            OutParameters["ExitItem"].SetValue(_vehicle);
            //if (InParameters["EntryItem"].HasValue)
            //{
            //    TrackingUnit item = (TrackingUnit)InParameters["EntryItem"].GetValue();
            //    if (item != null)
            //    {
            //        _ownerStorage.Entry(item);
            //    }
            //}
        }
Esempio n. 11
0
        public override void Execute(RedundancyMode Mode)
        {
            try
            {
                Int16         subGroupID = (Int16)InParameters["SubGroupID"].GetValue();
                TrackingUnit2 item       = (TrackingUnit2)InParameters["EntryItem"].GetValue();

                _ownerStorage.EntrySubGroup(subGroupID, item);
            }
            catch (Exception ex)
            {
                LOG.Error(string.Format("执行EntryStorageGroupAction 出错{0}", ex));
            }
        }
Esempio n. 12
0
        public override void Execute(RedundancyMode Mode)
        {
            try
            {
                Int16 subGroupID = (Int16)InParameters["SubGroupID"].GetValue();

                TrackingUnit2 item = _ownerStorage.ExitSubGroup(subGroupID);

                OutParameters["ExitItem"].SetValue(item);
            }
            catch (Exception ex)
            {
                LOG.Error(string.Format("执行ExitSubStorageAction 出错{0}", ex));
            }
        }
Esempio n. 13
0
        override public void Entry(TrackingUnit2 Item)
        { //根据规则进道,需要重写 -- Dongmin 20180817
            if (Item == null)
            {
                return;
            }

            //int ID = entrayVehicleRule.GetNextEntryLane(Lanes, Item);
            //if (ID != -1)
            //{
            //    Lanes[ID - 1].Entry(Item);
            //    exitVehicleRule.AddVehicle(Item);
            //    return true;
            //}
            //else
            //{
            //    LOG.Info(string.Format("{0} Entry Faild", _storageName));
            //    return false;
            //}
        }