Vuo  2.0.0
Typedefs | Functions
VuoOsc.h File Reference

Description

VuoOsc interface.

Definition in file VuoOsc.h.

Go to the source code of this file.

Typedefs

typedef void * VuoOscIn
 Manages receiving messages via OSC. More...
 
typedef void * VuoOscOut
 Manages sending OSC output. More...
 

Functions

void VuoOsc_use (void)
 Indicates that the caller needs to get notifications about OSC devices. More...
 
void VuoOsc_disuse (void)
 Indicates that the caller no longer needs notifications about OSC devices. More...
 
VuoList_VuoOscInputDevice VuoOsc_getInputDeviceList (void)
 Returns a list of the currently-avaialble OSC input devices. More...
 
VuoList_VuoOscOutputDevice VuoOsc_getOutputDeviceList (void)
 Returns a list of the currently-avaialble OSC output devices. More...
 
bool VuoOscInputDevice_realize (const VuoOscInputDevice device, VuoOscInputDevice *realizedDevice)
 If any of device's properties are unknown: More...
 
bool VuoOscOutputDevice_realize (const VuoOscOutputDevice device, VuoOscOutputDevice *realizedDevice)
 If any of device's properties are unknown: More...
 
void VuoOsc_addDevicesChangedTriggers (VuoOutputTrigger(inputDevices, VuoList_VuoOscInputDevice), VuoOutputTrigger(outputDevices, VuoList_VuoOscOutputDevice))
 Adds a trigger callback, to be invoked whenever the list of known OSC devices changes. More...
 
void VuoOsc_removeDevicesChangedTriggers (VuoOutputTrigger(inputDevices, VuoList_VuoOscInputDevice), VuoOutputTrigger(outputDevices, VuoList_VuoOscOutputDevice))
 Removes a trigger callback previously added by VuoOsc_addDevicesChangedTriggers. 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...
 
VuoOscOut VuoOscOut_getShared (const VuoOscOutputDevice device)
 Returns the reference-counted object for the specified OSC output device. More...
 
void VuoOscOut_sendMessages (VuoOscOut oo, VuoList_VuoOscMessage messages)
 Sends a message to the specified OSC device. More...
 

Typedef Documentation

◆ VuoOscIn

typedef void* VuoOscIn

Manages receiving messages via OSC.

Definition at line 48 of file VuoOsc.h.

◆ VuoOscOut

typedef void* VuoOscOut

Manages sending OSC output.

Definition at line 62 of file VuoOsc.h.

Function Documentation

◆ VuoOsc_addDevicesChangedTriggers()

void VuoOsc_addDevicesChangedTriggers ( VuoOutputTrigger(inputDevices, VuoList_VuoOscInputDevice ,
VuoOutputTrigger(outputDevices, VuoList_VuoOscOutputDevice  
)

Adds a trigger callback, to be invoked whenever the list of known OSC devices changes.

Call VuoOsc_use() before calling this.

This function may be called from any thread.

Definition at line 345 of file VuoOscDevices.cc.

◆ VuoOsc_disuse()

void VuoOsc_disuse ( void  )

Indicates that the caller no longer needs notifications about OSC devices.

This function may be called from any thread.

Definition at line 309 of file VuoOscDevices.cc.

◆ VuoOsc_getInputDeviceList()

VuoList_VuoOscInputDevice VuoOsc_getInputDeviceList ( void  )

Returns a list of the currently-avaialble OSC input devices.

Definition at line 45 of file VuoOscDevices.cc.

◆ VuoOsc_getOutputDeviceList()

VuoList_VuoOscOutputDevice VuoOsc_getOutputDeviceList ( void  )

Returns a list of the currently-avaialble OSC output devices.

Definition at line 57 of file VuoOscDevices.cc.

◆ VuoOsc_removeDevicesChangedTriggers()

void VuoOsc_removeDevicesChangedTriggers ( VuoOutputTrigger(inputDevices, VuoList_VuoOscInputDevice ,
VuoOutputTrigger(outputDevices, VuoList_VuoOscOutputDevice  
)

Removes a trigger callback previously added by VuoOsc_addDevicesChangedTriggers.

This function may be called from any thread.

Definition at line 369 of file VuoOscDevices.cc.

◆ VuoOsc_use()

void VuoOsc_use ( void  )

Indicates that the caller needs to get notifications about OSC devices.

This function may be called from any thread.

Definition at line 267 of file VuoOscDevices.cc.

◆ VuoOscIn_disableTriggers()

void VuoOscIn_disableTriggers ( VuoOscIn  oi)

Stops the OSC server from calling trigger functions when it receives a message.

This function may be called from any thread.

Definition at line 492 of file VuoOsc.cc.

◆ VuoOscIn_enableTriggers()

void VuoOscIn_enableTriggers ( VuoOscIn  oi,
VuoOutputTrigger(receivedMessage, VuoOscMessage  
)

Sets up the OSC server to call the trigger functions when it receives a message.

This function may be called from any thread.

Definition at line 468 of file VuoOsc.cc.

◆ VuoOscIn_make()

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.

Definition at line 436 of file VuoOsc.cc.

◆ VuoOscInputDevice_realize()

bool VuoOscInputDevice_realize ( VuoOscInputDevice  device,
VuoOscInputDevice realizedDevice 
)

If any of device's properties are unknown:

  • If a matching device is present, sets realizedDevice to that device, and returns true.
  • If no matching device is present, returns false, leaving realizedDevice unset.

If all of device's properties are already known, sets realizedDevice to a copy of device, and returns true. (Doesn't bother checking whether the device is currently present.)

Call VuoOsc_use() before calling this.

This function may be called from any thread.

Definition at line 400 of file VuoOscDevices.cc.

◆ VuoOscOut_getShared()

VuoOscOut VuoOscOut_getShared ( const VuoOscOutputDevice  device)

Returns the reference-counted object for the specified OSC output device.

Definition at line 725 of file VuoOsc.cc.

◆ VuoOscOut_sendMessages()

void VuoOscOut_sendMessages ( VuoOscOut  oo,
VuoList_VuoOscMessage  messages 
)

Sends a message to the specified OSC device.

Definition at line 733 of file VuoOsc.cc.

◆ VuoOscOutputDevice_realize()

bool VuoOscOutputDevice_realize ( VuoOscOutputDevice  device,
VuoOscOutputDevice realizedDevice 
)

If any of device's properties are unknown:

  • If a matching device is present, sets realizedDevice to that device, and returns true.
  • If no matching device is present, returns false, leaving realizedDevice unset.

If all of device's properties are already known, sets realizedDevice to a copy of device, and returns true. (Doesn't bother checking whether the device is currently present.)

Call VuoOsc_use() before calling this.

This function may be called from any thread.

Definition at line 461 of file VuoOscDevices.cc.