WPILib 2012
WPILibRoboticsLibraryforFRC
Public Member Functions | Static Public Member Functions | Friends
NetworkTable Class Reference
Inheritance diagram for NetworkTable:
ErrorBase

List of all members.

Public Member Functions

std::vector< const char * > GetKeys ()
void BeginTransaction ()
void EndTransaction ()
void AddChangeListener (const char *keyName, NetworkTableChangeListener *listener)
void AddChangeListenerAny (NetworkTableChangeListener *listener)
void RemoveChangeListener (const char *keyName, NetworkTableChangeListener *listener)
void RemoveChangeListenerAny (NetworkTableChangeListener *listener)
void AddAdditionListener (NetworkTableAdditionListener *listener)
void RemoveAdditionListener (NetworkTableAdditionListener *listener)
void AddConnectionListener (NetworkTableConnectionListener *listener, bool immediateNotify)
void RemoveConnectionListener (NetworkTableConnectionListener *listener)
bool IsConnected ()
bool ContainsKey (const char *keyName)
NetworkTables::EntryGetEntry (const char *keyName)
int GetInt (const char *keyName)
bool GetBoolean (const char *keyName)
double GetDouble (const char *keyName)
int GetString (const char *keyName, char *value, int len)
std::string GetString (std::string keyName)
NetworkTableGetSubTable (const char *keyName)
void PutInt (const char *keyName, int value)
void PutBoolean (const char *keyName, bool value)
void PutDouble (const char *keyName, double value)
void PutString (const char *keyName, const char *value)
void PutString (std::string keyName, std::string value)
void PutSubTable (const char *keyName, NetworkTable *value)

Static Public Member Functions

static void Initialize ()
static NetworkTableGetTable (const char *tableName)
static NetworkTableGetTable (int id)

Friends

class NetworkTables::Connection
class NetworkTables::Key
class NetworkTables::TableAssignment
class NetworkTables::TableEntry

Member Function Documentation

void NetworkTable::AddAdditionListener ( NetworkTableAdditionListener listener)

Adds the NetworkTableAdditionListener to the table.

Parameters:
listenerthe listener to add
See also:
NetworkTableAdditionListener
void NetworkTable::AddChangeListener ( const char *  keyName,
NetworkTableChangeListener listener 
)

Adds a NetworkTableChangeListener to listen to the specified element.

Parameters:
keyNamethe key to listen to
listenerthe listener
See also:
NetworkTableChangeListener
void NetworkTable::AddChangeListenerAny ( NetworkTableChangeListener listener)

Adds a NetworkTableChangeListener to listen to any element changed in the table

Parameters:
listenerthe listener
See also:
NetworkTableChangeListener
void NetworkTable::AddConnectionListener ( NetworkTableConnectionListener listener,
bool  immediateNotify 
)

Adds a NetworkTableConnectionListener to this table.

Parameters:
listenerthe listener to add
immediateNotifywhether to tell the listener of the current connection status
See also:
NetworkTableConnectionListener
void NetworkTable::BeginTransaction ( )

Begins a transaction. Note that you must call endTransaction() afterwards.

bool NetworkTable::GetBoolean ( const char *  keyName)

Returns the value at the specified key.

Parameters:
keyNamethe key
Returns:
the value
double NetworkTable::GetDouble ( const char *  keyName)

Returns the value at the specified key.

Parameters:
keyNamethe key
Returns:
the value
NetworkTables::Entry * NetworkTable::GetEntry ( const char *  keyName)

Internally used to get at the underlying Entry

Parameters:
keyNamethe name of the key
Returns:
the entry at that position (or null if no entry)
int NetworkTable::GetInt ( const char *  keyName)

Returns the value at the specified key.

Parameters:
keyNamethe key
Returns:
the value
int NetworkTable::GetString ( const char *  keyName,
char *  value,
int  len 
)

Returns the value at the specified key.

Parameters:
keyNamethe key
Returns:
the value
NetworkTable * NetworkTable::GetSubTable ( const char *  keyName)

Returns the value at the specified key.

Parameters:
keyNamethe key
Returns:
the value
NetworkTable * NetworkTable::GetTable ( const char *  tableName) [static]

Returns the table with the given name. The table will automatically be connected by clients asking for the same table.

Parameters:
tableNameThe name of the table
Returns:
The table
void NetworkTable::Initialize ( ) [static]

Opens up the connection stream. Note that this method will be called automatically when NetworkTable#GetTable(const char *) is called. This will only have an effect the first time this is called.

bool NetworkTable::IsConnected ( )

Returns whether or not this table is connected to the robot.

Returns:
whether or not this table is connected to the robot
void NetworkTable::PutBoolean ( const char *  keyName,
bool  value 
)

Maps the specified key to the specified value in this table. Neither the key nor the value can be null. The value can be retrieved by calling the get method with a key that is equal to the original key.

Parameters:
keyNamethe key
valuethe value
void NetworkTable::PutDouble ( const char *  keyName,
double  value 
)

Maps the specified key to the specified value in this table. Neither the key nor the value can be null. The value can be retrieved by calling the get method with a key that is equal to the original key.

Parameters:
keyNamethe key
valuethe value
void NetworkTable::PutInt ( const char *  keyName,
int  value 
)

Maps the specified key to the specified value in this table. Neither the key nor the value can be null. The value can be retrieved by calling the get method with a key that is equal to the original key.

Parameters:
keyNamethe key
valuethe value
void NetworkTable::PutString ( const char *  keyName,
const char *  value 
)

Maps the specified key to the specified value in this table. Neither the key nor the value can be null. The value can be retrieved by calling the get method with a key that is equal to the original key.

Parameters:
keyNamethe key
valuethe value
void NetworkTable::PutSubTable ( const char *  keyName,
NetworkTable value 
)

Maps the specified key to the specified value in this table. Neither the key nor the value can be null. The value can be retrieved by calling the get method with a key that is equal to the original key.

Parameters:
keyNamethe key
valuethe value
void NetworkTable::RemoveAdditionListener ( NetworkTableAdditionListener listener)

Removes the given NetworkTableAdditionListener from the set of listeners.

Parameters:
listenerthe listener to remove
See also:
NetworkTableAdditionListener
void NetworkTable::RemoveChangeListener ( const char *  keyName,
NetworkTableChangeListener listener 
)

Removes the given NetworkTableChangeListener from the specified element.

Parameters:
keyNamethe key to no longer listen to.
listenerthe listener to remove
See also:
NetworkTableChangeListener
void NetworkTable::RemoveChangeListenerAny ( NetworkTableChangeListener listener)

Removes the given NetworkTableChangeListener for any element in the table.

Parameters:
listenerthe listener to remove
See also:
NetworkTableChangeListener
void NetworkTable::RemoveConnectionListener ( NetworkTableConnectionListener listener)

Removes the given NetworkTableConnectionListener from the table.

Parameters:
listenerthe listener to remove
See also:
NetworkTableConnectionListener

The documentation for this class was generated from the following files:
 All Classes Functions Variables