Create Network Table Subtable

It looks like Network Tables had an overhaul around 2017 or something which seems to be leading to some confusion on how to accomplish what we are trying to do.

Basically we want to create a new table to keep communication between the RoboRio and the Raspberry Pi separate from the existing network table communication that gets initialized on robot startup. i don’t seem to see any examples doing this. I’m also confused on how to create subtables within an existing table. I don’t see any functions that deal with creation of new tables or subtables. I see a hint that just looking for them might create a new subtable, but documentation doesn’t seem to back that up. Here is what I saw: Network Table & Entry Initialization I’m guessing @Peter_Johnson might be able to answer this one, thanks in advance!

I replied on the GitHub issue, but for people wanting to see the reply here, there is nothing special you actually need to do to create subtables. Calling getTable() will get you a table, and you can call getSubTable() on that to get another table, and that can go on as deep as you want to go. You can then call getEntry(), and one of the set*() functions to set the value for the entry. You don’t need to explicitly call anything during the sub table calls to create the table, it happens automatically, because all entries are actually just a flat map of values.

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