Closed ZTY-star closed 4 years ago
@ZTY-star please see the Tutorial section 1.3.4 you can just pass it as an integer. Its recommended to use a domainId in the range of 0 - 230 for maximum interoperability see also the deploymentguide section 12.2.2
@ZTY-star please see the Tutorial section 1.3.4 you can just pass it as an integer. Its recommended to use a domainId in the range of 0 - 230 for maximum interoperability see also the deploymentguide section 12.2.2
However, the id value is related to the id value defined in the OSPL.xml file. Only when the id value set in the program is the same as the value in the configuration file can the program run. How can this be solved? The goal I want to achieve is to set the id value freely.Thankyou
@ZTY-star the domainId you are using in your application will be set inside the ospl.xml. When using default_id() the system will look inside the ospl.xml and use the domain id that if specified there. You cannot set a domain ID at runtime. it can only be done before starting the application.
@ZTY-star the domainId you are using in your application will be set inside the ospl.xml. When using default_id() the system will look inside the ospl.xml and use the domain id that if specified there. You cannot set a domain ID at runtime. it can only be done before starting the application.
I don't want to use default_id (), I want to specify a certain id myself before running, like this dds :: domain :: DomainParticipant dp (3), but if the program wants to run, id must be set to 3 in the configuration file , I want to get rid of the shackles of the configuration file.
@ZTY-star you can use environment variables in the configuration file i.e.
closing this as answered
opensplice examples all use the default id,like this:dds::domain::DomainParticipant(org::opensplice::domain::default_id()),but how to pass in the self-defined domain ID, and what is the value range of the domain ID.