vvopensource
|
Corresponds to an OSC message: contains zero or more values, and the address path the values have to get sent to. More...
#import <OSCMessage.h>
Inherits NSObject, and <NSCopying>.
Instance Methods | |
(void) | - addInt: |
Add the passed int to the message. | |
(void) | - addFloat: |
Add the passed float to the message. | |
(void) | - addDouble: |
Add the passed double to the message. | |
(void) | - addString: |
Add the passed string to the message. | |
(void) | - addColor: |
Add the passed color to the message. | |
(void) | - addBOOL: |
Add the passed bool to the message. | |
(void) | - addNSDataBlob: |
Add the passed NSData instance to the message as an OSC-blob. | |
(void) | - addValue: |
Adds the passed OSCValue object to the mesage. | |
(OSCValue *) | - value |
NOT A KEY-VALUE METHOD- function depends on valueCount! 'value' either returns "val" or the first object in "valArray", depending on "valCount". More... | |
(float) | - calculateFloatValue |
Returns 0.0 if 'valueArray' is empty, otherwise calculates the float val for the first OSCValue in 'valueArray'. | |
(float) | - calculateFloatValueAtIndex: |
Returns 0.0 if 'valueArray' is empty, otherwise calculates the float val for the OSCValue in 'valueArray' at the specified index. | |
(double) | - calculateDoubleValue |
Returns 0.0 if 'valueArray' is empty, otherwise calculates the float val for the first OSCValue in 'valueArray'. | |
(double) | - calculateDoubleValueAtIndex: |
Returns 0.0 if 'valueArray' is empty, otherwise calculates the float val for the OSCValue in 'valueArray' at the specified index. | |
(NSString *) | - address |
Returns the address variable. | |
(NSString *) | - replyAddress |
Returns the reply address for this message. If this was a query its address includes the query specifier in it, so I can't just return the 'address' variable (which explicitly does NOT contain any OSC query protocol data) | |
Class Methods | |
(id) | + createWithAddress: |
Creates & returns an auto-released instance of OSCMessage which will be sent to the passed path. | |
Protected Attributes | |
NSString * | address |
The address this message is being sent to. does NOT include any address formatting related to OSC query stuff! this is literally just the address of the destination node! | |
int | valueCount |
The number of values in this message. | |
OSCValue * | value |
Only used if 'valueCount' is < 2. | |
NSMutableArray * | valueArray |
Only used if 'valCount' is > 1. | |
NSDate * | timeTag |
Nil, or the NSDate at which this message should be executed. If nil, assume immediate execution. | |
BOOL | wildcardsInAddress |
Calculated while OSCMessage is being parsed or created. Used to expedite message dispatch by allowing regex to be skipped when unnecessary. | |
OSCMessageType | messageType |
OSCMessageTypeControl by default. | |
OSCQueryType | queryType |
OSCQueryTypeUnknown by default. | |
unsigned int | queryTXAddress |
0 by default, set when parsing received data- NETWORK BYTE ORDER. technically, it's a 'struct in_addr'- this is the IP address from which the message was received. queries need to send their replies back somewhere! | |
unsigned short | queryTXPort |
0 by default, set when parsing received data- NETWORK BYTE ORDER. this is the port from which the UDP message that created this message was received | |
Corresponds to an OSC message: contains zero or more values, and the address path the values have to get sent to.
According to the OSC spec, a message consists of an address path (where the message should be sent) and zero or more arguments. An OSCMessage must be created with an address path- once the OSCMessage exists, you may add as many arguments to it as you'd like.
- (OSCValue *) value |
NOT A KEY-VALUE METHOD- function depends on valueCount! 'value' either returns "val" or the first object in "valArray", depending on "valCount".
NOT A KEY-VALUE METHOD!
The 'value' method is purely for convenience- most OSC messages only have a single value, and most of the time when they have multiple values you really only want the first one. If this message only has a single value, it returns the value- if the message has multiple values, this method only returns the first of my values!