ProtoFlux:ASync Range Loop Int: Difference between revisions

From Resonite Wiki
m grammar
AsyncCall not SyncResumption
 
Line 11: Line 11:
|Outputs=
|Outputs=
[
[
{"Name": "LoopStart", "Type":"SyncResumption"},
{"Name": "LoopStart", "Type":"AsyncCall"},
{"Name": "LoopIteration", "Type":"SyncResumption"},
{"Name": "LoopIteration", "Type":"AsyncCall"},
{"Name": "LoopEnd", "Type": "Continuation"},
{"Name": "LoopEnd", "Type": "Continuation"},
{"Name": "Current", "Type": "int"}
{"Name": "Current", "Type": "int"}
Line 26: Line 26:
== Inputs ==
== Inputs ==


=== * ([[Type:Int|int]]) ===
=== * ([[Impulses#ASync|IAsyncOperation]]) ===


Start Execution of the ASync Range Loop.
Start Execution of the ASync Range Loop.
Line 46: Line 46:
== Outputs ==
== Outputs ==


=== LoopStart ([[Impulses#ASync|SyncResumption]]) ===
=== LoopStart ([[Impulses#ASync|AsyncCall]]) ===


Fires when the loop starts, regardless of executions of the ASync Range Loop.
Fires when the loop starts, regardless of executions of the ASync Range Loop.


=== LoopIteration ([[Impulses#ASync|SyncResumption]]) ===
=== LoopIteration ([[Impulses#ASync|AsyncCall]]) ===


Fires every time Current ([[Type:Int|int]]) increases by StepSize ([[Type:Int|int]]) and (has just or hasn't/hasn't)? hit the End ([[Type:Int|int]]) limit. Waits till the previous LoopIteration ([[Impulses#ASync|SyncResumption]]) is done or after LoopStart ([[Impulses#ASync|SyncResumption]]) is done before firing this one.
Fires every time Current ([[Type:Int|int]]) increases by StepSize ([[Type:Int|int]]) and (has just or hasn't/hasn't)? hit the End ([[Type:Int|int]]) limit. Waits till the previous LoopIteration ([[Impulses#ASync|AsyncCall]]) is done or after LoopStart ([[Impulses#ASync|AsyncCall]]) is done before firing this one.


TODO: Is this inclusive or exclusive?
TODO: Is this inclusive or exclusive?
Line 62: Line 62:
=== Current ([[Type:Int|int]]) ===
=== Current ([[Type:Int|int]]) ===


The current number between Start ([[Type:Int|int]]) and End ([[Type:Int|int]]). has a value during every LoopIteration ([[Impulses#ASync|SyncResumption]]).
The current number between Start ([[Type:Int|int]]) and End ([[Type:Int|int]]). has a value during every LoopIteration ([[Impulses#ASync|AsyncCall]]).


== Examples ==
== Examples ==

Latest revision as of 22:51, 16 February 2024

Async Range Loop
*
LoopStart
Start
LoopIteration
End
LoopEnd
StepSize
Current
Async


This article or section is a Stub. You can help the Resonite Wiki by expanding it.

Missing clarification

Range Loop Int is a ProtoFlux node that allows for firing a bunch of executions like an ASync For Loop except that instead of having to go one at a time from 0->count, you can specify a Start (int) number, End (int) number, and a StepSize (int) which all determine the range of numbers that will come out of Current (int) during execution and the distance between each Current (int) outputted.

This node will do a bunch of async tasks in order in an Async context, waiting for each task to be done before moving to the next one. This is useful if you want to do a bunch of GET String requests but you need to wait for the previous one to be done before doing the next, for a specified number of times. This does not behave the same as using a Start ASync Task on every Range Loop Int iteration or even before the Range Loop Int using a Start ASync Task.

Inputs

* (IAsyncOperation)

Start Execution of the ASync Range Loop.

Start (int)

The number to start at when executing.

End (int)

The number to end at when executing.

TODO: Is this inclusive or exclusive?

StepSize (int)

How much to add to Start (int) per execution for the Current (int) output number.

Outputs

LoopStart (AsyncCall)

Fires when the loop starts, regardless of executions of the ASync Range Loop.

LoopIteration (AsyncCall)

Fires every time Current (int) increases by StepSize (int) and (has just or hasn't/hasn't)? hit the End (int) limit. Waits till the previous LoopIteration (AsyncCall) is done or after LoopStart (AsyncCall) is done before firing this one.

TODO: Is this inclusive or exclusive?

LoopEnd (Continuation)

Fires once the loop has finished.

Current (int)

The current number between Start (int) and End (int). has a value during every LoopIteration (AsyncCall).

Examples