Class NetworkTable
- java.lang.Object
-
- edu.wpi.first.wpilibj.networktables.NetworkTable
-
@Deprecated public class NetworkTable extends Object implements ITable, IRemote
Deprecated.UseNetworkTableinstead.A network table that knows its subtable path.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PORTDeprecated.The default port that network tables operates onstatic charPATH_SEPARATORDeprecated.The path separator for sub-tables and keysstatic intPERSISTENTDeprecated.The persistent flag value.-
Fields inherited from interface edu.wpi.first.wpilibj.tables.ITable
NOTIFY_DELETE, NOTIFY_FLAGS, NOTIFY_IMMEDIATE, NOTIFY_LOCAL, NOTIFY_NEW, NOTIFY_UPDATE
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddConnectionListener(IRemoteConnectionListener listener, boolean immediateNotify)Deprecated.static voidaddGlobalConnectionListener(IRemoteConnectionListener listener, boolean immediateNotify)Deprecated.voidaddSubTableListener(ITableListener listener)Deprecated.voidaddSubTableListener(ITableListener listener, boolean localNotify)Deprecated.voidaddTableListener(ITableListener listener)Deprecated.UseNetworkTable.addEntryListener(TableEntryListener, int)instead (with flags value of NOTIFY_NEW | NOTIFY_UPDATE).voidaddTableListener(ITableListener listener, boolean immediateNotify)Deprecated.UseNetworkTable.addEntryListener(TableEntryListener, int)instead (with flags value of NOTIFY_NEW | NOTIFY_UPDATE | NOTIFY_IMMEDIATE).voidaddTableListener(String key, ITableListener listener, boolean immediateNotify)Deprecated.voidaddTableListenerEx(ITableListener listener, int flags)Deprecated.voidaddTableListenerEx(String key, ITableListener listener, int flags)Deprecated.voidclearFlags(String key, int flags)Deprecated.Clears flags on the specified key in this table.voidclearPersistent(String key)Deprecated.Stop making a key's value persistent through program restarts.static ConnectionInfo[]connections()Deprecated.UseNetworkTableInstance.getConnections()instead.booleancontainsKey(String key)Deprecated.Checks the table and tells if it contains the specified keybooleancontainsSubTable(String key)Deprecated.voiddelete(String key)Deprecated.Deletes the specified key in this table.booleanequals(Object o)Deprecated.static voidflush()Deprecated.UseNetworkTableInstance.flush()instead.static Boolean[]fromNative(boolean[] arr)Deprecated.static Double[]fromNative(double[] arr)Deprecated.booleangetBoolean(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.doublegetDouble(String key, double defaultValue)Deprecated.UsegetNumber(String, double)instead.intgetFlags(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).doublegetNumber(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.StringgetPath()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.StringgetString(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.ITablegetSubTable(String key)Deprecated.Returns the table at the specified key.Set<String>getSubTables()Deprecated.Gets the names of all subtables in the table.static NetworkTablegetTable(String key)Deprecated.UseNetworkTableInstance.getTable(String)instead.NetworkTableValuegetValue(String key)Deprecated.Gets the value associated with a key as a NetworkTableValue object.ObjectgetValue(String key, Object defaultValue)Deprecated.UseNetworkTableEntry.getValue()instead, e.g.static voidglobalDeleteAll()Deprecated.UseNetworkTableInstance.deleteAllEntries()instead.inthashCode()Deprecated.static voidinitialize()Deprecated.UseNetworkTableInstance.startServer()orNetworkTableInstance.startClient()instead.booleanisConnected()Deprecated.UseNetworkTableInstance.isConnected()instead.booleanisPersistent(String key)Deprecated.Returns whether the value is persistent through program restarts.booleanisServer()Deprecated.UseNetworkTableInstance.getNetworkMode()instead.static String[]loadPersistent(String filename)Deprecated.UseNetworkTableInstance.loadPersistent(String)instead.booleanputBoolean(String key, boolean value)Deprecated.Put a boolean in the tablebooleanputBooleanArray(String key, boolean[] value)Deprecated.Put a boolean array in the tablebooleanputBooleanArray(String key, Boolean[] value)Deprecated.Put a boolean array in the tablebooleanputDouble(String key, double value)Deprecated.UseputNumber(String, double)instead.booleanputNumber(String key, double value)Deprecated.Put a number in the tablebooleanputNumberArray(String key, double[] value)Deprecated.Put a number array in the tablebooleanputNumberArray(String key, Double[] value)Deprecated.Put a number array in the tablebooleanputRaw(String key, byte[] value)Deprecated.Put a raw value (byte array) in the tablebooleanputRaw(String key, ByteBuffer value, int len)Deprecated.Put a raw value (bytes from a byte buffer) in the tablebooleanputString(String key, String value)Deprecated.Put a string in the tablebooleanputStringArray(String key, String[] value)Deprecated.Put a string array in the tablebooleanputValue(String key, NetworkTableValue value)Deprecated.Put a value in the tablebooleanputValue(String key, Object value)Deprecated.UseNetworkTableEntry.setValue(Object)instead, e.g.voidremoveConnectionListener(IRemoteConnectionListener listener)Deprecated.UseNetworkTableInstance.removeConnectionListener(int)instead.static voidremoveGlobalConnectionListener(IRemoteConnectionListener listener)Deprecated.UseNetworkTableInstance.removeConnectionListener(int)instead.voidremoveTableListener(ITableListener listener)Deprecated.UseNetworkTable.removeTableListener(int)instead.static voidsavePersistent(String filename)Deprecated.UseNetworkTableInstance.savePersistent(String)instead.static voidsetClientMode()Deprecated.UseNetworkTableInstance.startClient()instead.booleansetDefaultBoolean(String key, boolean defaultValue)Deprecated.Gets the current value in the table, setting it if it does not exist.booleansetDefaultBooleanArray(String key, boolean[] defaultValue)Deprecated.Gets the current value in the table, setting it if it does not exist.booleansetDefaultBooleanArray(String key, Boolean[] defaultValue)Deprecated.Gets the current value in the table, setting it if it does not exist.booleansetDefaultNumber(String key, double defaultValue)Deprecated.Gets the current value in the table, setting it if it does not exist.booleansetDefaultNumberArray(String key, double[] defaultValue)Deprecated.Gets the current value in the table, setting it if it does not exist.booleansetDefaultNumberArray(String key, Double[] defaultValue)Deprecated.Gets the current value in the table, setting it if it does not exist.booleansetDefaultRaw(String key, byte[] defaultValue)Deprecated.Gets the current value in the table, setting it if it does not exist.booleansetDefaultString(String key, String defaultValue)Deprecated.Gets the current value in the table, setting it if it does not exist.booleansetDefaultStringArray(String key, String[] defaultValue)Deprecated.Gets the current value in the table, setting it if it does not exist.booleansetDefaultValue(String key, NetworkTableValue defaultValue)Deprecated.Sets the current value in the table if it does not exist.static voidsetDSClientEnabled(boolean enabled)Deprecated.UseNetworkTableInstance.startDSClient()andNetworkTableInstance.stopDSClient()instead.voidsetFlags(String key, int flags)Deprecated.Sets flags on the specified key in this table.static voidsetIPAddress(String address)Deprecated.static voidsetIPAddress(String[] addresses)Deprecated.static voidsetNetworkIdentity(String name)Deprecated.UseNetworkTableInstance.setNetworkIdentity(String)instead.voidsetPersistent(String key)Deprecated.Makes a key's value persistent through program restarts.static voidsetPersistentFilename(String filename)Deprecated.Use the appropriate parameter toNetworkTableInstance.startServer()instead.static voidsetPort(int aport)Deprecated.Use the appropriate parameters toNetworkTableInstance.setServer(String, int),NetworkTableInstance.startClient(String, int),NetworkTableInstance.startServer(String, String, int), andNetworkTableInstance.startDSClient(int)instead.static voidsetServerMode()Deprecated.UseNetworkTableInstance.startServer()instead.static voidsetTeam(int team)Deprecated.static voidsetUpdateRate(double interval)Deprecated.UseNetworkTableInstance.setUpdateRate(double)instead.static voidshutdown()Deprecated.UseNetworkTableInstance.stopServer()orNetworkTableInstance.stopClient()instead.static boolean[]toNative(Boolean[] arr)Deprecated.static double[]toNative(Number[] arr)Deprecated.StringtoString()Deprecated.
-
-
-
Field Detail
-
PATH_SEPARATOR
public static final char PATH_SEPARATOR
Deprecated.The path separator for sub-tables and keys- See Also:
- Constant Field Values
-
DEFAULT_PORT
public static final int DEFAULT_PORT
Deprecated.The default port that network tables operates on- See Also:
- Constant Field Values
-
PERSISTENT
public static final int PERSISTENT
Deprecated.The persistent flag value.- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
@Deprecated public static void initialize()
Deprecated.UseNetworkTableInstance.startServer()orNetworkTableInstance.startClient()instead.initializes network tables
-
shutdown
@Deprecated public static void shutdown()
Deprecated.UseNetworkTableInstance.stopServer()orNetworkTableInstance.stopClient()instead.shuts down network tables
-
setServerMode
@Deprecated public static void setServerMode()
Deprecated.UseNetworkTableInstance.startServer()instead.set that network tables should be a server This must be called before initialize or getTable
-
setClientMode
@Deprecated public static void setClientMode()
Deprecated.UseNetworkTableInstance.startClient()instead.set that network tables should be a client This must be called before initialize or getTable
-
setTeam
@Deprecated public static void setTeam(int team)
Deprecated.set the team the robot is configured for (this will set the mdns address that network tables will connect to in client mode) This must be called before initialize or getTable- Parameters:
team- the team number
-
setIPAddress
@Deprecated public static void setIPAddress(String address)
Deprecated.- Parameters:
address- the address that network tables will connect to in client mode
-
setIPAddress
@Deprecated public static void setIPAddress(String[] addresses)
Deprecated.- Parameters:
addresses- the adresses that network tables will connect to in client mode (in round robin order)
-
setPort
@Deprecated public static void setPort(int aport)
Deprecated.Use the appropriate parameters toNetworkTableInstance.setServer(String, int),NetworkTableInstance.startClient(String, int),NetworkTableInstance.startServer(String, String, int), andNetworkTableInstance.startDSClient(int)instead.Set the port number that network tables will connect to in client mode or listen to in server mode.- Parameters:
aport- the port number
-
setDSClientEnabled
@Deprecated public static void setDSClientEnabled(boolean enabled)
Deprecated.UseNetworkTableInstance.startDSClient()andNetworkTableInstance.stopDSClient()instead.Enable requesting the server address from the Driver Station.- Parameters:
enabled- whether to enable the connection to the local DS
-
setPersistentFilename
@Deprecated public static void setPersistentFilename(String filename)
Deprecated.Use the appropriate parameter toNetworkTableInstance.startServer()instead.Sets the persistent filename.- Parameters:
filename- the filename that the network tables server uses for automatic loading and saving of persistent values
-
setNetworkIdentity
@Deprecated public static void setNetworkIdentity(String name)
Deprecated.UseNetworkTableInstance.setNetworkIdentity(String)instead.Sets the network identity. This is provided in the connection info on the remote end.- Parameters:
name- identity
-
toNative
public static boolean[] toNative(Boolean[] arr)
Deprecated.
-
toNative
public static double[] toNative(Number[] arr)
Deprecated.
-
fromNative
public static Boolean[] fromNative(boolean[] arr)
Deprecated.
-
fromNative
public static Double[] fromNative(double[] arr)
Deprecated.
-
getTable
@Deprecated public static NetworkTable getTable(String key)
Deprecated.UseNetworkTableInstance.getTable(String)instead.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:
key- the key name- Returns:
- the network table requested
-
connections
@Deprecated public static ConnectionInfo[] connections()
Deprecated.UseNetworkTableInstance.getConnections()instead.Gets the current network connections.- Returns:
- An array of connection information.
-
isConnected
@Deprecated public boolean isConnected()
Deprecated.UseNetworkTableInstance.isConnected()instead.Determine whether or not a network connection is active.- Specified by:
isConnectedin interfaceIRemote- Returns:
- True if connected, false if not connected.
-
isServer
@Deprecated public boolean isServer()
Deprecated.UseNetworkTableInstance.getNetworkMode()instead.Determine whether NetworkTables is operating as a server or as a client.
-
addGlobalConnectionListener
@Deprecated public static void addGlobalConnectionListener(IRemoteConnectionListener listener, boolean immediateNotify)
Deprecated.Add a connection listener.- Parameters:
listener- connection listenerimmediateNotify- call listener immediately for all existing connections
-
removeGlobalConnectionListener
@Deprecated public static void removeGlobalConnectionListener(IRemoteConnectionListener listener)
Deprecated.UseNetworkTableInstance.removeConnectionListener(int)instead.Remove a connection listener.- Parameters:
listener- connection listener
-
addConnectionListener
@Deprecated public void addConnectionListener(IRemoteConnectionListener listener, boolean immediateNotify)
Deprecated.Add a connection listener.- Specified by:
addConnectionListenerin interfaceIRemote- Parameters:
listener- connection listenerimmediateNotify- call listener immediately for all existing connections
-
removeConnectionListener
@Deprecated public void removeConnectionListener(IRemoteConnectionListener listener)
Deprecated.UseNetworkTableInstance.removeConnectionListener(int)instead.Remove a connection listener.- Specified by:
removeConnectionListenerin interfaceIRemote- Parameters:
listener- connection listener
-
addTableListener
@Deprecated public void addTableListener(ITableListener listener)
Deprecated.UseNetworkTable.addEntryListener(TableEntryListener, int)instead (with flags value of NOTIFY_NEW | NOTIFY_UPDATE).Add a listener for changes to the table- Specified by:
addTableListenerin interfaceITable- Parameters:
listener- the listener to add
-
addTableListener
@Deprecated public void addTableListener(ITableListener listener, boolean immediateNotify)
Deprecated.UseNetworkTable.addEntryListener(TableEntryListener, int)instead (with flags value of NOTIFY_NEW | NOTIFY_UPDATE | NOTIFY_IMMEDIATE).Add a listener for changes to the table- Specified by:
addTableListenerin interfaceITable- Parameters:
listener- the listener to addimmediateNotify- if true then this listener will be notified of all current entries (marked as new)
-
addTableListenerEx
@Deprecated public void addTableListenerEx(ITableListener listener, int flags)
Deprecated.Add a listener for changes to the table- Specified by:
addTableListenerExin interfaceITable- Parameters:
listener- the listener to addflags- bitmask specifying desired notifications
-
addTableListener
@Deprecated public void addTableListener(String key, ITableListener listener, boolean immediateNotify)
Deprecated.Add a listener for changes to a specific key the table- Specified by:
addTableListenerin interfaceITable- Parameters:
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)
-
addTableListenerEx
@Deprecated public void addTableListenerEx(String key, ITableListener listener, int flags)
Deprecated.Add a listener for changes to a specific key the table- Specified by:
addTableListenerExin interfaceITable- Parameters:
key- the key to listen forlistener- the listener to addflags- bitmask specifying desired notifications
-
addSubTableListener
@Deprecated public void addSubTableListener(ITableListener listener)
Deprecated.This will immediately notify the listener of all current sub tables- Specified by:
addSubTableListenerin interfaceITable- Parameters:
listener- the listener to notify
-
addSubTableListener
@Deprecated public void addSubTableListener(ITableListener listener, boolean localNotify)
Deprecated.This will immediately notify the listener of all current sub tables- Specified by:
addSubTableListenerin interfaceITable- Parameters:
listener- the listener to notifylocalNotify- if true then this listener will be notified of all local changes in addition to all remote changes
-
removeTableListener
@Deprecated public void removeTableListener(ITableListener listener)
Deprecated.UseNetworkTable.removeTableListener(int)instead.Remove a listener from receiving table events- Specified by:
removeTableListenerin interfaceITable- Parameters:
listener- the listener to be removed
-
getSubTable
public ITable getSubTable(String key)
Deprecated.Returns the table at the specified key. If there is no table at the specified key, it will create a new table- Specified by:
getSubTablein interfaceITable- Parameters:
key- the name of the table relative to this one- Returns:
- a sub table relative to this one
-
containsKey
public boolean containsKey(String key)
Deprecated.Checks the table and tells if it contains the specified key- Specified by:
containsKeyin interfaceITable- Parameters:
key- the key to search for- Returns:
- true if the table as a value assigned to the given key
-
containsSubTable
public boolean containsSubTable(String key)
Deprecated.- Specified by:
containsSubTablein interfaceITable- Parameters:
key- the key to search for- Returns:
- true if there is a subtable with the key which contains at least one key/subtable of its own
-
getKeys
public Set<String> getKeys(int types)
Deprecated.Description copied from interface:ITableGets all keys in the table (not including sub-tables).
-
getKeys
public Set<String> getKeys()
Deprecated.Gets all keys in the table (not including sub-tables).
-
getSubTables
public Set<String> getSubTables()
Deprecated.Gets the names of all subtables in the table.- Specified by:
getSubTablesin interfaceITable- Returns:
- subtables currently in the table
-
putNumber
public boolean putNumber(String key, double value)
Deprecated.Put a number in the table
-
setDefaultNumber
public boolean setDefaultNumber(String key, double defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Specified by:
setDefaultNumberin interfaceITable- Parameters:
key- the keydefaultValue- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
getNumber
public double getNumber(String key, double defaultValue)
Deprecated.Returns the number the key maps to. If the key does not exist or is of different type, it will return the default value.
-
setDefaultString
public boolean setDefaultString(String key, String defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Specified by:
setDefaultStringin interfaceITable- Parameters:
key- the keydefaultValue- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
getString
public String getString(String key, String defaultValue)
Deprecated.Returns the string the key maps to. If the key does not exist or is of different type, it will return the default value.
-
putBoolean
public boolean putBoolean(String key, boolean value)
Deprecated.Put a boolean in the table- Specified by:
putBooleanin interfaceITable- Parameters:
key- the key to be assigned tovalue- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultBoolean
public boolean setDefaultBoolean(String key, boolean defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Specified by:
setDefaultBooleanin interfaceITable- Parameters:
key- the keydefaultValue- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
getBoolean
public boolean getBoolean(String key, boolean defaultValue)
Deprecated.Returns the boolean the key maps to. If the key does not exist or is of different type, it will return the default value.- Specified by:
getBooleanin interfaceITable- Parameters:
key- the key to look updefaultValue- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
putBooleanArray
public boolean putBooleanArray(String key, boolean[] value)
Deprecated.Put a boolean array in the table- Specified by:
putBooleanArrayin interfaceITable- Parameters:
key- the key to be assigned tovalue- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
putBooleanArray
public boolean putBooleanArray(String key, Boolean[] value)
Deprecated.Put a boolean array in the table- Specified by:
putBooleanArrayin interfaceITable- Parameters:
key- the key to be assigned tovalue- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultBooleanArray
public boolean setDefaultBooleanArray(String key, boolean[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Specified by:
setDefaultBooleanArrayin interfaceITable- Parameters:
key- the keydefaultValue- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
setDefaultBooleanArray
public boolean setDefaultBooleanArray(String key, Boolean[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Specified by:
setDefaultBooleanArrayin interfaceITable- Parameters:
key- the keydefaultValue- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
getBooleanArray
public boolean[] getBooleanArray(String key, boolean[] defaultValue)
Deprecated.Returns the boolean array the key maps to. If the key does not exist or is of different type, it will return the default value.- Specified by:
getBooleanArrayin interfaceITable- Parameters:
key- the key to look updefaultValue- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
getBooleanArray
public Boolean[] getBooleanArray(String key, Boolean[] defaultValue)
Deprecated.Returns the boolean array the key maps to. If the key does not exist or is of different type, it will return the default value.- Specified by:
getBooleanArrayin interfaceITable- Parameters:
key- the key to look updefaultValue- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
putNumberArray
public boolean putNumberArray(String key, double[] value)
Deprecated.Put a number array in the table- Specified by:
putNumberArrayin interfaceITable- Parameters:
key- the key to be assigned tovalue- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
putNumberArray
public boolean putNumberArray(String key, Double[] value)
Deprecated.Put a number array in the table- Specified by:
putNumberArrayin interfaceITable- Parameters:
key- the key to be assigned tovalue- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultNumberArray
public boolean setDefaultNumberArray(String key, double[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Specified by:
setDefaultNumberArrayin interfaceITable- Parameters:
key- the keydefaultValue- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
setDefaultNumberArray
public boolean setDefaultNumberArray(String key, Double[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Specified by:
setDefaultNumberArrayin interfaceITable- Parameters:
key- the keydefaultValue- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
getNumberArray
public double[] getNumberArray(String key, double[] defaultValue)
Deprecated.Returns the number array the key maps to. If the key does not exist or is of different type, it will return the default value.- Specified by:
getNumberArrayin interfaceITable- Parameters:
key- the key to look updefaultValue- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
getNumberArray
public Double[] getNumberArray(String key, Double[] defaultValue)
Deprecated.Returns the number array the key maps to. If the key does not exist or is of different type, it will return the default value.- Specified by:
getNumberArrayin interfaceITable- Parameters:
key- the key to look updefaultValue- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
putStringArray
public boolean putStringArray(String key, String[] value)
Deprecated.Put a string array in the table- Specified by:
putStringArrayin interfaceITable- Parameters:
key- the key to be assigned tovalue- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultStringArray
public boolean setDefaultStringArray(String key, String[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Specified by:
setDefaultStringArrayin interfaceITable- Parameters:
key- the keydefaultValue- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
getStringArray
public String[] getStringArray(String key, String[] defaultValue)
Deprecated.Returns the string array the key maps to. If the key does not exist or is of different type, it will return the default value.- Specified by:
getStringArrayin interfaceITable- Parameters:
key- the key to look updefaultValue- the value to be returned if no value is found- Returns:
- the value associated with the given key or the given default value if there is no value associated with the key
-
putRaw
public boolean putRaw(String key, byte[] value)
Deprecated.Put a raw value (byte array) in the table
-
setDefaultRaw
public boolean setDefaultRaw(String key, byte[] defaultValue)
Deprecated.Gets the current value in the table, setting it if it does not exist.- Specified by:
setDefaultRawin interfaceITable- Parameters:
key- the keydefaultValue- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
putRaw
public boolean putRaw(String key, ByteBuffer value, int len)
Deprecated.Put a raw value (bytes from a byte buffer) in the table
-
getRaw
public byte[] getRaw(String key, byte[] defaultValue)
Deprecated.Returns the raw value (byte array) the key maps to. If the key does not exist or is of different type, it will return the default value.
-
putValue
public boolean putValue(String key, NetworkTableValue value)
Deprecated.Put a value in the table- Parameters:
key- the key to be assigned tovalue- the value that will be assigned- Returns:
- False if the table key already exists with a different type
-
setDefaultValue
public boolean setDefaultValue(String key, NetworkTableValue defaultValue)
Deprecated.Sets the current value in the table if it does not exist.- Parameters:
key- the keydefaultValue- the default value to set if key doens't exist.- Returns:
- False if the table key exists with a different type
-
getValue
public NetworkTableValue getValue(String key)
Deprecated.Gets the value associated with a key as a NetworkTableValue object.- Parameters:
key- the key of the value to look up- Returns:
- the value associated with the given key
-
putValue
@Deprecated public boolean putValue(String key, Object value) throws IllegalArgumentException
Deprecated.UseNetworkTableEntry.setValue(Object)instead, e.g. `NetworkTable.getEntry(key).setValue(NetworkTableEntry.makeBoolean(false));` or `NetworkTable.getEntry(key).setValue(new Boolean(false));`Put a value in the table- Specified by:
putValuein interfaceITable- Parameters:
key- the key to be assigned tovalue- the value that will be assigned- Returns:
- False if the table key already exists with a different type
- Throws:
IllegalArgumentException- when the value is not supported by the table
-
getValue
@Deprecated public Object getValue(String key, Object defaultValue)
Deprecated.UseNetworkTableEntry.getValue()instead, e.g. `NetworkTable.getEntry(key).getValue();`Gets the value associated with a key as an object. NOTE: If the value is a double, it will return a Double object, not a primitive. To get the primitive, useITable.getDouble(String, double).
-
setPersistent
public void setPersistent(String key)
Deprecated.Makes a key's value persistent through program restarts. The key cannot be null.- Specified by:
setPersistentin interfaceITable- Parameters:
key- the key name
-
clearPersistent
public void clearPersistent(String key)
Deprecated.Stop making a key's value persistent through program restarts. The key cannot be null.- Specified by:
clearPersistentin interfaceITable- Parameters:
key- the key name
-
isPersistent
public boolean isPersistent(String key)
Deprecated.Returns whether the value is persistent through program restarts. The key cannot be null.- Specified by:
isPersistentin interfaceITable- Parameters:
key- the key name- Returns:
- True if the value is persistent.
-
setFlags
public void setFlags(String key, int flags)
Deprecated.Sets flags on the specified key in this table. The key can not be null.
-
clearFlags
public void clearFlags(String key, int flags)
Deprecated.Clears flags on the specified key in this table. The key can not be null.- Specified by:
clearFlagsin interfaceITable- Parameters:
key- the key nameflags- the flags to clear (bitmask)
-
getFlags
public int getFlags(String key)
Deprecated.Returns the flags for the specified key.
-
delete
public void delete(String key)
Deprecated.Deletes the specified key in this table. The key can not be null.
-
globalDeleteAll
@Deprecated public static void globalDeleteAll()
Deprecated.UseNetworkTableInstance.deleteAllEntries()instead.Deletes ALL keys in ALL subtables. Use with caution!
-
flush
@Deprecated public static void flush()
Deprecated.UseNetworkTableInstance.flush()instead.Flushes all updated values immediately to the network. Note: This is rate-limited to protect the network from flooding. This is primarily useful for synchronizing network updates with user code.
-
setUpdateRate
@Deprecated public static void setUpdateRate(double interval)
Deprecated.UseNetworkTableInstance.setUpdateRate(double)instead.Set the periodic update rate.- Parameters:
interval- update interval in seconds (range 0.01 to 1.0)
-
savePersistent
@Deprecated public static void savePersistent(String filename) throws PersistentException
Deprecated.UseNetworkTableInstance.savePersistent(String)instead.Saves persistent keys to a file. The server does this automatically.- Parameters:
filename- file name- Throws:
PersistentException- if error saving file
-
loadPersistent
@Deprecated public static String[] loadPersistent(String filename) throws PersistentException
Deprecated.UseNetworkTableInstance.loadPersistent(String)instead.Loads persistent keys from a file. The server does this automatically.- Parameters:
filename- file name- Returns:
- List of warnings (errors result in an exception instead)
- Throws:
PersistentException- if error reading file
-
putDouble
@Deprecated public boolean putDouble(String key, double value)
Deprecated.UseputNumber(String, double)instead.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.
-
getDouble
@Deprecated public double getDouble(String key, double defaultValue)
Deprecated.UsegetNumber(String, double)instead.Returns the value at the specified key.
-
getPath
public String getPath()
Deprecated.Gets the full path of this table. Does not include the trailing "/".
-
-