|
WPILibC++
2020.3.2
|
Common interface for objects that can contain shuffleboard components. More...
#include <ShuffleboardContainer.h>
Public Member Functions | |
| ShuffleboardContainer (const wpi::Twine &title) | |
| ShuffleboardContainer (ShuffleboardContainer &&rhs)=default | |
| const std::vector< std::unique_ptr< ShuffleboardComponentBase > > & | GetComponents () const |
| Gets the components that are direct children of this container. | |
| ShuffleboardLayout & | GetLayout (const wpi::Twine &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... | |
| ShuffleboardLayout & | GetLayout (const wpi::Twine &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... | |
| ShuffleboardLayout & | GetLayout (const wpi::Twine &title, const wpi::Twine &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... | |
| ShuffleboardLayout & | GetLayout (const wpi::Twine &title) |
| Gets the already-defined layout in this container with the given title. More... | |
| ComplexWidget & | Add (const wpi::Twine &title, Sendable &sendable) |
| Adds a widget to this container to display the given sendable. More... | |
| ComplexWidget & | Add (const wpi::Twine &title, const cs::VideoSource &video) |
| Adds a widget to this container to display the given video stream. More... | |
| ComplexWidget & | Add (Sendable &sendable) |
| Adds a widget to this container to display the given sendable. More... | |
| ComplexWidget & | Add (const cs::VideoSource &video) |
| Adds a widget to this container to display the given video stream. More... | |
| SimpleWidget & | Add (const wpi::Twine &title, std::shared_ptr< nt::Value > defaultValue) |
| Adds a widget to this container to display the given data. More... | |
| SimpleWidget & | Add (const wpi::Twine &title, bool defaultValue) |
| Adds a widget to this container to display the given data. More... | |
| SimpleWidget & | Add (const wpi::Twine &title, double defaultValue) |
| Adds a widget to this container to display the given data. More... | |
| SimpleWidget & | Add (const wpi::Twine &title, int defaultValue) |
| Adds a widget to this container to display the given data. More... | |
| SimpleWidget & | Add (const wpi::Twine &title, const wpi::Twine &defaultValue) |
| Adds a widget to this container to display the given data. More... | |
| SimpleWidget & | Add (const wpi::Twine &title, const char *defaultValue) |
| Adds a widget to this container to display the given data. More... | |
| SimpleWidget & | Add (const wpi::Twine &title, wpi::ArrayRef< bool > defaultValue) |
| Adds a widget to this container to display the given data. More... | |
| SimpleWidget & | Add (const wpi::Twine &title, wpi::ArrayRef< double > defaultValue) |
| Adds a widget to this container to display the given data. More... | |
| SimpleWidget & | Add (const wpi::Twine &title, wpi::ArrayRef< std::string > defaultValue) |
| Adds a widget to this container to display the given data. More... | |
| SuppliedValueWidget< std::string > & | AddString (const wpi::Twine &title, std::function< std::string()> supplier) |
| Adds a widget to this container. More... | |
| SuppliedValueWidget< double > & | AddNumber (const wpi::Twine &title, std::function< double()> supplier) |
| Adds a widget to this container. More... | |
| SuppliedValueWidget< bool > & | AddBoolean (const wpi::Twine &title, std::function< bool()> supplier) |
| Adds a widget to this container. More... | |
| SuppliedValueWidget< std::vector< std::string > > & | AddStringArray (const wpi::Twine &title, std::function< std::vector< std::string >()> supplier) |
| Adds a widget to this container. More... | |
| SuppliedValueWidget< std::vector< double > > & | AddNumberArray (const wpi::Twine &title, std::function< std::vector< double >()> supplier) |
| Adds a widget to this container. More... | |
| SuppliedValueWidget< std::vector< int > > & | AddBooleanArray (const wpi::Twine &title, std::function< std::vector< int >()> supplier) |
| Adds a widget to this container. More... | |
| SuppliedValueWidget< wpi::StringRef > & | AddRaw (const wpi::Twine &title, std::function< wpi::StringRef()> supplier) |
| Adds a widget to this container. More... | |
| SimpleWidget & | AddPersistent (const wpi::Twine &title, std::shared_ptr< nt::Value > defaultValue) |
| Adds a widget to this container to display a simple piece of data. More... | |
| SimpleWidget & | AddPersistent (const wpi::Twine &title, bool defaultValue) |
| Adds a widget to this container to display a simple piece of data. More... | |
| SimpleWidget & | AddPersistent (const wpi::Twine &title, double defaultValue) |
| Adds a widget to this container to display a simple piece of data. More... | |
| SimpleWidget & | AddPersistent (const wpi::Twine &title, int defaultValue) |
| Adds a widget to this container to display a simple piece of data. More... | |
| SimpleWidget & | AddPersistent (const wpi::Twine &title, const wpi::Twine &defaultValue) |
| Adds a widget to this container to display a simple piece of data. More... | |
| SimpleWidget & | AddPersistent (const wpi::Twine &title, wpi::ArrayRef< bool > defaultValue) |
| Adds a widget to this container to display a simple piece of data. More... | |
| SimpleWidget & | AddPersistent (const wpi::Twine &title, wpi::ArrayRef< double > defaultValue) |
| Adds a widget to this container to display a simple piece of data. More... | |
| SimpleWidget & | AddPersistent (const wpi::Twine &title, wpi::ArrayRef< 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 (const wpi::Twine &title) | |
| wpi::StringRef | GetTitle () const |
| Gets the title of this Shuffleboard value. | |
| virtual void | BuildInto (std::shared_ptr< nt::NetworkTable > parentTable, std::shared_ptr< nt::NetworkTable > metaTable)=0 |
| Builds the entries for this value. More... | |
Public Member Functions inherited from frc::ErrorBase | |
| ErrorBase (const ErrorBase &)=default | |
| ErrorBase & | operator= (const ErrorBase &)=default |
| ErrorBase (ErrorBase &&)=default | |
| ErrorBase & | operator= (ErrorBase &&)=default |
| virtual Error & | GetError () |
| Retrieve the current error. More... | |
| virtual const Error & | GetError () const |
| Retrieve the current error. More... | |
| virtual void | ClearError () const |
| Clear the current error information associated with this sensor. | |
| virtual void | SetErrnoError (const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const |
| Set error information associated with a C library call that set an error to the "errno" global variable. More... | |
| virtual void | SetImaqError (int success, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const |
| Set the current error information associated from the nivision Imaq API. More... | |
| virtual void | SetError (Error::Code code, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const |
| Set the current error information associated with this sensor. More... | |
| virtual void | SetErrorRange (Error::Code code, int32_t minRange, int32_t maxRange, int32_t requestedValue, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const |
| Set the current error information associated with this sensor. More... | |
| virtual void | SetWPIError (const wpi::Twine &errorMessage, Error::Code code, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) const |
| Set the current error information associated with this sensor. More... | |
| virtual void | CloneError (const ErrorBase &rhs) const |
| virtual bool | StatusIsFatal () const |
| Check if the current error code represents a fatal error. More... | |
| void | ClearGlobalErrors () |
| Clear global errors. | |
Protected Attributes | |
| bool | m_isLayout = false |
Protected Attributes inherited from frc::ErrorBase | |
| Error | m_error |
Friends | |
| class | SimpleWidget |
Additional Inherited Members | |
Static Public Member Functions inherited from frc::ErrorBase | |
| static void | SetGlobalError (Error::Code code, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) |
| static void | SetGlobalWPIError (const wpi::Twine &errorMessage, const wpi::Twine &contextMessage, wpi::StringRef filename, wpi::StringRef function, int lineNumber) |
| static Error | GetGlobalError () |
| Retrieve the last global error. | |
| static std::vector< Error > | GetGlobalErrors () |
| Retrieve all global errors. | |
Common interface for objects that can contain shuffleboard components.
|
inline |
Adds a widget to this container to display the given video stream.
| video | the video to display |
| IllegalArgumentException | if a widget already exists in this container with the same title as the video source |
| SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
| bool | defaultValue | ||
| ) |
Adds a widget to this container to display the given data.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| IllegalArgumentException | if a widget already exists in this container with the given title |
| SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
| const char * | defaultValue | ||
| ) |
Adds a widget to this container to display the given data.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| IllegalArgumentException | if a widget already exists in this container with the given title |
|
inline |
Adds a widget to this container to display the given video stream.
| title | the title of the widget |
| video | the video stream to display |
| IllegalArgumentException | if a widget already exists in this container with the given title |
| SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
| const wpi::Twine & | defaultValue | ||
| ) |
Adds a widget to this container to display the given data.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| IllegalArgumentException | if a widget already exists in this container with the given title |
| SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
| double | defaultValue | ||
| ) |
Adds a widget to this container to display the given data.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| IllegalArgumentException | if a widget already exists in this container with the given title |
| SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
| int | defaultValue | ||
| ) |
Adds a widget to this container to display the given data.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| IllegalArgumentException | if a widget already exists in this container with the given title |
| ComplexWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
| Sendable & | sendable | ||
| ) |
Adds a widget to this container to display the given sendable.
| title | the title of the widget |
| sendable | the sendable to display |
| IllegalArgumentException | if a widget already exists in this container with the given title |
| SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
| std::shared_ptr< nt::Value > | defaultValue | ||
| ) |
Adds a widget to this container to display the given data.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| IllegalArgumentException | if a widget already exists in this container with the given title |
| SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
| wpi::ArrayRef< bool > | defaultValue | ||
| ) |
Adds a widget to this container to display the given data.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| IllegalArgumentException | if a widget already exists in this container with the given title |
| SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
| wpi::ArrayRef< double > | defaultValue | ||
| ) |
Adds a widget to this container to display the given data.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| IllegalArgumentException | if a widget already exists in this container with the given title |
| SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
| wpi::ArrayRef< std::string > | defaultValue | ||
| ) |
Adds a widget to this container to display the given data.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| IllegalArgumentException | if a widget already exists in this container with the given title |
| ComplexWidget& frc::ShuffleboardContainer::Add | ( | Sendable & | sendable | ) |
Adds a widget to this container to display the given sendable.
| sendable | the sendable to display |
| IllegalArgumentException | if a widget already exists in this container with the given title, or if the sendable's name has not been specified |
| SuppliedValueWidget<bool>& frc::ShuffleboardContainer::AddBoolean | ( | const wpi::Twine & | 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.
| title | the title of the widget |
| valueSupplier | the supplier for values |
| SuppliedValueWidget<std::vector<int> >& frc::ShuffleboardContainer::AddBooleanArray | ( | const wpi::Twine & | 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.
| title | the title of the widget |
| valueSupplier | the supplier for values |
| SuppliedValueWidget<double>& frc::ShuffleboardContainer::AddNumber | ( | const wpi::Twine & | 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.
| title | the title of the widget |
| valueSupplier | the supplier for values |
| SuppliedValueWidget<std::vector<double> >& frc::ShuffleboardContainer::AddNumberArray | ( | const wpi::Twine & | 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.
| title | the title of the widget |
| valueSupplier | the supplier for values |
| SimpleWidget& frc::ShuffleboardContainer::AddPersistent | ( | const wpi::Twine & | title, |
| bool | defaultValue | ||
| ) |
Adds a widget to this container to display a simple piece of data.
Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than
.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| SimpleWidget& frc::ShuffleboardContainer::AddPersistent | ( | const wpi::Twine & | title, |
| const wpi::Twine & | defaultValue | ||
| ) |
Adds a widget to this container to display a simple piece of data.
Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than
.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| SimpleWidget& frc::ShuffleboardContainer::AddPersistent | ( | const wpi::Twine & | title, |
| double | defaultValue | ||
| ) |
Adds a widget to this container to display a simple piece of data.
Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than
.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| SimpleWidget& frc::ShuffleboardContainer::AddPersistent | ( | const wpi::Twine & | title, |
| int | defaultValue | ||
| ) |
Adds a widget to this container to display a simple piece of data.
Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than
.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| SimpleWidget& frc::ShuffleboardContainer::AddPersistent | ( | const wpi::Twine & | title, |
| std::shared_ptr< nt::Value > | defaultValue | ||
| ) |
Adds a widget to this container to display a simple piece of data.
Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than
.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| SimpleWidget& frc::ShuffleboardContainer::AddPersistent | ( | const wpi::Twine & | title, |
| wpi::ArrayRef< bool > | defaultValue | ||
| ) |
Adds a widget to this container to display a simple piece of data.
Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than
.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| SimpleWidget& frc::ShuffleboardContainer::AddPersistent | ( | const wpi::Twine & | title, |
| wpi::ArrayRef< double > | defaultValue | ||
| ) |
Adds a widget to this container to display a simple piece of data.
Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than
.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| SimpleWidget& frc::ShuffleboardContainer::AddPersistent | ( | const wpi::Twine & | title, |
| wpi::ArrayRef< std::string > | defaultValue | ||
| ) |
Adds a widget to this container to display a simple piece of data.
Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than
.
| title | the title of the widget |
| defaultValue | the default value of the widget |
| SuppliedValueWidget<wpi::StringRef>& frc::ShuffleboardContainer::AddRaw | ( | const wpi::Twine & | title, |
| std::function< wpi::StringRef()> | 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.
| title | the title of the widget |
| valueSupplier | the supplier for values |
| SuppliedValueWidget<std::string>& frc::ShuffleboardContainer::AddString | ( | const wpi::Twine & | 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.
| title | the title of the widget |
| valueSupplier | the supplier for values |
| SuppliedValueWidget<std::vector<std::string> >& frc::ShuffleboardContainer::AddStringArray | ( | const wpi::Twine & | 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.
| title | the title of the widget |
| valueSupplier | the supplier for values |
|
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.
|
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.
| ShuffleboardLayout& frc::ShuffleboardContainer::GetLayout | ( | const wpi::Twine & | title | ) |
Gets the already-defined layout in this container with the given title.
| title | the title of the layout to get |
| if | no layout has yet been defined with the given title |
| ShuffleboardLayout& frc::ShuffleboardContainer::GetLayout | ( | const wpi::Twine & | 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.
| title | the title of the layout |
| layoutType | the type of the layout, eg "List" or "Grid" |
| ShuffleboardLayout& frc::ShuffleboardContainer::GetLayout | ( | const wpi::Twine & | 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.
| title | the title of the layout |
| layoutType | the type of the layout, eg "List" or "Grid" |
| ShuffleboardLayout& frc::ShuffleboardContainer::GetLayout | ( | const wpi::Twine & | title, |
| const wpi::Twine & | 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(String, LayoutType) and the layouts in {}. title the title of the layout type the type of the layout, eg "List Layout" or "Grid Layout" the layout #GetLayout(String, LayoutType)