You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5 年之前
123456789101112131415161718192021222324252627282930313233343536373839
  1. # node-red-contrib-boolean-logic-ultimate
  2. ## DESCRIPTION
  3. The node performs Boolean logic on the incoming payloads.<br/>
  4. The node performs 3 checks (<b>AND,OR,XOR</b>) on the incoming boolean payloads and outputs the result at the same time, as follow:<br/>
  5. - Output "AND": true or false<br/>
  6. - Output "OR": true or false<br/>
  7. - Output "XOR": true or false<br/>
  8. The node can have a persistent input: the input values are retained after a node-red reboot. That means, that if you reboot your node-red, you don't need to wait all inputs to arrive and initialize the node, before the node can output a payload.
  9. ## CHANGELOG
  10. * See <a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/blob/master/CHANGELOG.md">here the changelog</a>
  11. ## CONFIGURATION
  12. <p>
  13. The node expects a fixed number of topics (configured in the settings) on which it will operate. It will only output a value
  14. when it has seen the expected number of topics. If it ever sees more than the configured number of topics it will log a message then reset its state and start over.<br/>
  15. Changing the topic is usually only needed when chaining multiple boolean nodes after each other becuse the topics will then all be the same when delivered to the nodes further down the chain.<br/>
  16. <br/>
  17. <b>Filter output result</b><br />
  18. <ol>
  19. <li>Output both 'true' and 'false' results: Standard behaviour, the node will output <b>true</b> and <b>false</b> whenever it receives an input and calculate the boolean logics as output.</li>
  20. <li>Output only 'true' results: whenever the node receives an input, it outputs a payload <b>true</b> only if the result of the logic is true. <b>False</b> results are filtered out.</li>
  21. </ol>
  22. <br/>
  23. <b>Remember latest input values after reboot</b><br />
  24. If checked, the input values are retained after a node-red reboot. That means, that if you reboot your node-red, you don't need to wait all inputs to arrive and initialize the node, before the node can output a payload.<br/>
  25. Every time you modify the node's config, <b>the retained values are cleared</b>.<br/>
  26. <br/>
  27. All incoming msg.payloads are converted into a boolean value according to the following rules (this applies to all boolean logic nodes):
  28. <ol>
  29. <li>Boolean values are taken as-is.</li>
  30. <li>For numbers, 0 evaluates to false, all other numbers evaluates to true.</li>
  31. <li>Strings are converted to numbers if they match the format of a decimal value, then the same rule as for numbers are applied. If it does not match, it evaluates to false. Also, the string "true" evaluates to true.</li>
  32. </ol>
  33. <br>
  34. The XOR operation operates in a one, and only one mode, i.e. (A ^ B) ^ C ... ^ n
  35. </p>