|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.illposed.osc.OSCPacket
com.illposed.osc.OSCBundle
A bundle represents a collection of osc packets (either messages or other bundles) and has a timetag which can be used by a scheduler to execute a bundle in the future instead of immediately (OSCMessages are executed immediately). Bundles should be used if you want to send multiple messages to be executed atomically together, or you want to schedule one or more messages to be executed in the future.
Internally, I use Vector to maintain jdk1.1 compatability
Copyright (C) 2003-2006, C. Ramakrishnan / Illposed Software. All rights reserved.
See license.txt (or license.rtf) for license information.
| Field Summary | |
protected java.util.Vector |
packets
|
static java.math.BigInteger |
SECONDS_FROM_1900_to_1970
2208988800 seconds -- includes 17 leap years |
protected java.util.Date |
timestamp
|
static java.util.Date |
TIMESTAMP_IMMEDIATE
The Java representation of an OSC timestamp with the semantics of "immediately" |
| Fields inherited from class com.illposed.osc.OSCPacket |
byteArray, isByteArrayComputed |
| Constructor Summary | |
OSCBundle()
Create a new empty OSCBundle with a timestamp of immediately. |
|
OSCBundle(java.util.Date timestamp)
Create an OSCBundle with the specified timestamp. |
|
OSCBundle(OSCPacket[] packets)
Create an OSCBundle made up of the given packets with a timestamp of now. |
|
OSCBundle(OSCPacket[] packets,
java.util.Date timestamp)
Create an OSCBundle, specifying the packets and timestamp. |
|
| Method Summary | |
void |
addPacket(OSCPacket packet)
Add a packet to the list of packets in this bundle. |
protected void |
computeByteArray(OSCJavaToByteArrayConverter stream)
Compute the OSC byte stream representation of the bundle. |
protected void |
computeTimeTagByteArray(OSCJavaToByteArrayConverter stream)
Convert the timetag (a Java Date) into the OSC byte stream. |
OSCPacket[] |
getPackets()
Get the packets contained in this bundle. |
java.util.Date |
getTimestamp()
Return the time the bundle will execute. |
void |
setTimestamp(java.util.Date timestamp)
Set the time the bundle will execute. |
| Methods inherited from class com.illposed.osc.OSCPacket |
computeByteArray, getByteArray, init |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.math.BigInteger SECONDS_FROM_1900_to_1970
public static final java.util.Date TIMESTAMP_IMMEDIATE
protected java.util.Date timestamp
protected java.util.Vector packets
| Constructor Detail |
public OSCBundle()
public OSCBundle(java.util.Date timestamp)
timestamp - the time to execute the bundlepublic OSCBundle(OSCPacket[] packets)
packets - array of OSCPackets to initialize this object with
public OSCBundle(OSCPacket[] packets,
java.util.Date timestamp)
packets - the packets that make up the bundletimestamp - the time to execute the bundle| Method Detail |
public java.util.Date getTimestamp()
public void setTimestamp(java.util.Date timestamp)
timestamp - Datepublic void addPacket(OSCPacket packet)
packet - OSCMessage or OSCBundlepublic OSCPacket[] getPackets()
protected void computeTimeTagByteArray(OSCJavaToByteArrayConverter stream)
protected void computeByteArray(OSCJavaToByteArrayConverter stream)
computeByteArray in class OSCPacketstream - OscPacketByteArrayConverter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||