2010-01-21 01:33:02 +01:00
|
|
|
|
|
|
|
/*******************************************************************************/
|
|
|
|
/* Copyright (C) 2010 Jonathan Moore Liles */
|
|
|
|
/* */
|
|
|
|
/* This program is free software; you can redistribute it and/or modify it */
|
|
|
|
/* under the terms of the GNU General Public License as published by the */
|
|
|
|
/* Free Software Foundation; either version 2 of the License, or (at your */
|
|
|
|
/* option) any later version. */
|
|
|
|
/* */
|
|
|
|
/* This program is distributed in the hope that it will be useful, but WITHOUT */
|
|
|
|
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
|
|
|
|
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for */
|
|
|
|
/* more details. */
|
|
|
|
/* */
|
|
|
|
/* You should have received a copy of the GNU General Public License along */
|
|
|
|
/* with This program; see the file COPYING. If not,write to the Free Software */
|
|
|
|
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|
|
|
/*******************************************************************************/
|
|
|
|
|
|
|
|
#include <lo/lo.h>
|
|
|
|
#include "debug.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
2012-02-09 00:39:03 +01:00
|
|
|
#include <string.h>
|
2010-01-21 01:33:02 +01:00
|
|
|
#include <assert.h>
|
2010-01-21 01:33:02 +01:00
|
|
|
|
|
|
|
#include "Endpoint.H"
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
#include "Thread.H"
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
namespace OSC
|
|
|
|
{
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
void
|
|
|
|
Endpoint::error_handler(int num, const char *msg, const char *path)
|
|
|
|
{
|
|
|
|
WARNING( "LibLO server error %d in path %s: %s\n", num, path, msg);
|
|
|
|
}
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
Endpoint::Endpoint ( )
|
2010-01-21 01:33:02 +01:00
|
|
|
{
|
2010-01-21 01:33:02 +01:00
|
|
|
}
|
2010-01-21 01:33:02 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
int
|
|
|
|
Endpoint::init ( const char *port )
|
|
|
|
{
|
|
|
|
DMESSAGE( "Creating OSC server" );
|
2010-01-21 01:33:02 +01:00
|
|
|
|
|
|
|
_server = lo_server_new( port, error_handler );
|
|
|
|
|
|
|
|
if ( ! _server )
|
2010-01-21 01:33:02 +01:00
|
|
|
{
|
|
|
|
WARNING( "Error creating OSC server" );
|
|
|
|
return -1;
|
|
|
|
}
|
2012-02-09 00:39:03 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
// char *url = lo_server_get_url(_server);
|
|
|
|
// printf("OSC: %s\n",url);
|
|
|
|
// free(url);
|
2012-02-09 00:39:03 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
// add generic handler for path reporting.
|
|
|
|
add_method( "/osc/query/parameters", "s", osc_query_parameters, this, "" );
|
2012-02-09 00:39:03 +01:00
|
|
|
add_method( NULL, "", &Endpoint::osc_generic, this, "" );
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
return 0;
|
2010-01-21 01:33:02 +01:00
|
|
|
}
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
Endpoint::~Endpoint ( )
|
|
|
|
{
|
|
|
|
// lo_server_thread_free( _st );
|
|
|
|
lo_server_free( _server );
|
|
|
|
}
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
int
|
|
|
|
Endpoint::osc_query_parameters ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
|
|
|
|
{
|
|
|
|
OSC_DMSG();
|
|
|
|
|
|
|
|
Endpoint *ep = (Endpoint*)user_data;
|
|
|
|
|
|
|
|
const char *qpath = &argv[0]->s;
|
|
|
|
|
|
|
|
Method_Data *md = NULL;
|
|
|
|
|
|
|
|
for ( std::list<Method_Data *>::iterator i = ep->_methods.begin(); i != ep->_methods.end(); ++i )
|
|
|
|
{
|
|
|
|
if ( ! (*i)->path )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if ( ! strcmp( qpath, (*i)->path ) && (*i)->typespec )
|
|
|
|
{
|
|
|
|
md = *i;
|
|
|
|
|
|
|
|
/* FIXME: what about the fact that there could be multiple messages with the same path but
|
|
|
|
different typespecs ? */
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( ! md )
|
|
|
|
{
|
|
|
|
ep->send( lo_message_get_source( msg ), "/error", path,
|
|
|
|
"Could not find specified path" );
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
char *r = (char*) malloc( 256 );
|
|
|
|
r[0] = 0;
|
|
|
|
|
|
|
|
for ( int i = 0; i < strlen( md->typespec ); ++i )
|
|
|
|
{
|
|
|
|
char desc[50];
|
|
|
|
|
|
|
|
snprintf( desc, sizeof(desc), "f:%f:%f:%f\n",
|
|
|
|
md->parameter_limits[i].min,
|
|
|
|
md->parameter_limits[i].max,
|
|
|
|
md->parameter_limits[i].default_value );
|
|
|
|
|
|
|
|
r = (char*)realloc( r, strlen( r ) + strlen( desc ) + 2 );
|
|
|
|
|
|
|
|
strcat( r, desc );
|
|
|
|
strcat( r, "\n" );
|
|
|
|
}
|
|
|
|
|
|
|
|
ep->send( lo_message_get_source( msg ), "/reply", path,
|
|
|
|
qpath,
|
|
|
|
r );
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2012-02-09 00:39:03 +01:00
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::osc_generic ( const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data )
|
|
|
|
{
|
2010-01-21 01:33:02 +01:00
|
|
|
// OSC_DMSG();
|
2012-02-09 00:39:03 +01:00
|
|
|
|
|
|
|
if ( path[ strlen(path) - 1 ] != '/' )
|
2012-02-09 09:37:49 +01:00
|
|
|
return -1;
|
2012-02-09 00:39:03 +01:00
|
|
|
|
|
|
|
char *paths = ((Endpoint*)user_data)->get_paths( path );
|
|
|
|
|
|
|
|
((Endpoint*)user_data)->send( lo_message_get_source( msg ), "/reply", path, paths );
|
|
|
|
|
|
|
|
free(paths);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// returns a malloc()'d string containing path names beginning with /prefix/, newline separated
|
|
|
|
char *
|
|
|
|
Endpoint::get_paths ( const char *prefix )
|
|
|
|
{
|
|
|
|
char *r = (char*)malloc( 1024 );
|
|
|
|
r[0] = 0;
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
for ( std::list<Method_Data*>::const_iterator i = _methods.begin(); i != _methods.end(); ++i )
|
2012-02-09 00:39:03 +01:00
|
|
|
{
|
2010-01-21 01:33:02 +01:00
|
|
|
if ( ! (*i)->path )
|
2012-02-09 00:39:03 +01:00
|
|
|
continue;
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
if (! strncmp( (*i)->path, prefix, strlen(prefix) ) )
|
2012-02-09 00:39:03 +01:00
|
|
|
{
|
2010-01-21 01:33:02 +01:00
|
|
|
r = (char*)realloc( r, strlen( r ) + strlen( (*i)->path ) + 2 );
|
2012-02-09 00:39:03 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
/* asprintf( &stored_path, "%s (%s); %s", path, typespec, argument_description ); */
|
|
|
|
|
|
|
|
strcat( r, (*i)->path );
|
2012-02-09 00:39:03 +01:00
|
|
|
strcat( r, "\n" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
void
|
|
|
|
Endpoint::set_parameter_limits ( const char *path, const char *typespec,
|
|
|
|
int index,
|
|
|
|
float min, float max, float default_value )
|
|
|
|
{
|
|
|
|
assert( typespec );
|
|
|
|
|
|
|
|
assert( index < strlen( typespec ) );
|
|
|
|
|
|
|
|
for ( std::list<Method_Data *>::iterator i = _methods.begin(); i != _methods.end(); ++i )
|
|
|
|
{
|
|
|
|
if ( ! (*i)->path )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if ( ! strcmp( path, (*i)->path ) &&
|
|
|
|
! strcmp( typespec, (*i)->typespec ) )
|
|
|
|
{
|
|
|
|
(*i)->parameter_limits[index].min = min;
|
|
|
|
(*i)->parameter_limits[index].max = max;
|
|
|
|
(*i)->parameter_limits[index].default_value = default_value;
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
method_handle
|
2012-02-09 00:39:03 +01:00
|
|
|
Endpoint::add_method ( const char *path, const char *typespec, lo_method_handler handler, void *user_data, const char *argument_description )
|
2010-01-21 01:33:02 +01:00
|
|
|
{
|
2010-01-21 01:33:02 +01:00
|
|
|
// DMESSAGE( "Added OSC method %s (%s)", path, typespec );
|
2012-02-08 04:44:40 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
lo_server_add_method( _server, path, typespec, handler, user_data );
|
2012-02-09 00:39:03 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
Method_Data *md = new Method_Data;
|
2012-02-10 09:28:37 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
if ( path )
|
|
|
|
md->path = strdup( path );
|
|
|
|
if ( typespec )
|
|
|
|
md->typespec = strdup( typespec );
|
|
|
|
if ( argument_description )
|
|
|
|
md->documentation = strdup( argument_description );
|
2012-02-10 09:28:37 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
if ( typespec )
|
|
|
|
md->parameter_limits = new Parameter_Limits[strlen(typespec)];
|
|
|
|
|
|
|
|
_methods.push_back( md );
|
|
|
|
|
|
|
|
return md;
|
|
|
|
|
|
|
|
/* asprintf( &stored_path, "%s (%s); %s", path, typespec, argument_description ); */
|
|
|
|
|
|
|
|
/* _path_names.push_back( stored_path ); */
|
2010-01-21 01:33:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Endpoint::del_method ( const char *path, const char *typespec )
|
|
|
|
{
|
2010-01-21 01:33:02 +01:00
|
|
|
// DMESSAGE( "Deleted OSC method %s (%s)", path, typespec );
|
2012-02-08 04:44:40 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
lo_server_del_method( _server, path, typespec );
|
2012-02-09 00:39:03 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
for ( std::list<Method_Data *>::iterator i = _methods.begin(); i != _methods.end(); ++i )
|
2012-02-09 00:39:03 +01:00
|
|
|
{
|
2010-01-21 01:33:02 +01:00
|
|
|
if ( ! (*i)->path )
|
2012-02-09 00:39:03 +01:00
|
|
|
continue;
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
if ( ! strcmp( path, (*i)->path ) &&
|
|
|
|
! strcmp( typespec, (*i)->typespec ) )
|
2012-02-09 00:39:03 +01:00
|
|
|
{
|
2010-01-21 01:33:02 +01:00
|
|
|
delete *i;
|
|
|
|
i = _methods.erase( i );
|
|
|
|
|
|
|
|
break;
|
2012-02-09 00:39:03 +01:00
|
|
|
}
|
|
|
|
}
|
2010-01-21 01:33:02 +01:00
|
|
|
}
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
void
|
|
|
|
Endpoint::del_method ( const method_handle mh )
|
|
|
|
{
|
|
|
|
// DMESSAGE( "Deleted OSC method %s (%s)", path, typespec );
|
|
|
|
|
|
|
|
Method_Data *meth = const_cast<Method_Data*>( (const Method_Data*)mh );
|
|
|
|
|
|
|
|
lo_server_del_method( _server, meth->path, meth->typespec );
|
|
|
|
|
|
|
|
delete meth;
|
2010-01-21 01:33:02 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
_methods.remove( meth );
|
2010-01-21 01:33:02 +01:00
|
|
|
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
/* for ( std::list<Method_Data *>::iterator i = _methods.begin(); i != _methods.end(); ++i ) */
|
|
|
|
/* { */
|
|
|
|
/* if ( ! (*i)->path ) */
|
|
|
|
/* continue; */
|
2010-01-21 01:33:02 +01:00
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
/* if ( ! strcmp( path, (*i)->path ) && */
|
|
|
|
/* ! strcmp( typespec, (*i)->typespec ) ) */
|
|
|
|
/* { */
|
|
|
|
/* delete *i; */
|
|
|
|
/* i = _methods.erase( i ); */
|
|
|
|
|
|
|
|
/* break; */
|
|
|
|
/* } */
|
|
|
|
/* } */
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void *
|
|
|
|
Endpoint::osc_thread ( void * arg )
|
|
|
|
{
|
|
|
|
((Endpoint*)arg)->osc_thread();
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Endpoint::osc_thread ( void )
|
|
|
|
{
|
|
|
|
_thread.name( "OSC" );
|
|
|
|
|
|
|
|
DMESSAGE( "OSC Thread running" );
|
|
|
|
|
|
|
|
run();
|
|
|
|
}
|
2010-01-21 01:33:02 +01:00
|
|
|
|
|
|
|
void
|
|
|
|
Endpoint::start ( void )
|
|
|
|
{
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
if ( !_thread.clone( &Endpoint::osc_thread, this ) )
|
|
|
|
FATAL( "Could not create OSC thread" );
|
2010-01-21 01:33:02 +01:00
|
|
|
|
|
|
|
/* lo_server_thread_start( _st ); */
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Endpoint::stop ( void )
|
|
|
|
{
|
2010-01-21 01:33:02 +01:00
|
|
|
_thread.join();
|
2010-01-21 01:33:02 +01:00
|
|
|
// lo_server_thread_stop( _st );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::port ( void ) const
|
|
|
|
{
|
|
|
|
return lo_server_get_port( _server );
|
|
|
|
}
|
|
|
|
|
|
|
|
char *
|
|
|
|
Endpoint::url ( void ) const
|
|
|
|
{
|
|
|
|
return lo_server_get_url( _server );
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Process any waiting events and return immediately */
|
|
|
|
void
|
|
|
|
Endpoint::check ( void ) const
|
|
|
|
{
|
|
|
|
wait( 0 );
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Process any waiting events and return immediately */
|
|
|
|
void
|
|
|
|
Endpoint::wait ( int timeout ) const
|
|
|
|
{
|
|
|
|
lo_server_recv_noblock( _server, timeout );
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Process events forever */
|
|
|
|
void
|
|
|
|
Endpoint::run ( void ) const
|
|
|
|
{
|
|
|
|
for ( ;; )
|
|
|
|
{
|
|
|
|
lo_server_recv( _server );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, std::list< OSC_Value > values )
|
|
|
|
{
|
|
|
|
|
|
|
|
lo_message m = lo_message_new();
|
|
|
|
|
|
|
|
for ( std::list< OSC_Value >::const_iterator i = values.begin();
|
|
|
|
i != values.end();
|
|
|
|
++i )
|
|
|
|
{
|
|
|
|
const OSC_Value *ov = &(*i);
|
|
|
|
|
|
|
|
switch ( ov->type() )
|
|
|
|
{
|
|
|
|
case 'f':
|
2010-01-21 01:33:02 +01:00
|
|
|
DMESSAGE( "Adding float %f", ((OSC_Float*)ov)->value() );
|
2010-01-21 01:33:02 +01:00
|
|
|
lo_message_add_float( m, ((OSC_Float*)ov)->value() );
|
|
|
|
break;
|
|
|
|
case 'i':
|
2010-01-21 01:33:02 +01:00
|
|
|
DMESSAGE( "Adding int %i", ((OSC_Int*)ov)->value() );
|
2010-01-21 01:33:02 +01:00
|
|
|
lo_message_add_int32( m, ((OSC_Int*)ov)->value() );
|
|
|
|
break;
|
|
|
|
case 's':
|
|
|
|
DMESSAGE( "Adding string %s", ((OSC_String*)ov)->value() );
|
|
|
|
lo_message_add_string( m, ((OSC_String*)ov)->value() );
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
FATAL( "Unknown format: %c", ov->type() );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
DMESSAGE( "Path: %s", path );
|
|
|
|
|
|
|
|
lo_bundle b = lo_bundle_new( LO_TT_IMMEDIATE );
|
|
|
|
|
|
|
|
lo_bundle_add_message(b, path, m );
|
|
|
|
|
|
|
|
int r = lo_send_bundle_from( to, _server, b );
|
|
|
|
|
|
|
|
// int r = lo_send_message_from( to, _server, path, m );
|
|
|
|
|
|
|
|
// lo_message_free( m );
|
|
|
|
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "" );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, int v )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "i", v );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, float v )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "f", v );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, double v )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "d", v );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, const char * v )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "s", v );
|
|
|
|
}
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, const char * v1, float v2 )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sf", v1, v2 );
|
|
|
|
}
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, const char * v1, const char *v2 )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "ss", v1, v2 );
|
|
|
|
}
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, const char * v1, const char *v2, const char *v3 )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sss", v1, v2, v3 );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, const char *v1, int v2, int v3, int v4 )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "siii", v1, v2, v3, v4 );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, const char *v1, const char *v2, int v3, int v4, int v5 )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "ssiii", v1, v2, v3, v4, v5 );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, const char *v1, const char *v2, const char *v3, int v4, int v5, int v6 )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sssiii", v1, v2, v3, v4, v5, v6 );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, const char *v1, int v2 )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "si", v1, v2 );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, int v1, const char *v2 )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "is", v1, v2 );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, const char *v1, int v2, const char *v3 )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sis", v1, v2, v3 );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, int v1, const char *v2, const char *v3, const char *v4 )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "isss", v1, v2, v3, v4 );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, const char *v1, int v2, const char *v3, const char *v4, const char *v5 )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sisss", v1, v2, v3, v4, v5 );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, const char *v1, const char *v2, const char *v3, const char *v4, const char *v5 )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "sssss", v1, v2, v3, v4, v5 );
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
Endpoint::send ( lo_address to, const char *path, const char *v1, const char *v2, const char *v3, const char *v4 )
|
|
|
|
{
|
|
|
|
return lo_send_from( to, _server, LO_TT_IMMEDIATE, path, "ssss", v1, v2, v3, v4 );
|
|
|
|
}
|
|
|
|
|
2010-01-21 01:33:02 +01:00
|
|
|
}
|