class Input
Update scheduling policy for Op arguments.
index
static functions
-
Input.cold(value)
– Create a cold Input. -
Input.hot(value)
– Create a hot Input.
input interface
-
Input\new(result)
– create a new Input. -
input\setup(prev)
– copy state from old instance (optional). -
input\dirty()
– whether this input requires processing (optional). -
input\finish_setup()
– leave setup state (optional). -
input\unwrap()
– unwrap to Lua value (optional). -
input\type()
– return the type name of this Input (optional). -
input\metatype()
– return the metatype name of this Input (optional). -
input.result
– the current value -
input.mode()
– the Input mode -
input\__call()
– alias for unwrap.
details
static functions
-
– Create a cold Input.
Never marked dirty. Use this for input results that are only read when another Input is dirty.
parameters:
-
– Create a hot Input.
Behaviour depends on what kind of Result value is:
- Constant: treated like cold.
- SigStream: Marked dirty only if old and new result differ.
- EvtStream: Marked dirty only if the current result is dirty.
This is the most common Input strategy.
parameters:
input interface
-
– create a new Input.
parameters:
-
– copy state from old instance (optional).
called by Op:setup with another Input instance or nil once this instance is registered. Must prepare this instance for dirty.
May enter a 'setup state' that is exited using finish_setup.
parameters:
- previous Input intance or nil
-
– whether this input requires processing (optional).
must return a boolean indicating whether Ops that refer to this instance should be notified (via Op:tick). If not overwritten, delegates to result:dirty.
returns:
- (bool): whether processing is necessary
-
– leave setup state (optional).
called after the Op has completed (or skipped) its first Op:tick after Op:setup. Must prepare this instance for dataflow operation.
-
– unwrap to Lua value (optional).
returns:
- (any): the raw Lua value
-
– return the type name of this Input (optional).
-
– return the metatype name of this Input (optional).
-
– the current value
-
– the Input mode
-
– alias for unwrap.