|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
pynetworktables - change IP address after initialization
I know this is probably a weird request. I'm working on an application that will relay I/O between our operator interface control board and the robot.
I want to add functionality to change the robot address because I will often switch to using a simulator (localhost) and our robot (roborio-4901-frc.local). I don't want to have to restart the application to do this. Here's how the code starts up the network table service: NetworkTable.setIPAddress(address) NetworkTable.setClientMode() NetworkTable.setWriteFlushPeriod(flushPeriod=flush _period) NetworkTable.initialize() What happens if I call NetworkTable.setIPAddress() after initialize is called? Can I reinitialize? Thanks, Ryan Nazaretian |
|
#2
|
||||
|
||||
|
Re: pynetworktables - change IP address after initialization
If it implements NetworkTable.shutdown() as the C++ ntcore api does, then yes. Call shutdown, then set the address, then initialize again.
|
|
#3
|
||||
|
||||
|
Re: pynetworktables - change IP address after initialization
It doesn't. Thanks though.
|
|
#4
|
||||
|
||||
|
Re: pynetworktables - change IP address after initialization
I'm anticipating rewriting NetworkTables in the style of ntcore before the start of the 2017 season, so it'll be there then.
|
|
#5
|
||||
|
||||
|
Re: pynetworktables - change IP address after initialization
Thanks for the information. I'll pick around with the code and figure out a way to accomplish this.
|
|
#6
|
||||
|
||||
|
Re: pynetworktables - change IP address after initialization
virtuald has the support integrated now.
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|