Hey! I'm trying to get NetworkTables working, and I have a list of things I want to send to the driver station. So I'm putting values into a Subtable on the robot, and trying to read them on the DS.
Is there a way to loop through every value in an ITable (which NetworkTables extends)? I assume there is, because the TableViewer program can do it (I compiled it but can't figure it out)
Here's the code I use for putting the info into the NetworkTable.
Code:
public void sendSubsystemInfo() {
Vector list = Warp7Robot.subsystem.subsystemList;
NetworkTable subtable = (NetworkTable) table.getSubTable("Subsystems");
for (int i = 0; i < list.size(); i++) {
Subsystem s = (Subsystem) list.elementAt(i);
subtable.putBoolean(s.getName(), s.isEnabled());
}
}