OSCMessageDispatcher:
Filter:
Classes | External Control > OSC > Dispatchers

OSCMessageDispatcher : AbstractWrappingDispatcher : AbstractDispatcher : Object

The default dispatcher class for OSCFunc and OSCdef.

Description

OSCMessageDispatcher dispatches incoming OSC messages to matching functions. Normally users should not have to create or message instances of this class directly.

Class Methods

Inherited class methods

Instance Methods

.wrapFunc(funcProxy)

Called internally to wrap functions in message matcher objects, if needed.

Arguments:

funcProxy

An instance of OSCFunc or OSCdef whose function(s) are to be wrapped.

.getKeysForFuncProxy(funcProxy)

Get the keys at which a responder func's functions are stored in this dispatcher's active dictionary. The keys will be an OSC path.

Arguments:

funcProxy

The OSCFunc or OSCdef whose keys should be returned.

Returns:

An Array containing the funcProxy's path as a Symbol.

.value(msg, time, addr, recvPort)

Attempt to match an incoming OSC message with this dispatcher's responder funcs, and evaluate their functions for all matches found.

Arguments:

msg

The OSC message as an Array in the form [OSCAddress, other args].

time

A Float indicating the time the incoming message was sent.

addr

A NetAddr indicating the source of the message.

recvPort

An Integer indicating the port on which the message was received.

.register

Adds this dispatcher to thisProcess.recvOSCfunc.

.unregister

Removes this dispatcher from thisProcess.recvOSCfunc.

.typeKey

Returns 'OSC unmatched'.

Returns:

A Symbol.

Inherited instance methods