/tg/ Station 13 - Modules - TypesVar Details - Proc Details

circuit_variable

A circuit variable that holds the name, the datatype and the colour of the variable (taken from the datatype).

Used in integrated circuits for setter and getter circuit components.

Vars

colorThe colour that appears in the UI. The value is set to the datatype's matching colour
datatypeThe datatype of the circuit variable. Used by the setter and getter circuit components
datatype_handlerThe datatype handler for the circuit variable.
listenersThe components that are currently listening. Triggers them when the value is updated.
nameThe display name of the circuit variable
valueThe current value held by the variable.

Procs

add_listenerAdds a listener to receive inputs when the variable has a value that is set.
remove_listenerRemoves a listener to receive inputs when the variable has a value that is set. Listener will usually clean themselves up
set_valueSets the value of the circuit component and triggers the appropriate listeners

Var Details

color

The colour that appears in the UI. The value is set to the datatype's matching colour

datatype

The datatype of the circuit variable. Used by the setter and getter circuit components

datatype_handler

The datatype handler for the circuit variable.

listeners

The components that are currently listening. Triggers them when the value is updated.

name

The display name of the circuit variable

value

The current value held by the variable.

Proc Details

add_listener

Adds a listener to receive inputs when the variable has a value that is set.

remove_listener

Removes a listener to receive inputs when the variable has a value that is set. Listener will usually clean themselves up

set_value

Sets the value of the circuit component and triggers the appropriate listeners