FUNCTION_BLOCK UDP_LISTEN

An instance of this type encapsulates a multicast (receiving) socket in a similar manner to a SUBSCRIBE_1 block. Since its RD_1 output is a string containing a hexadecimal representation of the most recently received message, it can be used to monitor the operation of a PUBLISH_x block that publishes any number (x) of data items on the associated multicast channel.
The format of the RD_1 output is a space-separated sequence of 2-digit hexadecimal representations of the individual bytes in the receive buffer. Since the buffer is zero-filled before message reception, the output string terminates with the characters "..." following the first zero byte in the set of contiguous zero bytes to the end of the buffer. Thus, if the message contains trailing zero bytes, only the first is shown.
See the CODEC_TEST system configuration for an example of the use of an instance of this type.
Last updated: 2011-01-13.
©2011 Holobloc Inc.
Licensed under the Academic Free License version 3.0.