Class GcodeServer

  • All Implemented Interfaces:
    java.lang.Runnable

    public class GcodeServer
    extends java.lang.Thread
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.TreeMap<java.lang.Double,​Motion> motionPlan  
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      GcodeServer()
      Create a GcodeServer listening on a random port.
      GcodeServer​(int port)
      Create a GcodeServer listening on the given port.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCommandResponse​(java.lang.String command, java.lang.String response)  
      Driver getDriver()  
      static java.lang.String getGenericFirmware()  
      AxesLocation getHomingOffsets()  
      int getListenerPort()  
      AxesLocation getMachineLocation()  
      Motion getMomentaryMotion​(double time)  
      void run()  
      void setDriver​(Driver driver)  
      void setHomingOffsets​(AxesLocation homingOffsets)  
      void shutdown()  
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • motionPlan

        protected java.util.TreeMap<java.lang.Double,​Motion> motionPlan
    • Constructor Detail

      • GcodeServer

        public GcodeServer​(int port)
                    throws java.lang.Exception
        Create a GcodeServer listening on the given port.
        Parameters:
        port -
        Throws:
        java.lang.Exception
      • GcodeServer

        public GcodeServer()
                    throws java.lang.Exception
        Create a GcodeServer listening on a random port. The chosen port can be retrieved by calling GcodeServer.getListenerPort().
        Throws:
        java.lang.Exception
    • Method Detail

      • getListenerPort

        public int getListenerPort()
      • getDriver

        public Driver getDriver()
      • setHomingOffsets

        public void setHomingOffsets​(AxesLocation homingOffsets)
      • setDriver

        public void setDriver​(Driver driver)
      • getMachineLocation

        public AxesLocation getMachineLocation()
      • addCommandResponse

        public void addCommandResponse​(java.lang.String command,
                                       java.lang.String response)
      • shutdown

        public void shutdown()
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • getMomentaryMotion

        public Motion getMomentaryMotion​(double time)
      • getGenericFirmware

        public static java.lang.String getGenericFirmware()