TCP Scripts

Navigation:  Widget Designer > Nodes > Script Nodes >

TCP Scripts

prev main next

Navigation:  Widget Designer > Nodes > Script Nodes >

TCP Scripts

prev main next

Please wait. Due to its content this page might take a while to load...

The TCP script node allows receiving either ASCII, decimal or hexadecimal values over a local TCP connection. Any input data can be linked to directly execute a dedicated script within WD. The TCP connection needs to be enabled in the Connection Manager.

This node can be found under Nodes > Scripts > TCP

wd_nodes_scripts_tcp

Node Properties

TCP Connection ID:
Enter the ID of the TCP Port Connection.

Packet End Character:

Define here the character marking the end of a received packet.

Input:
Please enter the string of the incoming data for which you want a command to be executed. Please note that values can only be entered in ASCII, not hexadecimal, decimal or mixed. Special symbols are not supported. If you need those, please use the TCP Input node or TCP ASCII Stream Input node instead.

Script:
In the Script section you may enter commands to be executed when the according data is received. Each "Input" string may have a different script assigned.
The topic Script Language explains this in more detail, for sophisticated scripts the use of Functions or Macros is recommended.

Type in a new string for the received data packet, type in a script in the Script section and press "Apply". The string will then be added to the Input drop-down and the script will be displayed upon selection. If you edit existing scripts, please remember to press "Apply" after changes.

Use Delete Macro to delete the selected script.
Use Delete All Macros to delete all scripts.

Node control

With Widget Designer version 6, all nodes support so called node commands. Node commands access functions (i.e methods) from a node and / or set a parameter (i.e. property).

Enter "node", followed by the according ID and a dot and a list will pop up showing all available commands for the node. For instance, Node1.TintColor.SetRGB(125,0,255), colors the node in purple.
In addition, the node properties with a parameter ID (the small superscript number) can be edited via the command Node1.SetParam(ID,new Value) or WDNodeSetParam(NodeID,ParamID,Value).