Example #1
0
 /// <summary>
 /// The AGVLeavingRFID.
 /// </summary>
 /// <param name="agv">The agv<see cref="AGVData"/>.</param>
 public void AGVLeavingRFID(AGVData agv)
 {
     //remove the AGV because it has left this RFID
     AGVsOnRFID.Remove(agv);
     //Fire the AGVLeaving event to alert any subscribers that an AGV has left this rfid
     AGVLeaving?.Invoke(this, new AGVDataEventArgs(agv));
     RaisePropertyChanged("ContainsAGV");
 }
Example #2
0
        /// <summary>
        /// This function is called when a new AGV enters this traffic zone.
        /// </summary>
        /// <param name="agv">.</param>
        public void AGVEnteringRFID(AGVData agv)
        {
            //add the AGV
            AGVsOnRFID.Add(agv);
            //tell the AGV that it is on this RFID
            if (agv.CurrentRFIDData != this)
            {
                agv.CurrentRFIDData = this;
            }
            //set the last AGV arrival time
            LastAGVArrivalTime = DateTime.Now;

            //Fire the AGVEntering event to alert any subscribers that an AGV has entered this rfid
            AGVEntering?.Invoke(this, new AGVDataEventArgs(agv));
            RaisePropertyChanged("ContainsAGV");
        }