Class RpcCall

java.lang.Object
edu.wpi.first.networktables.RpcCall
All Implemented Interfaces:
AutoCloseable

public final class RpcCall
extends Object
implements AutoCloseable
NetworkTables Remote Procedure Call.
  • Constructor Details

    • RpcCall

      public RpcCall​(NetworkTableEntry entry, int call)
      Constructor. This should generally only be used internally to NetworkTables.
      Parameters:
      entry - Entry
      call - Call handle
  • Method Details

    • close

      public void close()
      Cancels the result if no other action taken.
      Specified by:
      close in interface AutoCloseable
    • isValid

      public boolean isValid()
      Determines if the native handle is valid.
      Returns:
      True if the native handle is valid, false otherwise.
    • getEntry

      Get the RPC entry.
      Returns:
      NetworkTableEntry for the RPC.
    • getCall

      public int getCall()
      Get the call native handle.
      Returns:
      Native handle.
    • getResult

      public byte[] getResult()
      Get the result (return value). This function blocks until the result is received.
      Returns:
      Received result (output)
    • getResult

      public byte[] getResult​(double timeout)
      Get the result (return value). This function blocks until the result is received or it times out.
      Parameters:
      timeout - timeout, in seconds
      Returns:
      Received result (output)
    • cancelResult

      public void cancelResult()
      Ignore the result. This function is non-blocking.