mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[ntcore] Various NT4 fixes (#4474)
* TopicListener: Fix Add() return values * Update PubSubOption poll storage documentation * Update NetworkTableEntry::GetValue() doc * Add documentation regarding asynchronous callbacks * Unpublish entry: set publisher to nullptr * Implement ValueListenerPoller default constructor * Remove SetNetworkIdentity, make parameter to StartClient * URI-escape client ID, improve error message * Add connected message with client id; also improve disconnected message a bit * Handle SetServers either before or after StartClient * Fix client use-after-free; also delay reconnect after disconnect to rate limit * Don't re-announce to already subscribed client; we especially don't want to send the last value again * Always accept in-order sets, only use timestamp for tiebreak * Fix LocalStorage::StartNetwork race * Remove unused/unimplemented function Also: * [glass] Remove debug print * [glass] Fix mpack string decoding * [cameraserver] Fix up startclient
This commit is contained in:
@@ -450,16 +450,6 @@ public final class NetworkTableInstance implements AutoCloseable {
|
||||
* Client/Server Functions
|
||||
*/
|
||||
|
||||
/**
|
||||
* Set the network identity of this node. This is the name used during the initial connection
|
||||
* handshake, and is visible through ConnectionInfo on the remote node.
|
||||
*
|
||||
* @param name identity to advertise
|
||||
*/
|
||||
public void setNetworkIdentity(String name) {
|
||||
NetworkTablesJNI.setNetworkIdentity(m_handle, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current network mode.
|
||||
*
|
||||
@@ -541,14 +531,22 @@ public final class NetworkTableInstance implements AutoCloseable {
|
||||
NetworkTablesJNI.stopServer(m_handle);
|
||||
}
|
||||
|
||||
/** Starts a NT3 client. Use SetServer or SetServerTeam to set the server name and port. */
|
||||
public void startClient3() {
|
||||
NetworkTablesJNI.startClient3(m_handle);
|
||||
/**
|
||||
* Starts a NT3 client. Use SetServer or SetServerTeam to set the server name and port.
|
||||
*
|
||||
* @param identity network identity to advertise (cannot be empty string)
|
||||
*/
|
||||
public void startClient3(String identity) {
|
||||
NetworkTablesJNI.startClient3(m_handle, identity);
|
||||
}
|
||||
|
||||
/** Starts a NT4 client. Use SetServer or SetServerTeam to set the server name and port. */
|
||||
public void startClient4() {
|
||||
NetworkTablesJNI.startClient4(m_handle);
|
||||
/**
|
||||
* Starts a NT4 client. Use SetServer or SetServerTeam to set the server name and port.
|
||||
*
|
||||
* @param identity network identity to advertise (cannot be empty string)
|
||||
*/
|
||||
public void startClient4(String identity) {
|
||||
NetworkTablesJNI.startClient4(m_handle, identity);
|
||||
}
|
||||
|
||||
/** Stops the client if it is running. */
|
||||
|
||||
@@ -234,8 +234,6 @@ public final class NetworkTablesJNI {
|
||||
|
||||
public static native void removeConnectionListener(int connListener);
|
||||
|
||||
public static native void setNetworkIdentity(int inst, String name);
|
||||
|
||||
public static native int getNetworkMode(int inst);
|
||||
|
||||
public static native void startLocal(int inst);
|
||||
@@ -247,9 +245,9 @@ public final class NetworkTablesJNI {
|
||||
|
||||
public static native void stopServer(int inst);
|
||||
|
||||
public static native void startClient3(int inst);
|
||||
public static native void startClient3(int inst, String identity);
|
||||
|
||||
public static native void startClient4(int inst);
|
||||
public static native void startClient4(int inst, String identity);
|
||||
|
||||
public static native void stopClient(int inst);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user