public abstract class OscControl extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
OscControl.DeviceInitializationException |
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
logger |
protected OscReceiver |
receiver |
protected long |
timeOfLastEvent |
| Modifier | Constructor and Description |
|---|---|
protected |
OscControl(OscReceiver receiver) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(OscSender sender)
Attaches an OSC sender, also calling the onConnect method which may be used to initialize this control
|
void |
disconnect()
Closes and detaches the OSC sender, if one has previously been attached with
connect() |
OscReceiver |
getReceiver()
Returns the handler for incoming OSC messages
|
protected void |
onConnect() |
void |
send(com.illposed.osc.OSCMessage message)
Passes an OSC message to the attached sender.
|
void |
setThrottlingPeriod(long throttlingPeriod)
Sets the period for synchronous (by default) or asychronous throttling
|
void |
throttleAsynchronously(int bufferCapacity)
Start a separate thread to throttle outgoing messages, keeping them in a buffer of limited capacity and dropping
messages above that capacity.
|
protected static final Logger logger
protected final OscReceiver receiver
protected long timeOfLastEvent
protected OscControl(OscReceiver receiver)
receiver - a handler for incoming OSC messagespublic OscReceiver getReceiver()
public void setThrottlingPeriod(long throttlingPeriod)
throttlingPeriod - a minimum interval between outgoing messagespublic void throttleAsynchronously(int bufferCapacity)
bufferCapacity - the maximum number of messages in a waiting queue of messages to be sent.
Additional messages are dropped until the queue shrinks.public void connect(OscSender sender)
sender - the new OSC senderpublic void disconnect()
connect()protected void onConnect()
public void send(com.illposed.osc.OSCMessage message)
message - the OSC message to sendCopyright © 2017. All Rights Reserved.