vvopensource
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
Instance Methods | Protected Attributes
OSCInPort Class Reference

OSCInPort handles everything needed to receive OSC data on a given port. More...

#import <OSCInPort.h>

Inherits NSObject.

Inherited by OSCInPortRetainsRaw.

Instance Methods

(NSDictionary *) - createSnapshot
 returns an auto-released NSDictionary which describes this port (useful for restoring the state of the port later with OSCManager )
 
(void) - handleScratchArray:
 called internally by this OSCInPort, passed an array of OSCMessage objects corresponding to the serially received data. useful if you're subclassing OSCInPort. More...
 
(void) - _addMessage:
 called internally as messages are parsed. useful if you're subclassing OSCInPort.
 
(void) - dispatchQuery:toOutPort:timeout:replyHandler:
 Only used to support the (non-specification) OSC query protocol. All queries should be sent via one of these methods (the query has to actually be sent from an input port, or the client won't know what to reply to- the manager takes care of this, and also checks timeouts).
 
(id) - delegate
 returns the delegate (default is the OSCManager which created me).
 
(void) - setDelegate:
 sets the delegate- the delegate is NOT retained! if the delegate gets released before the port, make sure you set this to nil!
 
(void) - setInterval:
 sets the frequency of the callback which checks for OSC input
 

Protected Attributes

NSString * portLabel
 the "name" of the port (added to distinguish multiple osc input ports for bonjour)
 
id delegate
 my delegate gets notified of incoming messages
 

Detailed Description

OSCInPort handles everything needed to receive OSC data on a given port.

You should never create or destroy an instance of this class manually. OSCInPort instances should be created/destroyed by the OSCManager.

Each OSCInPort is running in its own separate thread- so make sure anything called as a result of received OSC input is thread-safe! When OSCInPort receives data, it gets parsed and passed to the in port's delegate as a series of OSCMessages consisting of an address path and an OSCValue. By default, the inport's delegate is the manager which created it- and by default, managers pass this data on to their delegates (your objects/app).

the documentation here only covers the basics, the header file for this class is small and heavily commented if you want to know more because you're heavily customizing OSCInPort.

Method Documentation

- (void) handleScratchArray: (NSArray *)  a

called internally by this OSCInPort, passed an array of OSCMessage objects corresponding to the serially received data. useful if you're subclassing OSCInPort.

if you don't want to bother with delegates (or you're not using OSCManager), you can override this method in your subclass of OSCInPort to receive an array of OSCMessage objects. by default, this method just calls "receivedOSCMessage:" with the in port's delegate for each of the items in the passed array.


The documentation for this class was generated from the following files: