XML
You can load XML from file using the “Load XML From File” or “Load XML From File Async”
For larger files it’s recommended to use “Load XML From File Async”
Path is the path to the XML file in standard Windows format
We can then read from the XML document using Find functions:
Example of a use case:
If we have a XML file example:
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
</note>
We might want to find who we have the note from.
We might also like to find any note from “Jani” and get it’s heading.
Notice that we are using the Parent element to get to the <note> element, this can be utilized to go up in the XML hierarchy.
UDP
Allows the connection to the UDP Sockets using blueprints.
There are two main functions: “Open Receiver UDP” to receive UDP messages and “Open Sender UDP” to send UDP messages.
Both accept info
Where you can specify IP, Prot for the socket connection and Socket Name
Receiver UDP
Receiver has a Format dropdown that is used when processing data to string and is used for On Received String
We suggest promoting the receiver to a variable using the “Promote to variable” this will prevent the destruction of the receiver and it will allow later use.
Then we can bind event to the receiver
On Received String interprets the data as a string using the encoding while calling the “Open Receiver UDP”
On Received Data returns raw data without any interpretation and it is for the user to interpret them in some way.
We will use On Received String in this example
We need to bind our event function, we can Add Custom Event
Then we can use the function to interpret the string and do something depending on the string.
In this example we just use Print String to print the message that we have received
Sender UDP
We suggest promoting the sender to a variable using the “Promote to variable” this will prevent the destruction of the sender and it will allow later use.
We can send Messages using the Send function
Header: it is text that gets appended before the Massage
Footer: it is text that gets appended after the Massage
Massage: it is the text that we want to send
Format: it determines the formatting that Massage gets converted to before the send
Return Value: send returns true if the send has been successful.
Alternatively we can use Send To Prime which is similar to the Send except tries to set Parameter in PRIME
Name: refers to the name of the Parameter in PRIME
Value: value that will be set
Note: it is required to have the Parameter in PRIME scoped to the Project or Application.
In PRIME we can add the listener using the Automation Settings
We use the default settings.
Make sure to enable the listener
In VSAR we specify the same port.