Function dds_create_domain¶
Defined in File dds.h
Function Documentation¶
-
dds_entity_t dds_create_domain(const dds_domainid_t domain, const char *config)¶
Creates a domain with a given configuration.
To explicitly create a domain based on a configuration passed as a string.
It will not be created if a domain with the given domain id already exists. This could have been created implicitly by a dds_create_participant().
Please be aware that the given domain_id always takes precedence over the configuration.
| domain_id | domain id in config | result +——–—+———————+——-— | n | any (or absent) | n, config is used | n | m == n | n, config is used | n | m != n | n, config is ignored: default
Config models: 1: <CycloneDDS> <Domain id=”X”>…</Domain> <Domain …/> </CycloneDDS> where … is all that can today be set in children of CycloneDDS with the exception of the id 2: <CycloneDDS> <Domain><Id>X</Id></Domain> … </CycloneDDS> legacy form, domain id must be the first element in the file with a value (if nothing has been set previously, it a warning is good enough)
Using NULL or “” as config will create a domain with default settings.
- Parameters
domain – [in] The domain to be created. DEFAULT_DOMAIN is not allowed.
config – [in] A configuration string containing file names and/or XML fragments representing the configuration.
- Return values
DDS_RETCODE_BAD_PARAMETER – Illegal value for domain id or the configfile parameter is NULL.
DDS_RETCODE_PRECONDITION_NOT_MET – The domain already existed and cannot be created again.
DDS_RETCODE_ERROR – An internal error has occurred.
- Returns
A valid entity handle or an error code.