TRANSPORT_MULTICAST_MAPPING QosPolicy (DDS Extension)

The multicast address on which a DataReader wants to receive its data can be explicitly configured using the TRANSPORT_MULTICAST QosPolicy (DDS Extension). However in systems with many multicast addresses, managing the multicast configuration can become cumbersome. The TransportMulticastMapping QosPolicy is designed to make configuration and assignment of the DataReader's multicast addresses more manageable. When using this QosPolicy, the middleware will automatically assign a multicast receive address for a DataReader from a range by using configurable mapping rules.

DataReaders can be assigned a single multicast receive address using the rules defined in this QosPolicy on the DomainParticipant. This multicast receive address is exchanged during simple discovery in the same manner used when the multicast receive address is defined explicitly. No additional configuration on the writer side is needed.

Mapping within a range is done through a mapping function. The middleware provides a default hash (md5) mapping function. This interface is also pluggable, so you can specify a custom mapping function to minimize collisions.

To use this QosPolicy, you must set the kind in the TRANSPORT_MULTICAST QosPolicy (DDS Extension) to AUTOMATIC.

This QosPolicy contains the member in DDS_TransportMulticastMappingQosPolicy.

DDS_TransportMulticastMappingQosPolicy

Type

Field Name

Description

DDS_TransportMapping
SettingsSeq

value

A sequence of multicast communication settings, each of which has the format shown in DDS_TransportMulticastSettings_t.

DDS_TransportMulticastSettings_t

Type

Field Name

Description

char *

addresses

A string containing a comma-separated list of IP addresses or IP address ranges to be used to receive multicast traffic for the entity with a topic that matches the topic_expression.

See Formatting Rules for Addresses.

char *

topic_expression

A regular expression used to map topic names to corresponding addresses.

See SQL Extension: Regular Expression Matching.

DDS_TransportMulticast
MappingFunction_t

mapping_function

Optional. Defines a user-provided pluggable mapping function. See DDS_TransportMulticastMappingFunction_t.

 

DDS_TransportMulticastMappingFunction_t

Type

Field Name

Description

char *

dll

Specifies a dynamic library that contains a mapping function.

You may specify a relative or absolute path.

If the name is specified as "foo", the library name on Linux systems will be libfoo.so; on Windows systems it will be foo.dll.

char *

function_name

Specifies the name of a mapping function in the library specified in the above dll.

The function must implement the following interface:

int function(const char* topic_name, int numberOfAddresses);

The function must return an integer that indicates the index of the address to use for the given topic_name. For example, if the first address in the list should be used, it must return 0; if the second address in the list should be used, it must return 1, etc.

Formatting Rules for Addresses

Example

This QoS policy configures the multicast ranges and mapping rules at the DomainParticipant level. You can configure a large set of multicast addresses on the DomainParticipant.

In addition, you can configure a mapping between topic names and multicast addresses. For example, topic "A" can be assigned to address 239.255.1.1 and topic "B" can be assigned to address 239.255.1.2.

This configuration is quite flexible. For example, you can specify mappings between a subset of topics to a range of multicast addresses. For example, topics "X", "Y" and Z" can be mapped to [239.255.1.1, 239.255.1.255], or using regular expressions, "X*" and "B-Z" can be mapped to a sub-range of addresses. See SQL Extension: Regular Expression Matching.

Properties

This QosPolicy cannot be modified after the DomainParticipant is created.

Related QosPolicies

Applicable DDS Entities

System Resource Considerations

See System Resource Considerations.

© 2018 RTI