WPILibC++ 2024.3.2
frc::ShuffleboardContainer Class Reference

Common interface for objects that can contain shuffleboard components. More...

#include <frc/shuffleboard/ShuffleboardContainer.h>

Inheritance diagram for frc::ShuffleboardContainer:
frc::ShuffleboardValue frc::ShuffleboardLayout frc::ShuffleboardTab

Public Member Functions

 ShuffleboardContainer (std::string_view title)
 
 ShuffleboardContainer (ShuffleboardContainer &&rhs)=default
 
 ~ShuffleboardContainer () override=default
 
const std::vector< std::unique_ptr< ShuffleboardComponentBase > > & GetComponents () const
 Gets the components that are direct children of this container. More...
 
ShuffleboardLayoutGetLayout (std::string_view title, BuiltInLayouts type)
 Gets the layout with the given type and title, creating it if it does not already exist at the time this method is called. More...
 
ShuffleboardLayoutGetLayout (std::string_view title, const LayoutType &type)
 Gets the layout with the given type and title, creating it if it does not already exist at the time this method is called. More...
 
ShuffleboardLayoutGetLayout (std::string_view title, std::string_view type)
 Gets the layout with the given type and title, creating it if it does not already exist at the time this method is called. More...
 
ShuffleboardLayoutGetLayout (std::string_view title)
 Gets the already-defined layout in this container with the given title. More...
 
ComplexWidgetAdd (std::string_view title, wpi::Sendable &sendable)
 Adds a widget to this container to display the given sendable. More...
 
ComplexWidgetAdd (std::string_view title, const cs::VideoSource &video)
 Adds a widget to this container to display the given video stream. More...
 
ComplexWidgetAddCamera (std::string_view title, std::string_view cameraName, std::span< const std::string > cameraUrls)
 Adds a widget to this container to display a video stream. More...
 
ComplexWidgetAdd (wpi::Sendable &sendable)
 Adds a widget to this container to display the given sendable. More...
 
ComplexWidgetAdd (const cs::VideoSource &video)
 Adds a widget to this container to display the given video stream. More...
 
