public class OscReceiver extends TypedAtomicActor implements oscP5.OscEventListener
Receive Open Sound Control (OSC) Messages by listening to the specified port and send each message to the corresponding output by name matching. This implies that the user will have to manually add output ports to the receiver, according to the messages they would like to listen for. Type of each port is determined by the first token that is received at that port. Allowed types are int, double, float and string. If input type is not specified by OSC, or if the defined type does not match any of the allowed types, tokens will still be produced as ObjectTokens.
See: http://opensoundcontrol.org/ for the full OSC Specification.
OscSender| Red (ilgea) |
Entity.ContainedObjectsIterator| Modifier and Type | Field and Description |
|---|---|
Parameter |
port
The receive port
|
_typesValid_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKSCOMPLETED, NOT_READY, STOP_ITERATING| Constructor and Description |
|---|
OscReceiver(CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attributeChanged(Attribute attribute)
React to a change in an attribute.
|
java.lang.Object |
clone(Workspace workspace)
Clone the actor into the specified workspace.
|
void |
fire()
Do nothing.
|
void |
initialize()
Initialize this actor.
|
void |
oscEvent(oscP5.OscMessage theMessage) |
void |
oscStatus(oscP5.OscStatus s) |
boolean |
postfire()
Return true, unless stop() has been called, in which case,
return false.
|
void |
wrapup()
Do nothing except invoke the wrapup() methods of any
objects that have been registered with addInitializable().
|
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspaceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortListisFireFunctional, isStrict, iterate, prefire, stop, stopFire, terminateaddInitializable, preinitialize, removeInitializabledescription, getContainer, getDisplayName, getFullName, getName, getName, setNamegetDerivedLevel, getDerivedList, propagateValuepublic Parameter port
public OscReceiver(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
container - The container.name - The name of this actortrainingSequence - The input string that the oracle is built fromIllegalActionException - If the actor cannot be contained
by the proposed container.NameDuplicationException - If the container already has an
actor with this name.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
TypedAtomicActorclone in class TypedAtomicActorworkspace - The workspace for the new object.java.lang.CloneNotSupportedException - If a derived class contains
an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String),
NamedObj.setDeferringChangeRequests(boolean)public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged in class NamedObjattribute - The attribute that changed.IllegalActionException - If the change is not acceptable
to this container (not thrown in this base class).public void initialize()
throws IllegalActionException
AtomicActorinitialize in interface Initializableinitialize in class AtomicActor<TypedIOPort>IllegalActionException - If a derived class throws it.public void fire()
throws IllegalActionException
AtomicActorfire in interface Executablefire in class AtomicActor<TypedIOPort>IllegalActionException - Not thrown in this base class.public boolean postfire()
throws IllegalActionException
AtomicActorpostfire in interface Executablepostfire in class AtomicActor<TypedIOPort>IllegalActionException - Not thrown in this base class.public void oscEvent(oscP5.OscMessage theMessage)
oscEvent in interface oscP5.OscEventListenerpublic void oscStatus(oscP5.OscStatus s)
oscStatus in interface oscP5.OscEventListenerpublic void wrapup()
throws IllegalActionException
AtomicActorwrapup in interface Initializablewrapup in class AtomicActor<TypedIOPort>IllegalActionException - Not thrown in this base class.