Class PVHost


  • public class PVHost
    extends java.lang.Object
    Robot code host for the PathVisualizer application.
    • Constructor Summary

      Constructors 
      Constructor Description
      PVHost​(int port)
      Creates a new PVHost.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void sendPath​(Path path, java.lang.String name)
      Sends a path to the PathVisualizer client for viewing.
      void update​(Point2D robotPosition)
      Sends the specified robot position to the PathVisualizer client.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PVHost

        public PVHost​(int port)
        Creates a new PVHost. It will listen for connections on the specified port.
        Parameters:
        port - The port that the host will operate on. The port you enter in PathVisualizer should match the one passed here.
    • Method Detail

      • update

        public void update​(Point2D robotPosition)
        Sends the specified robot position to the PathVisualizer client.
        Parameters:
        robotPosition - The current robot position.
      • sendPath

        public void sendPath​(Path path,
                             java.lang.String name)
        Sends a path to the PathVisualizer client for viewing.
        Parameters:
        path - The Path to send.
        name - The name of the path. Will appear on the manifest with that name.