WPILibC++ 2023.4.3-108-ge5452e3
|
#include <wpi/sendable/SendableBuilder.h>
Public Types | |
enum | BackendKind { kUnknown , kNetworkTables } |
The backend kinds used for the sendable builder. More... | |
Public Member Functions | |
virtual | ~SendableBuilder ()=default |
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 this sendable. More... | |
virtual void | SetActuator (bool value)=0 |
Set a flag indicating if this sendable should be treated as an actuator. More... | |
virtual void | SetSafeState (std::function< void()> func)=0 |
Set the function that should be called to set the Sendable into a safe state. More... | |
virtual void | AddBooleanProperty (std::string_view key, std::function< bool()> getter, std::function< void(bool)> setter)=0 |
Add a boolean property. More... | |
virtual void | AddIntegerProperty (std::string_view key, std::function< int64_t()> getter, std::function< void(int64_t)> setter)=0 |
Add an integer property. More... | |
virtual void | AddFloatProperty (std::string_view key, std::function< float()> getter, std::function< void(float)> setter)=0 |
Add a float property. More... | |
virtual void | AddDoubleProperty (std::string_view key, std::function< double()> getter, std::function< void(double)> setter)=0 |
Add a double property. More... | |
virtual void | AddStringProperty (std::string_view key, std::function< std::string()> getter, std::function< void(std::string_view)> setter)=0 |
Add a string property. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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). More... | |
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). More... | |
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). More... | |
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). More... | |
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). More... | |
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). More... | |
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). More... | |
virtual BackendKind | GetBackendKind () const =0 |
Gets the kind of backend being used. More... | |
virtual bool | IsPublished () const =0 |
Return whether this sendable has been published. More... | |
virtual void | Update ()=0 |
Update the published values by calling the getters for all properties. More... | |
virtual void | ClearProperties ()=0 |
Clear properties. More... | |
|
virtualdefault |
|
pure virtual |
Add a boolean array property.
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Add a boolean property.
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Add a double array property.
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Add a double property.
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Add a float array property.
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Add a float property.
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Add an integer array property.
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Add an integer property.
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Add a raw property.
key | property name |
typeString | type string |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Add a boolean array property (SmallVector form).
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
|
pure virtual |
Add a double array property (SmallVector form).
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
|
pure virtual |
Add a float array property (SmallVector form).
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
|
pure virtual |
Add an integer array property (SmallVector form).
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
|
pure virtual |
Add a raw property (SmallVector form).
key | property name |
typeString | type string |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
|
pure virtual |
Add a string array property (SmallVector form).
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
|
pure virtual |
Add a string property (SmallString form).
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
|
pure virtual |
Add a string array property.
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Add a string property.
key | property name |
getter | getter function (returns current value) |
setter | setter function (sets new value) |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Clear properties.
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
|
pure virtual |
Return whether this sendable has been published.
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Set a flag indicating if this sendable should be treated as an actuator.
By default this flag is false.
value | true if actuator, false if not |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Set the function that should be called to set the Sendable into a safe state.
This is called when entering and exiting Live Window mode.
func | function |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Set the string representation of the named data type that will be used by the smart dashboard for this sendable.
type | data type |
Implemented in frc::SendableBuilderImpl.
|
pure virtual |
Update the published values by calling the getters for all properties.
Implemented in frc::SendableBuilderImpl.