<commit_before><!--
 Copyright (c) 2016,2017,2018,2019,2020,2021 <NAME> (https://bianco-royal.space/)
 All rights reserved.
 node-red-contrib-modbus - The BSD 3-Clause License

 @author <a href="mailto:<EMAIL>"><NAME></a> (<NAME>)
-->
<script type="text/javascript">
    RED.nodes.registerType('modbus-queue-info', {
        category: 'modbus',
        color: '#E9967A',
        defaults: {
            name: { value: '' },
            topic: { value: '' },
            unitid: { value: 1, validate: RED.validators.number() },
            queueReadIntervalTime: { value: 1000, validate: RED.validators.number() },
            lowLowLevel: { value: 25, validate: RED.validators.number() },
            lowLevel: { value: 75, validate: RED.validators.number() },
            highLevel: { value: 150, validate: RED.validators.number() },
            highHighLevel: { value: 300, validate: RED.validators.number() },
            server: { type: 'modbus-client', required: true },
            errorOnHighLevel: { value: false },
            showStatusActivities: { value: true },
            updateOnAllQueueChanges: { value: false },
            updateOnAllUnitQueues: { value: false }
        },
        inputs: 1,
        outputs: 1,
        align: "right",
        icon: 'modbus.png',
        paletteLabel: 'Modbus-Queue-Info',
        label: function () {
            return this.name || 'Modbus Queue Info'
        }
    })
</script>


<script type="text/x-red" data-template-name="modbus-queue-info">
    <div class="form-row">
        <label for="node-input-name"><i class="icon-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
        <input type="text" id="node-input-name" placeholder="Name">
    </div>
    <div class="form-row">
        <label for="node-input-topic"><i class="icon-tag"></i> <span data-i18n="node-red:common.label.topic"></span></label>
        <input type="text" id="node-input-topic" placeholder="Topic">
    </div>
    <div class="form-row">
        <label for="node-input-unitid"><i class="icon-bookmark"></i> <span data-i18n="modbus-contrib.label.unitId"></span></label>
        <input type="text" id="node-input-unitid" placeholder="1">
    </div>
    <div class="form-row">
        <label for="node-input-queueReadIntervalTime"><i class="icon-clock"></i> <span data-i18n="modbus-contrib.label.queueReadIntervalTime"></span></label>
        <input type="text" id="node-input-queueReadIntervalTime" placeholder="1000" style="width:140px;"> msec.
    </div>
    <hr>
    <div class="form-row">
        <label for="node-input-lowLowLevel"><i class="icon-bookmark"></i> <span data-i18n="modbus-contrib.label.lowLowLevel"></span></label>
        <input type="text" id="node-input-lowLowLevel" placeholder="25">
    </div>
    <div class="form-row">
        <label for="node-input-lowLevel"><i class="icon-bookmark"></i> <span data-i18n="modbus-contrib.label.lowLevel"></span></label>
        <input type="text" id="node-input-lowLevel" placeholder="75">
    </div>
    <div class="form-row">
        <label for="node-input-highLevel"><i class="icon-bookmark"></i> <span data-i18n="modbus-contrib.label.highLevel"></span></label>
        <input type="text" id="node-input-highLevel" placeholder="150">
    </div>
    <div class="form-row">
        <label for="node-input-highHighLevel"><i class="icon-bookmark"></i> <span data-i18n="modbus-contrib.label.highHighLevel"></span></label>
        <input type="text" id="node-input-highHighLevel" placeholder="300">
    </div>
    <hr>
    <div class="form-row">
        <label for="node-input-server"><i class="icon-globe"></i> <span data-i18n="modbus-contrib.label.server"></span></label>
        <input type="text" id="node-input-server">
    </div>
    <hr>
    <div class="form-row">
        <label style="min-width:160px" for="node-input-updateOnAllQueueChanges"><i class="fa fa-th"></i> <span
        data-i18n="modbus-contrib.label.updateOnAllQueueChanges"></span></label>
        <input type="checkbox" id="node-input-updateOnAllQueueChanges" style="max-width:30px">
    </div>
    <div class="form-row">
        <label style="min-width:160px" for="node-input-updateOnAllUnitQueues"><i class="fa fa-th"></i> <span
        data-i18n="modbus-contrib.label.updateOnAllUnitQueues"></span></label>
        <input type="checkbox" id="node-input-updateOnAllUnitQueues" style="max-width:30px">
    </div>
    <hr>
    <div class="form-row">
        <label style="min-width:160px" for="node-input-errorOnHighLevel"><i class="fa fa-th"></i> <span
        data-i18n="modbus-contrib.label.errorOnHighLevel"></span></label>
        <input type="checkbox" id="node-input-errorOnHighLevel" style="max-width:30px">
    </div>
    <div class="form-row">
        <label style="min-width:160px" for="node-input-showStatusActivities"><i class="fa fa-th"></i> <span
        data-i18n="modbus-contrib.label.showActivities"></span></label>
        <input type="checkbox" id="node-input-showStatusActivities" style="max-width:30px">
    </div>

</script>


<script type="text/x-red" data-help-name="modbus-queue-info">
    <p><strong>
        A queue is set per unit - setup the unit-id to get the right information.
    </strong></p>

    <p>Modbus TCP/Serial queue information node.</p>

     <p>Unit-Id (0..255 tcp | 0..247 serial)</p>
     <p>Unit-Id 0 is for broadcasting Modbus messages.</p>

     <p>Use inject of <pre>msg.resetQueue = true</pre> to
      reset the queue.</p>

      <p>Reset on high level to connect with the catch node</p>
      <p><pre>
        [{"id":"430f76bf.9de2d8","type":"function","z":"b245d3e4.b52de","name":"reset on High",
        "func":"if(\"high level reached\" === msg.state) {\n    msg.payload.resetQueue = true;\n    return msg;\n}\n",
        "outputs":1,"noerr":0,"x":410,"y":140,"wires":[["64cca59a.dc295c"]]}]
      </pre></p>

      <p>Reset on high high level to connect with the catch node</p>
      <p>
          <pre>
            [{"id":"fc74491.2ddc9b8","type":"function","z":"b245d3e4.b52de","name":"reset on HighHigh",
            "func":"if(\"high high level reached\" === msg.state) {\n    msg.payload.resetQueue = true;\n    return msg;\n}\n",
            "outputs":1,"noerr":0,"x":430,"y":180,"wires":[["64cca59a.dc295c"]]}]
          </pre>
      </p>

     <p>
        An update of all unit queues can be watched by checking the option "All Queues (0-255)".
        With that option it sends out messages per queue event with the queue number and info.
        Use just a single queue info node per client configuration if you activate that option!
        A reset input will reset all queues (0-255) in that mode.
     </p>

     <p>"Error on high level" with that option the node sends
     an error if high level is reached and on high high level.</p>

     <p>With reaching the high level there comes a warning
     and with the high high an error for work with the catch node</p><commit_msg>fix: remove wire to none existing node of example code <commit_after><!--
 Copyright (c) 2016,2017,2018,2019,2020,2021 <NAME> (https://bianco-royal.space/)
 All rights reserved.
 node-red-contrib-modbus - The BSD 3-Clause License

 @author <a href="mailto:<EMAIL>"><NAME></a> (<NAME>)
-->
<script type="text/javascript">
    RED.nodes.registerType('modbus-queue-info', {
        category: 'modbus',
        color: '#E9967A',
        defaults: {
            name: { value: '' },
            topic: { value: '' },
            unitid: { value: 1, validate: RED.validators.number() },
            queueReadIntervalTime: { value: 1000, validate: RED.validators.number() },
            lowLowLevel: { value: 25, validate: RED.validators.number() },
            lowLevel: { value: 75, validate: RED.validators.number() },
            highLevel: { value: 150, validate: RED.validators.number() },
            highHighLevel: { value: 300, validate: RED.validators.number() },
            server: { type: 'modbus-client', required: true },
            errorOnHighLevel: { value: false },
            showStatusActivities: { value: true },
            updateOnAllQueueChanges: { value: false },
            updateOnAllUnitQueues: { value: false }
        },
        inputs: 1,
        outputs: 1,
        align: "right",
        icon: 'modbus.png',
        paletteLabel: 'Modbus-Queue-Info',
        label: function () {
            return this.name || 'Modbus Queue Info'
        }
    })
</script>


<script type="text/x-red" data-template-name="modbus-queue-info">
    <div class="form-row">
        <label for="node-input-name"><i class="icon-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
        <input type="text" id="node-input-name" placeholder="Name">
    </div>
    <div class="form-row">
        <label for="node-input-topic"><i class="icon-tag"></i> <span data-i18n="node-red:common.label.topic"></span></label>
        <input type="text" id="node-input-topic" placeholder="Topic">
    </div>
    <div class="form-row">
        <label for="node-input-unitid"><i class="icon-bookmark"></i> <span data-i18n="modbus-contrib.label.unitId"></span></label>
        <input type="text" id="node-input-unitid" placeholder="1">
    </div>
    <div class="form-row">
        <label for="node-input-queueReadIntervalTime"><i class="icon-clock"></i> <span data-i18n="modbus-contrib.label.queueReadIntervalTime"></span></label>
        <input type="text" id="node-input-queueReadIntervalTime" placeholder="1000" style="width:140px;"> msec.
    </div>
    <hr>
    <div class="form-row">
        <label for="node-input-lowLowLevel"><i class="icon-bookmark"></i> <span data-i18n="modbus-contrib.label.lowLowLevel"></span></label>
        <input type="text" id="node-input-lowLowLevel" placeholder="25">
    </div>
    <div class="form-row">
        <label for="node-input-lowLevel"><i class="icon-bookmark"></i> <span data-i18n="modbus-contrib.label.lowLevel"></span></label>
        <input type="text" id="node-input-lowLevel" placeholder="75">
    </div>
    <div class="form-row">
        <label for="node-input-highLevel"><i class="icon-bookmark"></i> <span data-i18n="modbus-contrib.label.highLevel"></span></label>
        <input type="text" id="node-input-highLevel" placeholder="150">
    </div>
    <div class="form-row">
        <label for="node-input-highHighLevel"><i class="icon-bookmark"></i> <span data-i18n="modbus-contrib.label.highHighLevel"></span></label>
        <input type="text" id="node-input-highHighLevel" placeholder="300">
    </div>
    <hr>
    <div class="form-row">
        <label for="node-input-server"><i class="icon-globe"></i> <span data-i18n="modbus-contrib.label.server"></span></label>
        <input type="text" id="node-input-server">
    </div>
    <hr>
    <div class="form-row">
        <label style="min-width:160px" for="node-input-updateOnAllQueueChanges"><i class="fa fa-th"></i> <span
        data-i18n="modbus-contrib.label.updateOnAllQueueChanges"></span></label>
        <input type="checkbox" id="node-input-updateOnAllQueueChanges" style="max-width:30px">
    </div>
    <div class="form-row">
        <label style="min-width:160px" for="node-input-updateOnAllUnitQueues"><i class="fa fa-th"></i> <span
        data-i18n="modbus-contrib.label.updateOnAllUnitQueues"></span></label>
        <input type="checkbox" id="node-input-updateOnAllUnitQueues" style="max-width:30px">
    </div>
    <hr>
    <div class="form-row">
        <label style="min-width:160px" for="node-input-errorOnHighLevel"><i class="fa fa-th"></i> <span
        data-i18n="modbus-contrib.label.errorOnHighLevel"></span></label>
        <input type="checkbox" id="node-input-errorOnHighLevel" style="max-width:30px">
    </div>
    <div class="form-row">
        <label style="min-width:160px" for="node-input-showStatusActivities"><i class="fa fa-th"></i> <span
        data-i18n="modbus-contrib.label.showActivities"></span></label>
        <input type="checkbox" id="node-input-showStatusActivities" style="max-width:30px">
    </div>

</script>


<script type="text/x-red" data-help-name="modbus-queue-info">
    <p><strong>
        A queue is set per unit - setup the unit-id to get the right information.
    </strong></p>

    <p>Modbus TCP/Serial queue information node.</p>

     <p>Unit-Id (0..255 tcp | 0..247 serial)</p>
     <p>Unit-Id 0 is for broadcasting Modbus messages.</p>

     <p>Use inject of <pre>msg.resetQueue = true</pre> to
      reset the queue.</p>

      <p>Reset on high level to connect with the catch node</p>
      <p><pre>
        [{"id":"430f76bf.9de2d8","type":"function","z":"b245d3e4.b52de","name":"reset on High",
        "func":"if(\"high level reached\" === msg.state) {\n    msg.payload.resetQueue = true;\n    return msg;\n}\n",
        "outputs":1,"noerr":0,"x":410,"y":140,"wires":[[]]}]
      </pre></p>

      <p>Reset on high high level to connect with the catch node</p>
      <p>
          <pre>
            [{"id":"fc74491.2ddc9b8","type":"function","z":"b245d3e4.b52de","name":"reset on HighHigh",
            "func":"if(\"high high level reached\" === msg.state) {\n    msg.payload.resetQueue = true;\n    return msg;\n}\n",
            "outputs":1,"noerr":0,"x":430,"y":180,"wires":[[]]}]
          </pre>
      </p>

     <p>
        An update of all unit queues can be watched by checking the option "All Queues (0-255)".
        With that option it sends out messages per queue event with the queue number and info.
        Use just a single queue info node per client configuration if you activate that option!
        A reset input will reset all queues (0-255) in that mode.
     </p>

     <p>"Error on high level" with that option the node sends
     an error if high level is reached and on high high level.</p>

     <p>With reaching the high level there comes a warning
     and with the high high an error for work with the catch node</p>
{'fraction_non_alphanumeric': 0.1815364658402998, 'fraction_numerical': 0.025944076102623233, 'mean_word_length': 3.092303155411383, 'pattern_counts': {'":': 40, '<': 333, '<?xml version=': 0, '>': 333, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5186777', 'n_tokens_mistral': 4708, 'n_tokens_neox': 4447, 'n_words': 951}