14 #include <networktables/NetworkTableEntry.h>
15 #include <networktables/NetworkTableValue.h>
17 #include "frc/ErrorBase.h"
18 #include "frc/smartdashboard/ListenerExecutor.h"
19 #include "frc/smartdashboard/Sendable.h"
20 #include "frc/smartdashboard/SendableHelper.h"
42 static std::vector<std::string>
GetKeys(
int types = 0);
402 std::shared_ptr<nt::Value> value);
412 std::shared_ptr<nt::Value> defaultValue);
static bool SetDefaultBooleanArray(wpi::StringRef key, wpi::ArrayRef< int > defaultValue)
Gets the current value in the table, setting it if it does not exist.
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 ma...
static bool SetDefaultValue(wpi::StringRef key, std::shared_ptr< nt::Value > defaultValue)
Gets the current value in the table, setting it if it does not exist.
static bool SetDefaultNumberArray(wpi::StringRef key, wpi::ArrayRef< double > defaultValue)
Gets the current value in the table, setting it if it does not exist.
static bool PutRaw(wpi::StringRef key, wpi::StringRef value)
Put a raw value (byte array) in the table.
static bool PutBooleanArray(wpi::StringRef key, wpi::ArrayRef< int > value)
Put a boolean array in the table.
static bool PutNumber(wpi::StringRef keyName, double value)
Maps the specified key to the specified value in this table.
static bool SetDefaultString(wpi::StringRef key, wpi::StringRef defaultValue)
Gets the current value in the table, setting it if it does not exist.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:42
static bool SetDefaultBoolean(wpi::StringRef key, bool defaultValue)
Gets the current value in the table, setting it if it does not exist.
static std::string GetRaw(wpi::StringRef key, wpi::StringRef defaultValue)
Returns the raw value (byte array) the key maps to.
static void ClearFlags(wpi::StringRef key, unsigned int flags)
Clears flags on the specified key in this table.
NetworkTables Entry.
Definition: NetworkTableEntry.h:39
static std::vector< double > GetNumberArray(wpi::StringRef key, wpi::ArrayRef< double > defaultValue)
Returns the number array the key maps to.
static std::shared_ptr< nt::Value > GetValue(wpi::StringRef keyName)
Retrieves the complex value (such as an array) in this table into the complex data object.
static double GetNumber(wpi::StringRef keyName, double defaultValue)
Returns the value at the specified key.
static bool SetDefaultStringArray(wpi::StringRef key, wpi::ArrayRef< std::string > defaultValue)
Gets the current value in the table, setting it if it does not exist.
static void SetFlags(wpi::StringRef key, unsigned int flags)
Sets flags on the specified key in this table.
An executor for running listener tasks posted by Sendable listeners synchronously from the main appli...
Definition: ListenerExecutor.h:22
static bool SetDefaultNumber(wpi::StringRef key, double defaultValue)
Gets the current value in the table, setting it if it does not exist.
static nt::NetworkTableEntry GetEntry(wpi::StringRef key)
Returns an NT Entry mapping to the specified key.
Base class for most objects.
Definition: ErrorBase.h:104
static bool IsPersistent(wpi::StringRef key)
Returns whether the value is persistent through program restarts.
static std::vector< std::string > GetKeys(int types=0)
static void SetPersistent(wpi::StringRef key)
Makes a key's value persistent through program restarts.
static void ClearPersistent(wpi::StringRef key)
Stop making a key's value persistent through program restarts.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
static bool PutStringArray(wpi::StringRef key, wpi::ArrayRef< std::string > value)
Put a string array in the table.
static bool PutBoolean(wpi::StringRef keyName, bool value)
Maps the specified key to the specified value in this table.
static bool GetBoolean(wpi::StringRef keyName, bool defaultValue)
Returns the value at the specified key.
static void Delete(wpi::StringRef key)
Deletes the specified key in this table.
static unsigned int GetFlags(wpi::StringRef key)
Returns the flags for the specified key.
Interface for Sendable objects.
Definition: Sendable.h:17
Definition: SmartDashboard.h:24
static bool ContainsKey(wpi::StringRef key)
Determines whether the given key is in this table.
static std::string GetString(wpi::StringRef keyName, wpi::StringRef defaultValue)
Returns the value at the specified key.
static bool PutValue(wpi::StringRef keyName, std::shared_ptr< nt::Value > value)
Maps the specified key to the specified complex value (such as an array) in this table.
static std::vector< std::string > GetStringArray(wpi::StringRef key, wpi::ArrayRef< std::string > defaultValue)
Returns the string array the key maps to.
A class that enforces constraints on the differential drive kinematics.
Definition: SPIAccelerometerSim.h:16
static Sendable * GetData(wpi::StringRef keyName)
Returns the value at the specified key.
static void PutData(wpi::StringRef key, Sendable *data)
Maps the specified key to the specified value in this table.
static void UpdateValues()
Puts all sendable data to the dashboard.
static bool PutNumberArray(wpi::StringRef key, wpi::ArrayRef< double > value)
Put a number array in the table.
static std::vector< int > GetBooleanArray(wpi::StringRef key, wpi::ArrayRef< int > defaultValue)
Returns the boolean array the key maps to.
A helper class for use with objects that add themselves to SendableRegistry.
Definition: SendableHelper.h:28
static bool PutString(wpi::StringRef keyName, wpi::StringRef value)
Maps the specified key to the specified value in this table.
static bool SetDefaultRaw(wpi::StringRef key, wpi::StringRef defaultValue)
Gets the current value in the table, setting it if it does not exist.