Ejemplo n.º 1
0
        private void SocketEvent_ProcessMessage(object sender, SocketEventArgs data)
        {
            if (!SocketEvent_InSync)
            {
                SocketEvent_InSync = true;
                this.Queue(false, new Action(() => SocketEvent_InSyncEvent?.Invoke(this, true)));
            }

            switch (data.Command)
            {
            case 1:     //Initial Scan
                this.Queue(false, new Action(() => HealthCheck?.Invoke(sender, new HealthCheckEventArgs(data.ID))));
                HealthCheckEventArgs hc = new HealthCheckEventArgs(data.ID);
                hc.Valid  = flipflop;
                flipflop ^= true;
                HealthCheckResponse(hc);
                break;

            case 10:     //Tote ready for pickup.
                this.Queue(false, new Action(() => ToteReady?.Invoke(sender, data)));
                break;

            case 12:     //Tote Loading complete.
                this.Queue(false, new Action(() => ToteLoadComplete?.Invoke(sender, data)));
                break;

            case 13:     //Tote Unloading complete.
                this.Queue(false, new Action(() => ToteUnloadComplete?.Invoke(sender, data)));
                break;
            }
        }
Ejemplo n.º 2
0
 private bool RobotAtGoal(SocketEventArgs data)
 {
     if (SocketEvent_Client.Write(data.GetCommandString(11)))
     {
         return(true);
     }
     return(false);
 }