Example #1
0
 public static void showStatus()
 {
     if (null != status)
     {
         Console.WriteLine("");
         Console.WriteLine("status = " + status);
         Schemas.CRCL.Status.CommandStatusType cst = status.CommandStatus;
         if (null != cst)
         {
             Console.WriteLine("CommandId = " + cst.CommandID);
             Console.WriteLine("State = " + cst.CommandState);
             Console.WriteLine("StatusId = " + cst.StatusID);
         }
         Schemas.CRCL.Status.PoseStatusType poseStatus = status.PoseStatus;
         if (null != poseStatus)
         {
             Schemas.CRCL.Status.PoseType pose = poseStatus.Pose;
             if (null != pose)
             {
                 Console.WriteLine("Pose.Point = " + pose.Point.X + "," + pose.Point.Y + "," + pose.Point.Z);
                 Console.WriteLine("Pose.XAxis = " + pose.XAxis.I + "," + pose.XAxis.J + "," + pose.XAxis.K);
                 Console.WriteLine("Pose.ZAxis = " + pose.ZAxis.I + "," + pose.ZAxis.J + "," + pose.ZAxis.K);
             }
         }
         Console.WriteLine("");
     }
 }
Example #2
0
        public static void showHelp()
        {
            Console.WriteLine("");
            Console.WriteLine("Available commands:");
            Console.WriteLine("");
            Console.WriteLine("quit");
            Console.WriteLine("\t-- quits the client");
            Console.WriteLine("");

            Console.WriteLine("init");
            Console.WriteLine("\t-- sends InitCanonType command.");
            Console.WriteLine("");


            Console.WriteLine("end");
            Console.WriteLine("\t-- sends EndCanonType command.");
            Console.WriteLine("");

            Console.WriteLine("move [Point.X] [Point.Y] [Point.Z] [XAxis.I] [XAxis.J] [XAxis.K] [ZAxis.I] [ZAxis.J] [ZAxis.K]");
            Console.WriteLine("\t-- sends MoveToType command (arguments are optional)");
            Console.WriteLine("examples:");
            double px = 0;
            double py = 0;
            double pz = 0;

            if (null != status)
            {
                Schemas.CRCL.Status.PoseStatusType poseStatus = status.PoseStatus;
                if (null != poseStatus)
                {
                    Schemas.CRCL.Status.PoseType pose = poseStatus.Pose;

                    if (null != pose)
                    {
                        px = pose.Point.X;
                        py = pose.Point.Y;
                        pz = pose.Point.Z;
                    }
                }
            }
            Console.WriteLine("move  " + px + " " + py + " " + pz);
            Console.WriteLine("move  " + px + " " + py + " " + pz + " 1 0 0 0 0 -1");
            Console.WriteLine("");
            Console.WriteLine("Press enter on empty line to see status.");
            Console.WriteLine("");
        }