Package edu.wpi.first.networktables
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 Summary
Constructors Constructor Description RpcCall(NetworkTableEntry entry, int call)
Constructor. -
Method Summary
Modifier and Type Method Description void
cancelResult()
Ignore the result.void
close()
Cancels the result if no other action taken.int
getCall()
Get the call native handle.NetworkTableEntry
getEntry()
Get the RPC entry.byte[]
getResult()
Get the result (return value).byte[]
getResult(double timeout)
Get the result (return value).boolean
isValid()
Determines if the native handle is valid.
-
Constructor Details
-
RpcCall
Constructor. This should generally only be used internally to NetworkTables.- Parameters:
entry
- Entrycall
- Call handle
-
-
Method Details
-
close
Cancels the result if no other action taken.- Specified by:
close
in interfaceAutoCloseable
-
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
Get the call native handle.- Returns:
- Native handle.
-
getResult
Get the result (return value). This function blocks until the result is received.- Returns:
- Received result (output)
-
getResult
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
Ignore the result. This function is non-blocking.
-