|
| NetworkTableInstance () NT_NOEXCEPT |
| Construct invalid instance.
|
|
| NetworkTableInstance (NT_Inst inst) NT_NOEXCEPT |
| Construct from native handle. More...
|
|
| operator bool () const |
| Determines if the native handle is valid. More...
|
|
NT_Inst | GetHandle () const |
| Gets the native handle for the entry. More...
|
|
NetworkTableEntry | GetEntry (const Twine &name) |
| Gets the entry for a key. More...
|
|
std::vector< NetworkTableEntry > | GetEntries (const Twine &prefix, unsigned int types) |
| Get entries starting with the given prefix. More...
|
|
std::vector< EntryInfo > | GetEntryInfo (const Twine &prefix, unsigned int types) const |
| Get information about entries starting with the given prefix. More...
|
|
std::shared_ptr< NetworkTable > | GetTable (const Twine &key) const |
| Gets the table with the specified key. More...
|
|
void | DeleteAllEntries () |
| Deletes ALL keys in ALL subtables (except persistent values). More...
|
|
NT_EntryListener | AddEntryListener (const Twine &prefix, std::function< void(const EntryNotification &event)> callback, unsigned int flags) const |
| Add a listener for all entries starting with a certain prefix. More...
|
|
bool | WaitForEntryListenerQueue (double timeout) |
| Wait for the entry listener queue to be empty. More...
|
|
NT_ConnectionListener | AddConnectionListener (std::function< void(const ConnectionNotification &event)> callback, bool immediate_notify) const |
| Add a connection listener. More...
|
|
bool | WaitForConnectionListenerQueue (double timeout) |
| Wait for the connection listener queue to be empty. More...
|
|
bool | WaitForRpcCallQueue (double timeout) |
| Wait for the incoming RPC call queue to be empty. More...
|
|
void | SetNetworkIdentity (const Twine &name) |
| Set the network identity of this node. More...
|
|
unsigned int | GetNetworkMode () const |
| Get the current network mode. More...
|
|
void | StartServer (const Twine &persist_filename="networktables.ini", const char *listen_address="", unsigned int port=kDefaultPort) |
| Starts a server using the specified filename, listening address, and port. More...
|
|
void | StopServer () |
| Stops the server if it is running.
|
|
void | StartClient () |
| Starts a client. More...
|
|
void | StartClient (const char *server_name, unsigned int port=kDefaultPort) |
| Starts a client using the specified server and port. More...
|
|
void | StartClient (ArrayRef< std::pair< StringRef, unsigned int >> servers) |
| Starts a client using the specified (server, port) combinations. More...
|
|
void | StartClient (ArrayRef< StringRef > servers, unsigned int port=kDefaultPort) |
| Starts a client using the specified servers and port. More...
|
|
void | StartClientTeam (unsigned int team, unsigned int port=kDefaultPort) |
| Starts a client using commonly known robot addresses for the specified team. More...
|
|
void | StopClient () |
| Stops the client if it is running.
|
|
void | SetServer (const char *server_name, unsigned int port=kDefaultPort) |
| Sets server address and port for client (without restarting client). More...
|
|
void | SetServer (ArrayRef< std::pair< StringRef, unsigned int >> servers) |
| Sets server addresses and ports for client (without restarting client). More...
|
|
void | SetServer (ArrayRef< StringRef > servers, unsigned int port=kDefaultPort) |
| Sets server addresses and port for client (without restarting client). More...
|
|
void | SetServerTeam (unsigned int team, unsigned int port=kDefaultPort) |
| Sets server addresses and port for client (without restarting client). More...
|
|
void | StartDSClient (unsigned int port=kDefaultPort) |
| Starts requesting server address from Driver Station. More...
|
|
void | StopDSClient () |
| Stops requesting server address from Driver Station.
|
|
void | SetUpdateRate (double interval) |
| Set the periodic update rate. More...
|
|
void | Flush () const |
| Flushes all updated values immediately to the network. More...
|
|
std::vector< ConnectionInfo > | GetConnections () const |
| Get information on the currently established network connections. More...
|
|
bool | IsConnected () const |
| Return whether or not the instance is connected to another node. More...
|
|
const char * | SavePersistent (const Twine &filename) const |
| Save persistent values to a file. More...
|
|
const char * | LoadPersistent (const Twine &filename, std::function< void(size_t line, const char *msg)> warn) |
| Load persistent values from a file. More...
|
|
const char * | SaveEntries (const Twine &filename, const Twine &prefix) const |
| Save table values to a file. More...
|
|
const char * | LoadEntries (const Twine &filename, const Twine &prefix, std::function< void(size_t line, const char *msg)> warn) |
| Load table values from a file. More...
|
|
NT_Logger | AddLogger (std::function< void(const LogMessage &msg)> func, unsigned int min_level, unsigned int max_level) |
| Add logger callback function. More...
|
|
bool | WaitForLoggerQueue (double timeout) |
| Wait for the incoming log event queue to be empty. More...
|
|
bool | operator== (const NetworkTableInstance &other) const |
| Equality operator. More...
|
|
bool | operator!= (const NetworkTableInstance &other) const |
| Inequality operator. More...
|
|
NetworkTables Instance.
Instances are completely independent from each other. Table operations on one instance will not be visible to other instances unless the instances are connected via the network. The main limitation on instances is that you cannot have two servers on the same network port. The main utility of instances is for unit testing, but they can also enable one program to connect to two different NetworkTables networks.
The global "default" instance (as returned by GetDefault()) is always available, and is intended for the common case when there is only a single NetworkTables instance being used in the program. The default instance cannot be destroyed.
Additional instances can be created with the Create() function. Instances are not reference counted or RAII. Instead, they must be explicitly destroyed (with Destroy()).