Package edu.wpi.first.networktables
Class NetworkTablesJNI
java.lang.Object
edu.wpi.first.networktables.NetworkTablesJNI
public final class NetworkTablesJNI extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNetworkTablesJNI.Helper -
Constructor Summary
Constructors Constructor Description NetworkTablesJNI() -
Method Summary
Modifier and Type Method Description static intaddPolledConnectionListener(int poller, boolean immediateNotify)static intaddPolledEntryListener(int poller, int entry, int flags)static intaddPolledEntryListener(int poller, String prefix, int flags)static intaddPolledLogger(int poller, int minLevel, int maxLevel)static intcallRpc(int entry, byte[] params)static voidcancelPollConnectionListener(int poller)static voidcancelPollEntryListener(int poller)static voidcancelPollLogger(int poller)static voidcancelPollRpc(int poller)static voidcancelRpcResult(int entry, int call)static intcreateConnectionListenerPoller(int inst)static intcreateEntryListenerPoller(int inst)static intcreateInstance()static intcreateLoggerPoller(int inst)static voidcreatePolledRpc(int entry, byte[] def, int poller)static intcreateRpcCallPoller(int inst)static voiddeleteAllEntries(int inst)static voiddeleteEntry(int entry)static voiddestroyConnectionListenerPoller(int poller)static voiddestroyEntryListenerPoller(int poller)static voiddestroyInstance(int inst)static voiddestroyLoggerPoller(int poller)static voiddestroyRpcCallPoller(int poller)static voidflush(int inst)static voidforceLoad()Force load the library.static booleangetBoolean(int entry, boolean defaultValue)static boolean[]getBooleanArray(int entry, boolean[] defaultValue)static ConnectionInfo[]getConnections(int inst)static intgetDefaultInstance()static doublegetDouble(int entry, double defaultValue)static double[]getDoubleArray(int entry, double[] defaultValue)static int[]getEntries(int inst, String prefix, int types)static intgetEntry(int inst, String key)static intgetEntryFlags(int entry)static EntryInfo[]getEntryInfo(NetworkTableInstance instObject, int inst, String prefix, int types)static EntryInfogetEntryInfoHandle(NetworkTableInstance inst, int entry)static longgetEntryLastChange(int entry)static StringgetEntryName(int entry)static intgetInstanceFromHandle(int handle)static intgetNetworkMode(int inst)static byte[]getRaw(int entry, byte[] defaultValue)static byte[]getRpc(int entry, byte[] defaultValue)static byte[]getRpcResult(int entry, int call)static byte[]getRpcResult(int entry, int call, double timeout)static StringgetString(int entry, String defaultValue)static String[]getStringArray(int entry, String[] defaultValue)static intgetType(int entry)static NetworkTableValuegetValue(int entry)static booleanisConnected(int inst)static String[]loadEntries(int inst, String filename, String prefix)static String[]loadPersistent(int inst, String filename)static longnow()static ConnectionNotification[]pollConnectionListener(NetworkTableInstance inst, int poller)static ConnectionNotification[]pollConnectionListenerTimeout(NetworkTableInstance inst, int poller, double timeout)static EntryNotification[]pollEntryListener(NetworkTableInstance inst, int poller)static EntryNotification[]pollEntryListenerTimeout(NetworkTableInstance inst, int poller, double timeout)static LogMessage[]pollLogger(NetworkTableInstance inst, int poller)static LogMessage[]pollLoggerTimeout(NetworkTableInstance inst, int poller, double timeout)static RpcAnswer[]pollRpc(NetworkTableInstance inst, int poller)static RpcAnswer[]pollRpcTimeout(NetworkTableInstance inst, int poller, double timeout)static booleanpostRpcResponse(int entry, int call, byte[] result)static voidremoveConnectionListener(int connListener)static voidremoveEntryListener(int entryListener)static voidremoveLogger(int logger)static voidsaveEntries(int inst, String filename, String prefix)static voidsavePersistent(int inst, String filename)static booleansetBoolean(int entry, long time, boolean value, boolean force)static booleansetBooleanArray(int entry, long time, boolean[] value, boolean force)static booleansetDefaultBoolean(int entry, long time, boolean defaultValue)static booleansetDefaultBooleanArray(int entry, long time, boolean[] defaultValue)static booleansetDefaultDouble(int entry, long time, double defaultValue)static booleansetDefaultDoubleArray(int entry, long time, double[] defaultValue)static booleansetDefaultRaw(int entry, long time, byte[] defaultValue)static booleansetDefaultString(int entry, long time, String defaultValue)static booleansetDefaultStringArray(int entry, long time, String[] defaultValue)static booleansetDouble(int entry, long time, double value, boolean force)static booleansetDoubleArray(int entry, long time, double[] value, boolean force)static voidsetEntryFlags(int entry, int flags)static voidsetNetworkIdentity(int inst, String name)static booleansetRaw(int entry, long time, byte[] value, boolean force)static booleansetRaw(int entry, long time, ByteBuffer value, int len, boolean force)static voidsetServer(int inst, String[] serverNames, int[] ports)static voidsetServer(int inst, String serverName, int port)static voidsetServerTeam(int inst, int team, int port)static booleansetString(int entry, long time, String value, boolean force)static booleansetStringArray(int entry, long time, String[] value, boolean force)static voidsetUpdateRate(int inst, double interval)static voidstartClient(int inst)static voidstartClient(int inst, String[] serverNames, int[] ports)static voidstartClient(int inst, String serverName, int port)static voidstartClientTeam(int inst, int team, int port)static voidstartDSClient(int inst, int port)static voidstartLocal(int inst)static voidstartServer(int inst, String persistFilename, String listenAddress, int port)static voidstopClient(int inst)static voidstopDSClient(int inst)static voidstopLocal(int inst)static voidstopServer(int inst)static booleanwaitForConnectionListenerQueue(int inst, double timeout)static booleanwaitForEntryListenerQueue(int inst, double timeout)static booleanwaitForLoggerQueue(int inst, double timeout)static booleanwaitForRpcCallQueue(int inst, double timeout)
-
Constructor Details
-
NetworkTablesJNI
public NetworkTablesJNI()
-
-
Method Details
-
forceLoad
Force load the library.- Throws:
IOException- if the library fails to load
-
getDefaultInstance
-
createInstance
-
destroyInstance
-
getInstanceFromHandle
-
getEntry
-
getEntries
-
getEntryName
-
getEntryLastChange
-
getType
-
setBoolean
-
setDouble
-
setString
-
setRaw
-
setRaw
-
setBooleanArray
-
setDoubleArray
-
setStringArray
-
getValue
-
getBoolean
-
getDouble
-
getString
-
getRaw
-
getBooleanArray
-
getDoubleArray
-
getStringArray
-
setDefaultBoolean
-
setDefaultDouble
-
setDefaultString
-
setDefaultRaw
-
setDefaultBooleanArray
-
setDefaultDoubleArray
-
setDefaultStringArray
-
setEntryFlags
-
getEntryFlags
-
deleteEntry
-
deleteAllEntries
-
getEntryInfoHandle
-
getEntryInfo
public static EntryInfo[] getEntryInfo(NetworkTableInstance instObject, int inst, String prefix, int types) -
createEntryListenerPoller
-
destroyEntryListenerPoller
-
addPolledEntryListener
-
addPolledEntryListener
-
pollEntryListener
public static EntryNotification[] pollEntryListener(NetworkTableInstance inst, int poller) throws InterruptedException- Throws:
InterruptedException
-
pollEntryListenerTimeout
public static EntryNotification[] pollEntryListenerTimeout(NetworkTableInstance inst, int poller, double timeout) throws InterruptedException- Throws:
InterruptedException
-
cancelPollEntryListener
-
removeEntryListener
-
waitForEntryListenerQueue
-
createConnectionListenerPoller
-
destroyConnectionListenerPoller
-
addPolledConnectionListener
-
pollConnectionListener
public static ConnectionNotification[] pollConnectionListener(NetworkTableInstance inst, int poller) throws InterruptedException- Throws:
InterruptedException
-
pollConnectionListenerTimeout
public static ConnectionNotification[] pollConnectionListenerTimeout(NetworkTableInstance inst, int poller, double timeout) throws InterruptedException- Throws:
InterruptedException
-
cancelPollConnectionListener
-
removeConnectionListener
-
waitForConnectionListenerQueue
-
createRpcCallPoller
-
destroyRpcCallPoller
-
createPolledRpc
-
pollRpc
public static RpcAnswer[] pollRpc(NetworkTableInstance inst, int poller) throws InterruptedException- Throws:
InterruptedException
-
pollRpcTimeout
public static RpcAnswer[] pollRpcTimeout(NetworkTableInstance inst, int poller, double timeout) throws InterruptedException- Throws:
InterruptedException
-
cancelPollRpc
-
waitForRpcCallQueue
-
postRpcResponse
-
callRpc
-
getRpcResult
-
getRpcResult
-
cancelRpcResult
-
getRpc
-
setNetworkIdentity
-
getNetworkMode
-
startLocal
-
stopLocal
-
startServer
-
stopServer
-
startClient
-
startClient
-
startClient
-
startClientTeam
-
stopClient
-
setServer
-
setServer
-
setServerTeam
-
startDSClient
-
stopDSClient
-
setUpdateRate
-
flush
-
getConnections
-
isConnected
-
savePersistent
- Throws:
PersistentException
-
loadPersistent
- Throws:
PersistentException
-
saveEntries
public static void saveEntries(int inst, String filename, String prefix) throws PersistentException- Throws:
PersistentException
-
loadEntries
public static String[] loadEntries(int inst, String filename, String prefix) throws PersistentException- Throws:
PersistentException
-
now
-
createLoggerPoller
-
destroyLoggerPoller
-
addPolledLogger
-
pollLogger
public static LogMessage[] pollLogger(NetworkTableInstance inst, int poller) throws InterruptedException- Throws:
InterruptedException
-
pollLoggerTimeout
public static LogMessage[] pollLoggerTimeout(NetworkTableInstance inst, int poller, double timeout) throws InterruptedException- Throws:
InterruptedException
-
cancelPollLogger
-
removeLogger
-
waitForLoggerQueue
-