Instrument Control Toolbox | ![]() ![]() |
Example: Using Events and Callbacks
This example extends Example: Communicating Between Two Hosts to include a datagram received callback. The callback function is instrcallback
, which displays information to the command line indicating that a datagram has been received.
The following command configures the callback for the UDP object u1
.
When a datagram is received, the following message is displayed.
DatagramReceived event occurred at 10:26:20 for the object: UDP-192.168.1.12. 17 bytes were received from address 192.168.1.12, port 2194.
![]() | Storing Event Information | Saving and Loading the Session | ![]() |