vvopensource
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
OSCMessage.h
1 
2 #if IPHONE
3 #import <UIKit/UIKit.h>
4 #else
5 #import <Cocoa/Cocoa.h>
6 #endif
7 #import "OSCValue.h"
8 #import <pthread.h>
9 
10 
11 
12 
14 
18 @interface OSCMessage : NSObject <NSCopying> {
19  NSString *address;
20 
21  int valueCount;
23  NSMutableArray *valueArray;
24 
25  NSDate *timeTag;
26 
30  unsigned int queryTXAddress;
31  unsigned short queryTXPort;
32 
33  id msgInfo; // a RETAINED var that isn't used by this class at all- this is open for use by users/subclasses
34 }
35 
36 + (OSCMessage *) parseRawBuffer:(unsigned char *)b ofMaxLength:(int)l fromAddr:(unsigned int)txAddr port:(unsigned short)txPort;
38 + (id) createWithAddress:(NSString *)a;
39 + (id) createQueryType:(OSCQueryType)t forAddress:(NSString *)a;
40 + (id) createReplyForAddress:(NSString *)a;
41 + (id) createReplyForMessage:(OSCMessage *)m;
42 + (id) createErrorForAddress:(NSString *)a;
43 + (id) createErrorForMessage:(OSCMessage *)m;
44 
45 - (id) initWithAddress:(NSString *)a;
46 - (id) initQueryType:(OSCQueryType)t forAddress:(NSString *)a;
47 - (id) initReplyForAddress:(NSString *)a;
48 - (id) initReplyForMessage:(OSCMessage *)m;
49 - (id) initErrorForAddress:(NSString *)a;
50 - (id) initErrorForMessage:(OSCMessage *)m;
51 - (id) initFast:(NSString *)addr :(BOOL)addrHasWildcards :(OSCMessageType)mType :(OSCQueryType)qType :(unsigned int)qTxAddr :(unsigned short)qTxPort;
52 
54 - (void) addInt:(int)n;
56 - (void) addFloat:(float)n;
58 - (void) addDouble:(double)n;
60 - (void) addString:(NSString *)n;
61 #if IPHONE
62 - (void) addColor:(UIColor *)c;
64 #else
65 - (void) addColor:(NSColor *)c;
67 #endif
68 - (void) addBOOL:(BOOL)n;
71 - (void) addNSDataBlob:(NSData *)b;
72 
74 - (void) addValue:(OSCValue *)n;
75 
77 - (OSCValue *) value;
78 - (OSCValue *) valueAtIndex:(int)i;
79 
81 - (float) calculateFloatValue;
83 - (float) calculateFloatValueAtIndex:(int)i;
84 
86 - (double) calculateDoubleValue;
88 - (double) calculateDoubleValueAtIndex:(int)i;
89 
91 - (NSString *) address;
93 - (NSString *) replyAddress;
94 - (int) valueCount;
95 - (NSMutableArray *) valueArray;
96 - (NSDate *) timeTag;
97 - (void) setTimeTag:(NSDate *)n;
98 
99 - (long) bufferLength;
100 - (void) writeToBuffer:(unsigned char *)b;
101 - (NSData *) writeToNSData;
102 
103 - (BOOL) wildcardsInAddress;
104 - (OSCMessageType) messageType;
105 - (OSCQueryType) queryType;
106 - (unsigned int) queryTXAddress;
107 - (unsigned short) queryTXPort;
108 
109 - (void) _setWildcardsInAddress:(BOOL)n;
110 - (void) _setMessageType:(OSCMessageType)n;
111 - (void) _setQueryType:(OSCQueryType)n;
112 - (NSString *) _description;
113 
114 - (void) setMsgInfo:(id)n;
115 - (id) msgInfo;
116 
117 @end
OSCMessageType messageType
OSCMessageTypeControl by default.
Definition: OSCMessage.h:28
NSString * address
The address this message is being sent to. does NOT include any address formatting related to OSC que...
Definition: OSCMessage.h:19
Corresponds to an OSC message: contains zero or more values, and the address path the values have to ...
Definition: OSCMessage.h:18
BOOL wildcardsInAddress
Calculated while OSCMessage is being parsed or created. Used to expedite message dispatch by allowing...
Definition: OSCMessage.h:27
int valueCount
The number of values in this message.
Definition: OSCMessage.h:21
NSMutableArray * valueArray
Only used if 'valCount' is > 1.
Definition: OSCMessage.h:23
OSCValue encapsulates any value you can send or receive via OSC. It is NOT mutable at this time...
Definition: OSCValue.h:21
unsigned int queryTXAddress
0 by default, set when parsing received data- NETWORK BYTE ORDER. technically, it's a 'struct in_addr...
Definition: OSCMessage.h:30
NSDate * timeTag
Nil, or the NSDate at which this message should be executed. If nil, assume immediate execution...
Definition: OSCMessage.h:25
OSCQueryType queryType
OSCQueryTypeUnknown by default.
Definition: OSCMessage.h:29
OSCValue * value
Only used if 'valueCount' is < 2.
Definition: OSCMessage.h:22
unsigned short queryTXPort
0 by default, set when parsing received data- NETWORK BYTE ORDER. this is the port from which the UDP...
Definition: OSCMessage.h:31
OSCQueryType
OSCQueryType.
Definition: OSCConstants.h:131
OSCMessageType
OSCMessageType.
Definition: OSCConstants.h:119