SimpleWidgetAdd (std::string_view title, const nt::Value &defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (std::string_view title, bool defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (std::string_view title, double defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (std::string_view title, float defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (std::string_view title, int defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (std::string_view title, std::string_view defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (std::string_view title, const char *defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (std::string_view title, std::span< const bool > defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (std::string_view title, std::span< const double > defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (std::string_view title, std::span< const float > defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (std::string_view title, std::span< const int64_t > defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (std::string_view title, std::span< const std::string > defaultValue)
 Adds a widget to this container to display the given data. More...
 
SuppliedValueWidget< std::string > & AddString (std::string_view title, std::function< std::string()> supplier)
 Adds a widget to this container. More...
 
SuppliedValueWidget< double > & AddNumber (std::string_view title, std::function< double()> supplier)
 Adds a widget to this container. More...
 
SuppliedValueWidget< double > & AddDouble (std::string_view title, std::function< double()> supplier)
 Adds a widget to this container. More...
 
SuppliedValueWidget< float > & AddFloat (std::string_view title, std::function< float()> supplier)
 Adds a widget to this container. More...
 
SuppliedValueWidget< int64_t > & AddInteger (std::string_view title, std::function< int64_t()> supplier)
 Adds a widget to this container. More...
 
SuppliedValueWidget< bool > & AddBoolean (std::string_view title, std::function< bool()> supplier)
 Adds a widget to this container. More...
 
SuppliedValueWidget< std::vector< std::string > > & AddStringArray (std::string_view title, std::function< std::vector< std::string >()> supplier)
 Adds a widget to this container. More...
 
SuppliedValueWidget< std::vector< double > > & AddNumberArray (std::string_view title, std::function< std::vector< double >()> supplier)
 Adds a widget to this container. More...
 
SuppliedValueWidget< std::vector< double > > & AddDoubleArray (std::string_view title, std::function< std::vector< double >()> supplier)
 Adds a widget to this container. More...
 
SuppliedValueWidget< std::vector< float > > & AddFloatArray (std::string_view title, std::function< std::vector< float >()> supplier)
 Adds a widget to this container. More...
 
SuppliedValueWidget< std::vector< int64_t > > & AddIntegerArray (std::string_view title, std::function< std::vector< int64_t >()> supplier)
 Adds a widget to this container. More...
 
SuppliedValueWidget< std::vector< int > > & AddBooleanArray (std::string_view title, std::function< std::vector< int >()> supplier)
 Adds a widget to this container. More...
 
SuppliedValueWidget< std::vector< uint8_t > > & AddRaw (std::string_view title, std::function< std::vector< uint8_t >()> supplier)
 Adds a widget to this container. More...
 
SuppliedValueWidget< std::vector< uint8_t > > & AddRaw (std::string_view title, std::string_view typeString, std::function< std::vector< uint8_t >()> supplier)
 Adds a widget to this container. More...
 
SimpleWidgetAddPersistent (std::string_view title, const nt::Value &defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (std::string_view title, bool defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (std::string_view title, double defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (std::string_view title, float defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (std::string_view title, int defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (std::string_view title, std::string_view defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (std::string_view title, std::span< const bool > defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (std::string_view title, std::span< const double > defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (std::string_view title, std::span< const float > defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (std::string_view title, std::span< const int64_t > defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (std::string_view title, std::span< const std::string > defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
void EnableIfActuator () override
 Enables user control of this widget in the Shuffleboard application. More...
 
void DisableIfActuator () override
 Disables user control of this widget in the Shuffleboard application. More...
 
- Public Member Functions inherited from frc::ShuffleboardValue
 ShuffleboardValue (std::string_view title)
 
virtual ~ShuffleboardValue ()=default
 
 ShuffleboardValue (const ShuffleboardValue &)=delete
 
ShuffleboardValueoperator= (const ShuffleboardValue &)=delete
 
const std::string & GetTitle () const
 Gets the title of this Shuffleboard value. More...
 
virtual void BuildInto (std::shared_ptr< nt::NetworkTable > parentTable, std::shared_ptr< nt::NetworkTable > metaTable)=0
 Builds the entries for this value. More...
 
virtual void EnableIfActuator ()
 Enables user control of this widget in the Shuffleboard application. More...
 
virtual void DisableIfActuator ()
 Disables user control of this widget in the Shuffleboard application. More...
 

Protected Attributes

bool m_isLayout = false
 

Friends

class SimpleWidget
 

Detailed Description

Common interface for objects that can contain shuffleboard components.

Constructor & Destructor Documentation

◆ ShuffleboardContainer() [1/2]

frc::ShuffleboardContainer::ShuffleboardContainer ( std::string_view  title)
explicit

◆ ShuffleboardContainer() [2/2]

frc::ShuffleboardContainer::ShuffleboardContainer ( ShuffleboardContainer &&  rhs)
default

◆ ~ShuffleboardContainer()

frc::ShuffleboardContainer::~ShuffleboardContainer ( )
overridedefault

Member Function Documentation

◆ Add() [1/16]

frc::ComplexWidget & frc::ShuffleboardContainer::Add ( const cs::VideoSource video)
inline

Adds a widget to this container to display the given video stream.

Parameters
videothe video to display
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the same title as the video source

◆ Add() [2/16]

SimpleWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
bool  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
AddPersistent(std::string_view, bool) Add(std::string_view title, bool defaultValue)

◆ Add() [3/16]

SimpleWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
const char *  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
AddPersistent(std::string_view, const char*) Add(std::string_view title, const char* defaultValue)

◆ Add() [4/16]

frc::ComplexWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
const cs::VideoSource video 
)
inline

Adds a widget to this container to display the given video stream.

Parameters
titlethe title of the widget
videothe video stream to display
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title

◆ Add() [5/16]

SimpleWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
const nt::Value defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
AddPersistent(std::string_view, std::shared_ptr<nt::Value>) Add(std::string_view title, std::shared_ptr<nt::Value> defaultValue)

◆ Add() [6/16]

SimpleWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
double  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
AddPersistent(std::string_view, double) Add(std::string_view title, double defaultValue)

◆ Add() [7/16]

SimpleWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
float  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
AddPersistent(std::string_view, double) Add(std::string_view title, double defaultValue)

◆ Add() [8/16]

SimpleWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
int  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
AddPersistent(std::string_view, int) Add(std::string_view title, int defaultValue)

◆ Add() [9/16]

SimpleWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
std::span< const bool >  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
AddPersistent(std::string_view, std::span<const bool>) Add(std::string_view title, std::span<const bool> defaultValue)

◆ Add() [10/16]

SimpleWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
std::span< const double >  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
AddPersistent(std::string_view, std::span<const double>) Add(std::string_view title, std::span<const double> defaultValue)

◆ Add() [11/16]

SimpleWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
std::span< const float >  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
AddPersistent(std::string_view, std::span<const double>) Add(std::string_view title, std::span<const double> defaultValue)

◆ Add() [12/16]

SimpleWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
std::span< const int64_t >  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
AddPersistent(std::string_view, std::span<const double>) Add(std::string_view title, std::span<const double> defaultValue)

◆ Add() [13/16]

SimpleWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
std::span< const std::string >  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
AddPersistent(std::string_view, std::span<const std::string>) Add(std::string_view title, std::span<const std::string> defaultValue)

◆ Add() [14/16]

SimpleWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
std::string_view  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
AddPersistent(std::string_view, std::string_view) Add(std::string_view title, std::string_view defaultValue)

◆ Add() [15/16]

ComplexWidget & frc::ShuffleboardContainer::Add ( std::string_view  title,
wpi::Sendable sendable 
)

Adds a widget to this container to display the given sendable.

Parameters
titlethe title of the widget
sendablethe sendable to display
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title

◆ Add() [16/16]

ComplexWidget & frc::ShuffleboardContainer::Add ( wpi::Sendable sendable)

Adds a widget to this container to display the given sendable.

Parameters
sendablethe sendable to display
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title, or if the sendable's name has not been specified

◆ AddBoolean()

SuppliedValueWidget< bool > & frc::ShuffleboardContainer::AddBoolean ( std::string_view  title,
std::function< bool()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
supplierthe supplier for values
Returns
a widget to display data

◆ AddBooleanArray()

SuppliedValueWidget< std::vector< int > > & frc::ShuffleboardContainer::AddBooleanArray ( std::string_view  title,
std::function< std::vector< int >()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
supplierthe supplier for values
Returns
a widget to display data

◆ AddCamera()

frc::ComplexWidget & frc::ShuffleboardContainer::AddCamera ( std::string_view  title,
std::string_view  cameraName,
std::span< const std::string >  cameraUrls 
)
inline

Adds a widget to this container to display a video stream.

Parameters
titlethe title of the widget
cameraNamethe name of the streamed camera
cameraUrlsthe URLs with which the dashboard can access the camera stream
Returns
a widget to display the camera stream

◆ AddDouble()

SuppliedValueWidget< double > & frc::ShuffleboardContainer::AddDouble ( std::string_view  title,
std::function< double()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
supplierthe supplier for values
Returns
a widget to display data

◆ AddDoubleArray()

SuppliedValueWidget< std::vector< double > > & frc::ShuffleboardContainer::AddDoubleArray ( std::string_view  title,
std::function< std::vector< double >()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
supplierthe supplier for values
Returns
a widget to display data

◆ AddFloat()

SuppliedValueWidget< float > & frc::ShuffleboardContainer::AddFloat ( std::string_view  title,
std::function< float()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
supplierthe supplier for values
Returns
a widget to display data

◆ AddFloatArray()

SuppliedValueWidget< std::vector< float > > & frc::ShuffleboardContainer::AddFloatArray ( std::string_view  title,
std::function< std::vector< float >()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
supplierthe supplier for values
Returns
a widget to display data

◆ AddInteger()

SuppliedValueWidget< int64_t > & frc::ShuffleboardContainer::AddInteger ( std::string_view  title,
std::function< int64_t()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
supplierthe supplier for values
Returns
a widget to display data

◆ AddIntegerArray()

SuppliedValueWidget< std::vector< int64_t > > & frc::ShuffleboardContainer::AddIntegerArray ( std::string_view  title,
std::function< std::vector< int64_t >()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
supplierthe supplier for values
Returns
a widget to display data

◆ AddNumber()

SuppliedValueWidget< double > & frc::ShuffleboardContainer::AddNumber ( std::string_view  title,
std::function< double()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
supplierthe supplier for values
Returns
a widget to display data

◆ AddNumberArray()

SuppliedValueWidget< std::vector< double > > & frc::ShuffleboardContainer::AddNumberArray ( std::string_view  title,
std::function< std::vector< double >()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
supplierthe supplier for values
Returns
a widget to display data

◆ AddPersistent() [1/11]

SimpleWidget & frc::ShuffleboardContainer::AddPersistent ( std::string_view  title,
bool  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike Add(std::string_view, bool), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than defaultValue.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
Add(std::string_view, bool) Add(std::string_view title, bool defaultValue)

◆ AddPersistent() [2/11]

SimpleWidget & frc::ShuffleboardContainer::AddPersistent ( std::string_view  title,
const nt::Value defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike Add(std::string_view, std::shared_ptr<nt::Value>), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than defaultValue.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
Add(stdd::string_view, std::shared_ptr<nt::Value>) Add(std::string_view title, std::shared_ptr<nt::Value> defaultValue)

◆ AddPersistent() [3/11]

SimpleWidget & frc::ShuffleboardContainer::AddPersistent ( std::string_view  title,
double  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike Add(std::string_view, double), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than defaultValue.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
Add(std::string_view, double) Add(std::string_view title, double defaultValue)

◆ AddPersistent() [4/11]

SimpleWidget & frc::ShuffleboardContainer::AddPersistent ( std::string_view  title,
float  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike Add(std::string_view, float), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than defaultValue.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
Add(std::string_view, float) Add(std::string_view title, float defaultValue)

◆ AddPersistent() [5/11]

SimpleWidget & frc::ShuffleboardContainer::AddPersistent ( std::string_view  title,
int  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike Add(std::string_view, int64_t), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than defaultValue.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
Add(std:string_view, int64_t) Add(std::string_view title, int64_t defaultValue)

◆ AddPersistent() [6/11]

SimpleWidget & frc::ShuffleboardContainer::AddPersistent ( std::string_view  title,
std::span< const bool >  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike Add(std::string_view, std::span<const bool>), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than defaultValue.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
Add(std::string_view, std::span<const bool>) Add(std::string_view title, std::span<const bool> defaultValue)

◆ AddPersistent() [7/11]

SimpleWidget & frc::ShuffleboardContainer::AddPersistent ( std::string_view  title,
std::span< const double >  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike Add(std::string_view, std::span<const double>), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than defaultValue.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
Add(std::string_view, std::span<const double>) Add(std::string_view title, std::span<const double> defaultValue)

◆ AddPersistent() [8/11]

SimpleWidget & frc::ShuffleboardContainer::AddPersistent ( std::string_view  title,
std::span< const float >  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike Add(std::string_view, std::span<const float>), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than defaultValue.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
Add(std::string_view, std::span<const float>) Add(std::string_view title, std::span<const float> defaultValue)

◆ AddPersistent() [9/11]

SimpleWidget & frc::ShuffleboardContainer::AddPersistent ( std::string_view  title,
std::span< const int64_t >  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike Add(std::string_view, std::span<const int64_t>), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than defaultValue.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
Add(std::string_view, std::span<const int64_t>) Add(std::string_view title, std::span<const int64_t> defaultValue)

◆ AddPersistent() [10/11]

SimpleWidget & frc::ShuffleboardContainer::AddPersistent ( std::string_view  title,
std::span< const std::string >  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike Add(std::string_view, std::span<const std::string>), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than defaultValue.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
Add(std::string_view, std::span<const std::string>) Add(std::string_view title, std::span<const std::string> defaultValue)

◆ AddPersistent() [11/11]

SimpleWidget & frc::ShuffleboardContainer::AddPersistent ( std::string_view  title,
std::string_view  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike Add(std::string_view, std::string_view), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than defaultValue.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
Add(std::string_view, std::string_view) Add(std::string_view title, std::string_view defaultValue)

◆ AddRaw() [1/2]

SuppliedValueWidget< std::vector< uint8_t > > & frc::ShuffleboardContainer::AddRaw ( std::string_view  title,
std::function< std::vector< uint8_t >()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
supplierthe supplier for values
Returns
a widget to display data

◆ AddRaw() [2/2]

SuppliedValueWidget< std::vector< uint8_t > > & frc::ShuffleboardContainer::AddRaw ( std::string_view  title,
std::string_view  typeString,
std::function< std::vector< uint8_t >()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
typeStringthe NT type string
supplierthe supplier for values
Returns
a widget to display data

◆ AddString()

SuppliedValueWidget< std::string > & frc::ShuffleboardContainer::AddString ( std::string_view  title,
std::function< std::string()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
supplierthe supplier for values
Returns
a widget to display data

◆ AddStringArray()

SuppliedValueWidget< std::vector< std::string > > & frc::ShuffleboardContainer::AddStringArray ( std::string_view  title,
std::function< std::vector< std::string >()>  supplier 
)

Adds a widget to this container.

The widget will display the data provided by the value supplier. Changes made on the dashboard will not propagate to the widget object, and will be overridden by values from the value supplier.

Parameters
titlethe title of the widget
supplierthe supplier for values
Returns
a widget to display data

◆ DisableIfActuator()

void frc::ShuffleboardContainer::DisableIfActuator ( )
overridevirtual

Disables user control of this widget in the Shuffleboard application.

This method is package-private to prevent users from enabling control themselves. Has no effect if the sendable is not marked as an actuator with SendableBuilder::SetActuator().

Reimplemented from frc::ShuffleboardValue.

◆ EnableIfActuator()

void frc::ShuffleboardContainer::EnableIfActuator ( )
overridevirtual

Enables user control of this widget in the Shuffleboard application.

This method is package-private to prevent users from enabling control themselves. Has no effect if the sendable is not marked as an actuator with SendableBuilder::SetActuator().

Reimplemented from frc::ShuffleboardValue.

◆ GetComponents()

const std::vector< std::unique_ptr< ShuffleboardComponentBase > > & frc::ShuffleboardContainer::GetComponents ( ) const

Gets the components that are direct children of this container.

◆ GetLayout() [1/4]

ShuffleboardLayout & frc::ShuffleboardContainer::GetLayout ( std::string_view  title)

Gets the already-defined layout in this container with the given title.


Shuffleboard::GetTab("Example Tab")->getLayout("My Layout",
&BuiltInLayouts.kList);

// Later...
Shuffleboard::GetTab("Example Tab")->GetLayout("My Layout");
Parameters
titlethe title of the layout to get
Returns
the layout with the given title
Exceptions
ifno layout has yet been defined with the given title

◆ GetLayout() [2/4]

ShuffleboardLayout & frc::ShuffleboardContainer::GetLayout ( std::string_view  title,
BuiltInLayouts  type 
)

Gets the layout with the given type and title, creating it if it does not already exist at the time this method is called.

Parameters
titlethe title of the layout
typethe type of the layout, eg "List" or "Grid"
Returns
the layout

◆ GetLayout() [3/4]

ShuffleboardLayout & frc::ShuffleboardContainer::GetLayout ( std::string_view  title,
const LayoutType type 
)

Gets the layout with the given type and title, creating it if it does not already exist at the time this method is called.

Parameters
titlethe title of the layout
typethe type of the layout, eg "List" or "Grid"
Returns
the layout

◆ GetLayout() [4/4]

ShuffleboardLayout & frc::ShuffleboardContainer::GetLayout ( std::string_view  title,
std::string_view  type 
)

Gets the layout with the given type and title, creating it if it does not already exist at the time this method is called.

Note: this method should only be used to use a layout type that is not already built into Shuffleboard. To use a layout built into Shuffleboard, use GetLayout(std::string_view, const LayoutType&) and the layouts in BuiltInLayouts.

Parameters
titlethe title of the layout
typethe type of the layout, eg "List Layout" or "Grid Layout"
Returns
the layout
See also
GetLayout(std::string_view, const LayoutType&)

Friends And Related Function Documentation

◆ SimpleWidget

friend class SimpleWidget
friend

Member Data Documentation

◆ m_isLayout

bool frc::ShuffleboardContainer::m_isLayout = false
protected

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