Пример #1
0
 public bool initShell()
 {
     if (!ShellSessionReady)
     {
         this.UpdateStatus(Status.Starting("Aquiring shell session"));
         shellSession = Board.GetShellSession();
         if (shellSession != null)
         {
             this.UpdateStatus(Status.Starting("Connecting to shell session. This may take a while..."));
             Why conected = shellSession.Connect();
             if (conected)
             {
                 this.UpdateStatus(Status.Done("Shell session banner: " + shellSession.ConnectionBanner.ShortenTextWithEllipsis(60)));
                 this.UpdateStatus(Status.Done("Shell session : " + shellSession));
                 return(true);
             }
             else
             {
                 this.UpdateStatus(Status.Error(string.Format("Error [{0}] Could not connect to [{1}]  ", conected.Reason, shellSession)));
                 State = TaskState.abortedError;
                 return(false);
             }
         }
         else
         {
             this.UpdateStatus(Status.Error("Could not get shell sesion for: " + Board));
             return(false);
         }
     }
     else
     {
         return(true);
     }
 }
Пример #2
0
 public RobotBase(IComDevice com)
 {
     this.Com = com;
 }