vvopensource
|
OSCValue encapsulates any value you can send or receive via OSC. It is NOT mutable at this time. More...
#import <OSCValue.h>
Inherits NSObject, and <NSCopying>.
Instance Methods | |
(int) | - intValue |
Returns an int value corresponding to the instance's value. | |
(float) | - floatValue |
Returns a float value corresponding to the instance's value. | |
(NSString *) | - stringValue |
Returns an NSString corresponding to the instance's value. | |
(struct timeval) | - timeValue |
Returns the standard unix timeval struct, with two 32-bit longs- one for seconds, one for microseconds. | |
(NSDate *) | - dateValue |
Returns an NSDate created from the time value. | |
(long long) | - longLongValue |
Returns a 64-bit signed integer value corresponding to the instance's value. | |
(double) | - doubleValue |
Returns a 64-bit float (a double) corresopnding to the instance's value. | |
(char) | - charValue |
Returns a char value corresponding to the instance's value. | |
(id) | - colorValue |
Returns a color value corresponding to the instance's value. | |
(Byte) | - midiPort |
Returns the midi port (if the value type is OSCValMIDI) | |
(OSCMIDIType) | - midiStatus |
Returns the midi status byte (if the value type is OSCValMIDI) | |
(Byte) | - midiData1 |
Returns the first midi data byte (if the value type is OSCValMIDI) | |
(Byte) | - midiData2 |
Returns the second midi data byte (if the value type is OSCValMIDI) | |
(BOOL) | - boolValue |
Returns a BOOL value corresponding to the instance's value. | |
(void) | - addValue: |
Adds the passed (non-nil) value to the array (only works if receiver is an array-type OSCValue) | |
(NSMutableArray *) | - valueArray |
Returns this value's NSMutableArray, which contains zero or more OSCValue instances. | |
(NSData *) | - blobNSData |
Returns an auto-released NSData instance containing the "blob" data. | |
(int) | - SMPTEValue |
Returns a 32-bit value representing the SMPTE time. | |
(float) | - calculateFloatValue |
Returns a float value, regardless as to the type of the OSCValue. | |
(double) | - calculateDoubleValue |
Returns a double value, regardless as to the type of the OSCValue. | |
Class Methods | |
(id) | + createWithInt: |
Creates & returns an auto-released instance of OSCValue with an int. | |
(id) | + createWithFloat: |
Creates & returns an auto-released instance of OSCValue with a float. | |
(id) | + createWithString: |
Creates & returns an auto-released instance of OSCValue with an NSString. | |
(id) | + createWithTimeSeconds:microSeconds: |
Creates & returns an auto-released instance of OSCValue with the timeval represented as two 32-bit unsigned ints- seconds and microseconds. | |
(id) | + createWithLongLong: |
Creates & returns an auto-released instance of OSCValue with a 64-bit signed integer. | |
(id) | + createWithDouble: |
Creates & returns an auto-released instance of OSCValue with a 64-bit float (double) | |
(id) | + createWithChar: |
Creates & returns an auto-released instance of OSCValue with a character. | |
(id) | + createWithColor: |
Creates & returns an auto-released instance of OSCValue with a color. | |
(id) | + createWithMIDIChannel:status:data1:data2: |
Creates & returns an auto-released instance of OSCValue with the passed MIDI data. | |
(id) | + createWithBool: |
Creates & returns an auto-released instance of OSCValue with a BOOL. | |
(id) | + createWithNil |
Creates & returns an auto-released instance of OSCValue representing nil. | |
(id) | + createWithInfinity |
Creates & returns an auto-released instance of OSCValue representing infinity. | |
(id) | + createArray |
Creates & returns an auto-released instance of OSCValue that contains a mutable array (of other OSCValue instances) | |
(id) | + createWithNSDataBlob: |
Creates & returns an auto-released instance of OSCValue with an NSData blob. | |
(id) | + createWithSMPTEVals:::::: |
Creates & returns an auto-released instance of OSCValue with an SMPTE timecode. | |
Protected Attributes | |
void * | value |
The actual value is stored here; this memory is allocated dynamically, and the size of this pointer varies depending on the type. Whenever possible the value is stored as a basic C data type, but it falls back to NSObjects (NSString, NSColor/UIColor, etc) for more complex data types. | |
Properties | |
OSCValueType | type |
The type of the OSCValue. | |
OSCValue encapsulates any value you can send or receive via OSC. It is NOT mutable at this time.
When you send or receive values via OSC, you'll be working with OSCValue objects in an OSCMessage. Internally, OSCValue isn't mutable, and it attempts to store its value in its native format (int for an int, float for a float) instead of relying on NSNumber. The exceptions to this are NSColor/UIColor and NSString.