diff --git a/.gitignore b/.gitignore index 0b7bbeb..8c6b72e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ target/ .classpath .project .settings/ +.externalToolBuilders/ distribution/ lib/ data/ @@ -9,3 +10,4 @@ TODO NOTES bin/ reference/ +materials/ diff --git a/README.md b/README.md index c8e7c49..1a620be 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,17 @@ oscp5 ===== An Open Sound Control (OSC) implementation for java and processing.org + + + + +## Digital Object Identifiers + +In case you make use of OscP5 in your research publication, please use the DOI below as a reference. + +Digital Object Identifiers (DOI) are the backbone of the academic reference and metrics system which allows researchers writing software to make their work they share on GitHub citable by archiving one of their GitHub repositories and assigning a DOI with the data archiving tool Zenodo [(link)](https://guides.github.com/activities/citable-code/). + + +[![DOI](https://zenodo.org/badge/11256/sojamo/oscp5.svg)](http://dx.doi.org/10.5281/zenodo.16308) + +Copyright 2004-2015 Andreas Schlegel diff --git a/examples/basics-without-comments/oscP5bundle/oscP5bundle.pde b/examples/basics-without-comments/oscP5bundle/oscP5bundle.pde new file mode 100644 index 0000000..2a9bb46 --- /dev/null +++ b/examples/basics-without-comments/oscP5bundle/oscP5bundle.pde @@ -0,0 +1,39 @@ +import oscP5.*; +import netP5.*; + +OscP5 osc; +NetAddress addr; + +void setup() { + osc = new OscP5(this, 12000); + addr = new NetAddress("127.0.0.1", 12000); +} + + +void draw() { +} + +void keyPressed() { + switch(key) { + case('1'): + osc.send(addr, "/test", 1, 2, 3); + break; + case('2'): + OscBundle bundle = new OscBundle(); + bundle.add(new OscMessage("/m/1", 1)); + bundle.add(new OscMessage("/m/2", 2)); + osc.send(addr, bundle); + break; + } +} + +void oscEvent(OscBundle theBundle) { + println("received a bundle", theBundle); + for (OscMessage m : theBundle.get()) { + oscEvent(m); + } +} + +void oscEvent(OscMessage theMessage) { + println("received a message", theMessage); +} \ No newline at end of file diff --git a/examples/basics/oscP5bundle/oscP5bundle.pde b/examples/basics/oscP5bundle/oscP5bundle.pde new file mode 100644 index 0000000..d817752 --- /dev/null +++ b/examples/basics/oscP5bundle/oscP5bundle.pde @@ -0,0 +1,39 @@ +import oscP5.*; +import netP5.*; + +OscP5 osc; +NetAddress addr; + +void setup() { + osc = new OscP5(this, 12000); + addr = new NetAddress("127.0.0.1", 12000); +} + + +void draw() { +} + +void keyPressed() { + switch(key) { + case('1'): + osc.send(addr, "/test", 1, 2, 3); + break; + case('2'): + OscBundle bundle = new OscBundle(); + bundle.add(new OscMessage("/m/1", 1)); + bundle.add(new OscMessage("/m/2", 2)); + osc.send(addr, bundle); + break; + } +} + +void oscEvent(OscBundle theBundle) { + println("received a bundle", theBundle); + for (OscMessage m : theBundle.get()) { + oscEvent(m); /* forward each message inside the bundle to oscEvent(OscMessage) */ + } +} + +void oscEvent(OscMessage theMessage) { + println("received a message", theMessage); +} \ No newline at end of file diff --git a/resources/build.xml b/resources/build.xml index 1df0bc5..1ef53d3 100644 --- a/resources/build.xml +++ b/resources/build.xml @@ -45,11 +45,11 @@ - + - + @@ -180,24 +180,24 @@ - - - - - + + + + + - - - - + + + + - + - + diff --git a/resources/install_instructions.txt b/resources/install_instructions.txt index 693bf1f..cadd472 100644 --- a/resources/install_instructions.txt +++ b/resources/install_instructions.txt @@ -1,4 +1,4 @@ -How to install library ##library.name## +How to install library oscP5 Install with the "Add Library..." tool @@ -26,19 +26,19 @@ By default the following locations are used for your sketchbook folder: For Windows users, the sketchbook folder is located inside 'My Documents'/Processing. -The folder structure for library ##library.name## should be as follows: +The folder structure for library oscP5 should be as follows: Processing libraries - ##library.name## + oscP5 examples library - ##library.name##.jar + oscP5.jar reference src Some folders like "examples" or "src" might be missing. After library -##library.name## has been successfully installed, restart the Processing +oscP5 has been successfully installed, restart the Processing application. diff --git a/resources/jar.sh b/resources/jar.sh new file mode 100755 index 0000000..fb223af --- /dev/null +++ b/resources/jar.sh @@ -0,0 +1,4 @@ +cd $HOME/Documents/workspace/oscP5/target/classes +jar cf ../oscP5.jar . +cp ../oscP5.jar $HOME/Documents/Processing3/libraries/oscP5/library +echo "oscP5 compiled on $(date)" \ No newline at end of file diff --git a/src/main/java/netP5/changelog.txt b/src/main/java/netP5/changelog.txt deleted file mode 100644 index 8e716fb..0000000 --- a/src/main/java/netP5/changelog.txt +++ /dev/null @@ -1,20 +0,0 @@ -2013-10-29 Andreas Schlegel - - * src netP5.StringUtils.java: - removed. - -2013-10-29 Andreas Schlegel - - * src netP5.*: - massive rework on network protocol classes - -2013-07-21 Andreas Schlegel - - * src netP5.NetInfo.java: - adding method getNetworkInterfaces() which returns a map of available network interfaces - including name, inetaddress, or mac. - - * version 2.0.0 - - * major renovation going on here, streamlining and cleaning up. - This version is not backwards compatible with 0.9.9 and earlier. \ No newline at end of file diff --git a/src/main/java/oscP5/OscBundle.java b/src/main/java/oscP5/OscBundle.java index 5c79e0e..96c2d37 100755 --- a/src/main/java/oscP5/OscBundle.java +++ b/src/main/java/oscP5/OscBundle.java @@ -10,22 +10,23 @@ * * This library 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General * Public License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA + * Boston, MA 02111-1307 USA * - * @author ##author## - * @modified ##date## - * @version ##version## + * @author ##author## + * @modified ##date## + * @version ##version## */ package oscP5; import java.util.ArrayList; +import java.util.List; import java.util.Map; import netP5.Bytes; @@ -37,9 +38,7 @@ public class OscBundle extends OscPacket { protected static final int BUNDLE_HEADER_SIZE = 16; - protected static final byte[] BUNDLE_AS_BYTES = { 0x23 , 0x62 , 0x75 , 0x6E , 0x64 , 0x6C , 0x65 , 0x00 }; - private int _myMessageSize = 0; public OscBundle( ) { @@ -48,6 +47,10 @@ public OscBundle( ) { OscBundle( Map m ) { _myMessageSize = parseBundle( m ); + _myRef = m.get( "socket-ref" ); + hostAddress = s( m.get( "socket-address" ) , null ); + port = i( m.get( "socket-port" ) , 0 ); + localPort = i( m.get( "local-port" ) , 0 ); } public OscBundle add( OscMessage ... theOscMessages ) { @@ -82,6 +85,17 @@ public int size( ) { return _myMessageSize; } + public OscMessage get( int theIndex ) { + if ( theIndex < 0 || theIndex >= size( ) ) { + return null; + } + return messages.get( theIndex ); + } + + public List< OscMessage > get( ) { + return messages; + } + /** * TODO set the timetag of an osc bundle. timetags are used to synchronize events and execute * events at a given time in the future or immediately. timetags can only be set for osc @@ -115,4 +129,8 @@ public byte[] getBytes( ) { } return myBytes; } + + public final String toString( ) { + return String.format( "OscBundle{hostAddress=%s, port=%s, messages=%s}" , hostAddress , port , size( ) ); + } } diff --git a/src/main/java/oscP5/OscMessage.java b/src/main/java/oscP5/OscMessage.java index 893bbc2..04737db 100755 --- a/src/main/java/oscP5/OscMessage.java +++ b/src/main/java/oscP5/OscMessage.java @@ -10,17 +10,17 @@ * * This library 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General * Public License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA + * Boston, MA 02111-1307 USA * - * @author ##author## - * @modified ##date## - * @version ##version## + * @author ##author## + * @modified ##date## + * @version ##version## */ package oscP5; @@ -38,7 +38,6 @@ public class OscMessage extends OscPacket { protected final OscArgument _myOscArgument = new OscArgument( ); - protected boolean isPlugged = false; OscMessage( Map m ) { @@ -94,7 +93,7 @@ public OscMessage clear( ) { init( ); setAddress( "" ); setArguments( new Object[ 0 ] ); - return this; + return this; } public OscMessage clearArguments( ) { @@ -320,7 +319,7 @@ public OscMessage add( final Double theValue ) { add( theValue.doubleValue( ) ); return this; } - + public OscMessage add( final Long theValue ) { add( theValue.longValue( ) ); return this; @@ -471,7 +470,17 @@ public OscArgument get( final int theIndex ) { } public final String toString( ) { - return hostAddress + ":" + port + " | " + getAddress( ) + " " + getTypetag( ); + return String.format( "OscMessage{hostAddress=%s, port=%s, address=%s, typetag=%s, data-size=%s, data=%s}" , hostAddress , port , getAddress( ) , getTypetag( ) , getArguments( ).length , arrayToString( getArguments( ) ) ); + } + + private final String arrayToString( Object[] os ) { + String s = "["; + for ( Object o : os ) { + s += o.toString( ) + ","; + } + s = s.replaceAll( ",$" , "" ); + s += "]"; + return s; } public boolean isPlugged( ) { @@ -604,43 +613,35 @@ public void indexOutOfBounds( int n ) { /* Deprecated methods */ - @Deprecated - public void setAddrPattern( final String theAddrPattern ) { + @Deprecated public void setAddrPattern( final String theAddrPattern ) { _myAddrPattern = theAddrPattern.getBytes( ); } - @Deprecated - public void setAddrPattern( final int theAddrPattern ) { + @Deprecated public void setAddrPattern( final int theAddrPattern ) { _myAddrPattern = Bytes.toBytes( theAddrPattern ); } - @Deprecated - public boolean checkAddrPattern( final String theAddrPattern ) { + @Deprecated public boolean checkAddrPattern( final String theAddrPattern ) { return theAddrPattern.equals( addrPattern( ) ); } - @Deprecated - public String typetag( ) { + @Deprecated public String typetag( ) { return Bytes.getAsString( _myTypetag ); } - @Deprecated - public long timetag( ) { + @Deprecated public long timetag( ) { return timetag; } - @Deprecated - public Object[] arguments( ) { + @Deprecated public Object[] arguments( ) { return _myArguments; } - @Deprecated - public OscMessage addArguments( final Object ... theArguments ) { + @Deprecated public OscMessage addArguments( final Object ... theArguments ) { return add( theArguments ); } - @Deprecated - public String addrPattern( ) { + @Deprecated public String addrPattern( ) { return Bytes.getAsString( _myAddrPattern ); } diff --git a/src/main/java/oscP5/OscP5.java b/src/main/java/oscP5/OscP5.java index 7c29411..62dd39d 100755 --- a/src/main/java/oscP5/OscP5.java +++ b/src/main/java/oscP5/OscP5.java @@ -81,6 +81,7 @@ */ public class OscP5 implements Observer { + static public boolean DEBUG = false; final static Logger LOGGER = Logger.getLogger( OscP5.class.getName( ) ); protected Map< String , List< OscPlug >> _myOscPlugMap = new HashMap< String , List< OscPlug >>( ); public final static boolean ON = OscProperties.ON; @@ -97,10 +98,12 @@ public class OscP5 implements Observer { private OscProperties _myOscProperties; private Method _myEventMethod; + private Method _myPacketMethod; private Class< ? > _myEventClass = OscMessage.class; private boolean isEventMethod; + private boolean isPacketMethod; private boolean isBroadcast = false; - public static final String VERSION = "2.0.3"; + public static final String VERSION = "2.0.4"; static private int welcome = 0; private Transmitter transmit; private Object parent; @@ -138,10 +141,17 @@ public OscP5( final Object theParent , final OscProperties theProperties ) { private void init( Object theParent , OscProperties theProperties ) { welcome( ); + parent = ( theParent == null ) ? new Object( ) : theParent; registerDispose( parent ); _myOscProperties = theProperties; - isEventMethod = checkEventMethod( ); + + _myEventMethod = checkEventMethod( parent , "oscEvent" , new Class< ? >[] { OscMessage.class } ); + _myPacketMethod = checkEventMethod( parent , "oscEvent" , new Class< ? >[] { OscBundle.class } ); + isEventMethod = _myEventMethod != null; + isPacketMethod = _myPacketMethod != null; + + println( _myEventMethod , isEventMethod , "\n" , _myPacketMethod , isPacketMethod ); switch ( _myOscProperties.networkProtocol( ) ) { case ( OscProperties.UDP ): @@ -213,8 +223,9 @@ public List< OscEventListener > listeners( ) { } /** - * In case the parent is of type PApplet, register "dispose". Do so quietly, no error messages - * will be displayed. + * Check if we are dealing with a PApplet parent. + * If this is the case, register "dispose". + * Do so quietly, no error messages will be displayed. */ private void registerDispose( Object theObject ) { try { @@ -231,8 +242,7 @@ private void registerDispose( Object theObject ) { parent = theObject; } } catch ( Exception e ) { - System.out.println( "registerDispose failed (1)" ); - // e.printStackTrace( ); + debug( "OscP5.registerDispose()" , "registerDispose failed (1)" , e.getCause( ) ); } try { @@ -240,63 +250,26 @@ private void registerDispose( Object theObject ) { try { method.invoke( parent , new Object[] { "dispose" , this } ); } catch ( Exception e ) { - System.out.println( "registerDispose failed (2)" ); - // e.printStackTrace( ); + debug( "OscP5.registerDispose()" , "registerDispose failed (2)" , e.getCause( ) ); } } catch ( NoSuchMethodException e ) { - System.out.println( "registerDispose failed (3)" ); - // e.printStackTrace( ); + debug( "OscP5.registerDispose()" , "registerDispose failed (3)" , e.getCause( ) ); } } catch ( NullPointerException e ) { - System.out.println( "registerDispose failed (4)" ); - // e.printStackTrace( ); + debug( "OscP5.registerDispose()" , "registerDispose failed (4)" , e.getCause( ) ); } } - private boolean checkEventMethod( ) { - - Class< ? > _myParentClass = parent.getClass( ); - + private Method checkEventMethod( Object theObject , String theMethod , Class< ? >[] theClass ) { + Method method = null; try { + method = theObject.getClass( ).getDeclaredMethod( theMethod , theClass ); + method.setAccessible( true ); + } catch ( SecurityException e1 ) {} catch ( NoSuchMethodException e1 ) {} - Method[] myMethods = _myParentClass.getDeclaredMethods( ); - - for ( int i = 0 ; i < myMethods.length ; i++ ) { - if ( myMethods[ i ].getName( ).indexOf( _myOscProperties.eventMethod( ) ) != -1 ) { - Class< ? >[] myClasses = myMethods[ i ].getParameterTypes( ); - if ( myClasses.length == 1 ) { - _myEventClass = myClasses[ 0 ]; - break; - } - } - } - - } catch ( Throwable e ) { - - } - - String tMethod = _myOscProperties.eventMethod( ); - - if ( tMethod != null ) { - - try { - - Class< ? >[] tClass = { _myEventClass }; - _myEventMethod = _myParentClass.getDeclaredMethod( tMethod , tClass ); - _myEventMethod.setAccessible( true ); - return true; - - } catch ( SecurityException e1 ) { - LOGGER.warning( "### security issues in OscP5.checkEventMethod(). (this occures when running in applet mode)" ); - } catch ( NoSuchMethodException e1 ) {} - } - - if ( _myEventMethod != null ) { - return true; - } - return false; + return method; } public static void flush( final NetAddress theNetAddress , final byte[] theBytes ) { @@ -385,7 +358,6 @@ private void callMethod( final OscMessage theOscMessage ) { } } } - } if ( _myOscPlugMap.containsKey( theOscMessage.getAddress( ) ) ) { @@ -433,12 +405,17 @@ public void process( Object o ) { } private void process( OscPacket thePacket ) { + /* TODO add raw packet listener here */ if ( thePacket instanceof OscMessage ) { callMethod( ( OscMessage ) thePacket ); } else if ( thePacket instanceof OscBundle ) { - OscBundle bundle = ( OscBundle ) thePacket; - for ( OscPacket p : bundle.messages ) { - process( p ); + if ( isPacketMethod ) { + invoke( parent , _myPacketMethod , new Object[] { thePacket } ); + } else { + OscBundle bundle = ( OscBundle ) thePacket; + for ( OscPacket p : bundle.messages ) { + process( p ); + } } } } @@ -624,6 +601,29 @@ public static void flush( final NetAddress theNetAddress , final String theAddrP flush( theNetAddress , ( new OscMessage( theAddrPattern , theArguments ) ).getBytes( ) ); } + static public void print( final Object ... strs ) { + for ( Object str : strs ) { + System.out.print( str + " " ); + } + } + + static public void println( final Object ... strs ) { + print( strs ); + System.out.println( ); + } + + static public void debug( final Object ... strs ) { + if ( DEBUG ) { + println( strs ); + } + } + + static public void sleep( final long theMillis ) { + try { + Thread.sleep( theMillis ); + } catch ( Exception e ) {} + } + /* DEPRECATED methods and constructors. */ @Deprecated public void process( final DatagramPacket thePacket , final int thePort ) { diff --git a/src/main/java/oscP5/OscPatcher.java b/src/main/java/oscP5/OscPatcher.java index ae0359f..f44a2dd 100755 --- a/src/main/java/oscP5/OscPatcher.java +++ b/src/main/java/oscP5/OscPatcher.java @@ -35,31 +35,18 @@ public abstract class OscPatcher { protected static final byte ZEROBYTE = 0x00; - protected static final byte KOMMA = 0x2c; - protected static final long TIMETAG_OFFSET = 2208988800L; - protected static final long TIEMTAG_NOW = 1; - protected List< OscMessage > messages; - protected byte[] _myAddrPattern; - protected int _myAddrInt = -1; - protected byte[] _myTypetag = new byte[ 0 ]; - protected byte[] _myData = new byte[ 0 ]; - protected Object[] _myArguments; - protected boolean isValid = false; - protected long timetag = 1; - protected boolean isArray = false; - protected byte _myArrayType = 0X00; protected int parseBundle( Map m ) { @@ -78,7 +65,8 @@ protected int parseBundle( Map m ) { m0.put( "socket-port" , m.get( "socket-port" ) ); m0.put( "local-port" , m.get( "local-port" ) ); - messages.add( new OscMessage( m ) ); + messages.add( new OscMessage( m0 ) ); + myPosition += myMessageLength; if ( myPosition >= bytes.length ) { break; diff --git a/src/main/java/oscP5/OscPlug.java b/src/main/java/oscP5/OscPlug.java index 3419f6f..6349122 100755 --- a/src/main/java/oscP5/OscPlug.java +++ b/src/main/java/oscP5/OscPlug.java @@ -10,17 +10,17 @@ * * This library 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General * Public License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA + * Boston, MA 02111-1307 USA * - * @author ##author## - * @modified ##date## - * @version ##version## + * @author ##author## + * @modified ##date## + * @version ##version## */ package oscP5; @@ -31,113 +31,70 @@ public class OscPlug { private final static Logger LOGGER = Logger.getLogger( OscPlug.class.getName( ) ); - private boolean _isValid = true; - private String _myTypetag = ""; - private String _myAddrPattern = ""; - private String _myPattern = ""; - private String _myMethodName; - private Object _myObject; - public Method method = null; - private int _myChecker = 0; - protected boolean isArray = false; - private static final int CHECK_ADDRPATTERN_TYPETAG = 0; - private static final int CHECK_ADDRPATTERN = 1; - private static final int CHECK_TYPETAG = 2; public void plug( final Object theObject , final String theMethodName , final String theAddrPattern ) { - + _myObject = theObject; - _myMethodName = theMethodName; - _myAddrPattern = theAddrPattern; - _myChecker = CHECK_ADDRPATTERN_TYPETAG; - + if ( _myMethodName != null && _myMethodName.length( ) > 0 ) { - + Class< ? > myClass = theObject.getClass( ); - Class< ? >[] myParams = null; - Method[] myMethods = myClass.getMethods( ); - _myTypetag = ""; - + for ( int i = 0 ; i < myMethods.length ; i++ ) { - if ( ( myMethods[ i ].getName( ) ).equals( _myMethodName ) ) { - myParams = myMethods[ i ].getParameterTypes( ); - for ( int j = 0 ; j < myParams.length ; j++ ) { - _myTypetag += checkType( myParams[ j ].getName( ) ); - } - break; - } } + if ( myParams != null ) { - makeMethod( theObject.getClass( ) , myParams ); - } else { - LOGGER.warning( "OscPlug, no arguments found for method " + _myMethodName ); - } } } public void plug( final Object theObject , final String theMethodName , final String theAddrPattern , final String theTypetag ) { - + _myObject = theObject; - _myMethodName = theMethodName; - _myAddrPattern = theAddrPattern; - _myTypetag = theTypetag; - _myChecker = CHECK_ADDRPATTERN_TYPETAG; if ( _myMethodName != null && _myMethodName.length( ) > 0 ) { - int tLen = _myTypetag.length( ); - Class< ? >[] myParams; - if ( tLen > 0 ) { - myParams = getArgs( _myTypetag ); - } else { - myParams = null; - } - if ( _isValid ) { - makeMethod( theObject.getClass( ) , myParams ); - } - } } @@ -146,72 +103,48 @@ public Object getObject( ) { } private void makeMethod( final Class< ? > theObjectsClass , final Class< ? >[] theClass ) { - + try { - + method = theObjectsClass.getDeclaredMethod( _myMethodName , theClass ); - _myPattern = _myAddrPattern + _myTypetag; - method.setAccessible( true ); - LOGGER.finest( "plugging " + theObjectsClass + " | " + "addrPattern:" + _myAddrPattern + " typetag:" + _myTypetag + " method:" + _myMethodName ); - } catch ( Exception e ) { - final Class< ? > theObjecsSuperClass = theObjectsClass.getSuperclass( ); - if ( theObjecsSuperClass.equals( Object.class ) ) { - if ( theObjectsClass.getName( ).equals( "java.awt.Component" ) == false ) { - LOGGER.warning( "OscPlug, method " + theObjectsClass.getName( ) + " does not exist in your code." ); - } } else { - makeMethod( theObjecsSuperClass , theClass ); - } } return; } public boolean checkMethod( final OscMessage theOscMessage , final boolean isArray ) { - + String myTypetag; - + /* if theFlag is true and the arguments of theOscmessage can be represented as an array of * the same type, then only fetch the first character of the typetag, otherwise use the full * typetag. */ - + if ( isArray ) { - - myTypetag = "" + theOscMessage.typetag( ).charAt( 0 ); - + myTypetag = "" + theOscMessage.getTypetag( ).charAt( 0 ); } else { - - myTypetag = theOscMessage.typetag( ); - + myTypetag = theOscMessage.getTypetag( ); } switch ( _myChecker ) { - case ( CHECK_ADDRPATTERN_TYPETAG ): - String thePattern = theOscMessage.addrPattern( ) + myTypetag; - return thePattern.equals( _myPattern ); - case ( CHECK_ADDRPATTERN ): - return ( theOscMessage.addrPattern( ).equals( _myAddrPattern ) ); - case ( CHECK_TYPETAG ): - return ( myTypetag.equals( _myTypetag ) ); - default: - return false; } } diff --git a/src/main/java/oscP5/changelog.txt b/src/main/java/oscP5/changelog.txt deleted file mode 100644 index 8a861a6..0000000 --- a/src/main/java/oscP5/changelog.txt +++ /dev/null @@ -1,57 +0,0 @@ -2013-07-21 Andreas Schlegel - - * version 2.0.0 - - * starting new release for processing 2.0 - * removing class OscIn which has been deprecated for a while now. - * src oscP5.OscMessage.java: - replaced add(Object[]) with add(Object...) - - * src oscP5.OscMessage.java: - replaced setArguments(Object[]) with setArguments(Object...) - - * src oscP5.OscMessage.java: - replaced addArguments(Object[]) with addArguments(Object...) - - * src oscP5.OscMessage.java: - replaced add(int[]) with add(int...) - - * src oscP5.OscMessage.java: - replaced add(char[]) with add(char...) - - * src oscP5.OscMessage.java: - replaced add(float[]) with add(float...) - - * src oscP5.OscMessage.java: - replaced add(String[]) with add(String...) - - * src oscP5.OscMessage.java: - replaced add(byte[]) with add(byte...) - - * src oscP5.OscMessage.java: - adding address(), intValue(theIndex), floatValue(theIndex), charValue(theIndex), booleaValue(theIndex), doubleValue(theIndex), stringValue(theIndex), bytesValue(theIndex), blobValue(theIndex) - - * src oscP5.OscMessage.java: - arguments of send methods have been arranged so that the remote address comes first, then - the address pattern followed by all arguments. send methods which do not follow this - sequence have been deprecated - - * src oscP5.OscMessage.java: - removing protected constructors - - * src oscP5.OscP5.java: - removed method handleSystemMessage( OscMessage ), process( TcpPacket, int ), status( ), - disconnect( NetAddress ) , connect( NetAddress , String , Object ) - - * src oscP5.OscP5.java, oscP5.OscNetManager.java: - removing implemented interfaces - - * src oscP5.OscNetManager.java: - removed, sockets are handled by OscP5.java - - * src oscP5.OscStatus.java: - removed - - - -