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 class
NetworkTablesJNI.Helper
-
Constructor Summary
Constructors Constructor Description NetworkTablesJNI()
-
Method Summary
Modifier and Type Method Description static int
addPolledConnectionListener(int poller, boolean immediateNotify)
static int
addPolledEntryListener(int poller, int entry, int flags)
static int
addPolledEntryListener(int poller, String prefix, int flags)
static int
addPolledLogger(int poller, int minLevel, int maxLevel)
static int
callRpc(int entry, byte[] params)
static void
cancelPollConnectionListener(int poller)
static void
cancelPollEntryListener(int poller)
static void
cancelPollLogger(int poller)
static void
cancelPollRpc(int poller)
static void
cancelRpcResult(int entry, int call)
static int
createConnectionListenerPoller(int inst)
static int
createEntryListenerPoller(int inst)
static int
createInstance()
static int
createLoggerPoller(int inst)
static void
createPolledRpc(int entry, byte[] def, int poller)
static int
createRpcCallPoller(int inst)
static void
deleteAllEntries(int inst)
static void
deleteEntry(int entry)
static void
destroyConnectionListenerPoller(int poller)
static void
destroyEntryListenerPoller(int poller)
static void
destroyInstance(int inst)
static void
destroyLoggerPoller(int poller)
static void
destroyRpcCallPoller(int poller)
static void
flush(int inst)
static void
forceLoad()
Force load the library.static boolean
getBoolean(int entry, boolean defaultValue)
static boolean[]
getBooleanArray(int entry, boolean[] defaultValue)
static ConnectionInfo[]
getConnections(int inst)
static int
getDefaultInstance()
static double
getDouble(int entry, double defaultValue)
static double[]
getDoubleArray(int entry, double[] defaultValue)
static int[]
getEntries(int inst, String prefix, int types)
static int
getEntry(int inst, String key)
static int
getEntryFlags(int entry)
static EntryInfo[]
getEntryInfo(NetworkTableInstance instObject, int inst, String prefix, int types)
static EntryInfo
getEntryInfoHandle(NetworkTableInstance inst, int entry)
static long
getEntryLastChange(int entry)
static String
getEntryName(int entry)
static int
getInstanceFromHandle(int handle)
static int
getNetworkMode(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 String
getString(int entry, String defaultValue)
static String[]
getStringArray(int entry, String[] defaultValue)
static int
getType(int entry)
static NetworkTableValue
getValue(int entry)
static boolean
isConnected(int inst)
static String[]
loadEntries(int inst, String filename, String prefix)
static String[]
loadPersistent(int inst, String filename)
static long
now()
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 boolean
postRpcResponse(int entry, int call, byte[] result)
static void
removeConnectionListener(int connListener)
static void
removeEntryListener(int entryListener)
static void
removeLogger(int logger)
static void
saveEntries(int inst, String filename, String prefix)
static void
savePersistent(int inst, String filename)
static boolean
setBoolean(int entry, long time, boolean value, boolean force)
static boolean
setBooleanArray(int entry, long time, boolean[] value, boolean force)
static boolean
setDefaultBoolean(int entry, long time, boolean defaultValue)
static boolean
setDefaultBooleanArray(int entry, long time, boolean[] defaultValue)
static boolean
setDefaultDouble(int entry, long time, double defaultValue)
static boolean
setDefaultDoubleArray(int entry, long time, double[] defaultValue)
static boolean
setDefaultRaw(int entry, long time, byte[] defaultValue)
static boolean
setDefaultString(int entry, long time, String defaultValue)
static boolean
setDefaultStringArray(int entry, long time, String[] defaultValue)
static boolean
setDouble(int entry, long time, double value, boolean force)
static boolean
setDoubleArray(int entry, long time, double[] value, boolean force)
static void
setEntryFlags(int entry, int flags)
static void
setNetworkIdentity(int inst, String name)
static boolean
setRaw(int entry, long time, byte[] value, boolean force)
static boolean
setRaw(int entry, long time, ByteBuffer value, int len, boolean force)
static void
setServer(int inst, String[] serverNames, int[] ports)
static void
setServer(int inst, String serverName, int port)
static void
setServerTeam(int inst, int team, int port)
static boolean
setString(int entry, long time, String value, boolean force)
static boolean
setStringArray(int entry, long time, String[] value, boolean force)
static void
setUpdateRate(int inst, double interval)
static void
startClient(int inst)
static void
startClient(int inst, String[] serverNames, int[] ports)
static void
startClient(int inst, String serverName, int port)
static void
startClientTeam(int inst, int team, int port)
static void
startDSClient(int inst, int port)
static void
startLocal(int inst)
static void
startServer(int inst, String persistFilename, String listenAddress, int port)
static void
stopClient(int inst)
static void
stopDSClient(int inst)
static void
stopLocal(int inst)
static void
stopServer(int inst)
static boolean
waitForConnectionListenerQueue(int inst, double timeout)
static boolean
waitForEntryListenerQueue(int inst, double timeout)
static boolean
waitForLoggerQueue(int inst, double timeout)
static boolean
waitForRpcCallQueue(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
-