Description

The EnumMeterDemux component allows you to dynamically redistribute an input value to any number of output slots depending on an input determined by an external enum.

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 EnumMeterDemux   from the control palette to your workbench
  • Link any slot with a numeric value to the MeterIn slot
  • Link any slot with a enum value to the Mode slot
  • Trigger the "Generate out slots" action. The range facets from the point will be read and applied to the mode slot and two output slots will be added. Their name for each enumaration will be the following: out +  tag

example:

In the previous screenshot, the EnumWritable has the aapup:PupWeekdayEnum range

Triggering the action on the EnumWritable 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 tange facets from the Enum point linked to the mode slot and generate the output slots.
  • ResetOutput: Set all the output values to 0