Network Table & Entry Initialization

How do I initialize NetworkTables and NetworkTable Entries in the .cpp files? I’m trying to use tables generated by ChameleonVision. Thanks

One example from the docs (this one is with GRIP, but the concept is generic):

The basic concept is:

auto table = nt::NetworkTable::GetTable("MyTable");
nt::NetworkTableEntry entry = table->GetEntry("value");
double value = entry.GetDouble(0);

How do I do it to a subtable?

You can either put the subtable name in the GetTable string (e.g. "MyTable/MySubTable") or call GetSubTable on the Table (e.g. auto subTable = table->GetSubTable("MySubTable")).

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.