WPILibC++  2019.3.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
frc::SendableBuilder Class Referenceabstract
Inheritance diagram for frc::SendableBuilder:
frc::SendableBuilderImpl

Public Member Functions

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 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 SetUpdateTable (std::function< void()> func)=0
 Set the function that should be called to update the network table for things other than properties. More...
 
virtual nt::NetworkTableEntry GetEntry (const wpi::Twine &key)=0
 Add a property without getters or setters. More...
 
virtual void AddBooleanProperty (const wpi::Twine &key, std::function< bool()> getter, std::function< void(bool)> setter)=0
 Add a boolean property. More...
 
virtual void AddDoubleProperty (const wpi::Twine &key, std::function< double()> getter, std::function< void(double)> setter)=0
 Add a double property. More...
 
virtual void AddStringProperty (const wpi::Twine &key, std::function< std::string()> getter, std::function< void(wpi::StringRef)> setter)=0
 Add a string property. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual void AddRawProperty (const wpi::Twine &key, std::function< std::string()> getter, std::function< void(wpi::StringRef)> setter)=0
 Add a raw property. More...
 
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. More...
 
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). More...
 
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). More...
 
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). More...
 
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). More...
 
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). More...
 

Member Function Documentation

virtual void frc::SendableBuilder::AddBooleanArrayProperty ( const wpi::Twine key,
std::function< std::vector< int >()>  getter,
std::function< void(wpi::ArrayRef< int >)>  setter 
)
pure virtual

Add a boolean array property.

Parameters
keyproperty name
gettergetter function (returns current value)
settersetter function (sets new value)

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::AddBooleanProperty ( const wpi::Twine key,
std::function< bool()>  getter,
std::function< void(bool)>  setter 
)
pure virtual

Add a boolean property.

Parameters
keyproperty name
gettergetter function (returns current value)
settersetter function (sets new value)

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::AddDoubleArrayProperty ( const wpi::Twine key,
std::function< std::vector< double >()>  getter,
std::function< void(wpi::ArrayRef< double >)>  setter 
)
pure virtual

Add a double array property.

Parameters
keyproperty name
gettergetter function (returns current value)
settersetter function (sets new value)

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::AddDoubleProperty ( const wpi::Twine key,
std::function< double()>  getter,
std::function< void(double)>  setter 
)
pure virtual

Add a double property.

Parameters
keyproperty name
gettergetter function (returns current value)
settersetter function (sets new value)

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::AddRawProperty ( const wpi::Twine key,
std::function< std::string()>  getter,
std::function< void(wpi::StringRef)>  setter 
)
pure virtual

Add a raw property.

Parameters
keyproperty name
gettergetter function (returns current value)
settersetter function (sets new value)

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::AddSmallBooleanArrayProperty ( const wpi::Twine key,
std::function< wpi::ArrayRef< int >(wpi::SmallVectorImpl< int > &buf)>  getter,
std::function< void(wpi::ArrayRef< int >)>  setter 
)
pure virtual

Add a boolean array property (SmallVector form).

Parameters
keyproperty name
gettergetter function (returns current value)
settersetter function (sets new value)

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::AddSmallDoubleArrayProperty ( const wpi::Twine key,
std::function< wpi::ArrayRef< double >(wpi::SmallVectorImpl< double > &buf)>  getter,
std::function< void(wpi::ArrayRef< double >)>  setter 
)
pure virtual

Add a double array property (SmallVector form).

Parameters
keyproperty name
gettergetter function (returns current value)
settersetter function (sets new value)

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::AddSmallRawProperty ( const wpi::Twine key,
std::function< wpi::StringRef(wpi::SmallVectorImpl< char > &buf)>  getter,
std::function< void(wpi::StringRef)>  setter 
)
pure virtual

Add a raw property (SmallVector form).

Parameters
keyproperty name
gettergetter function (returns current value)
settersetter function (sets new value)

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::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 
)
pure virtual

Add a string array property (SmallVector form).

Parameters
keyproperty name
gettergetter function (returns current value)
settersetter function (sets new value)

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::AddSmallStringProperty ( const wpi::Twine key,
std::function< wpi::StringRef(wpi::SmallVectorImpl< char > &buf)>  getter,
std::function< void(wpi::StringRef)>  setter 
)
pure virtual

Add a string property (SmallString form).

Parameters
keyproperty name
gettergetter function (returns current value)
settersetter function (sets new value)

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::AddStringArrayProperty ( const wpi::Twine key,
std::function< std::vector< std::string >()>  getter,
std::function< void(wpi::ArrayRef< std::string >)>  setter 
)
pure virtual

Add a string array property.

Parameters
keyproperty name
gettergetter function (returns current value)
settersetter function (sets new value)

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::AddStringProperty ( const wpi::Twine key,
std::function< std::string()>  getter,
std::function< void(wpi::StringRef)>  setter 
)
pure virtual

Add a string property.

Parameters
keyproperty name
gettergetter function (returns current value)
settersetter function (sets new value)

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::AddValueProperty ( const wpi::Twine key,
std::function< std::shared_ptr< nt::Value >()>  getter,
std::function< void(std::shared_ptr< nt::Value >)>  setter 
)
pure virtual

Add a NetworkTableValue property.

Parameters
keyproperty name
gettergetter function (returns current value)
settersetter function (sets new value)

Implemented in frc::SendableBuilderImpl.

virtual nt::NetworkTableEntry frc::SendableBuilder::GetEntry ( const wpi::Twine key)
pure virtual

Add a property without getters or setters.

This can be used to get entry handles for the function called by SetUpdateTable().

Parameters
keyproperty name
Returns
Network table entry

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::SetActuator ( bool  value)
pure virtual

Set a flag indicating if this sendable should be treated as an actuator.

By default this flag is false.

Parameters
valuetrue if actuator, false if not

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::SetSafeState ( std::function< void()>  func)
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.

Parameters
funcfunction

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::SetSmartDashboardType ( const wpi::Twine type)
pure virtual

Set the string representation of the named data type that will be used by the smart dashboard for this sendable.

Parameters
typedata type

Implemented in frc::SendableBuilderImpl.

virtual void frc::SendableBuilder::SetUpdateTable ( std::function< void()>  func)
pure virtual

Set the function that should be called to update the network table for things other than properties.

Note this function is not passed the network table object; instead it should use the entry handles returned by GetEntry().

Parameters
funcfunction

Implemented in frc::SendableBuilderImpl.


The documentation for this class was generated from the following file: