mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
[ntcore] NetworkTables 4 (#3217)
This commit is contained in:
@@ -5,10 +5,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <networktables/GenericEntry.h>
|
||||
#include <networktables/NetworkTable.h>
|
||||
#include <networktables/NetworkTableEntry.h>
|
||||
|
||||
#include "frc/shuffleboard/ShuffleboardWidget.h"
|
||||
|
||||
@@ -26,14 +27,24 @@ class SimpleWidget final : public ShuffleboardWidget<SimpleWidget> {
|
||||
|
||||
/**
|
||||
* Gets the NetworkTable entry that contains the data for this widget.
|
||||
* The widget owns the entry.
|
||||
*/
|
||||
nt::NetworkTableEntry GetEntry();
|
||||
nt::GenericEntry& GetEntry();
|
||||
|
||||
/**
|
||||
* Gets the NetworkTable entry that contains the data for this widget.
|
||||
* The widget owns the entry.
|
||||
*
|
||||
* @param typeString NT type string
|
||||
*/
|
||||
nt::GenericEntry& GetEntry(std::string_view typeString);
|
||||
|
||||
void BuildInto(std::shared_ptr<nt::NetworkTable> parentTable,
|
||||
std::shared_ptr<nt::NetworkTable> metaTable) override;
|
||||
|
||||
private:
|
||||
nt::NetworkTableEntry m_entry;
|
||||
nt::GenericEntry m_entry;
|
||||
std::string m_typeString;
|
||||
|
||||
void ForceGenerate();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user