WPILibC++  2019.3.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
nt::RpcCall Class Referencefinal

NetworkTables Remote Procedure Call. More...

#include <RpcCall.h>

Public Member Functions

 RpcCall ()
 Construct invalid instance.
 
 RpcCall (NT_Entry entry, NT_RpcCall call)
 Construct from native handles. More...
 
 RpcCall (RpcCall &&other)
 
 RpcCall (const RpcCall &)=delete
 
RpcCalloperator= (const RpcCall &)=delete
 
 ~RpcCall ()
 Destructor. More...
 
 operator bool () const
 Determines if the native handle is valid. More...
 
NetworkTableEntry GetEntry () const
 Get the RPC entry. More...
 
NT_RpcCall GetCall () const
 Get the call native handle. More...
 
bool GetResult (std::string *result)
 Get the result (return value). More...
 
bool GetResult (std::string *result, double timeout, bool *timed_out)
 Get the result (return value). More...
 
void CancelResult ()
 Ignore the result. More...
 

Friends

void swap (RpcCall &first, RpcCall &second)
 

Detailed Description

NetworkTables Remote Procedure Call.

Constructor & Destructor Documentation

nt::RpcCall::RpcCall ( NT_Entry  entry,
NT_RpcCall  call 
)
inline

Construct from native handles.

Parameters
entryEntry handle
callCall handle
nt::RpcCall::~RpcCall ( )
inline

Destructor.

Cancels the result if no other action taken.

Member Function Documentation

void nt::RpcCall::CancelResult ( )
inline

Ignore the result.

This function is non-blocking.

NT_RpcCall nt::RpcCall::GetCall ( ) const
inline

Get the call native handle.

Returns
Native handle.
NetworkTableEntry nt::RpcCall::GetEntry ( ) const

Get the RPC entry.

Returns
NetworkTableEntry for the RPC.
bool nt::RpcCall::GetResult ( std::string *  result)
inline

Get the result (return value).

This function blocks until the result is received.

Parameters
resultreceived result (output)
Returns
False on error, true otherwise.
bool nt::RpcCall::GetResult ( std::string *  result,
double  timeout,
bool *  timed_out 
)
inline

Get the result (return value).

This function blocks until the result is received or it times out.

Parameters
resultreceived result (output)
timeouttimeout, in seconds
timed_outtrue if the timeout period elapsed (output)
Returns
False on error or timeout, true otherwise.
nt::RpcCall::operator bool ( ) const
inlineexplicit

Determines if the native handle is valid.

Returns
True if the native handle is valid, false otherwise.

The documentation for this class was generated from the following files: