The BooleanToEnum component converts a series of boolean inputs into a value in an enum range

To calculate the value of the out slot, the algorithm iterates through the boolean inputs until it finds the first one that is set to true. Then, it uses the index of this boolean input to try to find a value in the enum range that matches it. If it finds it, it displays that value. If it doesn't find that value, it sets the status of the out slot to fault and displays a fault cause.

If no boolean input is set to true, the out property is set to 0 with status {ok}. 

Properties

  • Out: the output, calculated automatically from the enum inputs
  • Facets: The enum range containing the desired values
  • Zero Based Select: If true, the first boolean input refers to the 0th element in the enum range. If false, it refers to the first element. 
  • inputN: 1 to N boolean inputs 

Action

  • Set Boolean Input Count: sets the number of boolean input slots to use