#include <TuioClient.h>
Public Member Functions | |
| TuioClient (int port=3333) | |
| ~TuioClient () | |
| void | connect (bool lock=false) |
| void | disconnect () |
| bool | isConnected () |
| void | addTuioListener (TuioListener *listener) |
| void | removeTuioListener (TuioListener *listener) |
| void | removeAllTuioListeners () |
| std::list< TuioObject * > | getTuioObjects () |
| std::list< TuioCursor * > | getTuioCursors () |
| TuioObject * | getTuioObject (long s_id) |
| TuioCursor * | getTuioCursor (long s_id) |
| void | lockObjectList () |
| void | unlockObjectList () |
| void | lockCursorList () |
| void | unlockCursorList () |
| void | ProcessPacket (const char *data, int size, const IpEndpointName &remoteEndpoint) |
Public Attributes | |
| UdpListeningReceiveSocket * | socket |
Protected Member Functions | |
| void | ProcessBundle (const ReceivedBundle &b, const IpEndpointName &remoteEndpoint) |
| void | ProcessMessage (const ReceivedMessage &message, const IpEndpointName &remoteEndpoint) |
TuioClient *client = new TuioClient();
client->addTuioListener(myTuioListener);
client->connect();
| TuioClient::TuioClient | ( | int | port = 3333 |
) |
This constructor creates a TuioClient that listens to the provided port
| port | the incoming TUIO UDP port number, defaults to 3333 if no argument is provided |
| TuioClient::~TuioClient | ( | ) |
The destructor is doing nothing in particular.
| void TuioClient::connect | ( | bool | lock = false |
) |
The TuioClient starts listening to TUIO messages on the configured UDP port All received TUIO messages are decoded and the resulting TUIO events are broadcasted to all registered TuioListeners
| lock | running in the background if set to false (default) |
| void TuioClient::disconnect | ( | ) |
The TuioClient stops listening to TUIO messages on the configured UDP port
| bool TUIO::TuioClient::isConnected | ( | ) | [inline] |
Returns true if this TuioClient is currently connected.
| void TuioClient::addTuioListener | ( | TuioListener * | listener | ) |
Adds the provided TuioListener to the list of registered TUIO event listeners
| listener | the TuioListener to add |
| void TuioClient::removeTuioListener | ( | TuioListener * | listener | ) |
Removes the provided TuioListener from the list of registered TUIO event listeners
| listener | the TuioListener to remove |
| void TUIO::TuioClient::removeAllTuioListeners | ( | ) | [inline] |
Removes all TuioListener from the list of registered TUIO event listeners
| std::list< TuioObject * > TuioClient::getTuioObjects | ( | ) |
Returns a List of all currently active TuioObjects
| std::list< TuioCursor * > TuioClient::getTuioCursors | ( | ) |
Returns a List of all currently active TuioCursors
| TuioObject * TuioClient::getTuioObject | ( | long | s_id | ) |
Returns the TuioObject corresponding to the provided Session ID or NULL if the Session ID does not refer to an active TuioObject
| TuioCursor * TuioClient::getTuioCursor | ( | long | s_id | ) |
Returns the TuioCursor corresponding to the provided Session ID or NULL if the Session ID does not refer to an active TuioCursor
| void TuioClient::lockObjectList | ( | ) |
Locks the TuioObject list in order to avoid updates during access
| void TuioClient::unlockObjectList | ( | ) |
Releases the lock of the TuioObject list
| void TuioClient::lockCursorList | ( | ) |
Locks the TuioCursor list in order to avoid updates during access
| void TuioClient::unlockCursorList | ( | ) |
Releases the lock of the TuioCursor list
| void TuioClient::ProcessMessage | ( | const ReceivedMessage & | message, | |
| const IpEndpointName & | remoteEndpoint | |||
| ) | [protected] |
The OSC callback method where all TUIO messages are received and decoded and where the TUIO event callbacks are dispatched
| message | the received OSC message | |
| remoteEndpoint | the received OSC message origin |
1.5.6