The TCP node allows you to create a generic TCP connection to another device on the network, and manage the connection yourself. You can send messages on demand, and can process received messages to implement your own custom behavior. The TCP node is useful for situations where Waltz does not provide a node for the specific device you are using, but you would still like to be able to communicate with that device.
||LocalInterface||The local network adapter that will be used to communicate with the remote device.|
||RemoteAddress/IP||The address of the remote device.|
||String||A String that is used to delineate between incoming messages over the TCP connection. If left blank, message data is delivered as it is read, with no guarantee that a full packet will be received, or that multiple packets won't be provided in the same callback. An unlimited number of characters can be used to separate messages, but keep in mind that Waltz will cache incoming data until it encounters the separator.|
||Any||A script in which a single additional variable, message, is present containing the message to be processed.|
There are no parameters exposed by this node. Each received message is processed by the script defined as the
||Void||Send the specified message to the device. Be sure to include any necessary message terminators for your device, like |
Splitting values from messages
You may find that the remote device has additional delineation within messages that are sent to you. While you delineate messages using the messageSeparator you define, the data within the message may also need separated. For example, suppose you receive a message that reads
SET,07,1994, you may want to break the parts of that message apart.
This can be accomplished in a callback as follows:
var values = message.split(","); var command = values; // Will be SET var thing = ParseInt(values); // Will be 7 var value = ParseInt(values); // Will be 1994
You could then define your own logic based on the
value properties we extracted from the message.
|Devices||ArtNet Input · ArtNet Output · Interactive LED Processor · NDI™ Input · NDI™ Output · OSC Input · OSC Output · Projector · SensorLink · TCP · TUIO Output · UDP Input · UDP Output · Watchout Media Server|
|Objects||LED Tile Layout · List · Map · Random Number · Simulated Touch · Timer · Value · Wave|
|Operators||Blend · Change · Clip · Cluster Tracker · DMX Multiverse Merge · Ease · Filter · Hold · JSON Mapper · JSON Stringify · Logic · Math · Proximity · Range · Rotate · Scale · Shear · Smooth · Touch Mapper · Translate|
|Scenes||External Scene · Material Scene|
|Materials||Graph · Touch Material|
|Scripting||Script Function · Script|