I want to use inst in another class SubscribeTables() I need it with all of its data. I tried to make a getter in Main() but it didnt work. Maybe i can pass it to another class somehow? Can someone help me with it?
Lets say i need to call inst.isConnected() in SubscribeTables()
public class Main {
public static void main(String[] args) throws IOException {
// Setup NT4 Client
NetworkTableInstance inst = NetworkTableInstance.getDefault();
inst.startClient4("FRC Stat Track");
selectNetworkTablesIP(inst, 5883);
// Connects after ~100ms
new SubscribeTables();
}
SubscribeTableswhich takes aNetworkTableInstanceas a parameter, and create a field inSubscribeTables.