vvopensource
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
OSCOutPort.h
1 
2 #if IPHONE
3 #import <UIKit/UIKit.h>
4 #else
5 #import <Cocoa/Cocoa.h>
6 #endif
7 
8 
9 #include <arpa/inet.h>
10 
11 #import "OSCPacket.h"
12 #import "OSCBundle.h"
13 #import "OSCMessage.h"
14 
15 
16 
17 
19 
25 @interface OSCOutPort : NSObject {
26  BOOL deleted;
27  int sock;
28  struct sockaddr_in addr;
29  unsigned short port;
30  NSString *addressString;
31  NSString *portLabel;
32 }
33 
35 + (id) createWithAddress:(NSString *)a andPort:(unsigned short)p;
37 + (id) createWithAddress:(NSString *)a andPort:(unsigned short)p labelled:(NSString *)l;
38 - (id) initWithAddress:(NSString *)a andPort:(unsigned short)p;
39 - (id) initWithAddress:(NSString *)a andPort:(unsigned short)p labelled:(NSString *)l;
40 - (void) prepareToBeDeleted;
41 
43 - (NSDictionary *) createSnapshot;
44 
45 - (BOOL) createSocket;
46 
48 - (void) sendThisBundle:(OSCBundle *)b;
50 - (void) sendThisMessage:(OSCMessage *)m;
52 - (void) sendThisPacket:(OSCPacket *)p;
53 
55 - (void) setAddressString:(NSString *)n;
57 - (void) setPort:(unsigned short)p;
59 - (void) setAddressString:(NSString *)n andPort:(unsigned short)p;
60 
61 - (BOOL) _matchesRawAddress:(unsigned int)a andPort:(unsigned short)p;
62 - (BOOL) _matchesRawAddress:(unsigned int)a;
63 
65 - (NSString *) portLabel;
67 - (void) setPortLabel:(NSString *)n;
68 
69 - (unsigned short) port;
70 - (NSString *) addressString;
71 - (struct sockaddr_in *) addr;
72 
73 @end
Used to parse raw OSC data or to assemble raw OSC data from OSCMessages/OSCBundles.
Definition: OSCPacket.h:20
Corresponds to an OSC message: contains zero or more values, and the address path the values have to ...
Definition: OSCMessage.h:18
unsigned short port
The port i'm sending to.
Definition: OSCOutPort.h:29
NSString * addressString
The IP address i'm sending to as an NSString.
Definition: OSCOutPort.h:30
An OSCBundle is a "container" for multiple OSC messages or bundles (bundles may also be nested) ...
Definition: OSCBundle.h:24
NSString * portLabel
The label used to distinguish this port from other OSCOutPorts in the same OSCManager.
Definition: OSCOutPort.h:31
OSCOutPort handles everything needed to send OSC data to a given address.
Definition: OSCOutPort.h:25