Updates SmartDashboard with new NetworkTables3 functions (#162)

This commit is contained in:
Thad House
2016-10-03 09:59:18 -07:00
committed by Peter Johnson
parent 8b2345a706
commit 64ebe7f5e5
3 changed files with 791 additions and 78 deletions

View File

@@ -20,22 +20,65 @@ class SmartDashboard : public SensorBase {
public:
static void init();
static bool ContainsKey(llvm::StringRef key);
static std::vector<std::string> GetKeys(int types = 0);
static void SetPersistent(llvm::StringRef key);
static void ClearPersistent(llvm::StringRef key);
static bool IsPersistent(llvm::StringRef key);
static void SetFlags(llvm::StringRef key, unsigned int flags);
static void ClearFlags(llvm::StringRef key, unsigned int flags);
static unsigned int GetFlags(llvm::StringRef key);
static void Delete(llvm::StringRef key);
static void PutData(llvm::StringRef key, Sendable* data);
static void PutData(NamedSendable* value);
static Sendable* GetData(llvm::StringRef keyName);
static void PutBoolean(llvm::StringRef keyName, bool value);
static bool PutBoolean(llvm::StringRef keyName, bool value);
static bool SetDefaultBoolean(llvm::StringRef key, bool defaultValue);
static bool GetBoolean(llvm::StringRef keyName, bool defaultValue);
static void PutNumber(llvm::StringRef keyName, double value);
static bool PutNumber(llvm::StringRef keyName, double value);
static bool SetDefaultNumber(llvm::StringRef key, double defaultValue);
static double GetNumber(llvm::StringRef keyName, double defaultValue);
static void PutString(llvm::StringRef keyName, llvm::StringRef value);
static bool PutString(llvm::StringRef keyName, llvm::StringRef value);
static bool SetDefaultString(llvm::StringRef key,
llvm::StringRef defaultValue);
static std::string GetString(llvm::StringRef keyName,
llvm::StringRef defaultValue);
static void PutValue(llvm::StringRef keyName,
static bool PutBooleanArray(llvm::StringRef key, llvm::ArrayRef<int> value);
static bool SetDefaultBooleanArray(llvm::StringRef key,
llvm::ArrayRef<int> defaultValue);
static std::vector<int> GetBooleanArray(llvm::StringRef key,
llvm::ArrayRef<int> defaultValue);
static bool PutNumberArray(llvm::StringRef key, llvm::ArrayRef<double> value);
static bool SetDefaultNumberArray(llvm::StringRef key,
llvm::ArrayRef<double> defaultValue);
static std::vector<double> GetNumberArray(
llvm::StringRef key, llvm::ArrayRef<double> defaultValue);
static bool PutStringArray(llvm::StringRef key,
llvm::ArrayRef<std::string> value);
static bool SetDefaultStringArray(llvm::StringRef key,
llvm::ArrayRef<std::string> defaultValue);
static std::vector<std::string> GetStringArray(
llvm::StringRef key, llvm::ArrayRef<std::string> defaultValue);
static bool PutRaw(llvm::StringRef key, llvm::StringRef value);
static bool SetDefaultRaw(llvm::StringRef key, llvm::StringRef defaultValue);
static std::string GetRaw(llvm::StringRef key, llvm::StringRef defaultValue);
static bool PutValue(llvm::StringRef keyName,
std::shared_ptr<nt::Value> value);
static bool SetDefaultValue(llvm::StringRef key,
std::shared_ptr<nt::Value> defaultValue);
static std::shared_ptr<nt::Value> GetValue(llvm::StringRef keyName);
private: