Vuo
0.8.0
|
A trigger output port.
Public Member Functions | |
VuoCompilerTriggerPort (VuoPort *basePort) | |
Creates a trigger port based on portClass . | |
void | generateAllocation (Module *module, string nodeInstanceIdentifier) |
Generates code to allocate global variables for this trigger. | |
void | generateInitialization (Module *module, BasicBlock *block) |
Generates code to initialize the global variables for this trigger. | |
void | generateFinalization (Module *module, BasicBlock *block) |
Generates code to finalize the global variables for this trigger. | |
Function * | generateAsynchronousSubmissionToDispatchQueue (Module *module, BasicBlock *block, string identifier) |
Generates code to submit a task to this trigger's dispatch queue. | |
Function * | generateSynchronousSubmissionToDispatchQueue (Module *module, BasicBlock *block, string identifier) |
Generates code to submit a task to this trigger's dispatch queue. | |
Value * | generateDataValueUpdate (Module *module, BasicBlock *block, Function *triggerWorker) |
Generates code to update the trigger's data value (if any) with the worker function argument. | |
void | generateDataValueDiscard (Module *module, BasicBlock *block, Function *triggerWorker) |
Generates code to discard the worker function argument without updating the trigger's data value (if any). | |
LoadInst * | generateLoad (BasicBlock *block) |
Does nothing. | |
StoreInst * | generateStore (Value *value, BasicBlock *block) |
Does nothing. | |
void | setFunction (Function *function) |
Sets the function that's called each time the trigger port generates a push. | |
Function * | getFunction (void) |
Returns the function that's called each time the trigger port generates a push. | |
GlobalVariable * | getPreviousDataVariable (void) |
Returns the variable that stores the most recent data value fired from this trigger, or NULL if the trigger is event-only. | |
Type * | getDataType (void) |
Returns the type of data associated with the trigger, or NULL if the trigger is event-only. | |
VuoCompilerTriggerPortClass * | getClass (void) |
Returns the trigger port class of this trigger port. | |
string | getIdentifier (void) |
Returns a unique, consistent identifier for this port. | |
![]() | |
bool | hasConnectedCable (bool includePublishedCables) const |
Returns a boolean indicating whether this port has any attached cables. | |
bool | hasConnectedDataCable (bool includePublishedCables) const |
Returns a boolean indicating whether this port has any attached data+event cables. | |
VuoType * | getDataVuoType (void) |
Returns tthis port's data type, or null if this port is event-only. | |
void | setDataVuoType (VuoType *dataType) |
Sets the data type for this port, overriding the type from the port class. | |
![]() | |
GlobalVariable * | getVariable (void) |
Returns the global variable to store the argument's value, if generateAllocation has been called. | |
![]() | |
VuoBaseDetail (string description, VuoPort *base) | |
Creates a VuoNode detail class. | |
VuoPort * | getBase (void) const |
Returns the VuoNode detail class instance's base class instance. | |
void | setBase (VuoPort *base) |
Sets the VuoNode detail class instance's base class instance. | |
Additional Inherited Members | |
![]() | |
VuoCompilerPort (VuoPort *basePort) | |
Creates a compiler detail from a given basePort . | |
![]() | |
GlobalVariable * | variable |
The global variable in the generated code in which this argument is stored. | |
VuoCompilerTriggerPort::VuoCompilerTriggerPort | ( | VuoPort * | basePort | ) |
Creates a trigger port based on portClass
.
|
virtual |
Generates code to allocate global variables for this trigger.
Reimplemented from VuoCompilerNodeArgument.
Function * VuoCompilerTriggerPort::generateAsynchronousSubmissionToDispatchQueue | ( | Module * | module, |
BasicBlock * | block, | ||
string | identifier | ||
) |
Generates code to submit a task to this trigger's dispatch queue.
Returns the worker function, which will be called by the dispatch queue to execute the task. The caller is responsible for filling in the body of the worker function.
Assumes block is inside the function associated with this trigger. Passes the argument of that function, if any, as the context which will be passed to the worker function.
void VuoCompilerTriggerPort::generateDataValueDiscard | ( | Module * | module, |
BasicBlock * | block, | ||
Function * | triggerWorker | ||
) |
Generates code to discard the worker function argument without updating the trigger's data value (if any).
Value * VuoCompilerTriggerPort::generateDataValueUpdate | ( | Module * | module, |
BasicBlock * | block, | ||
Function * | triggerWorker | ||
) |
Generates code to update the trigger's data value (if any) with the worker function argument.
void VuoCompilerTriggerPort::generateFinalization | ( | Module * | module, |
BasicBlock * | block | ||
) |
Generates code to finalize the global variables for this trigger.
void VuoCompilerTriggerPort::generateInitialization | ( | Module * | module, |
BasicBlock * | block | ||
) |
Generates code to initialize the global variables for this trigger.
|
virtual |
Does nothing.
Reimplemented from VuoCompilerNodeArgument.
|
virtual |
Does nothing.
Reimplemented from VuoCompilerNodeArgument.
Function * VuoCompilerTriggerPort::generateSynchronousSubmissionToDispatchQueue | ( | Module * | module, |
BasicBlock * | block, | ||
string | identifier | ||
) |
Generates code to submit a task to this trigger's dispatch queue.
Returns the worker function, which will be called by the dispatch queue to execute the task. The caller is responsible for filling in the body of the worker function.
VuoCompilerTriggerPortClass * VuoCompilerTriggerPort::getClass | ( | void | ) |
Returns the trigger port class of this trigger port.
Type * VuoCompilerTriggerPort::getDataType | ( | void | ) |
Returns the type of data associated with the trigger, or NULL if the trigger is event-only.
Function * VuoCompilerTriggerPort::getFunction | ( | void | ) |
Returns the function that's called each time the trigger port generates a push.
|
virtual |
Returns a unique, consistent identifier for this port.
Assumes generateAllocation
has been called.
Implements VuoCompilerPort.
GlobalVariable * VuoCompilerTriggerPort::getPreviousDataVariable | ( | void | ) |
Returns the variable that stores the most recent data value fired from this trigger, or NULL if the trigger is event-only.
void VuoCompilerTriggerPort::setFunction | ( | Function * | function | ) |
Sets the function that's called each time the trigger port generates a push.