|
| NetworkTable (std::string path, NetworkTableProvider &provider) |
|
bool | IsConnected () |
|
bool | IsServer () |
|
void | AddConnectionListener (IRemoteConnectionListener *listener, bool immediateNotify) |
|
void | RemoveConnectionListener (IRemoteConnectionListener *listener) |
|
void | AddTableListener (ITableListener *listener) |
|
void | AddTableListener (ITableListener *listener, bool immediateNotify) |
|
void | AddTableListener (std::string key, ITableListener *listener, bool immediateNotify) |
|
void | AddSubTableListener (ITableListener *listener) |
|
void | RemoveTableListener (ITableListener *listener) |
|
NetworkTable * | GetSubTable (std::string key) |
|
bool | ContainsKey (std::string key) |
|
bool | ContainsSubTable (std::string key) |
|
void | PutNumber (std::string key, double value) |
|
double | GetNumber (std::string key) |
|
double | GetNumber (std::string key, double defaultValue) |
|
void | PutString (std::string key, std::string value) |
|
std::string | GetString (std::string key) |
|
std::string | GetString (std::string key, std::string defaultValue) |
|
void | PutBoolean (std::string key, bool value) |
|
bool | GetBoolean (std::string key) |
|
bool | GetBoolean (std::string key, bool defaultValue) |
|
void | PutValue (std::string key, NetworkTableEntryType *type, EntryValue value) |
|
void | RetrieveValue (std::string key, ComplexData &externalValue) |
|
void | PutValue (std::string key, ComplexData &value) |
|
EntryValue | GetValue (std::string key) |
|
EntryValue | GetValue (std::string key, EntryValue defaultValue) |
|
Definition at line 53 of file NetworkTable.h.
Register an object to listen for connection and disconnection events
- Parameters
-
listener | the listener to be register |
immediateNotify | if the listener object should be notified of the current connection state |
Implements IRemote.
Definition at line 136 of file NetworkTable.cpp.
This will immediately notify the listener of all current sub tables
- Parameters
-
Implements ITable.
Definition at line 174 of file NetworkTable.cpp.
Add a listener for changes to the table
- Parameters
-
listener | the listener to add |
Implements ITable.
Definition at line 158 of file NetworkTable.cpp.
void NetworkTable::AddTableListener |
( |
ITableListener * |
listener, |
|
|
bool |
immediateNotify |
|
) |
| |
|
virtual |
Add a listener for changes to the table
- Parameters
-
listener | the listener to add |
immediateNotify | if true then this listener will be notified of all current entries (marked as new) |
Implements ITable.
Definition at line 162 of file NetworkTable.cpp.
void NetworkTable::AddTableListener |
( |
std::string |
key, |
|
|
ITableListener * |
listener, |
|
|
bool |
immediateNotify |
|
) |
| |
|
virtual |
Add a listener for changes to a specific key the table
- Parameters
-
key | the key to listen for |
listener | the listener to add |
immediateNotify | if true then this listener will be notified of all current entries (marked as new) |
Implements ITable.
Definition at line 169 of file NetworkTable.cpp.
bool NetworkTable::ContainsKey |
( |
std::string |
key | ) |
|
|
virtual |
Checks the table and tells if it contains the specified key
- Parameters
-
Implements ITable.
Definition at line 206 of file NetworkTable.cpp.
bool NetworkTable::ContainsSubTable |
( |
std::string |
key | ) |
|
|
virtual |
Determines whether there exists a non-empty subtable for this key in this table.
- Parameters
-
- Returns
- true if there is a subtable with the key which contains at least one key/subtable of its own
Implements ITable.
Definition at line 210 of file NetworkTable.cpp.
bool NetworkTable::GetBoolean |
( |
std::string |
key | ) |
|
|
virtual |
Returns the key that the name maps to.
- Parameters
-
- Returns
- the key
- Exceptions
-
Implements ITable.
Definition at line 274 of file NetworkTable.cpp.
bool NetworkTable::GetBoolean |
( |
std::string |
key, |
|
|
bool |
defaultValue |
|
) |
| |
|
virtual |
Returns the key that the name maps to. If the key is null, it will return the default value
- Parameters
-
key | the key name |
defaultValue | the default value if the key is null |
- Returns
- the key
Implements ITable.
Definition at line 279 of file NetworkTable.cpp.
double NetworkTable::GetNumber |
( |
std::string |
key | ) |
|
|
virtual |
Returns the key that the name maps to.
- Parameters
-
- Returns
- the key
- Exceptions
-
Implements ITable.
Definition at line 232 of file NetworkTable.cpp.
double NetworkTable::GetNumber |
( |
std::string |
key, |
|
|
double |
defaultValue |
|
) |
| |
|
virtual |
Returns the key that the name maps to. If the key is null, it will return the default value
- Parameters
-
key | the key name |
defaultValue | the default value if the key is null |
- Returns
- the key
Implements ITable.
Definition at line 237 of file NetworkTable.cpp.
std::string NetworkTable::GetString |
( |
std::string |
key | ) |
|
|
virtual |
Returns the key that the name maps to.
- Parameters
-
- Returns
- the key
- Exceptions
-
Implements ITable.
Definition at line 253 of file NetworkTable.cpp.
std::string NetworkTable::GetString |
( |
std::string |
key, |
|
|
std::string |
defaultValue |
|
) |
| |
|
virtual |
Returns the key that the name maps to. If the key is null, it will return the default value
- Parameters
-
key | the key name |
defaultValue | the default value if the key is null |
- Returns
- the key
Implements ITable.
Definition at line 258 of file NetworkTable.cpp.
Returns the table at the specified key. If there is no table at the specified key, it will create a new table
- Parameters
-
- Returns
- the networktable to be returned
Implements ITable.
Definition at line 198 of file NetworkTable.cpp.
Gets the table with the specified key. If the table does not exist, a new table will be created.
This will automatically initialize network tables if it has not been already
- Parameters
-
- Returns
- the network table requested
Definition at line 107 of file NetworkTable.cpp.
EntryValue NetworkTable::GetValue |
( |
std::string |
key | ) |
|
|
virtual |
Returns the key that the name maps to. NOTE: If the value is a double, it will return a Double object, not a primitive. To get the primitive, use GetDouble
- Parameters
-
- Returns
- the key
- Exceptions
-
Implements ITable.
Definition at line 307 of file NetworkTable.cpp.
Returns the key that the name maps to. If the key is null, it will return the default value NOTE: If the value is a double, it will return a Double object, not a primitive. To get the primitive, use GetDouble
- Parameters
-
key | the key name |
defaultValue | the default value if the key is null |
- Returns
- the key
Definition at line 311 of file NetworkTable.cpp.
void NetworkTable::Initialize |
( |
| ) |
|
|
static |
bool NetworkTable::IsConnected |
( |
| ) |
|
|
virtual |
Get the current state of the objects connection
- Returns
- the current connection state
Implements IRemote.
Definition at line 127 of file NetworkTable.cpp.
bool NetworkTable::IsServer |
( |
| ) |
|
|
virtual |
If the object is acting as a server
- Returns
- if the object is a server
Implements IRemote.
Definition at line 131 of file NetworkTable.cpp.
void NetworkTable::PutBoolean |
( |
std::string |
key, |
|
|
bool |
value |
|
) |
| |
|
virtual |
Maps the specified key to the specified value in this table. The key can not be null. The value can be retrieved by calling the get method with a key that is equal to the original key.
- Parameters
-
key | the key |
value | the value |
Implements ITable.
Definition at line 267 of file NetworkTable.cpp.
void NetworkTable::PutNumber |
( |
std::string |
key, |
|
|
double |
value |
|
) |
| |
|
virtual |
Maps the specified key to the specified value in this table. The key can not be null. The value can be retrieved by calling the get method with a key that is equal to the original key.
- Parameters
-
key | the key |
value | the value |
Implements ITable.
Definition at line 225 of file NetworkTable.cpp.
void NetworkTable::PutString |
( |
std::string |
key, |
|
|
std::string |
value |
|
) |
| |
|
virtual |
Maps the specified key to the specified value in this table. The key can not be null. The value can be retrieved by calling the get method with a key that is equal to the original key.
- Parameters
-
key | the key |
value | the value |
Implements ITable.
Definition at line 246 of file NetworkTable.cpp.
void NetworkTable::PutValue |
( |
std::string |
key, |
|
|
ComplexData & |
value |
|
) |
| |
|
virtual |
Maps the specified key to the specified value in this table. The key can not be null. The value can be retrieved by calling the get method with a key that is equal to the original key.
- Parameters
-
key | the key name |
value | the value to be put |
Implements ITable.
Definition at line 300 of file NetworkTable.cpp.
Unregister a listener from connection events
- Parameters
-
listener | the listener to be unregistered |
Implements IRemote.
Definition at line 148 of file NetworkTable.cpp.
Remove a listener from receiving table events
- Parameters
-
listener | the listener to be removed |
Implements ITable.
Definition at line 180 of file NetworkTable.cpp.
void NetworkTable::SetClientMode |
( |
| ) |
|
|
static |
set that network tables should be a client This must be called before initalize or GetTable
Definition at line 86 of file NetworkTable.cpp.
void NetworkTable::SetIPAddress |
( |
const char * |
address | ) |
|
|
static |
- Parameters
-
address | the adress that network tables will connect to in client mode |
Definition at line 102 of file NetworkTable.cpp.
void NetworkTable::SetServerMode |
( |
| ) |
|
|
static |
set that network tables should be a server This must be called before initalize or GetTable
Definition at line 91 of file NetworkTable.cpp.
set the table provider for static network tables methods This must be called before getTable
Definition at line 81 of file NetworkTable.cpp.
void NetworkTable::SetTeam |
( |
int |
team | ) |
|
|
static |
set the team the robot is configured for (this will set the ip address that network tables will connect to in client mode) This must be called before initalize or GetTable
- Parameters
-
Definition at line 96 of file NetworkTable.cpp.
const int NetworkTable::DEFAULT_PORT = 1735 |
|
static |
The default port that network tables operates on
Definition at line 94 of file NetworkTable.h.
const std::string NetworkTable::PATH_SEPARATOR |
|
static |
The path separator for sub-tables and keys
Definition at line 90 of file NetworkTable.h.
The documentation for this class was generated from the following files: