mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Split Sendable into NT and non-NT portions (#3432)
The non-NT portion has been moved to wpiutil. The NT portion has been moved to ntcore (as NTSendable). SendableBuilder similarly split and moved. SendableRegistry moved to wpiutil. In C++, SendableHelper also moved to wpiutil. This enables use of Sendable from wpimath and also enables moving several classes from wpilib to wpimath.
This commit is contained in:
@@ -11,17 +11,16 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <networktables/NTSendableBuilder.h>
|
||||
#include <networktables/NetworkTable.h>
|
||||
#include <networktables/NetworkTableEntry.h>
|
||||
#include <networktables/NetworkTableValue.h>
|
||||
#include <wpi/SmallVector.h>
|
||||
#include <wpi/span.h>
|
||||
|
||||
#include "frc/smartdashboard/SendableBuilder.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
class SendableBuilderImpl : public SendableBuilder {
|
||||
class SendableBuilderImpl : public nt::NTSendableBuilder {
|
||||
public:
|
||||
SendableBuilderImpl() = default;
|
||||
~SendableBuilderImpl() override = default;
|
||||
@@ -46,7 +45,7 @@ class SendableBuilderImpl : public SendableBuilder {
|
||||
* Return whether this sendable has an associated table.
|
||||
* @return True if it has a table, false if not.
|
||||
*/
|
||||
bool HasTable() const;
|
||||
bool IsPublished() const override;
|
||||
|
||||
/**
|
||||
* Return whether this sendable should be treated as an actuator.
|
||||
@@ -57,7 +56,7 @@ class SendableBuilderImpl : public SendableBuilder {
|
||||
/**
|
||||
* Update the network table values by calling the getters for all properties.
|
||||
*/
|
||||
void UpdateTable();
|
||||
void Update() override;
|
||||
|
||||
/**
|
||||
* Hook setters for all properties.
|
||||
@@ -84,7 +83,7 @@ class SendableBuilderImpl : public SendableBuilder {
|
||||
/**
|
||||
* Clear properties.
|
||||
*/
|
||||
void ClearProperties();
|
||||
void ClearProperties() override;
|
||||
|
||||
void SetSmartDashboardType(std::string_view type) override;
|
||||
void SetActuator(bool value) override;
|
||||
|
||||
Reference in New Issue
Block a user