Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

5 лет назад
5 лет назад
5 лет назад
5 лет назад
5 лет назад
5 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # node-red-contrib-boolean-logic-ultimate
  2. [![NPM version][npm-version-image]][npm-url]
  3. [![NPM downloads per month][npm-downloads-month-image]][npm-url]
  4. [![NPM downloads total][npm-downloads-total-image]][npm-url]
  5. [![MIT License][license-image]][license-url]
  6. [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
  7. ## DESCRIPTION
  8. The node performs Boolean logic on the incoming payloads.<br/>
  9. 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/>
  10. - Output "AND": true or false<br/>
  11. - Output "OR": true or false<br/>
  12. - Output "XOR": true or false<br/>
  13. 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.
  14. ## CHANGELOG
  15. * See <a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/blob/master/CHANGELOG.md">here the changelog</a>
  16. ## CONFIGURATION
  17. <p>
  18. The node expects a fixed number of topics (configured in the settings) on which it will operate. It will only output a value
  19. 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/>
  20. 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/>
  21. <br/>
  22. <b>Filter output result</b><br />
  23. <ol>
  24. <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>
  25. <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>
  26. </ol>
  27. <br/>
  28. <b>Remember latest input values after reboot</b><br />
  29. 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/>
  30. Every time you modify the node's config, <b>the retained values are cleared</b>.<br/>
  31. <br/>
  32. All incoming msg.payloads are converted into a boolean value according to the following rules (this applies to all boolean logic nodes):
  33. <ol>
  34. <li>Boolean values are taken as-is.</li>
  35. <li>For numbers, 0 evaluates to false, all other numbers evaluates to true.</li>
  36. <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>
  37. </ol>
  38. <br>
  39. The XOR operation operates in a one, and only one mode, i.e. (A ^ B) ^ C ... ^ n
  40. </p>
  41. <p>
  42. <b>Invert Ultimate</b><br />
  43. Outputs the inverted input. For example true -> false
  44. </p>
  45. <p>
  46. <b>Filter Ultimate</b><br />
  47. This node has 2 outputs.<br />
  48. If the input payload is true, the node will send <code>true</code> on output 1 and nothing on oputput 2<br />
  49. If the input payload is false, the node will send nothing on output 1, and <code>false</code> on oputput 2<br />
  50. </p>
  51. [license-image]: https://img.shields.io/badge/license-MIT-blue.svg
  52. [license-url]: https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/LICENSE
  53. [npm-url]: https://npmjs.org/package/node-red-contrib-boolean-logic-ultimate
  54. [npm-version-image]: https://img.shields.io/npm/v/node-red-contrib-boolean-logic-ultimate.svg
  55. [npm-downloads-month-image]: https://img.shields.io/npm/dm/node-red-contrib-boolean-logic-ultimate.svg
  56. [npm-downloads-total-image]: https://img.shields.io/npm/dt/node-red-contrib-boolean-logic-ultimate.svg