Description

The BooleanMeterDemux component allows you to dynamically redistribute an input value to two different output slots depending on an input determined by an external boolean.

On any change in the meterIn value, the delta between the current value and the previous value (stored in the lastMeterIn) will be added to the target output slot


 

Implementation

  • Drag and drop the BooleanMeterDemux  from the control palette to your workbench
  • Link any slot with a numeric value to the MeterIn slot
  • Link any slot with a boolean value to the Mode slot
  • Trigger the "Generate out slots" action. The trueText and falseText facets from the point will be read and applied to the mode slot and two output slots will be added. Their name will be the following:
    • out +  trueText
    • out + falseText

example:

In the previous screenshot, the BooleanWritable has trueText=winter and falseText=summer

Triggering the action on the BooleanMeterDemux in the previous screenshot will give you this

Properties

  • Facets: Adds facets to the two output slots
  • MeterIn: The input value which will be redistributed
  • Mode: The output slot to which the MeterIn value will be added
  • ValueMode: The way in which the output value is computed
    • Cumulative: the out value will be incremented by the last change in the meterIn value.
    • Passthrough:  the out value will be equal to meterIn
  • LastMeterIn: The previous MeterIn Value
  • LastMode: The previous Mode Value


Actions

  • GenerateOutSlots: Get the trueText and falseText facets from the Boolean point linked to the mode slot and generate two output slots.
  • ResetOutput: Set all the output values to 0