|
Re: Creating a custom NetworkTable?
Quote:
Originally Posted by jcbaker4050
As far as the table creation, I work with databases in my 8-5, so in my mind, a table doesn't exist unless you create it explicitly. Kind of funny how experience can help determine perspectives.
|
Tables in NetworkTables are a convention to help organize keys into logical groupings by using "/" as a separator; the actual NetworkTables key namespace is flat. Tables themselves don't really exist (except as an object in your code to keep track of the table path for convenience sake), so it's not actually necessary to create or delete them.
For example, getTable("/").putNumber("foo/bar", 5) and getTable("/foo").putNumber("bar", 5) are exactly equivalent (both set the key "/foo/bar" to 5).
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC
2010 FRC World Champions ( 294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
|