The UDP Data Parser node enables you to interpret incoming byte streams as values of different data types. While the UDP Input node can only interpret incoming packets and streams as ASCII characters or bytes, this node additionally offers numeric data types such as integer, double and single/float.
This node can be found under Nodes > Input > Connections > UDP Data Parser
Enter the ID of the UDP connection to be watched.
Enter here the header as ASCII, Hex or Dec value. Please refer to the chapter Syntax TCP- / UDP- / Serial Messages for more information about the syntax to be used or hover your mouse over the field.
Select here the data type your message is supposed to be interpreted with. Please keep in mind that Integer and Single/Float require four bytes (32bit) each, Double eight bytes (64bit) and Byte exactly one byte. If the message contains a String, the character string needs to be terminated by a Null byte.
Enter here the offset of bytes that should be applied to extract the needed value. The counting starts with 0 for the first byte of the header. So if your header is e.g. "!WD", followed by the value, your Start Index needs to be set to 3.
Check this box to swap the byte order of the received message for parsing.
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).
The Input node generates the following output:
- Value: outputs the message as numeric value
- Delta: outputs the delta value between the last received numeric value and the current one
- String: outputs the string message