Bad parameter: domainId

4 posts / 0 new
Last post
Offline
Last seen: 2 years 6 months ago
Joined: 01/15/2018
Posts: 8
Bad parameter: domainId

Hello,

 

I am trying different domain id when creating the domain participant and this is the error that I got:

[2020-11-11 23:52:53.175998] U0000000000007f60 [CREATE Participant]
Mx0F:DomainParticipantFactory.c:2387:DDS_DomainParticipantFactory_create_participant_disabledI:RTI0x20f0000:ERROR: Bad parameter: domainId

It has always worked with 0, but 1 or 2 seemed to cause the above error.

 

Also, I am using the following API to create the participant:

participant = DomainParticipantFactory.TheParticipantFactory.create_participant_with_profile(domainId,
        defaultLibrary, defaultProfile,
        null, StatusKind.STATUS_MASK_NONE);

 

What we have done to configure TheParticipantFactory with the qos url, qos library and qos profile first via

 

DomainParticipantFactoryQos factoryQos = new DomainParticipantFactoryQos();
DomainParticipantFactory.TheParticipantFactory.get_qos(factoryQos);
factoryQos.profile.url_profile.setMaximum(1);
factoryQos.profile.url_profile.add(qosFile.toURI().getPath());
DomainParticipantFactory.TheParticipantFactory.set_qos(factoryQos);
 
DomainParticipantFactory.TheParticipantFactory.set_default_library(defaultLibrary); DomainParticipantFactory.TheParticipantFactory.set_default_profile(defaultLibrary, defaultProfile);

 

before calling the create_participant. Without calling the above first seemed to be working for non-0 domain id.

I am using version 6.0.1.  Any help would be greatly appreciated.

 

Thanks,

 

Tyler

Howard's picture
Offline
Last seen: 18 hours 36 min ago
Joined: 11/29/2012
Posts: 565

So, if it works without setting a QOS Profile and it does not work when you do set a QOS Profile, then the problem is probably in the QOS Profile.

Please show the QOS Profile that you are using to create the DomainParticipant.  Providing the entire XML file would be best.

Offline
Last seen: 2 years 6 months ago
Joined: 01/15/2018
Posts: 8

Thanks for the response. It was definitely caused property configurations in the qos_profile. It may be related to us changing the domain id gain and other related properties.

After reverting back to the DDS-RTPS spec constants, it seems to be working now. Specifically, these constants:

 

PBPort BaseNumber7400
DGDomain Id Gain250
PGParticipant Id Gain2
d0Discovery Multicast Port Offset0
d1Discovery Unicast Port Offset10
d2User Data Multicast Port Offset1
d3User Data Unicast Port Offset

11

Howard's picture
Offline
Last seen: 18 hours 36 min ago
Joined: 11/29/2012
Posts: 565

DDS Domain IDs are used by DDS to map to TCP/UDP IPv4 ports through the gains/offsets and an equation specified in the DDS specification.  This is discussed here.

If you modify those gains/offsets, it's up to you to make sure that the ports generated by the equation do not exceed the value of 65535...which is the largest port value that is valid.

However, we don't generally recommend for anyone to modify the gains/offsets...if you modify them, then any DDS applications you use will also have to use the exact same values, which are not default...and it can result in a hard-to-understand/diagnose situation of applications not talking to each other.  Also, if you are using any of RTI's development tools or Services, then you have to modify the gains/offsets for those applications as well.