TUIO C++ Developer API
|
#include <TuioClient.h>
Additional Inherited Members | |
Protected Attributes inherited from TUIO::TuioDispatcher | |
std::list< TuioListener * > | listenerList |
std::list< TuioObject * > | objectList |
std::list< TuioCursor * > | cursorList |
std::list< TuioBlob * > | blobList |
pthread_mutex_t | objectMutex |
pthread_mutex_t | cursorMutex |
pthread_mutex_t | blobMutex |
The TuioClient class is the central TUIO protocol decoder component. It provides a simple callback infrastructure using the TuioListener interface. In order to receive and decode TUIO messages an instance of TuioClient needs to be created. The TuioClient instance then generates TUIO events which are broadcasted to all registered classes that implement the TuioListener interface.
TuioClient *client = new TuioClient();
client->addTuioListener(myTuioListener);
client->connect();
TuioClient::TuioClient | ( | ) |
This constructor creates a TuioClient that uses an internal UdpReceiver listening to the default UDP port 3333
TuioClient::TuioClient | ( | int | port | ) |
This constructor creates a TuioClient that uses an internal UdpReceiver listening to the provided UDP port
port | the UDP port the internal UdpReceiver is listening to |
TuioClient::TuioClient | ( | OscReceiver * | oscreceiver | ) |
This constructor creates a TuioClient that uses the provided OscReceiver for the incoming OSC data
oscreceiver | the OscReceiver implementation for the chosen transport method (UDP, TCP ...) |
TuioClient::~TuioClient | ( | ) |
The destructor is doing nothing in particular.
void TuioClient::connect | ( | bool | lock = false | ) |
The TuioClient connects and starts receiving TUIO messages from its associated OscReceiver
lock | running in the background if set to false (default) |
|
inline |
Returns a List with a copy of all currently active TuioBlobs
std::list< TuioBlob > TuioClient::copyTuioBlobs | ( | int | source_id | ) |
Returns a List with a copy of all currently active TuioBlobs which are associated to the given Source ID
src_id | the source ID of the corresponding TUIO source |
|
inline |
Returns a List with a copy of all currently active TuioCursors
std::list< TuioCursor > TuioClient::copyTuioCursors | ( | int | source_id | ) |
Returns a List with a copy of all currently active TuioCursors which are associated to the given Source ID
src_id | the source ID of the corresponding TUIO source |
std::list< TuioObject > TuioClient::copyTuioObjects | ( | int | source_id | ) |
Returns a List with a copy of all currently active TuioObjects which are associated to the given Source ID
src_id | the source ID of the corresponding TUIO source |
|
inline |
Returns a List with a copy of all currently active TuioObjects
void TuioClient::disconnect | ( | ) |
The TuioClient disconnects and stops receiving TUIO messages from its associated OscReceiver
|
inline |
TuioBlob * TuioClient::getTuioBlob | ( | int | src_id, |
long | s_id | ||
) |
Returns the TuioBlob corresponding to the provided Session ID which is associated to the given Source ID or NULL if the Session ID does not refer to an active TuioBlob
src_id | the source ID of the corresponding TUIO source |
s_id | the session ID of the corresponding TuioBlob |
|
inline |
Returns a List of all currently active TuioBlobs
std::list< TuioBlob * > TuioClient::getTuioBlobs | ( | int | source_id | ) |
Returns a List of all currently active TuioBlobs which are associated to the given Source ID
src_id | the source ID of the corresponding TUIO source |
|
inline |
Returns the TuioCursor corresponding to the provided Session ID or NULL if the Session ID does not refer to an active TuioCursor
s_id | the session ID of the corresponding TuioCursor |
TuioCursor * TuioClient::getTuioCursor | ( | int | src_id, |
long | s_id | ||
) |
Returns the TuioCursor corresponding to the provided Session ID which is associated to the given Source ID or NULL if the Session ID does not refer to an active TuioCursor
src_id | the source ID of the corresponding TUIO source |
s_id | the session ID of the corresponding TuioCursor |
|
inline |
Returns a List of all currently active TuioCursors
std::list< TuioCursor * > TuioClient::getTuioCursors | ( | int | source_id | ) |
Returns a List of all currently active TuioCursors which are associated to the given Source ID
src_id | the source ID of the corresponding TUIO source |
|
inline |
Returns the TuioObject corresponding to the provided Session ID or NULL if the Session ID does not refer to an active TuioObject
s_id | the session ID of the corresponding TuioObject |
TuioObject * TuioClient::getTuioObject | ( | int | src_id, |
long | s_id | ||
) |
Returns the TuioObject corresponding to the provided Session ID which is associated to the given Source ID or NULL if the Session ID does not refer to an active TuioObject
src_id | the source ID of the corresponding TUIO source |
s_id | the session ID of the corresponding TuioObject |
|
inline |
Returns a List of all currently active TuioObjects
std::list< TuioObject * > TuioClient::getTuioObjects | ( | int | source_id | ) |
Returns a List of all currently active TuioObjects which are associated to the given Source ID
src_id | the source ID of the corresponding TUIO source |
bool TuioClient::isConnected | ( | ) |
Returns true if this TuioClient is currently connected.