VuoOsc implementation.
Definition in file VuoOsc.cc.
Go to the source code of this file.
Classes | |
class | VuoOscInPacketListener |
This class maintains a list of trigger functions to be called when an OSC message is received. More... | |
class | VuoOscInSocket |
Opens a reusable UDP socket, attaches the specified listener to it (on a separate thread), and starts it receiving messages. More... | |
struct | VuoOscIn_internal |
Private data for a VuoOscIn instance. More... | |
class | VuoOscOutputIdentifier |
Enable VuoOscOutputDevice to be used in std::map . More... | |
Typedefs | |
typedef void(* | VuoOscReceivedMessageTrigger) (VuoOscMessage) |
A node's trigger method, to be called when an OSC message is received. More... | |
typedef struct _VuoOscOut_internal * | VuoOscOut_internal |
Private data for a VuoOscOut instance. More... | |
Functions | |
static void | registerCallback (CFNetServiceRef theService, CFStreamError *error, void *info) |
Callback needed to asynchronously register a CFNetService. More... | |
static CFNetServiceRef | VuoOsc_createNetService (char *name, int port, bool isServer) |
Creates a new CFNetService for advertising an OSC server or client. More... | |
static void | VuoOsc_destroyNetService (CFNetServiceRef netService) |
Stop advertising the Bonjour service. More... | |
void | VuoOscIn_destroy (VuoOscIn oi) |
Destroys an OSC server. More... | |
VuoOscIn | VuoOscIn_make (const VuoOscInputDevice device) |
Creates a reference-counted object to manage receiving messages from a OSC device. More... | |
void | VuoOscIn_enableTriggers (VuoOscIn oi, VuoOutputTrigger(receivedMessage, VuoOscMessage)) |
Sets up the OSC server to call the trigger functions when it receives a message. More... | |
void | VuoOscIn_disableTriggers (VuoOscIn oi) |
Stops the OSC server from calling trigger functions when it receives a message. More... | |
static int | VuoOsc_findAvailableUdpPort (void) |
Returns an available UDP port. More... | |
VuoOscOut | VuoOscOut_getShared (const VuoOscOutputDevice device) |
Returns the reference-counted object for the specified OSC output device. More... | |
void | VuoOscOut_sendMessages (VuoOscOut ao, VuoList_VuoOscMessage messages) |
Sends a message to the specified OSC device. More... | |
VUOKEYEDPOOL (VuoOscOutputIdentifier, VuoOscOut_internal) | |
VuoKeyedPool_VuoOscOut. More... | |
static void | VuoOscOut_destroy (VuoOscOut_internal ai) |
VuoKeyedPool_VuoOscOut. More... | |
VuoOscOut_internal | VuoOscOut_make (VuoOscOutputIdentifier device) |
VuoKeyedPool_VuoOscOut. More... | |
VUOKEYEDPOOL_DEFINE (VuoOscOutputIdentifier, VuoOscOut_internal, VuoOscOut_make) | |
VuoKeyedPool_VuoOscOut. More... | |
Variables | |
std::map< unsigned int, VuoOscInSocket * > | VuoOscInPool |
Sockets, keyed by port. More... | |
dispatch_semaphore_t | VuoOscInPool_semaphore = NULL |
Synchronizes access to VuoOscInPool . More... | |
struct VuoOscIn_internal |
Class Members | ||
---|---|---|
VuoOscInputDevice | device | The port to listen on, and the name of the Bonjour service. |
VuoOscReceivedMessageTrigger | receivedMessage | The trigger function to call when a newly-arrived OSC message has been parsed. |
typedef struct _VuoOscOut_internal * VuoOscOut_internal |
Private data for a VuoOscOut instance.
typedef void(* VuoOscReceivedMessageTrigger) (VuoOscMessage) |
|
static |
VUOKEYEDPOOL | ( | VuoOscOutputIdentifier | , |
VuoOscOut_internal | |||
) |
VuoKeyedPool_VuoOscOut.
VUOKEYEDPOOL_DEFINE | ( | VuoOscOutputIdentifier | , |
VuoOscOut_internal | , | ||
VuoOscOut_make | |||
) |
VuoKeyedPool_VuoOscOut.
|
static |
|
static |
|
static |
void VuoOscIn_destroy | ( | VuoOscIn | oi | ) |
void VuoOscIn_disableTriggers | ( | VuoOscIn | oi | ) |
void VuoOscIn_enableTriggers | ( | VuoOscIn | oi, |
VuoOutputTrigger(receivedMessage, VuoOscMessage) | |||
) |
VuoOscIn VuoOscIn_make | ( | const VuoOscInputDevice | device | ) |
Creates a reference-counted object to manage receiving messages from a OSC device.
If the device's port is nonzero, attempts to use the specified port. If zero, automatically chooses an unused port. If the port is successfully opened, advertises the server via Bonjour.
|
static |
VuoOscOut VuoOscOut_getShared | ( | const VuoOscOutputDevice | device | ) |
VuoOscOut_internal VuoOscOut_make | ( | VuoOscOutputIdentifier | device | ) |
void VuoOscOut_sendMessages | ( | VuoOscOut | ao, |
VuoList_VuoOscMessage | messages | ||
) |
std::map<unsigned int, VuoOscInSocket *> VuoOscInPool |