Vuo  0.4.7
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Enumerations
Node Parameters

Description

Parameter decorations to be used by node classes.

Macros

#define VuoInstanceData(type)
 Use this to decorate parameters referring to a stateful node's instance data structure.
 
#define VuoInputData(type,...)
 Use this to decorate parameters acting as data input ports.
 
#define VuoInputConductor(conductivity, name)
 Use this to decorate parameters acting as event input ports.
 
#define VuoOutputData(type)
 Use this to decorate parameters acting as data output ports.
 
#define VuoOutputConductor(name)   __attribute__((annotate("vuoOutputConductor:" #name))) bool * const
 Use this to decorate parameters acting as event output ports.
 
#define VuoOutputTrigger(name, type)
 Use this to decorate parameters acting as event triggers.
 

Enumerations

enum  VuoPortConductivity { VuoPortAlwaysConducts, VuoPortMayConduct, VuoPortNeverConducts }
 Conductivity options for input ports. More...
 

Macro Definition Documentation

#define VuoInputConductor (   conductivity,
  name 
)

Use this to decorate parameters acting as event input ports.

Indicates whether this particular input port was pushed. The input port name should use lowerCamelCase.

Parameters
conductivityA value of type VuoPortConductivity, indicating the port's type of conductivity.
nameThe identifier of the corresponding data port, or blank if this is intended to be an event-only input port.
Example:
void nodeEvent(VuoInputData(VuoInteger,"0") seconds, VuoInputConductor(VuoPortNeverConducts,seconds) secondsPushed);
Example:
#define VuoInputData (   type,
  ... 
)

Use this to decorate parameters acting as data input ports.

The input port name should use lowerCamelCase.

Parameters
typeThis input port's C type. Must be a typedef from a Vuo type definition.
...Optionally, a JSON object specification containing additional details about the input port's data, such as the default value.
Example:
void nodeEvent(VuoInputData(VuoInteger,{"default":60,"suggestedMin":0,"suggestedMax":127}) noteNumber);
#define VuoInstanceData (   type)

Use this to decorate parameters referring to a stateful node's instance data structure.

Parameters
typeThe instance data's C type.
Example:
#define VuoOutputConductor (   name)    __attribute__((annotate("vuoOutputConductor:" #name))) bool * const

Use this to decorate parameters acting as event output ports.

Indicates whether a push should be conducted through this particular output port. The output port name should use lowerCamelCase.

Parameters
nameThe identifier of the corresponding data port, or blank if this is intended to be an event-only output port.
Example:
void nodeEvent(VuoOutputData(VuoInteger) seconds, VuoOutputConductor(seconds) secondsPush);
Example:
void nodeEvent(VuoOutputConductor() started);
#define VuoOutputData (   type)

Use this to decorate parameters acting as data output ports.

The output port name should use lowerCamelCase.

Parameters
typeThis output port's C type. Must be a typedef from a Vuo type definition.
Example:
#define VuoOutputTrigger (   name,
  type 
)

Use this to decorate parameters acting as event triggers.

Indicates whether an event should be fired from this particular output port.

Parameters
nameThe identifier of the triggers function. Use lowerCamelCase.
typeThe C type of the data passed along when an event is fired.
Example:
void nodeEvent(VuoOutputTrigger(started,void))
{
// Generate an event without any data.
started();
}
Example:
void nodeEvent(VuoOutputTrigger(ding,int))
{
// Generate an event with stack data.
ding(5);
}
Example:
void nodeEvent(VuoOutputTrigger(ding,char *))
{
// Generate an event with heap data.
char *heapData = (char *)malloc(strlen("hello")+1);
strcpy(heapData, "hello");
ding(heapData);
VuoRelease(heapData);
}

Enumeration Type Documentation

Conductivity options for input ports.

Enumerator
VuoPortAlwaysConducts 

An event received by this input port is conducted to all output ports.

VuoPortMayConduct 

An event received by this input port may be conducted to all, some, or none of the output ports.

VuoPortNeverConducts 

An event received by this input port is never conducted to any output port.