|
Urbi SDK Remote for Java
2.7.3
|
UClient linux implementation with support for synchronous extra functions. More...


Public Member Functions | |
| USyncClient (long cPtr, boolean cMemoryOwn) | |
| USyncClient (String host, long port, long buflen) | |
| USyncClient (String host, long port) | |
| USyncClient (String host) | |
| void | callbackThread () |
| synchronized void | delete () |
| boolean | isCallbackThread () |
| void | lockQueue () |
| void | notifyCallbacks (UMessage msg) |
| Overriding UAbstractclient implementation. | |
| void | onConnect () |
| boolean | processEvents (long timeout) |
| Check message queue for pending messages, notify callbacks synchronously. | |
| boolean | processEvents () |
| Check message queue for pending messages, notify callbacks synchronously. | |
| void | setSynchronous (boolean enable) |
| void | stopCallbackThread () |
| Stop the callback processing thread. | |
| UMessage | syncGet (String expression) |
| Synchronously evaluate an Urbi expression. | |
| UMessage | syncGet (long useconds, String expression) |
| Synchronously evaluate an Urbi expression. | |
| int | syncGetDevice (String device, SWIGTYPE_p_double val, long useconds) |
| int | syncGetDevice (String device, SWIGTYPE_p_double val) |
| int | syncGetDevice (String device, String field, SWIGTYPE_p_double val, long useconds) |
| int | syncGetDevice (String device, String field, SWIGTYPE_p_double val) |
| int | syncGetNormalizedDevice (String device, SWIGTYPE_p_double val, long useconds) |
| int | syncGetNormalizedDevice (String device, SWIGTYPE_p_double val) |
| int | syncGetResult (String command, SWIGTYPE_p_double val, long useconds) |
| int | syncGetResult (String command, SWIGTYPE_p_double val) |
| int | syncGetSound (String device, int duration, USound sound, long useconds) |
| int | syncGetSound (String device, int duration, USound sound) |
| UMessage | syncGetTag (String expression, String mtag, String mmod) |
| UMessage | syncGetTag (long useconds, String expression, String mtag, String mmod) |
| int | syncGetValue (String valName, UValue val, long useconds) |
| int | syncGetValue (String valName, UValue val) |
| int | syncGetValue (String tag, String valName, UValue val, long useconds) |
| int | syncGetValue (String tag, String valName, UValue val) |
| void | waitForKernelVersion (boolean hasProcessingThread) |
| Block until kernel version is available or an error occurrs. | |
| UMessage | waitForTag (String tag, long useconds) |
| Wait until a message with specified tag is received. | |
| UMessage | waitForTag (String tag) |
| Wait until a message with specified tag is received. | |
Static Public Member Functions | |
| static long | getCPtr (USyncClient obj) |
Protected Member Functions | |
| void | finalize () |
UClient linux implementation with support for synchronous extra functions.
This class provides extra functions to synchronously request values. These functions can safely be called frow within a callback function.
All callbacks will be called in a separate thread created in the constructor. When one of those callbacks calls a synchronous function, new incoming messages are kept on hold until the response from the synchronous call is received.
If you want to call these callbacks in a different thread, call stopCallbackThread(), then regularly call processEvents(). Each call will call callbacks for all pending messages in the current thread.
Definition at line 27 of file USyncClient.java.
| boolean urbi.USyncClient.isCallbackThread | ( | ) |
Definition at line 224 of file USyncClient.java.
| boolean urbi.USyncClient.processEvents | ( | long | timeout | ) |
Check message queue for pending messages, notify callbacks synchronously.
| timeout | If different -1 process events for at most timeout microseconds. This is useful if you don't want processEvents() to take to much time if there are many many pending messages. |
Definition at line 178 of file USyncClient.java.
| boolean urbi.USyncClient.processEvents | ( | ) |
Check message queue for pending messages, notify callbacks synchronously.
| timeout | If different -1 process events for at most timeout microseconds. This is useful if you don't want processEvents() to take to much time if there are many many pending messages. |
Definition at line 191 of file USyncClient.java.
| void urbi.USyncClient.stopCallbackThread | ( | ) |
Stop the callback processing thread.
The user is responsible for calling processEvents() regularily once this function has been called.
Definition at line 200 of file USyncClient.java.
| UMessage urbi.USyncClient.syncGet | ( | String | expression | ) |
Synchronously evaluate an Urbi expression.
The expression must not start with a tag or channel.
Definition at line 68 of file USyncClient.java.
| UMessage urbi.USyncClient.syncGet | ( | long | useconds, |
| String | expression | ||
| ) |
Synchronously evaluate an Urbi expression.
The expression must not start with a tag or channel.
Definition at line 75 of file USyncClient.java.
| void urbi.USyncClient.waitForKernelVersion | ( | boolean | hasProcessingThread | ) |
Block until kernel version is available or an error occurrs.
Message processing must not depend on this thread.
Definition at line 215 of file USyncClient.java.
| UMessage urbi.USyncClient.waitForTag | ( | String | tag, |
| long | useconds | ||
| ) |
Wait until a message with specified tag is received.
Returned message must be deleted.
Definition at line 148 of file USyncClient.java.
| UMessage urbi.USyncClient.waitForTag | ( | String | tag | ) |
Wait until a message with specified tag is received.
Returned message must be deleted.
Definition at line 155 of file USyncClient.java.