Now you can download a copy of these docs so you can use them offline! Download now
Inheritance diagram for NetworkTable:
Collaboration diagram for NetworkTable:

Public Member Functions

 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)
NetworkTableGetSubTable (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)
- Public Member Functions inherited from ITable
virtual bool ContainsKey (std::string key)=0
virtual bool ContainsSubTable (std::string key)=0
virtual ITableGetSubTable (std::string key)=0
virtual EntryValue GetValue (std::string key)=0
virtual void PutValue (std::string key, ComplexData &value)=0
virtual void RetrieveValue (std::string key, ComplexData &externalValue)=0
virtual void PutNumber (std::string key, double value)=0
virtual double GetNumber (std::string key)=0
virtual double GetNumber (std::string key, double defaultValue)=0
virtual void PutString (std::string key, std::string value)=0
virtual std::string GetString (std::string key)=0
virtual std::string GetString (std::string key, std::string defaultValue)=0
virtual void PutBoolean (std::string key, bool value)=0
virtual bool GetBoolean (std::string key)=0
virtual bool GetBoolean (std::string key, bool defaultValue)=0
virtual void AddTableListener (ITableListener *listener)=0
virtual void AddTableListener (ITableListener *listener, bool immediateNotify)=0
virtual void AddTableListener (std::string key, ITableListener *listener, bool immediateNotify)=0
virtual void AddSubTableListener (ITableListener *listener)=0
virtual void RemoveTableListener (ITableListener *listener)=0

Static Public Member Functions

static void Initialize ()
static void SetTableProvider (NetworkTableProvider *provider)
static void SetClientMode ()
static void SetServerMode ()
static void SetTeam (int team)
static void SetIPAddress (const char *address)
static NetworkTableGetTable (std::string key)

Static Public Attributes

static const char PATH_SEPARATOR_CHAR = '/'
static const std::string PATH_SEPARATOR
static const int DEFAULT_PORT = 1735

Additional Inherited Members

- Private Member Functions inherited from IRemote
virtual void AddConnectionListener (IRemoteConnectionListener *listener, bool immediateNotify)=0
virtual void RemoveConnectionListener (IRemoteConnectionListener *listener)=0
virtual bool IsConnected ()=0
virtual bool IsServer ()=0

Detailed Description

Definition at line 53 of file NetworkTable.h.

Member Function Documentation

bool NetworkTable::ContainsKey ( std::string  key)

Checks the table and tells if it contains the specified key

Parameters
keythe key to be checked

Definition at line 171 of file NetworkTable.cpp.

bool NetworkTable::GetBoolean ( std::string  key)

Returns the key that the name maps to.

Parameters
keythe key name
Returns
the key
Exceptions
TableKeyNotDefinedExceptionif the specified key is null

Definition at line 239 of file NetworkTable.cpp.

bool NetworkTable::GetBoolean ( std::string  key,
bool  defaultValue 
)

Returns the key that the name maps to. If the key is null, it will return the default value

Parameters
keythe key name
defaultValuethe default value if the key is null
Returns
the key

Definition at line 244 of file NetworkTable.cpp.

double NetworkTable::GetNumber ( std::string  key)

Returns the key that the name maps to.

Parameters
keythe key name
Returns
the key
Exceptions
TableKeyNotDefinedExceptionif the specified key is null

Definition at line 197 of file NetworkTable.cpp.

double NetworkTable::GetNumber ( std::string  key,
double  defaultValue 
)

Returns the key that the name maps to. If the key is null, it will return the default value

Parameters
keythe key name
defaultValuethe default value if the key is null
Returns
the key

Definition at line 202 of file NetworkTable.cpp.

std::string NetworkTable::GetString ( std::string  key)

Returns the key that the name maps to.

Parameters
keythe key name
Returns
the key
Exceptions
TableKeyNotDefinedExceptionif the specified key is null

Definition at line 218 of file NetworkTable.cpp.

std::string NetworkTable::GetString ( std::string  key,
std::string  defaultValue 
)

Returns the key that the name maps to. If the key is null, it will return the default value

Parameters
keythe key name
defaultValuethe default value if the key is null
Returns
the key

Definition at line 223 of file NetworkTable.cpp.

NetworkTable * NetworkTable::GetSubTable ( std::string  key)

Returns the table at the specified key. If there is no table at the specified key, it will create a new table

Parameters
keythe key name
Returns
the networktable to be returned

Definition at line 163 of file NetworkTable.cpp.

NetworkTable * NetworkTable::GetTable ( std::string  key)
static

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
keythe key name
Returns
the network table requested

Definition at line 75 of file NetworkTable.cpp.

EntryValue NetworkTable::GetValue ( std::string  key)

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
keythe key name
Returns
the key
Exceptions
TableKeyNotDefinedExceptionif the specified key is null

Definition at line 272 of file NetworkTable.cpp.

EntryValue NetworkTable::GetValue ( std::string  key,
EntryValue  defaultValue 
)

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
keythe key name
defaultValuethe default value if the key is null
Returns
the key

Definition at line 276 of file NetworkTable.cpp.

void NetworkTable::Initialize ( )
static
Exceptions
IOException

Definition at line 44 of file NetworkTable.cpp.

void NetworkTable::PutBoolean ( std::string  key,
bool  value 
)

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
keythe key
valuethe value

Definition at line 232 of file NetworkTable.cpp.

void NetworkTable::PutNumber ( std::string  key,
double  value 
)

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
keythe key
valuethe value

Definition at line 190 of file NetworkTable.cpp.

void NetworkTable::PutString ( std::string  key,
std::string  value 
)

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
keythe key
valuethe value

Definition at line 211 of file NetworkTable.cpp.

void NetworkTable::PutValue ( std::string  key,
ComplexData value 
)

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
keythe key name
valuethe value to be put

Definition at line 265 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 54 of file NetworkTable.cpp.

void NetworkTable::SetIPAddress ( const char *  address)
static
Parameters
addressthe adress that network tables will connect to in client mode

Definition at line 70 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 59 of file NetworkTable.cpp.

void NetworkTable::SetTableProvider ( NetworkTableProvider provider)
static

set the table provider for static network tables methods This must be called before getTable

Definition at line 49 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
teamthe team number

Definition at line 64 of file NetworkTable.cpp.

Member Data Documentation

const int NetworkTable::DEFAULT_PORT = 1735
static

The default port that network tables operates on

Definition at line 91 of file NetworkTable.h.

const std::string NetworkTable::PATH_SEPARATOR
static

The path separator for sub-tables and keys

Definition at line 87 of file NetworkTable.h.


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

Generated on Tue Feb 5 2013 00:55:10 for WPILibC++ by doxygen 1.8.1.2