Next: , Previous: , Up: Executing a Multinode Model   [Contents][Index]

4.3.2 Transferring Control between Nodes

The function qsmm_node_call_default transfers control to a node. That function exits when node execution finishes. The event handler of an instruction meta-class can call that function to transfer control to another node in a nested manner while processing an instruction invocation.

To finish the execution of a node, call the function qsmm_return_to_caller_node while handling an instruction invocation for the node.

To terminate the execution of a model, for example, after processing all input data, call the macro QSMM_TERMINATE or the function qsmm_set_continue with flag equal to 0 while processing an instruction invocation. They cause finishing the execution of all nodes in the node call stack. The event handlers of instruction meta-classes may need to analyze a flag returned by the function qsmm_get_continue after a call to qsmm_node_call_default to perform exit from the event handler as soon as possible on terminating model execution.