Hi, I'm in the process of porting some existing code from 6.0.1 C++ API to 6.1 C# API.
I've looked through the example project that rtiddsgen 3.1 generates for dotnet5 to get a hang of things, but I'm currently stuck at trying to load 2 separate XML files. One defines the domain participants, while the other defines QOS profiles.
In the original application, I would push the 2 file paths into a string vector before assigning them as qos provider params, like so:
dds::core::StringSeq files;
files.push_back(filePath1);
files.push_back(filePath2);
dds::core::QosProvider provider;
rti::core::QosProviderParams params;
params.url_profile(files);
provider->default_provider_params(params);
participant = provider->create_participant_from_config(...);
In the C# version:
QosProvider provider = new QosProvider(filePath1);
provider.ProviderParams.UrlProfile.Add(filePath2);
participant = provider.CreateParticipantFromConfig(...);
I would get error processing tag 'datareader_qos' when it is processing the xml that contains the domain participants. It seems to be unable to find the corresponding QOS profiles defined in the other XML file.
The creation of the XML application works if I define the QOS profile within the domain participant XML, so I believe it's an issue with how I'm passing in the files to be processed by the QosProvider.
Thanks
Sorry, without knowing what's in the XML files and then which configuration you're trying to use, it's difficult to assess the problem. It would also be good to know the actual error message being printed.
XML config for app creation :
XML config for qos profiles :
The error message I would get is Parse Error at line 14: Error processing tag 'datareader_qos'
Apologies for not including more details, as I am working in an environment with no network access
Well, I suggest that you first confirm that the XML file that contains the QoS Profiles, i.e., the qos_library "qosLibrary", is actually being loaded.
Connext DDS doesn't complain when it doesn't find a file that you've set as one to be loaded. It only complains when it needs a definition that hasn't been loaded.
So, the best way to test whether a specific file is being loaded by Connext is to create a syntax error in the file. For example, create a unknown tag without a closing tag.
<aaa>
Then if Connext DDS actually tries to load the file, it will at that time complain and print out an error message.
If it's the case that the file isn't loaded. Then it's likely how you're adding files to the QosProvider to be loaded. I see that the way that you did it in C# is different than C++.