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 voidcancelResult()Ignore the result.voidclose()Cancels the result if no other action taken.intgetCall()Get the call native handle.NetworkTableEntrygetEntry()Get the RPC entry.byte[]getResult()Get the result (return value).byte[]getResult(double timeout)Get the result (return value).booleanisValid()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:
closein 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.
-