Version 1.9.0.03 Changes
Last updated
Last updated
In previous versions there was an issue with Generic emulators which could cause the emulator to stop transmitting data after a failed transmission attempt. This version fixes that issue and also clarifies configurations around send and receive with UDP in Generic Emulators.
There are several options for using UDP with generic emulators, and which one you choose will be defined by your use case.
Only need to send UDP messages to a remote device:
Use a UDP client and leave the local port option set for zero.
Messages may be sent using the ToSend Property in Logic Flows and/or panels.
Note that configuring a watcher for this configuration is meaningless. The client is only configured to send messages and not set up to listen for any responses.
Only need to receive UDP messages from remote devices:
Use a UDP listener and define the port on which to listen.
Need to send and receive messages to/from a device
Use a UDP Client and define a local port to listen for return messages.
OR
Use a UDP Client with zero selected for the local port and a UDP listener for return messages.
This last situation could use a little bit of clarification. In general UDP is a single direction message with no guarantees on delivery. Therefore if you need bi-directional communication, you must define a port for the return messages. Using a UDP client you can define a listen port by using the local port option:
In this case we are sending messages to 192.168.1.223 on port 5001 and expecting messages to come back on port 5002. We could have also chosen 5001 for the return port as well which is perhaps more usual. The response port may be configured in the remote device or discovered since the local port will be transmitted as the source port of the message. Depending on the application, it may require defining a port to respond to, or it may use the source port from the message. However, you can only have one emulator listening on a single UDP port at a time. Therefore, in the situation where you have 3 remote devices and 3 emulators talking to them, but all of these devices are the same brand and expect to communicate to the same response port, then defining the local port redundantly in each emulator will not work. In that case, create a client with a local port of 0 for for each device to use for sending, and a UDP listener emulator to hear the responses from all of the devices.
Understanding your application is critical to configuring UDP communications correctly.