new OSC()
The OSC service exposes functionality for listening to incoming messages
from the server and sending outgoing messages to the server.
Methods
incomingMessageHandler(message) → {undefined}
Handles OSC messages received over socket.io. These messages are then passed on to any subscribers to the message address. Messages received for which there are no subscribers are logged to the console.
Parameters:
| Name | Type | Description |
|---|---|---|
message |
Object | Received OSC message |
Returns:
- Type
- undefined
subscribe(address, callback) → {undefined}
Subscribe to receive OSC messages for a particular address.
Parameters:
| Name | Type | Description |
|---|---|---|
address |
string | The address of messages for which the caller would like to subscribe |
callback |
Angular.OSC.OSCSubscriberCallback | The callback
to be called when messages with the address in |
Returns:
- Type
- undefined
unsubscribe(address, callback) → {undefined}
Stop receiving OSC messages with a particular address.
Parameters:
| Name | Type | Description |
|---|---|---|
address |
string | The address of messages for which the caller would like to unsubscribe |
callback |
Angular.OSC.OSCSubscriberCallback | The callback that was passed with the original call to Angular.OSC#subscribe} |
Returns:
- Type
- undefined
Type Definitions
OSCSubscriberCallback(message)
Callback that will be called when a message is received for a specified address.
Parameters:
| Name | Type | Description |
|---|---|---|
message |
Object | The OSC message that was received |