NetworkTable
instead.@Deprecated public class NetworkTable extends Object implements ITable, IRemote
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT
Deprecated.
The default port that network tables operates on
|
static char |
PATH_SEPARATOR
Deprecated.
The path separator for sub-tables and keys
|
static int |
PERSISTENT
Deprecated.
The persistent flag value.
|
NOTIFY_DELETE, NOTIFY_FLAGS, NOTIFY_IMMEDIATE, NOTIFY_LOCAL, NOTIFY_NEW, NOTIFY_UPDATE
Modifier and Type | Method and Description |
---|---|
void |
addConnectionListener(IRemoteConnectionListener listener,
boolean immediateNotify)
Deprecated.
|
static void |
addGlobalConnectionListener(IRemoteConnectionListener listener,
boolean immediateNotify)
Deprecated.
|
void |
addSubTableListener(ITableListener listener)
Deprecated.
|
void |
addSubTableListener(ITableListener listener,
boolean localNotify)
Deprecated.
|
void |
addTableListener(ITableListener listener)
Deprecated.
Use
NetworkTable.addEntryListener(TableEntryListener, int) instead
(with flags value of NOTIFY_NEW | NOTIFY_UPDATE). |
void |
addTableListener(ITableListener listener,
boolean immediateNotify)
Deprecated.
Use
NetworkTable.addEntryListener(TableEntryListener, int) instead
(with flags value of NOTIFY_NEW | NOTIFY_UPDATE | NOTIFY_IMMEDIATE). |
void |
addTableListener(String key,
ITableListener listener,
boolean immediateNotify)
Deprecated.
|
void |
addTableListenerEx(ITableListener listener,
int flags)
Deprecated.
|
void |
addTableListenerEx(String key,
ITableListener listener,
int flags)
Deprecated.
|
void |
clearFlags(String key,
int flags)
Deprecated.
Clears flags on the specified key in this table.
|
void |
clearPersistent(String key)
Deprecated.
Stop making a key's value persistent through program restarts.
|
static ConnectionInfo[] |
connections()
Deprecated.
Use
NetworkTableInstance.getConnections() instead. |
boolean |
containsKey(String key)
Deprecated.
Checks the table and tells if it contains the specified key
|
boolean |
containsSubTable(String key)
Deprecated.
|
void |
delete(String key)
Deprecated.
Deletes the specified key in this table.
|
boolean |
equals(Object o)
Deprecated.
|
static void |
flush()
Deprecated.
Use
NetworkTableInstance.flush() instead. |
static Boolean[] |
fromNative(boolean[] arr)
Deprecated.
|
static Double[] |
fromNative(double[] arr)
Deprecated.
|
boolean |
getBoolean(String key,
boolean defaultValue)
Deprecated.
Returns the boolean the key maps to.
|
boolean[] |
getBooleanArray(String key,
boolean[] defaultValue)
Deprecated.
Returns the boolean array the key maps to.
|
Boolean[] |
getBooleanArray(String key,
Boolean[] defaultValue)
Deprecated.
Returns the boolean array the key maps to.
|
double |
getDouble(String key,
double defaultValue)
Deprecated.
Use
getNumber(String, double) instead. |
int |
getFlags(String key)
Deprecated.
Returns the flags for the specified key.
|
Set<String> |
getKeys()
Deprecated.
Gets all keys in the table (not including sub-tables).
|
Set<String> |
getKeys(int types)
Deprecated.
Gets all keys in the table (not including sub-tables).
|
double |
getNumber(String key,
double defaultValue)
Deprecated.
Returns the number the key maps to.
|
double[] |
getNumberArray(String key,
double[] defaultValue)
Deprecated.
Returns the number array the key maps to.
|
Double[] |
getNumberArray(String key,
Double[] defaultValue)
Deprecated.
Returns the number array the key maps to.
|
String |
getPath()
Deprecated.
Gets the full path of this table.
|
byte[] |
getRaw(String key,
byte[] defaultValue)
Deprecated.
Returns the raw value (byte array) the key maps to.
|
String |
getString(String key,
String defaultValue)
Deprecated.
Returns the string the key maps to.
|
String[] |
getStringArray(String key,
String[] defaultValue)
Deprecated.
Returns the string array the key maps to.
|
ITable |
getSubTable(String key)
Deprecated.
Returns the table at the specified key.
|
Set<String> |
getSubTables()
Deprecated.
Gets the names of all subtables in the table.
|
static NetworkTable |
getTable(String key)
Deprecated.
Use
NetworkTableInstance.getTable(String) instead. |
NetworkTableValue |
getValue(String key)
Deprecated.
Gets the value associated with a key as a NetworkTableValue object.
|
Object |
getValue(String key,
Object defaultValue)
Deprecated.
Use
NetworkTableEntry.getValue()
instead, e.g. `NetworkTable.getEntry(key).getValue();` |
static void |
globalDeleteAll()
Deprecated.
Use
NetworkTableInstance.deleteAllEntries() instead. |
int |
hashCode()
Deprecated.
|
static void |
initialize()
Deprecated.
Use
NetworkTableInstance.startServer() or
NetworkTableInstance.startClient() instead. |
boolean |
isConnected()
Deprecated.
Use
NetworkTableInstance.isConnected() instead. |
boolean |
isPersistent(String key)
Deprecated.
Returns whether the value is persistent through program restarts.
|
boolean |
isServer()
Deprecated.
Use
NetworkTableInstance.getNetworkMode() instead. |
static String[] |
loadPersistent(String filename)
Deprecated.
Use
NetworkTableInstance.loadPersistent(String)
instead. |
boolean |
putBoolean(String key,
boolean value)
Deprecated.
Put a boolean in the table
|
boolean |
putBooleanArray(String key,
boolean[] value)
Deprecated.
Put a boolean array in the table
|
boolean |
putBooleanArray(String key,
Boolean[] value)
Deprecated.
Put a boolean array in the table
|
boolean |
putDouble(String key,
double value)
Deprecated.
Use
putNumber(String, double) instead. |
boolean |
putNumber(String key,
double value)
Deprecated.
Put a number in the table
|
boolean |
putNumberArray(String key,
double[] value)
Deprecated.
Put a number array in the table
|
boolean |
putNumberArray(String key,
Double[] value)
Deprecated.
Put a number array in the table
|
boolean |
putRaw(String key,
byte[] value)
Deprecated.
Put a raw value (byte array) in the table
|
boolean |
putRaw(String key,
ByteBuffer value,
int len)
Deprecated.
Put a raw value (bytes from a byte buffer) in the table
|
boolean |
putString(String key,
String value)
Deprecated.
Put a string in the table
|
boolean |
putStringArray(String key,
String[] value)
Deprecated.
Put a string array in the table
|
boolean |
putValue(String key,
NetworkTableValue value)
Deprecated.
Put a value in the table
|
boolean |
putValue(String key,
Object value)
Deprecated.
Use
NetworkTableEntry.setValue(Object)
instead, e.g. `NetworkTable.getEntry(key).setValue(NetworkTableEntry.makeBoolean(false));`
or `NetworkTable.getEntry(key).setValue(new Boolean(false));` |
void |
removeConnectionListener(IRemoteConnectionListener listener)
Deprecated.
Use
NetworkTableInstance.removeConnectionListener(int) instead. |
static void |
removeGlobalConnectionListener(IRemoteConnectionListener listener)
Deprecated.
Use
NetworkTableInstance.removeConnectionListener(int) instead. |
void |
removeTableListener(ITableListener listener)
Deprecated.
Use
NetworkTable.removeTableListener(int) instead. |
static void |
savePersistent(String filename)
Deprecated.
Use
NetworkTableInstance.savePersistent(String)
instead. |
static void |
setClientMode()
Deprecated.
Use
NetworkTableInstance.startClient() instead. |
boolean |
setDefaultBoolean(String key,
boolean defaultValue)
Deprecated.
Gets the current value in the table, setting it if it does not exist.
|
boolean |
setDefaultBooleanArray(String key,
boolean[] defaultValue)
Deprecated.
Gets the current value in the table, setting it if it does not exist.
|
boolean |
setDefaultBooleanArray(String key,
Boolean[] defaultValue)
Deprecated.
Gets the current value in the table, setting it if it does not exist.
|
boolean |
setDefaultNumber(String key,
double defaultValue)
Deprecated.
Gets the current value in the table, setting it if it does not exist.
|
boolean |
setDefaultNumberArray(String key,
double[] defaultValue)
Deprecated.
Gets the current value in the table, setting it if it does not exist.
|
boolean |
setDefaultNumberArray(String key,
Double[] defaultValue)
Deprecated.
Gets the current value in the table, setting it if it does not exist.
|
boolean |
setDefaultRaw(String key,
byte[] defaultValue)
Deprecated.
Gets the current value in the table, setting it if it does not exist.
|
boolean |
setDefaultString(String key,
String defaultValue)
Deprecated.
Gets the current value in the table, setting it if it does not exist.
|
boolean |
setDefaultStringArray(String key,
String[] defaultValue)
Deprecated.
Gets the current value in the table, setting it if it does not exist.
|
boolean |
setDefaultValue(String key,
NetworkTableValue defaultValue)
Deprecated.
Sets the current value in the table if it does not exist.
|
static void |
setDSClientEnabled(boolean enabled)
Deprecated.
Use
NetworkTableInstance.startDSClient() and
NetworkTableInstance.stopDSClient() instead. |
void |
setFlags(String key,
int flags)
Deprecated.
Sets flags on the specified key in this table.
|
static void |
setIPAddress(String address)
Deprecated.
|
static void |
setIPAddress(String[] addresses)
Deprecated.
|
static void |
setNetworkIdentity(String name)
Deprecated.
Use
NetworkTableInstance.setNetworkIdentity(String)
instead. |
void |
setPersistent(String key)
Deprecated.
Makes a key's value persistent through program restarts.
|
static void |
setPersistentFilename(String filename)
Deprecated.
Use the appropriate parameter to
NetworkTableInstance.startServer() instead. |
static void |
setPort(int aport)
Deprecated.
Use the appropriate parameters to
NetworkTableInstance.setServer(String, int) ,
NetworkTableInstance.startClient(String, int) ,
NetworkTableInstance.startServer(String, String, int) , and
NetworkTableInstance.startDSClient(int) instead. |
static void |
setServerMode()
Deprecated.
Use
NetworkTableInstance.startServer() instead. |
static void |
setTeam(int team)
Deprecated.
|
static void |
setUpdateRate(double interval)
Deprecated.
Use
NetworkTableInstance.setUpdateRate(double)
instead. |
static void |
shutdown()
Deprecated.
Use
NetworkTableInstance.stopServer() or
NetworkTableInstance.stopClient() instead. |
static boolean[] |
toNative(Boolean[] arr)
Deprecated.
|
static double[] |
toNative(Number[] arr)
Deprecated.
|
String |
toString()
Deprecated.
|
public static final char PATH_SEPARATOR
public static final int DEFAULT_PORT
public static final int PERSISTENT
@Deprecated public static void initialize()
NetworkTableInstance.startServer()
or
NetworkTableInstance.startClient()
instead.@Deprecated public static void shutdown()
NetworkTableInstance.stopServer()
or
NetworkTableInstance.stopClient()
instead.@Deprecated public static void setServerMode()
NetworkTableInstance.startServer()
instead.@Deprecated public static void setClientMode()
NetworkTableInstance.startClient()
instead.@Deprecated public static void setTeam(int team)
NetworkTableInstance.setServerTeam(int)
or
NetworkTableInstance.startClientTeam(int)
instead.team
- the team number@Deprecated public static void setIPAddress(String address)
NetworkTableInstance.setServer(String)
or
NetworkTableInstance.startClient(String)
instead.address
- the address that network tables will connect to in client
mode@Deprecated public static void setIPAddress(String[] addresses)
NetworkTableInstance.setServer(String[])
or
NetworkTableInstance.startClient(String[])
instead.addresses
- the adresses that network tables will connect to in
client mode (in round robin order)@Deprecated public static void setPort(int aport)
NetworkTableInstance.setServer(String, int)
,
NetworkTableInstance.startClient(String, int)
,
NetworkTableInstance.startServer(String, String, int)
, and
NetworkTableInstance.startDSClient(int)
instead.aport
- the port number@Deprecated public static void setDSClientEnabled(boolean enabled)
NetworkTableInstance.startDSClient()
and
NetworkTableInstance.stopDSClient()
instead.enabled
- whether to enable the connection to the local DS@Deprecated public static void setPersistentFilename(String filename)
NetworkTableInstance.startServer()
instead.filename
- the filename that the network tables server uses for
automatic loading and saving of persistent values@Deprecated public static void setNetworkIdentity(String name)
NetworkTableInstance.setNetworkIdentity(String)
instead.name
- identitypublic static boolean[] toNative(Boolean[] arr)
public static double[] toNative(Number[] arr)
public static Boolean[] fromNative(boolean[] arr)
public static Double[] fromNative(double[] arr)
@Deprecated public static NetworkTable getTable(String key)
NetworkTableInstance.getTable(String)
instead.key
- the key name@Deprecated public static ConnectionInfo[] connections()
NetworkTableInstance.getConnections()
instead.@Deprecated public boolean isConnected()
NetworkTableInstance.isConnected()
instead.isConnected
in interface IRemote
@Deprecated public boolean isServer()
NetworkTableInstance.getNetworkMode()
instead.@Deprecated public static void addGlobalConnectionListener(IRemoteConnectionListener listener, boolean immediateNotify)
NetworkTableInstance.addConnectionListener(Consumer, boolean)
instead.listener
- connection listenerimmediateNotify
- call listener immediately for all existing connections@Deprecated public static void removeGlobalConnectionListener(IRemoteConnectionListener listener)
NetworkTableInstance.removeConnectionListener(int)
instead.listener
- connection listener@Deprecated public void addConnectionListener(IRemoteConnectionListener listener, boolean immediateNotify)
NetworkTableInstance.addConnectionListener(Consumer, boolean)
instead.addConnectionListener
in interface IRemote
listener
- connection listenerimmediateNotify
- call listener immediately for all existing connections@Deprecated public void removeConnectionListener(IRemoteConnectionListener listener)
NetworkTableInstance.removeConnectionListener(int)
instead.removeConnectionListener
in interface IRemote
listener
- connection listener@Deprecated public void addTableListener(ITableListener listener)
NetworkTable.addEntryListener(TableEntryListener, int)
instead
(with flags value of NOTIFY_NEW | NOTIFY_UPDATE).addTableListener
in interface ITable
listener
- the listener to add@Deprecated public void addTableListener(ITableListener listener, boolean immediateNotify)
NetworkTable.addEntryListener(TableEntryListener, int)
instead
(with flags value of NOTIFY_NEW | NOTIFY_UPDATE | NOTIFY_IMMEDIATE).addTableListener
in interface ITable
listener
- the listener to addimmediateNotify
- if true then this listener will be notified of all
current entries (marked as new)@Deprecated public void addTableListenerEx(ITableListener listener, int flags)
NetworkTable.addEntryListener(TableEntryListener, int)
instead.addTableListenerEx
in interface ITable
listener
- the listener to addflags
- bitmask specifying desired notifications@Deprecated public void addTableListener(String key, ITableListener listener, boolean immediateNotify)
NetworkTable.addEntryListener(String, TableEntryListener, int)
or NetworkTableEntry.addListener(Consumer, int)
instead.addTableListener
in interface ITable
key
- the key to listen forlistener
- the listener to addimmediateNotify
- if true then this listener will be notified of all
current entries (marked as new)@Deprecated public void addTableListenerEx(String key, ITableListener listener, int flags)
NetworkTable.addEntryListener(String, TableEntryListener, int)
or NetworkTableEntry.addListener(Consumer, int)
instead.addTableListenerEx
in interface ITable
key
- the key to listen forlistener
- the listener to addflags
- bitmask specifying desired notifications@Deprecated public void addSubTableListener(ITableListener listener)
NetworkTable.addSubTableListener(TableListener, boolean)
instead.addSubTableListener
in interface ITable
listener
- the listener to notify@Deprecated public void addSubTableListener(ITableListener listener, boolean localNotify)
NetworkTable.addSubTableListener(TableListener, boolean)
instead.addSubTableListener
in interface ITable
listener
- the listener to notifylocalNotify
- if true then this listener will be notified of all
local changes in addition to all remote changes@Deprecated public void removeTableListener(ITableListener listener)
NetworkTable.removeTableListener(int)
instead.removeTableListener
in interface ITable
listener
- the listener to be removedpublic ITable getSubTable(String key)
getSubTable
in interface ITable
key
- the name of the table relative to this onepublic boolean containsKey(String key)
containsKey
in interface ITable
key
- the key to search forpublic boolean containsSubTable(String key)
containsSubTable
in interface ITable
key
- the key to search forpublic Set<String> getKeys(int types)
ITable
public Set<String> getKeys()
public Set<String> getSubTables()
getSubTables
in interface ITable
public boolean putNumber(String key, double value)
public boolean setDefaultNumber(String key, double defaultValue)
setDefaultNumber
in interface ITable
key
- the keydefaultValue
- the default value to set if key doens't exist.public double getNumber(String key, double defaultValue)
public boolean setDefaultString(String key, String defaultValue)
setDefaultString
in interface ITable
key
- the keydefaultValue
- the default value to set if key doens't exist.public String getString(String key, String defaultValue)
public boolean putBoolean(String key, boolean value)
putBoolean
in interface ITable
key
- the key to be assigned tovalue
- the value that will be assignedpublic boolean setDefaultBoolean(String key, boolean defaultValue)
setDefaultBoolean
in interface ITable
key
- the keydefaultValue
- the default value to set if key doens't exist.public boolean getBoolean(String key, boolean defaultValue)
getBoolean
in interface ITable
key
- the key to look updefaultValue
- the value to be returned if no value is foundpublic boolean putBooleanArray(String key, boolean[] value)
putBooleanArray
in interface ITable
key
- the key to be assigned tovalue
- the value that will be assignedpublic boolean putBooleanArray(String key, Boolean[] value)
putBooleanArray
in interface ITable
key
- the key to be assigned tovalue
- the value that will be assignedpublic boolean setDefaultBooleanArray(String key, boolean[] defaultValue)
setDefaultBooleanArray
in interface ITable
key
- the keydefaultValue
- the default value to set if key doens't exist.public boolean setDefaultBooleanArray(String key, Boolean[] defaultValue)
setDefaultBooleanArray
in interface ITable
key
- the keydefaultValue
- the default value to set if key doens't exist.public boolean[] getBooleanArray(String key, boolean[] defaultValue)
getBooleanArray
in interface ITable
key
- the key to look updefaultValue
- the value to be returned if no value is foundpublic Boolean[] getBooleanArray(String key, Boolean[] defaultValue)
getBooleanArray
in interface ITable
key
- the key to look updefaultValue
- the value to be returned if no value is foundpublic boolean putNumberArray(String key, double[] value)
putNumberArray
in interface ITable
key
- the key to be assigned tovalue
- the value that will be assignedpublic boolean putNumberArray(String key, Double[] value)
putNumberArray
in interface ITable
key
- the key to be assigned tovalue
- the value that will be assignedpublic boolean setDefaultNumberArray(String key, double[] defaultValue)
setDefaultNumberArray
in interface ITable
key
- the keydefaultValue
- the default value to set if key doens't exist.public boolean setDefaultNumberArray(String key, Double[] defaultValue)
setDefaultNumberArray
in interface ITable
key
- the keydefaultValue
- the default value to set if key doens't exist.public double[] getNumberArray(String key, double[] defaultValue)
getNumberArray
in interface ITable
key
- the key to look updefaultValue
- the value to be returned if no value is foundpublic Double[] getNumberArray(String key, Double[] defaultValue)
getNumberArray
in interface ITable
key
- the key to look updefaultValue
- the value to be returned if no value is foundpublic boolean putStringArray(String key, String[] value)
putStringArray
in interface ITable
key
- the key to be assigned tovalue
- the value that will be assignedpublic boolean setDefaultStringArray(String key, String[] defaultValue)
setDefaultStringArray
in interface ITable
key
- the keydefaultValue
- the default value to set if key doens't exist.public String[] getStringArray(String key, String[] defaultValue)
getStringArray
in interface ITable
key
- the key to look updefaultValue
- the value to be returned if no value is foundpublic boolean putRaw(String key, byte[] value)
public boolean setDefaultRaw(String key, byte[] defaultValue)
setDefaultRaw
in interface ITable
key
- the keydefaultValue
- the default value to set if key doens't exist.public boolean putRaw(String key, ByteBuffer value, int len)
public byte[] getRaw(String key, byte[] defaultValue)
public boolean putValue(String key, NetworkTableValue value)
key
- the key to be assigned tovalue
- the value that will be assignedpublic boolean setDefaultValue(String key, NetworkTableValue defaultValue)
key
- the keydefaultValue
- the default value to set if key doens't exist.public NetworkTableValue getValue(String key)
key
- the key of the value to look up@Deprecated public boolean putValue(String key, Object value) throws IllegalArgumentException
NetworkTableEntry.setValue(Object)
instead, e.g. `NetworkTable.getEntry(key).setValue(NetworkTableEntry.makeBoolean(false));`
or `NetworkTable.getEntry(key).setValue(new Boolean(false));`putValue
in interface ITable
key
- the key to be assigned tovalue
- the value that will be assignedIllegalArgumentException
- when the value is not supported by the
table@Deprecated public Object getValue(String key, Object defaultValue)
NetworkTableEntry.getValue()
instead, e.g. `NetworkTable.getEntry(key).getValue();`ITable.getDouble(String, double)
.public void setPersistent(String key)
setPersistent
in interface ITable
key
- the key namepublic void clearPersistent(String key)
clearPersistent
in interface ITable
key
- the key namepublic boolean isPersistent(String key)
isPersistent
in interface ITable
key
- the key namepublic void setFlags(String key, int flags)
public void clearFlags(String key, int flags)
clearFlags
in interface ITable
key
- the key nameflags
- the flags to clear (bitmask)public int getFlags(String key)
public void delete(String key)
@Deprecated public static void globalDeleteAll()
NetworkTableInstance.deleteAllEntries()
instead.@Deprecated public static void flush()
NetworkTableInstance.flush()
instead.@Deprecated public static void setUpdateRate(double interval)
NetworkTableInstance.setUpdateRate(double)
instead.interval
- update interval in seconds (range 0.01 to 1.0)@Deprecated public static void savePersistent(String filename) throws PersistentException
NetworkTableInstance.savePersistent(String)
instead.filename
- file namePersistentException
- if error saving file@Deprecated public static String[] loadPersistent(String filename) throws PersistentException
NetworkTableInstance.loadPersistent(String)
instead.filename
- file namePersistentException
- if error reading file@Deprecated public boolean putDouble(String key, double value)
putNumber(String, double)
instead.@Deprecated public double getDouble(String key, double defaultValue)
getNumber(String, double)
instead.public String getPath()