SETO_OSCTUIOServer

superclass: SETOServer


/*

Author: 

2004, 2005, 2006, 2007, 2008

Till Bovermann 

Neuroinformatics Group 

Faculty of Technology 

Bielefeld University

Germany

*/


a server fullfilling the TUIO-Specs (bielefeld flavour).

drawbacks:

no 'P' symbols are yet handled...




*new(formatString, netaddr, setoClass)

formatString a format String (explained in [SETObject])

netaddr a netaddr default nothing, listening to all. 

setoClass the Class of the created objects. 

Must be a subclass of [SETObject], defaults to SETObject.


start

starts listening

stop

stops litening

gui

creates a gui representing recognized objects




Examples / Tests:


// create a server and start it...

(

// ... listening to all messages from priamos

//t = SETO_OSCTUIOServer('_ixya', NetAddr("priamos.techfak.uni-bielefeld.de", nil)); 

// ... or

t = SETO_OSCTUIOServer("_ixya", nil, SETObject); // listen to all messages from anywhere

t.start;

// inspect its behavior

//i = t.inspect;


g = t.gui;



// send him messages

a = NetAddr.localAddr;


a.sendMsg("/tuio/_ixya", \set, 1, 42, 0.5, 0.5, 2pi.rand, 0, 0, 0); 

a.sendMsg('/tuio/_ixya', \alive, 42);

i.update;


)


a.sendMsg('/tuio/_ixya', \set, 2, 43, 0.5, 0.8, 2pi.rand, 0, 0, 0);

a.sendMsg('/tuio/_ixya', \alive, 42, 43);

i.update;


a.sendMsg('/tuio/_ixya', \set, 3, 44, 0.5, 0.6, 2pi.rand, 0, 0, 0);

a.sendMsg('/tuio/_ixya', \alive, 42, 43, 44);

i.update;


a.sendMsg('/tuio/_ixya', \set, 4, 45, 0.5, 0.5, 2pi.rand, 0, 0, 0);

a.sendMsg('/tuio/_ixya', \alive, 42, 43, 44, 45);

i.update;




// send alive messages

a.sendMsg('/tuio/_ixya', \alive, 42, 43, 44, 45);

i.update

// 45 does not exist

a.sendMsg('/tuio/_ixya', \alive, 42, 43, 44);

i.update


a.sendMsg('/tuio/_ixya', \alive);

i.update;




t.stop





// create a server and start it... now using 3D axis notation

(

// ... listening to all messages from priamos

//t = SETO_OSCTUIOServer('_ixya', NetAddr("priamos.techfak.uni-bielefeld.de", nil)); 

// ... or

t = SETO_OSCTUIOServer("_ixyzuvw", nil, SETObject); // listen to all messages from anywhere

t.start;

// inspect its behavior

i = t.inspect;


g = t.gui;



// send him messages

n = NetAddr.localAddr;


n.sendMsg('/tuio/_ixyzuvw', \set, 1, 42, 0.7.rand, 0.5, 2pi.rand, 10, 20, 30.rand); 

n.sendMsg('/tuio/_ixyzuvw', \alive, 1);

i.update;


)