WPILibC++
2018.4.1-20180729040223-1137-g011f0ff
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
RpcCall.h
1
/*----------------------------------------------------------------------------*/
2
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
3
/* Open Source Software - may be modified and shared by FRC teams. The code */
4
/* must be accompanied by the FIRST BSD license file in the root directory of */
5
/* the project. */
6
/*----------------------------------------------------------------------------*/
7
8
#ifndef NTCORE_NETWORKTABLES_RPCCALL_H_
9
#define NTCORE_NETWORKTABLES_RPCCALL_H_
10
11
#include <string>
12
#include <utility>
13
14
#include "ntcore_c.h"
15
16
namespace
nt
{
17
18
class
NetworkTableEntry;
19
24
class
RpcCall
final {
25
public
:
29
RpcCall
() : m_entry(0), m_call(0) {}
30
37
RpcCall
(NT_Entry entry, NT_RpcCall call) : m_entry(entry), m_call(call) {}
38
39
RpcCall
(
RpcCall
&& other);
40
RpcCall
(
const
RpcCall
&) =
delete
;
41
RpcCall
& operator=(
const
RpcCall
&) =
delete
;
42
46
~RpcCall
();
47
53
explicit
operator
bool()
const
{
return
m_call != 0; }
54
60
NetworkTableEntry
GetEntry
()
const
;
61
67
NT_RpcCall
GetCall
()
const
{
return
m_call; }
68
76
bool
GetResult
(std::string* result);
77
87
bool
GetResult
(std::string* result,
double
timeout,
bool
* timed_out);
88
92
void
CancelResult
();
93
94
friend
void
swap(
RpcCall
& first,
RpcCall
& second) {
95
using
std::swap;
96
swap(first.m_entry, second.m_entry);
97
swap(first.m_call, second.m_call);
98
}
99
100
private
:
101
NT_Entry m_entry;
102
NT_RpcCall m_call;
103
};
104
105
}
// namespace nt
106
107
#include "networktables/RpcCall.inl"
108
109
#endif // NTCORE_NETWORKTABLES_RPCCALL_H_
nt::RpcCall::RpcCall
RpcCall()
Construct invalid instance.
Definition:
RpcCall.h:29
nt::RpcCall
NetworkTables Remote Procedure Call.
Definition:
RpcCall.h:24
nt::RpcCall::GetResult
bool GetResult(std::string *result)
Get the result (return value).
Definition:
RpcCall.inl:24
nt::RpcCall::RpcCall
RpcCall(NT_Entry entry, NT_RpcCall call)
Construct from native handles.
Definition:
RpcCall.h:37
nt
Definition:
ITable.h:21
nt::RpcCall::~RpcCall
~RpcCall()
Destructor.
Definition:
RpcCall.inl:19
nt::RpcCall::CancelResult
void CancelResult()
Ignore the result.
Definition:
RpcCall.inl:41
nt::NetworkTableEntry
NetworkTables Entry.
Definition:
NetworkTableEntry.h:38
nt::RpcCall::GetCall
NT_RpcCall GetCall() const
Get the call native handle.
Definition:
RpcCall.h:67
nt::RpcCall::GetEntry
NetworkTableEntry GetEntry() const
Get the RPC entry.
ntcore
src
main
native
include
networktables
RpcCall.h
Generated on Sun Jul 29 2018 04:03:32 for WPILibC++ by
1.8.8