2 /*******************************************************************************/
3 /* Copyright (C) 2010 Jonathan Moore Liles */
5 /* This program is free software; you can redistribute it and/or modify it */
6 /* under the terms of the GNU General Public License as published by the */
7 /* Free Software Foundation; either version 2 of the License, or (at your */
8 /* option) any later version. */
10 /* This program is distributed in the hope that it will be useful, but WITHOUT */
11 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
12 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for */
15 /* You should have received a copy of the GNU General Public License along */
16 /* with This program; see the file COPYING. If not,write to the Free Software */
17 /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
18 /*******************************************************************************/
31 #pragma GCC diagnostic ignored "-Wunused-parameter"
42 _path = _typespec = _documentation = 0;
57 int Signal::next_id = 0;
60 Signal::Signal ( const char *path, Direction dir )
63 _path = strdup( path );
70 _connection_state_callback = 0;
71 _connection_state_userdata = 0;
78 _endpoint->del_signal( this );
88 Signal::rename ( const char *path )
90 DMESSAGE( "Renaming signal %s to %s", this->path(), path );
93 _path = strdup( path );
95 _endpoint->send_signal_rename_notifications( this );
99 Signal::is_connected_to ( const OSC::Signal *s ) const
101 for ( std::list<Signal*>::const_iterator i = _outgoing.begin();
102 i != _outgoing.end();
105 if ( (*i)->_peer == s->_peer &&
106 (*i)->id() == s->id() )
114 Signal::value ( float f )
116 for ( std::list<Signal*>::const_iterator i = _outgoing.begin();
117 i != _outgoing.end();
120 /* FIXME: won't work for loopback */
121 if ( (*i)->_value != f )
125 _endpoint->send( (*i)->_peer->addr,
135 Signal::get_output_connection_peer_name_and_path ( int n )
140 for ( std::list<Signal*>::const_iterator i = _outgoing.begin();
141 i != _outgoing.end();
151 // Signal *s = get_peer_signal_by_id( t->_peer, t->signal_id );
154 asprintf( &r, "%s:%s", t->_peer->name, t->path() );
162 Endpoint::error_handler(int num, const char *msg, const char *path)
164 WARNING( "LibLO server error %d in path %s: %s\n", num, path, msg);
167 Endpoint::Endpoint ( )
169 _peer_scan_complete_callback = 0;
170 _peer_scan_complete_userdata = 0;
177 Endpoint::init ( int proto, const char *port )
179 DMESSAGE( "Creating OSC server" );
181 _server = lo_server_new_with_proto( port, proto, error_handler );
185 WARNING( "Error creating OSC server" );
189 add_method( "/signal/hello", "ss", &Endpoint::osc_sig_hello, this, "" );
190 add_method( "/signal/connect", "ii", &Endpoint::osc_sig_connect, this, "" );
191 add_method( "/signal/disconnect", "ii", &Endpoint::osc_sig_disconnect, this, "" );
192 add_method( "/signal/renamed", "is", &Endpoint::osc_sig_renamed, this, "" );
193 add_method( "/signal/removed", "i", &Endpoint::osc_sig_removed, this, "" );
194 add_method( "/signal/created", "ssifff", &Endpoint::osc_sig_created, this, "" );
195 add_method( "/signal/change", "iif", &Endpoint::osc_sig_handler, this, "" );
196 add_method( "/signal/list", NULL, &Endpoint::osc_signal_lister, this, "" );
197 add_method( NULL, "", &Endpoint::osc_generic, this, "" );
198 add_method( "/reply", NULL, &Endpoint::osc_reply, this, "" );
204 Endpoint::~Endpoint ( )
206 // lo_server_thread_free( _st );
209 lo_server_free( _server );
215 Endpoint::find_target_by_peer_address ( std::list<Signal*> *l, lo_address addr )
218 for ( std::list<Signal*>::iterator i = l->begin();
222 if ( address_matches( addr, (*i)->_peer->addr ) )
232 Endpoint::find_signal_by_id ( int id )
234 for ( std::list<Signal*>::iterator i = _signals.begin();
238 if ( (*i)->id() == id )
246 Endpoint::find_peer_signal_by_path ( Peer *p, const char *path )
248 for ( std::list<Signal*>::iterator i = p->_signals.begin();
249 i != p->_signals.end();
252 if ( !strcmp( (*i)->path(), path ) )
260 Endpoint::find_peer_signal_by_id ( Peer *p, int id )
262 for ( std::list<Signal*>::iterator i = p->_signals.begin();
263 i != p->_signals.end();
266 if ( id == (*i)->id() )
274 Endpoint::hello ( const char *url )
278 lo_address addr = lo_address_new_from_url ( url );
280 char *our_url = this->url();
281 send( addr, "/signal/hello", name(), our_url );
284 lo_address_free( addr );
288 Endpoint::osc_sig_hello ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
291 Endpoint *ep = (Endpoint*)user_data;
293 const char *peer_name = &argv[0]->s;
294 const char *peer_url = &argv[1]->s;
296 DMESSAGE( "Got hello from %s", peer_name );
298 if ( ! ep->find_peer_by_name( peer_name ) )
300 ep->scan_peer( peer_name, peer_url );
304 ep->hello( peer_url );
308 DMESSAGE( "Not sending hello because we don't have a name yet!" );
316 Endpoint::osc_sig_disconnect ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
318 int their_id = argv[0]->i;
319 int our_id = argv[1]->i;
321 Endpoint *ep = (Endpoint*)user_data;
323 Peer *p = ep->find_peer_by_address( lo_message_get_source( msg ) );
328 Signal *ps = ep->find_peer_signal_by_id( p, their_id );
333 Signal *s = ep->find_signal_by_id( our_id );
338 if ( s->_direction == Signal::Input )
340 s->_incoming.remove( ps );
342 DMESSAGE( "Peer %s has disconnected from signal %s", p->name, ps->path() );
344 if ( s->_connection_state_callback )
345 s->_connection_state_callback( s, s->_connection_state_userdata );
355 Endpoint::osc_sig_connect ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
357 int their_id = argv[0]->i;
358 int our_id = argv[1]->i;
360 Endpoint *ep = (Endpoint*)user_data;
362 Peer *p = ep->find_peer_by_address( lo_message_get_source( msg ) );
366 WARNING( "Got connection signal from unknown peer" );
370 Signal *ps = ep->find_peer_signal_by_id( p, their_id );
374 WARNING( "Unknown source signal" );
379 Signal *s = ep->find_signal_by_id( our_id );
383 WARNING( "Unknown destination signal" );
388 DMESSAGE( "Peer %s has connected to signal %s", p->name, s->path() );
390 /* if ( s->_direction == Signal::Input ) */
392 s->_incoming.push_back( ps );
394 /* make a record of it ourselves */
395 ps->_outgoing.push_back( s );
397 if ( s->_connection_state_callback )
398 s->_connection_state_callback( s, s->_connection_state_userdata );
407 Endpoint::osc_sig_removed ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
411 Endpoint *ep = (Endpoint*)user_data;
413 Peer *p = ep->find_peer_by_address( lo_message_get_source( msg ) );
417 WARNING( "Got signal remove notification from unknown peer." );
421 Signal *o = ep->find_peer_signal_by_id( p, id );
425 WARNING( "Unknown signal id %i", id );
429 DMESSAGE( "Signal %s:%s was removed", o->_peer->name, o->path() );
432 for ( std::list<Signal*>::iterator i = o->_outgoing.begin();
433 i != o->_outgoing.end();
436 ep->disconnect_signal( o, *i );
439 for ( std::list<Signal*>::iterator i = o->_incoming.begin();
440 i != o->_incoming.end();
443 ep->disconnect_signal( *i, o );
446 p->_signals.remove( o );
454 Endpoint::osc_sig_created ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
456 Endpoint *ep = (Endpoint*)user_data;
458 Peer *p = ep->find_peer_by_address( lo_message_get_source( msg ) );
462 WARNING( "Got signal creation from unknown peer." );
466 const char *name = &argv[0]->s;
467 const char *direction = &argv[1]->s;
468 const int id = argv[2]->i;
469 const float min = argv[3]->f;
470 const float max = argv[4]->f;
471 const float default_value = argv[5]->f;
473 DMESSAGE( "Peer %s has created signal %s with id %i (%s %f %f %f)", p->name,
474 name, id, direction, min, max, default_value );
476 Signal::Direction dir = Signal::Input;
478 if ( !strcmp( direction, "in" ) )
480 else if ( !strcmp( direction, "out" ) )
481 dir = Signal::Output;
483 Signal *s = new Signal( name, dir );
487 s->parameter_limits( min, max, default_value );
489 p->_signals.push_back( s );
495 Endpoint::osc_sig_renamed ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
497 DMESSAGE( "Got renamed message." );
500 char *new_name = &argv[1]->s;
502 Endpoint *ep = (Endpoint*)user_data;
504 Peer *p = ep->find_peer_by_address( lo_message_get_source( msg ) );
508 WARNING( "Got signal rename notification from unknown peer." );
512 Signal *o = ep->find_peer_signal_by_id( p, id );
516 WARNING( "Unknown signal id %i", id );
520 DMESSAGE( "Signal %s:%s was renamed to %s", o->_peer->name, o->_path, path );
523 o->_path = strdup( new_name );
529 Endpoint::osc_sig_handler ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
536 if ( !strcmp( path, "/signal/change" ) && !strcmp( types, "iif" ) )
538 /* accept a value for numbered signal */
541 ep = (Endpoint*)user_data;
543 o = ep->find_signal_by_id( id );
547 WARNING( "Unknown signal id %i", id );
551 else if ( ! strcmp( types, "f" ) )
553 /* accept a value for signal named in path */
554 o = (Signal*)user_data;
557 else if ( ! types || 0 == types[0] )
559 /* reply with current value */
560 o = (Signal*)user_data;
561 o->_endpoint->send( lo_message_get_source( msg ), "/reply", path, o->value() );
572 p = ep->find_peer_by_address( lo_message_get_source( msg ) );
577 DMESSAGE( "Signal change initiated by an unknown peer" );
578 /* message came from an unconnected peer, just set the value exactly */
582 /* message is from a connected source, do mixing. */
585 /* if ( t->_peer ) */
587 /* if ( 0 == o->_incoming.size() ) */
590 for ( std::list<Signal*>::const_iterator i = o->_incoming.begin();
591 i != o->_incoming.end();
594 if ( (*i)->id() == argv[0]->i )
603 for ( std::list<Signal*>::const_iterator i = o->_incoming.begin();
604 i != o->_incoming.end();
613 o->_handler( f, o->_user_data );
619 Endpoint::osc_generic ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
623 if ( argc || path[ strlen(path) - 1 ] != '/' )
626 Endpoint *ep = (Endpoint*)user_data;
628 for ( std::list<Method*>::const_iterator i = ep->_methods.begin(); i != ep->_methods.end(); ++i )
630 if ( ! (*i)->path() )
633 if (! strncmp( (*i)->path(), path, strlen(path) ) )
635 /* asprintf( &stored_path, "%s (%s); %s", path, typespec, argument_description ); */
637 ((Endpoint*)user_data)->send( lo_message_get_source( msg ), "/reply", path, (*i)->path() );
641 ((Endpoint*)user_data)->send( lo_message_get_source( msg ), "/reply", path );
647 Endpoint::osc_signal_lister ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
651 const char *prefix = NULL;
654 prefix = &argv[0]->s;
656 Endpoint *ep = (Endpoint*)user_data;
658 for ( std::list<Signal*>::const_iterator i = ep->_signals.begin(); i != ep->_signals.end(); ++i )
662 if ( ! prefix || ! strncmp( o->path(), prefix, strlen(prefix) ) )
664 ep->send( lo_message_get_source( msg ),
668 o->_direction == Signal::Input ? "in" : "out",
670 o->parameter_limits().min,
671 o->parameter_limits().max,
672 o->parameter_limits().default_value
677 ep->send( lo_message_get_source( msg ), "/reply", path );
683 Endpoint::address_matches ( lo_address addr1, lo_address addr2 )
685 char *purl = strdup( lo_address_get_port( addr1 ) );
686 char *url = strdup( lo_address_get_port( addr2 ) );
688 bool r = !strcmp( purl, url );
698 Endpoint::list_peer_signals ( void (*callback) (const char *, const OSC::Signal *, void * ), void *v )
700 for ( std::list<Peer*>::iterator i = _peers.begin();
704 for ( std::list<Signal*>::iterator j = (*i)->_signals.begin();
705 j != (*i)->_signals.end();
708 // DMESSAGE( "Running callback" );
709 callback( (*i)->name, *j, v );
715 Endpoint::find_peer_by_address ( lo_address addr )
717 char *url = strdup( lo_address_get_port( addr ) );
721 for ( std::list<Peer*>::iterator i = _peers.begin();
725 char *purl = strdup( lo_address_get_port( (*i)->addr ) );
727 if ( !strcmp( purl, url ) )
742 Endpoint::find_peer_by_name ( const char *name )
744 for ( std::list<Peer*>::iterator i = _peers.begin();
748 if ( !strcmp( name, (*i)->name ) )
758 Endpoint::disconnect_signal ( OSC::Signal *s, OSC::Signal *d )
760 if ( ! s->is_connected_to( d ) )
763 MESSAGE( "Disconnecting signal output \"%s\" to %s:%i", s->path(), d->_peer->name, d->_id );
765 send( d->_peer->addr, "/signal/disconnect",
766 s->_id, /* our signal id */
767 d->_id /* their signal id */ );
769 s->_outgoing.remove( d );
770 s->_incoming.remove( d );
776 Endpoint::disconnect_signal ( OSC::Signal *s, const char *peer_name, const char *signal_path )
778 if ( s->_direction == Signal::Output )
780 Peer *p = find_peer_by_name( peer_name );
785 Signal *ps = find_peer_signal_by_path( p, signal_path );
790 if ( ! s->is_connected_to( ps ) )
793 return disconnect_signal( s, ps );
800 Endpoint::connect_signal( OSC::Signal *s, const char *peer_and_path )
806 if ( 2 == sscanf( peer_and_path, "%[^:]:%s", peer, path ) )
808 return connect_signal( s, peer, path );
815 Endpoint::connect_signal ( OSC::Signal *s, OSC::Signal *d )
817 if ( s->is_connected_to( d ) )
822 MESSAGE( "Connecting signal output \"%s\" to %s:%s", s->path(), d->_peer->name, d->path() );
824 s->_outgoing.push_back( d );
826 /* make a record of it ourselves */
827 d->_incoming.push_back( s );
829 send( d->_peer->addr, "/signal/connect",
830 s->_id, /* our signal id */
831 d->_id /* their signal id */ );
838 Endpoint::connect_signal( OSC::Signal *s, const char *peer_name, const char *signal_path )
840 if ( s->_direction == Signal::Output )
842 Peer *p = find_peer_by_name( peer_name );
847 Signal *ps = find_peer_signal_by_path( p, signal_path );
852 return connect_signal( s, ps );
859 Endpoint::connect_signal( OSC::Signal *s, const char *peer_name, int signal_id )
861 if ( s->_direction == Signal::Output )
863 Peer *p = find_peer_by_name( peer_name );
868 Signal *ps = find_peer_signal_by_id( p, signal_id );
873 return connect_signal( s, ps );
880 Signal::get_peer_signal_by_id ( Peer *p, int signal_id )
882 for ( std::list<Signal *>::iterator i = p->_signals.begin();
883 i != p->_signals.end();
886 if ( (*i)->_id == signal_id )
894 Endpoint::osc_reply ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
897 Endpoint *ep = (Endpoint*)user_data;
899 if ( argc && !strcmp( &argv[0]->s, "/signal/list" ) )
901 Peer *p = ep->find_peer_by_address( lo_message_get_source( msg ) );
905 WARNING( "Got input list reply from unknown peer." );
911 p->_scanning = false;
912 DMESSAGE( "Done scanning %s", p->name );
914 if ( ep->_peer_scan_complete_callback )
915 ep->_peer_scan_complete_callback(ep->_peer_scan_complete_userdata);
917 else if ( argc == 7 && p->_scanning )
919 DMESSAGE( "Peer %s has signal %s (%s)", p->name, &argv[1]->s, &argv[2]->s );
923 if ( !strcmp( &argv[2]->s, "in" ) )
925 else if ( !strcmp( &argv[2]->s, "out" ) )
926 dir = Signal::Output;
928 Signal *s = new Signal( &argv[1]->s, (Signal::Direction)dir );
932 s->parameter_limits( argv[4]->f, argv[5]->f, argv[6]->f );
934 p->_signals.push_back( s );
944 Endpoint::add_method ( const char *path, const char *typespec, lo_method_handler handler, void *user_data, const char *argument_description )
946 // DMESSAGE( "Added OSC method %s (%s)", path, typespec );
948 lo_server_add_method( _server, path, typespec, handler, user_data );
950 Method *md = new Method;
953 md->_path = strdup( path );
955 md->_typespec = strdup( typespec );
956 if ( argument_description )
957 md->_documentation = strdup( argument_description );
959 _methods.push_back( md );
965 Endpoint::add_signal ( const char *path, Signal::Direction dir, float min, float max, float default_value, signal_handler handler, void *user_data )
967 Signal *o = new Signal( path, dir );
970 o->_path = strdup( path );
972 o->_handler = handler;
973 o->_user_data = user_data;
976 _signals.push_back( o );
978 if ( dir == Signal::Input )
980 lo_server_add_method( _server, path, NULL, osc_sig_handler, o );
984 o->parameter_limits( min, max, default_value );
986 /* tell our peers about it */
987 for ( std::list<Peer*>::iterator i = _peers.begin();
994 o->_direction == Signal::Input ? "in" : "out",
1006 Endpoint::del_method ( const char *path, const char *typespec )
1008 // DMESSAGE( "Deleted OSC method %s (%s)", path, typespec );
1010 lo_server_del_method( _server, path, typespec );
1012 for ( std::list<Method *>::iterator i = _methods.begin(); i != _methods.end(); ++i )
1014 if ( ! (*i)->path() )
1017 if ( ! strcmp( path, (*i)->path() ) &&
1018 ! strcmp( typespec, (*i)->typespec() ) )
1021 i = _methods.erase( i );
1029 Endpoint::del_method ( Method *meth )
1031 // DMESSAGE( "Deleted OSC method %s (%s)", path, typespec );
1033 lo_server_del_method( _server, meth->path(), meth->typespec() );
1037 _methods.remove( meth );
1041 Endpoint::send_signal_rename_notifications ( Signal *s )
1044 for ( std::list<Peer*>::const_iterator i = _peers.begin();
1056 Endpoint::del_signal ( Signal *o )
1058 // DMESSAGE( "Deleted OSC method %s (%s)", path, typespec );
1060 lo_server_del_method( _server, o->path(), "f" );
1062 /* tell our peers about it */
1063 for ( std::list<Peer*>::iterator i = _peers.begin();
1072 /* FIXME: clear loopback connections first! */
1075 _signals.remove( o );
1079 Endpoint::scan_peer ( const char *name, const char *url )
1083 DMESSAGE( "Scanning peer %s @ %s...", name, url );
1085 p->name = strdup( name );
1086 p->addr = lo_address_new_from_url( url );
1087 p->_scanning = true;
1089 _peers.push_back( p );
1091 send( p->addr, "/signal/list" );
1095 Endpoint::osc_thread ( void * arg )
1097 ((Endpoint*)arg)->osc_thread();
1103 Endpoint::osc_thread ( void )
1105 _thread.name( "OSC" );
1107 DMESSAGE( "OSC Thread running" );
1113 Endpoint::start ( void )
1116 if ( !_thread.clone( &Endpoint::osc_thread, this ) )
1117 FATAL( "Could not create OSC thread" );
1119 /* lo_server_thread_start( _st ); */
1124 Endpoint::stop ( void )
1127 // lo_server_thread_stop( _st );
1131 Endpoint::port ( void ) const
1133 return lo_server_get_port( _server );
1137 Endpoint::url ( void ) const
1139 return lo_server_get_url( _server );
1142 /** Process any waiting events and return immediately */
1144 Endpoint::check ( void ) const
1149 /** Process any waiting events and return after timeout */
1151 Endpoint::wait ( int timeout ) const
1153 if ( lo_server_wait( _server, timeout ) )
1154 while ( lo_server_recv_noblock( _server, 0 ) ) { }
1157 /** Process events forever */
1159 Endpoint::run ( void ) const
1163 lo_server_recv( _server );
1168 Endpoint::send ( lo_address to, const char *path, std::list< OSC_Value > values )
1171 lo_message m = lo_message_new();
1173 for ( std::list< OSC_Value >::const_iterator i = values.begin();
1177 const OSC_Value *ov = &(*i);
1179 switch ( ov->type() )
1182 DMESSAGE( "Adding float %f", ((OSC_Float*)ov)->value() );
1183 lo_message_add_float( m, ((OSC_Float*)ov)->value() );
1186 DMESSAGE( "Adding int %i", ((OSC_Int*)ov)->value() );
1187 lo_message_add_int32( m, ((OSC_Int*)ov)->value() );
1190 DMESSAGE( "Adding string %s", ((OSC_String*)ov)->value() );
1191 lo_message_add_string( m, ((OSC_String*)ov)->value() );
1194 FATAL( "Unknown format: %c", ov->type() );
1199 DMESSAGE( "Path: %s", path );
1201 lo_bundle b = lo_bundle_new( LO_TT_IMMEDIATE );
1203 lo_bundle_add_message(b, path, m );
1205 int r = lo_send_bundle_from( to, _server, b );
1207 // int r = lo_send_message_from( to, _server, path, m );
1209 // lo_message_free( m );
1215 Endpoint::send ( lo_address to, const char *path )
1217 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "" );
1221 Endpoint::send ( lo_address to, const char *path, int v )
1223 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "i", v );
1227 Endpoint::send ( lo_address to, const char *path, float v )
1229 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "f", v );
1233 Endpoint::send ( lo_address to, const char *path, double v )
1235 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "d", v );
1239 Endpoint::send ( lo_address to, const char *path, const char * v )
1241 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "s", v );
1245 Endpoint::send ( lo_address to, const char *path, const char * v1, float v2 )
1247 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sf", v1, v2 );
1251 Endpoint::send ( lo_address to, const char *path, const char * v1, const char *v2 )
1253 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "ss", v1, v2 );
1257 Endpoint::send ( lo_address to, const char *path, const char * v1, const char *v2, const char *v3 )
1259 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sss", v1, v2, v3 );
1263 Endpoint::send ( lo_address to, const char *path, const char *v1, int v2, int v3, int v4 )
1265 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "siii", v1, v2, v3, v4 );
1269 Endpoint::send ( lo_address to, const char *path, const char *v1, const char *v2, int v3, int v4, int v5 )
1271 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "ssiii", v1, v2, v3, v4, v5 );
1276 Endpoint::send ( lo_address to, const char *path, const char *v1, const char *v2, const char *v3, int v4, int v5, int v6 )
1278 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sssiii", v1, v2, v3, v4, v5, v6 );
1282 Endpoint::send ( lo_address to, const char *path, const char *v1, int v2 )
1284 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "si", v1, v2 );
1288 Endpoint::send ( lo_address to, const char *path, int v1, const char *v2 )
1290 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "is", v1, v2 );
1294 Endpoint::send ( lo_address to, const char *path, const char *v1, int v2, const char *v3 )
1296 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sis", v1, v2, v3 );
1300 Endpoint::send ( lo_address to, const char *path, int v1, const char *v2, const char *v3, const char *v4 )
1302 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "isss", v1, v2, v3, v4 );
1306 Endpoint::send ( lo_address to, const char *path, const char *v1, int v2, const char *v3, const char *v4, const char *v5 )
1308 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sisss", v1, v2, v3, v4, v5 );
1312 Endpoint::send ( lo_address to, const char *path, const char *v1, const char *v2, const char *v3, const char *v4, const char *v5 )
1314 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sssss", v1, v2, v3, v4, v5 );
1318 Endpoint::send ( lo_address to, const char *path, const char *v1, const char *v2, const char *v3, const char *v4 )
1320 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "ssss", v1, v2, v3, v4 );
1324 Endpoint::send ( lo_address to, const char *path, lo_message msg )
1326 return lo_send_message_from( to, _server, path, msg );
1330 Endpoint::send ( lo_address to, const char *path, const char *v1, const char *v2, int v3, float v4, float v5, float v6 )
1332 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "ssifff", v1, v2, v3, v4, v5, v6 );
1336 Endpoint::send ( lo_address to, const char *path, const char *v1, const char *v2, const char *v3, int v4, float v5, float v6, float v7 )
1338 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sssifff", v1, v2, v3, v4, v5, v6, v7 );
1342 Endpoint::send ( lo_address to, const char *path, const char *v1, int v2, int v3 )
1344 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sii", v1, v2, v3 );
1348 Endpoint::send ( lo_address to, const char *path, int v1, int v2 )
1350 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "ii", v1, v2 );
1354 Endpoint::send ( lo_address to, const char *path, int v1, float v2 )
1356 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "if", v1, v2 );
1360 Endpoint::send ( lo_address to, const char *path, const char *v1, int v2, int v3, float v4 )
1362 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "siif", v1, v2, v3, v4 );
1366 Endpoint::send ( lo_address to, const char *path, int v1, int v2, float v3 )
1368 return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "iif", v1, v2, v3 );