public class LXOscEngine extends LXComponent
Modifier and Type | Class and Description |
---|---|
class |
LXOscEngine.Receiver |
class |
LXOscEngine.Transmitter |
LXComponent.Placeholder, LXComponent.Renamable
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_RECEIVE_HOST |
static int |
DEFAULT_RECEIVE_PORT |
static String |
DEFAULT_TRANSMIT_HOST |
static int |
DEFAULT_TRANSMIT_PORT |
BooleanParameter |
receiveActive |
StringParameter |
receiveHost |
DiscreteParameter |
receivePort |
BooleanParameter |
transmitActive |
StringParameter |
transmitHost |
DiscreteParameter |
transmitPort |
BooleanParameter |
unknownReceiveHost |
BooleanParameter |
unknownTransmitHost |
controlSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor
Constructor and Description |
---|
LXOscEngine(LX lx) |
Modifier and Type | Method and Description |
---|---|
void |
dispatch()
Invoked by the main engine to dispatch all OSC messages on the input queue.
|
void |
dispose()
Invoked when a component is being removed from the system and will no longer be used at all.
|
static void |
error(Exception x,
String message) |
static void |
error(String message) |
static String |
getOscAddress(LXParameter p)
Gets the OSC address pattern for a parameter
|
static void |
log(String message) |
void |
onParameterChanged(LXParameter p)
Subclasses are free to override this if desired.
|
LXOscEngine.Receiver |
receiver(int port) |
LXOscEngine.Receiver |
receiver(int port,
InetAddress address) |
LXOscEngine.Receiver |
receiver(int port,
InetAddress address,
int bufferSize) |
LXOscEngine.Receiver |
receiver(int port,
int bufferSize) |
LXOscEngine.Receiver |
receiver(int port,
String host) |
LXOscEngine |
sendMessage(String path,
int value) |
LXOscEngine |
sendParameter(LXParameter parameter) |
LXOscEngine.Transmitter |
transmitter(InetAddress address,
int port) |
LXOscEngine.Transmitter |
transmitter(InetAddress address,
int port,
int bufferSize) |
LXOscEngine.Transmitter |
transmitter(String host,
int port) |
addArray, addChild, addInternalParameter, addParameter, addParameter, contains, copyParameters, getChild, getComponentName, getComponentName, getComponentName, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, getPath, handleOscMessage, load, loadParameters, removeParameter, removeParameter, save, saveParameters, setParent, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
get, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter
public static final int DEFAULT_RECEIVE_PORT
public static final int DEFAULT_TRANSMIT_PORT
public static final String DEFAULT_RECEIVE_HOST
public static final String DEFAULT_TRANSMIT_HOST
public final StringParameter receiveHost
public final BooleanParameter unknownReceiveHost
public final DiscreteParameter receivePort
public final StringParameter transmitHost
public final BooleanParameter unknownTransmitHost
public final DiscreteParameter transmitPort
public final BooleanParameter receiveActive
public final BooleanParameter transmitActive
public LXOscEngine(LX lx)
public LXOscEngine sendMessage(String path, int value)
public LXOscEngine sendParameter(LXParameter parameter)
public static String getOscAddress(LXParameter p)
p
- parameterpublic void onParameterChanged(LXParameter p)
LXComponent
onParameterChanged
in interface LXParameterListener
onParameterChanged
in class LXComponent
p
- Parameter that has a value changepublic LXOscEngine.Receiver receiver(int port, String host) throws SocketException, UnknownHostException
SocketException
UnknownHostException
public LXOscEngine.Receiver receiver(int port, InetAddress address) throws SocketException
SocketException
public LXOscEngine.Receiver receiver(int port, InetAddress address, int bufferSize) throws SocketException
SocketException
public LXOscEngine.Receiver receiver(int port) throws SocketException
SocketException
public LXOscEngine.Receiver receiver(int port, int bufferSize) throws SocketException
SocketException
public LXOscEngine.Transmitter transmitter(String host, int port) throws SocketException, UnknownHostException
SocketException
UnknownHostException
public LXOscEngine.Transmitter transmitter(InetAddress address, int port) throws SocketException
SocketException
public LXOscEngine.Transmitter transmitter(InetAddress address, int port, int bufferSize) throws SocketException
SocketException
public void dispatch()
public void dispose()
LXComponent
super.dispose()
at the appropriate
time to perform the basic cleanup, which may need to happen either before or after cleaning
up other objects.dispose
in class LXComponent
public static final void log(String message)
public static final void error(String message)
LX library by Mark C. Slee. © 2012-2020