WPILibC++ 2023.4.3-108-ge5452e3
|
#include <frc/smartdashboard/SmartDashboard.h>
Public Member Functions | |
SmartDashboard ()=delete | |
Static Public Member Functions | |
static void | init () |
static bool | ContainsKey (std::string_view key) |
Determines whether the given key is in this table. More... | |
static std::vector< std::string > | GetKeys (int types=0) |
static void | SetPersistent (std::string_view key) |
Makes a key's value persistent through program restarts. More... | |
static void | ClearPersistent (std::string_view key) |
Stop making a key's value persistent through program restarts. More... | |
static bool | IsPersistent (std::string_view key) |
Returns whether the value is persistent through program restarts. More... | |
static nt::NetworkTableEntry | GetEntry (std::string_view key) |
Returns an NT Entry mapping to the specified key. More... | |
static void | PutData (std::string_view key, wpi::Sendable *data) |
Maps the specified key to the specified value in this table. More... | |
static void | PutData (wpi::Sendable *value) |
Maps the specified key (where the key is the name of the Sendable) to the specified value in this table. More... | |
static wpi::Sendable * | GetData (std::string_view keyName) |
Returns the value at the specified key. More... | |
static bool | PutBoolean (std::string_view keyName, bool value) |
Maps the specified key to the specified value in this table. More... | |
static bool | SetDefaultBoolean (std::string_view key, bool defaultValue) |
Gets the current value in the table, setting it if it does not exist. More... | |
static bool | GetBoolean (std::string_view keyName, bool defaultValue) |
Returns the value at the specified key. More... | |
static bool | PutNumber (std::string_view keyName, double value) |
Maps the specified key to the specified value in this table. More... | |
static bool | SetDefaultNumber (std::string_view key, double defaultValue) |
Gets the current value in the table, setting it if it does not exist. More... | |
static double | GetNumber (std::string_view keyName, double defaultValue) |
Returns the value at the specified key. More... | |
static bool | PutString (std::string_view keyName, std::string_view value) |
Maps the specified key to the specified value in this table. More... | |
static bool | SetDefaultString (std::string_view key, std::string_view defaultValue) |
Gets the current value in the table, setting it if it does not exist. More... | |
static std::string | GetString (std::string_view keyName, std::string_view defaultValue) |
Returns the value at the specified key. More... | |
static bool | PutBooleanArray (std::string_view key, std::span< const int > value) |
Put a boolean array in the table. More... | |
static bool | SetDefaultBooleanArray (std::string_view key, std::span< const int > defaultValue) |
Gets the current value in the table, setting it if it does not exist. More... | |
static std::vector< int > | GetBooleanArray (std::string_view key, std::span< const int > defaultValue) |
Returns the boolean array the key maps to. More... | |
static bool | PutNumberArray (std::string_view key, std::span< const double > value) |
Put a number array in the table. More... | |
static bool | SetDefaultNumberArray (std::string_view key, std::span< const double > defaultValue) |
Gets the current value in the table, setting it if it does not exist. More... | |
static std::vector< double > | GetNumberArray (std::string_view key, std::span< const double > defaultValue) |
Returns the number array the key maps to. More... | |
static bool | PutStringArray (std::string_view key, std::span< const std::string > value) |
Put a string array in the table. More... | |
static bool | SetDefaultStringArray (std::string_view key, std::span< const std::string > defaultValue) |
Gets the current value in the table, setting it if it does not exist. More... | |
static std::vector< std::string > | GetStringArray (std::string_view key, std::span< const std::string > defaultValue) |
Returns the string array the key maps to. More... | |
static bool | PutRaw (std::string_view key, std::span< const uint8_t > value) |
Put a raw value (byte array) in the table. More... | |
static bool | SetDefaultRaw (std::string_view key, std::span< const uint8_t > defaultValue) |
Gets the current value in the table, setting it if it does not exist. More... | |
static std::vector< uint8_t > | GetRaw (std::string_view key, std::span< const uint8_t > defaultValue) |
Returns the raw value (byte array) the key maps to. More... | |
static bool | PutValue (std::string_view keyName, const nt::Value &value) |
Maps the specified key to the specified complex value (such as an array) in this table. More... | |
static bool | SetDefaultValue (std::string_view key, const nt::Value &defaultValue) |
Gets the current value in the table, setting it if it does not exist. More... | |
static nt::Value | GetValue (std::string_view keyName) |
Retrieves the complex value (such as an array) in this table into the complex data object. More... | |
static void | PostListenerTask (std::function< void()> task) |
Posts a task from a listener to the ListenerExecutor, so that it can be run synchronously from the main loop on the next call to updateValues(). More... | |
static void | UpdateValues () |
Puts all sendable data to the dashboard. More... | |
|
delete |
|
static |
Stop making a key's value persistent through program restarts.
The key cannot be null.
key | the key name |
|
static |
Determines whether the given key is in this table.
key | the key to search for |
|
static |
Returns the value at the specified key.
If the key is not found, returns the default value.
keyName | the key |
defaultValue | the default value to set if key doesn't exist |
|
static |
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.
key | The key to look up. |
defaultValue | The value to be returned if no value is found. |
|
static |
Returns the value at the specified key.
keyName | the key |
|
static |
Returns an NT Entry mapping to the specified key.
This is useful if an entry is used often, or is read and then modified.
key | the key |
|
static |
types | bitmask of types; 0 is treated as a "don't care". |
|
static |
Returns the value at the specified key.
If the key is not found, returns the default value.
keyName | the key |
defaultValue | the default value to set if the key doesn't exist |
|
static |
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.
key | The key to look up. |
defaultValue | The value to be returned if no value is found. |
|
static |
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.
key | The key to look up. |
defaultValue | The value to be returned if no value is found. |
|
static |
Returns the value at the specified key.
If the key is not found, returns the default value.
keyName | the key |
defaultValue | the default value to set if the key doesn't exist |
|
static |
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.
key | The key to look up. |
defaultValue | The value to be returned if no value is found. |
|
static |
Retrieves the complex value (such as an array) in this table into the complex data object.
keyName | the key |
|
static |
|
static |
Returns whether the value is persistent through program restarts.
The key cannot be null.
key | the key name |
|
static |
Posts a task from a listener to the ListenerExecutor, so that it can be run synchronously from the main loop on the next call to updateValues().
task | The task to run synchronously from the main thread. |
|
static |
Maps the specified key to the specified value in this table.
The value can be retrieved by calling the get method with a key that is equal to the original key.
keyName | the key |
value | the value |
|
static |
Put a boolean array in the table.
key | the key to be assigned to |
value | the value that will be assigned |
|
static |
Maps the specified key to the specified value in this table.
The value can be retrieved by calling the get method with a key that is equal to the original key.
In order for the value to appear in the dashboard, it must be registered with SendableRegistry. WPILib components do this automatically.
key | the key |
data | the value |
|
static |
Maps the specified key (where the key is the name of the Sendable) to the specified value in this table.
The value can be retrieved by calling the get method with a key that is equal to the original key.
In order for the value to appear in the dashboard, it must be registered with SendableRegistry. WPILib components do this automatically.
value | the value |
|
static |
Maps the specified key to the specified value in this table.
The value can be retrieved by calling the get method with a key that is equal to the original key.
keyName | the key |
value | the value |
|
static |
Put a number array in the table.
key | The key to be assigned to. |
value | The value that will be assigned. |
|
static |
Put a raw value (byte array) in the table.
key | The key to be assigned to. |
value | The value that will be assigned. |
|
static |
Maps the specified key to the specified value in this table.
The value can be retrieved by calling the get method with a key that is equal to the original key.
keyName | the key |
value | the value |
|
static |
Put a string array in the table.
key | The key to be assigned to. |
value | The value that will be assigned. |
|
static |
Maps the specified key to the specified complex value (such as an array) in this table.
The value can be retrieved by calling the RetrieveValue method with a key that is equal to the original key.
keyName | the key |
value | the value |
|
static |
Gets the current value in the table, setting it if it does not exist.
key | the key |
defaultValue | the default value to set if key doesn't exist. |
|
static |
Gets the current value in the table, setting it if it does not exist.
key | the key |
defaultValue | the default value to set if key doesn't exist. |
|
static |
Gets the current value in the table, setting it if it does not exist.
key | The key. |
defaultValue | The default value to set if key doesn't exist. |
|
static |
Gets the current value in the table, setting it if it does not exist.
key | The key. |
defaultValue | The default value to set if key doesn't exist. |
|
static |
Gets the current value in the table, setting it if it does not exist.
key | The key. |
defaultValue | The default value to set if key doesn't exist. |
|
static |
Gets the current value in the table, setting it if it does not exist.
key | the key |
defaultValue | the default value to set if key doesn't exist. |
|
static |
Gets the current value in the table, setting it if it does not exist.
key | The key. |
defaultValue | The default value to set if key doesn't exist. |
|
static |
Gets the current value in the table, setting it if it does not exist.
key | the key |
defaultValue | The default value to set if key doesn't exist. |
|
static |
Makes a key's value persistent through program restarts.
key | the key to make persistent |
|
static |
Puts all sendable data to the dashboard.