67 std::function<
bool()> getter,
68 std::function<
void(
bool)> setter) = 0;
86 std::function<int64_t()> getter,
87 std::function<
void(int64_t)> setter) = 0;
105 std::function<
float()> getter,
106 std::function<
void(
float)> setter) = 0;
124 std::function<
double()> getter,
125 std::function<
void(
double)> setter) = 0;
164 std::function<
void(std::span<const int>)> setter) = 0;
173 std::span<const int> value) = 0;
184 std::function<
void(std::span<const int64_t>)> setter) = 0;
193 std::span<const int64_t> value) = 0;
204 std::function<
void(std::span<const float>)> setter) = 0;
213 std::span<const float> value) = 0;
224 std::function<
void(std::span<const double>)> setter) = 0;
233 std::span<const double> value) = 0;
244 std::function<
void(std::span<const std::string>)> setter) = 0;
253 std::span<const std::string> value) = 0;
265 std::function<std::vector<uint8_t>()> getter,
266 std::function<
void(std::span<const uint8_t>)> setter) = 0;
277 std::span<const uint8_t> value) = 0;
302 std::function<
void(std::span<const int>)> setter) = 0;
316 std::function<
void(std::span<const int64_t>)> setter) = 0;
329 std::function<
void(std::span<const float>)> setter) = 0;
342 std::function<
void(std::span<const double>)> setter) = 0;
356 std::function<
void(std::span<const std::string>)> setter) = 0;
370 std::function<
void(std::span<const uint8_t>)> setter) = 0;
This file defines the SmallVector class.
Helper class for building Sendable dashboard representations.
Definition: SendableBuilder.h:21
virtual void PublishConstBoolean(std::string_view key, bool value)=0
Add a constant boolean property.
virtual void AddDoubleProperty(std::string_view key, std::function< double()> getter, std::function< void(double)> setter)=0
Add a double property.
virtual void PublishConstBooleanArray(std::string_view key, std::span< const int > value)=0
Add a constant boolean array property.
virtual void PublishConstString(std::string_view key, std::string_view value)=0
Add a constant string property.
virtual void PublishConstRaw(std::string_view key, std::string_view typeString, std::span< const uint8_t > value)=0
Add a constant raw property.
virtual void AddSmallBooleanArrayProperty(std::string_view key, std::function< std::span< const int >(wpi::SmallVectorImpl< int > &buf)> getter, std::function< void(std::span< const int >)> setter)=0
Add a boolean array property (SmallVector form).
virtual ~SendableBuilder()=default
virtual void AddRawProperty(std::string_view key, std::string_view typeString, std::function< std::vector< uint8_t >()> getter, std::function< void(std::span< const uint8_t >)> setter)=0
Add a raw property.
virtual void PublishConstFloatArray(std::string_view key, std::span< const float > value)=0
Add a constant float array property.
virtual void AddStringArrayProperty(std::string_view key, std::function< std::vector< std::string >()> getter, std::function< void(std::span< const std::string >)> setter)=0
Add a string array property.
virtual void AddFloatProperty(std::string_view key, std::function< float()> getter, std::function< void(float)> setter)=0
Add a float property.
virtual void SetSmartDashboardType(std::string_view type)=0
Set the string representation of the named data type that will be used by the smart dashboard for thi...
virtual void ClearProperties()=0
Clear properties.
virtual void AddBooleanArrayProperty(std::string_view key, std::function< std::vector< int >()> getter, std::function< void(std::span< const int >)> setter)=0
Add a boolean array property.
virtual void PublishConstIntegerArray(std::string_view key, std::span< const int64_t > value)=0
Add a constant integer array property.
virtual void AddSmallStringArrayProperty(std::string_view key, std::function< std::span< const std::string >(wpi::SmallVectorImpl< std::string > &buf)> getter, std::function< void(std::span< const std::string >)> setter)=0
Add a string array property (SmallVector form).
virtual void AddSmallDoubleArrayProperty(std::string_view key, std::function< std::span< const double >(wpi::SmallVectorImpl< double > &buf)> getter, std::function< void(std::span< const double >)> setter)=0
Add a double array property (SmallVector form).
virtual void PublishConstFloat(std::string_view key, float value)=0
Add a constant float property.
virtual void AddBooleanProperty(std::string_view key, std::function< bool()> getter, std::function< void(bool)> setter)=0
Add a boolean property.
virtual void AddSmallIntegerArrayProperty(std::string_view key, std::function< std::span< const int64_t >(wpi::SmallVectorImpl< int64_t > &buf)> getter, std::function< void(std::span< const int64_t >)> setter)=0
Add an integer array property (SmallVector form).
virtual void AddSmallFloatArrayProperty(std::string_view key, std::function< std::span< const float >(wpi::SmallVectorImpl< float > &buf)> getter, std::function< void(std::span< const float >)> setter)=0
Add a float array property (SmallVector form).
virtual void AddFloatArrayProperty(std::string_view key, std::function< std::vector< float >()> getter, std::function< void(std::span< const float >)> setter)=0
Add a float array property.
virtual void AddSmallStringProperty(std::string_view key, std::function< std::string_view(wpi::SmallVectorImpl< char > &buf)> getter, std::function< void(std::string_view)> setter)=0
Add a string property (SmallString form).
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 PublishConstStringArray(std::string_view key, std::span< const std::string > value)=0
Add a constant string array property.
virtual void Update()=0
Update the published values by calling the getters for all properties.
virtual void AddSmallRawProperty(std::string_view key, std::string_view typeString, std::function< std::span< uint8_t >(wpi::SmallVectorImpl< uint8_t > &buf)> getter, std::function< void(std::span< const uint8_t >)> setter)=0
Add a raw property (SmallVector form).
virtual void PublishConstDoubleArray(std::string_view key, std::span< const double > value)=0
Add a constant double array property.
virtual void PublishConstDouble(std::string_view key, double value)=0
Add a constant double property.
BackendKind
The backend kinds used for the sendable builder.
Definition: SendableBuilder.h:26
@ kNetworkTables
NetworkTables.
Definition: SendableBuilder.h:30
@ kUnknown
Unknown.
Definition: SendableBuilder.h:28
virtual void PublishConstInteger(std::string_view key, int64_t value)=0
Add a constant integer property.
virtual void SetActuator(bool value)=0
Set a flag indicating if this sendable should be treated as an actuator.
virtual BackendKind GetBackendKind() const =0
Gets the kind of backend being used.
virtual void AddIntegerProperty(std::string_view key, std::function< int64_t()> getter, std::function< void(int64_t)> setter)=0
Add an integer property.
virtual bool IsPublished() const =0
Return whether this sendable has been published.
virtual void AddStringProperty(std::string_view key, std::function< std::string()> getter, std::function< void(std::string_view)> setter)=0
Add a string property.
virtual void AddDoubleArrayProperty(std::string_view key, std::function< std::vector< double >()> getter, std::function< void(std::span< const double >)> setter)=0
Add a double array property.
virtual void AddIntegerArrayProperty(std::string_view key, std::function< std::vector< int64_t >()> getter, std::function< void(std::span< const int64_t >)> setter)=0
Add an integer array property.
basic_string_view< char > string_view
Definition: core.h:501
type
Definition: core.h:556
Definition: ntcore_cpp.h:26