View Single Post
  #7   Spotlight this post!  
Unread Today, 14:35
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 270
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: Creating a custom NetworkTable?

Quote:
Originally Posted by jcbaker4050 View Post
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)
Reply With Quote