Difference between revisions of "Write Latch (LogiX node)"
(Update category) |
(Update to new node page style) |
||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
− | + | {{Infobox Logix Node | |
+ | | Name = Write Latch | ||
+ | | Image =[[File: WriteLatch`1Node.png | noframe | 128px | 'Write Latch' LogiX node ]] | ||
+ | | Input0Type = Impulse | Input0Name = Set | ||
+ | | Input1Type = Impulse | Input1Name = Reset | ||
+ | | Input2Type = dummy | Input2Name = SetValue | ||
+ | | Input3Type = dummy | Input3Name = ResetValue | ||
+ | | Output0Type = IValue`1 | Output0Name = Target | ||
+ | | Output1Type = Impulse | Output1Name = OnSet | ||
+ | | Output2Type = Impulse | Output2Name = OnReset | ||
+ | }} | ||
<!--T:2--> | <!--T:2--> | ||
− | < | + | The '''Write Latch''' node node overwrites the referenced <code>Target</code> value with the input <code>SetValue</code> or <code>ResetValue</code> when an impulse is received at <code>Set</code> or <code>Reset</code> respectively. |
− | == | + | == Usage == <!--T:3--> |
− | + | When spawned from the node browser, the <code>SetValue</code> and <code>ResetValue</code> inputs have a dummy datatype. This will overload to match the input data type when a valid input is connected. The type of these two inputs and that of the referenced <code>Target</code> must match. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | The <code>OnSet</code> output fires an impulse after an impulse is received at <code>Set</code>. This occurs regardless of whether there is a valid <code>Target</code> or whether any <code>Target</code> was actually written to. This continues the impulse chain which arrived at <code>Set</code>. | |
− | |||
− | |||
− | |||
− | + | The <code>OnReset</code> output fires an impulse after an impulse is received at <code>Reset</code>. This occurs regardless of whether there is a valid <code>Target</code> or whether any <code>Target</code> was actually written to. This continues the impulse chain which arrived at <code>Reset</code>. | |
− | |||
− | |||
− | |||
− | == Node Menu == <!--T: | + | Changing the value of a Variable node, Component field etc. via a Write Latch node results in a datamodel change which will then be synchronised to other users in the session. Note that changes are only synchronised at the end of every update so, if multiple writes to the same target are performed by a single client within an update, only the final value will be sent. Additionally, no changes will be broadcast if the value is reset to the value it held at the beginning of an update. Due to this synchronisation process, it is inadvisable to write to a value very regularly (e.g. every update) unless absolutely necessary. It is generally better to use the [[drive|Drive]] system instead for continuously changing values to avoid unnecessary network traffic. [https://github.com/Neos-Metaverse/NeosPublic/issues/2590#issuecomment-874788205 Source]. |
+ | |||
+ | == Examples == <!--T:4--> | ||
+ | These two images illustrate comparable LogiX setups using either one Write Latch node or two [[Write (LogiX node)|Write]] nodes. Note that the presence of the <code>OnFail</code> impulse output and different behaviour of <code>OnDone</code> and <code>OnFail</code> compared with <code>OnSet</code> and <code>OnReset</code> means that the two setups are not exactly identical. | ||
+ | [[File:LogiX.Actions.WriteLatch.Example.jpg|600px|Example usage Write Latch]] | ||
+ | |||
+ | [[File:LogiX.Actions.Write.imp_WriteLatch.jpg|600px|Comparable usage of two Write nodes]] | ||
+ | |||
+ | == Node Menu == <!--T:5--> | ||
</translate> | </translate> | ||
Revision as of 10:42, 10 July 2021
Write Latch | ||
---|---|---|
Inputs | ||
Impulse | Set | |
Impulse | Reset | |
dummy | SetValue | |
dummy | ResetValue | |
Outputs | ||
IValue`1 | Target | |
Impulse | OnSet | |
Impulse | OnReset |
The Write Latch node node overwrites the referenced Target
value with the input SetValue
or ResetValue
when an impulse is received at Set
or Reset
respectively.
Usage
When spawned from the node browser, the SetValue
and ResetValue
inputs have a dummy datatype. This will overload to match the input data type when a valid input is connected. The type of these two inputs and that of the referenced Target
must match.
The OnSet
output fires an impulse after an impulse is received at Set
. This occurs regardless of whether there is a valid Target
or whether any Target
was actually written to. This continues the impulse chain which arrived at Set
.
The OnReset
output fires an impulse after an impulse is received at Reset
. This occurs regardless of whether there is a valid Target
or whether any Target
was actually written to. This continues the impulse chain which arrived at Reset
.
Changing the value of a Variable node, Component field etc. via a Write Latch node results in a datamodel change which will then be synchronised to other users in the session. Note that changes are only synchronised at the end of every update so, if multiple writes to the same target are performed by a single client within an update, only the final value will be sent. Additionally, no changes will be broadcast if the value is reset to the value it held at the beginning of an update. Due to this synchronisation process, it is inadvisable to write to a value very regularly (e.g. every update) unless absolutely necessary. It is generally better to use the Drive system instead for continuously changing values to avoid unnecessary network traffic. Source.
Examples
These two images illustrate comparable LogiX setups using either one Write Latch node or two Write nodes. Note that the presence of the OnFail
impulse output and different behaviour of OnDone
and OnFail
compared with OnSet
and OnReset
means that the two setups are not exactly identical.
Node Menu
Actions | ||||||
---|---|---|---|---|---|---|
Back | -- | ++ | Drive | Drive Playback | Tween | Write |
Write Latch | Write Ref | Write Ref Latch |