Provide efficient intraprocess multicasting of data without resorting to more expensive interprocess communication methods such as UDP multicast.
In contrast to the
types described in Annex E of IEC 61499-1, which use communication networks
for exchange of data, instances of
service interface types are used for local (within the same runtime
process) multicast publishing and subscribing of data. The service
interface types and associated service sequences for
are illustrated below. In addition to increased speed of data
, these blocks offer the following convenience features:
- The local multicast group is identified by the
IDinput. For convenience, the default value of this input is set to the function block's instance name. This can be overridden by connection to a non-default variable or configuration parameter.
- The number of data elements is given by the
nsuffix of the function block type. The number of data elements, say n
P, transmitted by a
PUBL_ninstance on a given channel need not match the number of output elements, say
nS, of a
SUBL_ninstance on the same channel. If n
SUBL_ninstance will ignore the extra data elements; if n
Sthe extra outputs of the
SUBL_ninstance will remain at their initial values.
- If a
RD_ioutput of a
SUBL_nblock is not connected or is connected to a variable of a different data type than that of the corresponding
SD_iinput of a
PUBL_nblock on the same local mulitcast channel, the
SD_ivalue will not be copied to the
RD_ivariable and no error condition will result.
As noted above, the use of the local
multicast function block types
is subject to substantially fewer restrictions than the use of the
corresponding distributed multicast types
. As a result, care must be exercised when converting from a design
which uses local multicast to a design using distributed multicast.
In particular, for distributed multicast:
IDinput must be an appropriate identifier for a distributed multicast group, such as a UDP multicast group address.
- The number of data elements given by the
nsuffix of the function block type must be identical for all publishers and subscribers in distributed multicast group.
SD_i (i=0,1,...,n-1)inputs of
PUBLISH_ninstances must be connected to variables of concrete type, i.e., not the abstract
ANYtype, in order to permit their proper encoding for transmission. Similar restrictions apply to the corresponding
RD_i (i=0,1,...,n-1)outputs of
SUBSCRIBE_ninstances, and the types of each
SD_ivariable and the corresponding
RD_ivariable must match at both ends of the multicast connection for each value of
For other examples of the application of this methodology see the documentation of the layered MVC design pattern.
In addition to the sharing of local multicast channels across Resources
in the same Device, the FBRT implementation of this design
pattern permits the sharing of channels among Devices in the
same Java™ runtime process, for example Devices that are
launched from the same SystemManager. This usage can be documented
through the use of a LocalBus segment in the System diagram;
for an example see the