/** * Returns the value at the specified key. * * @param key the key * @return the value * @throws NetworkTableKeyNotDefined if there is no value mapped to by the key * @throws IllegalArgumentException if the key is null */ public static Sendable getData(String key) { ITable subtable = table.getSubTable(key); Object data = tablesToData.get(subtable); if (data == null) { throw new IllegalArgumentException("SmartDashboard data does not exist: " + key); } else { return (Sendable) data; } }
public static void putData(String name, Sendable value) { SmartDashboard.putData(name, value); }
public static Sendable getData(String name) { return SmartDashboard.getData(name); }
/** * 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. * * @param key the key * @param data the value * @throws IllegalArgumentException If key is null */ public static void putData(String key, Sendable data) { ITable dataTable = table.getSubTable(key); dataTable.putString("~TYPE~", data.getSmartDashboardType()); data.initTable(dataTable); tablesToData.put(data, key); }
/** * 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. * @param key the key * @param data the value * @throws IllegalArgumentException if key is null */ public static void putData(String key, Sendable data) { ITable dataTable = table.getSubTable(key); dataTable.putString("~TYPE~", data.getSmartDashboardType()); data.initTable(dataTable); tablesToData.put(data, key); }