command, connect and ping nodes split
This commit is contained in:
66
nodes/xilica-command.html
Normal file
66
nodes/xilica-command.html
Normal file
@@ -0,0 +1,66 @@
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType('xilica-command', {
|
||||
category: 'Xilica',
|
||||
color: '#D8E7FF',
|
||||
defaults: {
|
||||
name: { value: "" },
|
||||
connection: { value: "", type: "xilica-connection", required: true },
|
||||
command: { value: "" },
|
||||
control: { value: "" },
|
||||
data: { value: "" },
|
||||
parseResponse: { value: true }
|
||||
},
|
||||
inputs: 1,
|
||||
outputs: 1,
|
||||
icon: "font-awesome/fa-plug",
|
||||
label: function () {
|
||||
if (this.name) {
|
||||
return this.name;
|
||||
}
|
||||
if (this.command) {
|
||||
return "xilica " + this.command.toLowerCase();
|
||||
}
|
||||
return "xilica command";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-template-name="xilica-command">
|
||||
<div class="form-row">
|
||||
<label for="node-input-name">Name</label>
|
||||
<input type="text" id="node-input-name">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-connection">Connection</label>
|
||||
<input type="text" id="node-input-connection">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-command">Command</label>
|
||||
<input type="text" id="node-input-command" placeholder="SET, GET, GETRAW, INC, ...">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-control">Control Object/Group</label>
|
||||
<input type="text" id="node-input-control" placeholder="gain1, $group1, ...">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-data">Data</label>
|
||||
<input type="text" id="node-input-data" placeholder="-3.2, "Butterworth", TRUE, ...">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-parseResponse">Parse response</label>
|
||||
<input type="checkbox" id="node-input-parseResponse" style="width:auto;">
|
||||
<span>Return structured payload instead of raw text</span>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="xilica-command">
|
||||
<p>Send a single command to a Xilica Solaro processor using the Third-Party Control API over TCP.</p>
|
||||
<p>You can either:</p>
|
||||
<ul>
|
||||
<li>Configure the command, control object and data fields in the node, or</li>
|
||||
<li>Provide a complete command string in <code>msg.payload</code>, or</li>
|
||||
<li>Provide <code>msg.command</code>, <code>msg.control</code> and <code>msg.data</code>.</li>
|
||||
</ul>
|
||||
<p>The node automatically appends the required carriage return and waits for the response. When parsing is enabled, it returns an object (or array of objects) describing values, notifications, OK and error responses. When disabled, it returns the raw response lines as a single string.</p>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user