15 #include <networktables/NetworkTableEntry.h> 16 #include <networktables/NetworkTableValue.h> 17 #include <wpi/ArrayRef.h> 18 #include <wpi/SmallVector.h> 19 #include <wpi/Twine.h> 41 virtual void SetSafeState(std::function<
void()> func) = 0;
70 std::function<
bool()> getter,
71 std::function<
void(
bool)> setter) = 0;
81 std::function<
double()> getter,
82 std::function<
void(
double)> setter) = 0;
92 const wpi::Twine& key, std::function<std::string()> getter,
103 const wpi::Twine& key, std::function<std::vector<int>()> getter,
114 const wpi::Twine& key, std::function<std::vector<double>()> getter,
125 const wpi::Twine& key, std::function<std::vector<std::string>()> getter,
136 std::function<std::string()> getter,
147 const wpi::Twine& key, std::function<std::shared_ptr<nt::Value>()> getter,
148 std::function<
void(std::shared_ptr<nt::Value>)> setter) = 0;
virtual void AddSmallRawProperty(const wpi::Twine &key, std::function< wpi::StringRef(wpi::SmallVectorImpl< char > &buf)> getter, std::function< void(wpi::StringRef)> setter)=0
Add a raw property (SmallVector form).
Definition: Utility.cpp:119
virtual void AddRawProperty(const wpi::Twine &key, std::function< std::string()> getter, std::function< void(wpi::StringRef)> setter)=0
Add a raw property.
virtual void AddSmallStringArrayProperty(const wpi::Twine &key, std::function< wpi::ArrayRef< std::string >(wpi::SmallVectorImpl< std::string > &buf)> getter, std::function< void(wpi::ArrayRef< std::string >)> setter)=0
Add a string array property (SmallVector form).
virtual nt::NetworkTableEntry GetEntry(const wpi::Twine &key)=0
Add a property without getters or setters.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: ArrayRef.h:41
virtual void AddDoubleProperty(const wpi::Twine &key, std::function< double()> getter, std::function< void(double)> setter)=0
Add a double property.
virtual void AddSmallDoubleArrayProperty(const wpi::Twine &key, std::function< wpi::ArrayRef< double >(wpi::SmallVectorImpl< double > &buf)> getter, std::function< void(wpi::ArrayRef< double >)> setter)=0
Add a double array property (SmallVector form).
virtual void AddValueProperty(const wpi::Twine &key, std::function< std::shared_ptr< nt::Value >()> getter, std::function< void(std::shared_ptr< nt::Value >)> setter)=0
Add a NetworkTableValue property.
virtual void SetSafeState(std::function< void()> func)=0
Set the function that should be called to set the Sendable into a safe state.
virtual void AddStringProperty(const wpi::Twine &key, std::function< std::string()> getter, std::function< void(wpi::StringRef)> setter)=0
Add a string property.
virtual void SetSmartDashboardType(const wpi::Twine &type)=0
Set the string representation of the named data type that will be used by the smart dashboard for thi...
virtual void AddBooleanProperty(const wpi::Twine &key, std::function< bool()> getter, std::function< void(bool)> setter)=0
Add a boolean property.
virtual void AddSmallStringProperty(const wpi::Twine &key, std::function< wpi::StringRef(wpi::SmallVectorImpl< char > &buf)> getter, std::function< void(wpi::StringRef)> setter)=0
Add a string property (SmallString form).
virtual void AddDoubleArrayProperty(const wpi::Twine &key, std::function< std::vector< double >()> getter, std::function< void(wpi::ArrayRef< double >)> setter)=0
Add a double array property.
virtual void SetUpdateTable(std::function< void()> func)=0
Set the function that should be called to update the network table for things other than properties...
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
Definition: SendableBuilder.h:23
NetworkTables Entry.
Definition: NetworkTableEntry.h:35
virtual void AddSmallBooleanArrayProperty(const wpi::Twine &key, std::function< wpi::ArrayRef< int >(wpi::SmallVectorImpl< int > &buf)> getter, std::function< void(wpi::ArrayRef< int >)> setter)=0
Add a boolean array property (SmallVector form).
virtual void AddStringArrayProperty(const wpi::Twine &key, std::function< std::vector< std::string >()> getter, std::function< void(wpi::ArrayRef< std::string >)> setter)=0
Add a string array property.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:79
virtual void AddBooleanArrayProperty(const wpi::Twine &key, std::function< std::vector< int >()> getter, std::function< void(wpi::ArrayRef< int >)> setter)=0
Add a boolean array property.