Support multiple domains in configuration

Change the structure of the configuration file (in a backwards
compatible manner) to allow specifying configurations for multiple
domains in a file.  (Listing multiple files in CYCLONEDDS_URI was
already supported.)  A configuration specifies an id, with a default of
any, configurations for an incompatible id are ignored.

If the application specifies an id other than DDS_DOMAIN_DEFAULT in the
call to create_participant, then only configuration specifications for
Domain elements with that id or with id "any" will be used.  If the
application does specify DDS_DOMAIN_DEFAULT, then the id will be taken
from the first Domain element that specifies an id.  If none do, the
domain id defaults to 0.  Each applicable domain specification is taken
as a separate source and may override settings made previously.

All settings moved from the top-level CycloneDDS element to the
CycloneDDS/Domain element.  The CycloneDDS/Domain/Id element moved to
become the "id" attribute of CycloneDDS/Domain.  The old locations still
work, with appropriate deprecation warnings.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-08-09 17:12:52 +02:00 committed by eboasson
parent 70a342991f
commit 891fc2b12f
27 changed files with 1161 additions and 711 deletions

View file

@ -182,7 +182,7 @@ script:
${SCAN_BUILD} cmake --build . --config ${BUILD_TYPE} --target install ${SCAN_BUILD} cmake --build . --config ${BUILD_TYPE} --target install
;; ;;
esac esac
- CYCLONEDDS_URI='<CycloneDDS><DDSI2E><Internal><EnableExpensiveChecks>all</EnableExpensiveChecks></Internal></DDSI2E></CycloneDDS>' ctest -j 4 --output-on-failure -T test -C ${BUILD_TYPE} - CYCLONEDDS_URI='<CycloneDDS><Domain><Internal><EnableExpensiveChecks>all</EnableExpensiveChecks></Internal></Domain></CycloneDDS>' ctest -j 4 --output-on-failure -T test -C ${BUILD_TYPE}
- if [ "${ASAN}" != "none" ]; then - if [ "${ASAN}" != "none" ]; then
CMAKE_LINKER_FLAGS="-DCMAKE_LINKER_FLAGS=-fsanitize=${USE_SANITIZER}"; CMAKE_LINKER_FLAGS="-DCMAKE_LINKER_FLAGS=-fsanitize=${USE_SANITIZER}";
CMAKE_C_FLAGS="-DCMAKE_C_FLAGS=-fsanitize=${USE_SANITIZER}"; CMAKE_C_FLAGS="-DCMAKE_C_FLAGS=-fsanitize=${USE_SANITIZER}";

View file

@ -157,7 +157,7 @@ if(${CMAKE_GENERATOR} STREQUAL "Xcode")
set (CMAKE_XCODE_ATTRIBUTE_GCC_WARN_UNUSED_VALUE YES) set (CMAKE_XCODE_ATTRIBUTE_GCC_WARN_UNUSED_VALUE YES)
set (CMAKE_XCODE_ATTRIBUTE_GCC_WARN_UNUSED_VARIABLE YES) set (CMAKE_XCODE_ATTRIBUTE_GCC_WARN_UNUSED_VARIABLE YES)
set (CMAKE_XCODE_ATTRIBUTE_CLANG_WARN_DOCUMENTATION_COMMENTS YES) set (CMAKE_XCODE_ATTRIBUTE_CLANG_WARN_DOCUMENTATION_COMMENTS YES)
set (CMAKE_XCODE_ATTRIBUTE_CLANG_WARN_MISSING_PROTOTYPES YES) set (CMAKE_XCODE_ATTRIBUTE_GCC_WARN_ABOUT_MISSING_PROTOTYPES YES)
endif() endif()
# Make it easy to enable one of Clang's/gcc's analyzers, and default to using # Make it easy to enable one of Clang's/gcc's analyzers, and default to using

View file

@ -186,21 +186,23 @@ point to it. E.g. (on Linux):
$ cat cyclonedds.xml $ cat cyclonedds.xml
<CycloneDDS> <CycloneDDS>
<General> <Domain id="any">
<NetworkInterfaceAddress>auto</NetworkInterfaceAddress> <General>
<AllowMulticast>auto</AllowMulticast> <NetworkInterfaceAddress>auto</NetworkInterfaceAddress>
<MaxMessageSize>65500B</MaxMessageSize> <AllowMulticast>auto</AllowMulticast>
<FragmentSize>65000B</FragmentSize> <MaxMessageSize>65500B</MaxMessageSize>
</General> <FragmentSize>4000B</FragmentSize>
<Internal> </General>
<Watermarks> <Internal>
<WhcHigh>500kB</WhcHigh> <Watermarks>
</Watermarks> <WhcHigh>500kB</WhcHigh>
</Internal> </Watermarks>
<Tracing> </Internal>
<Verbosity>config</Verbosity> <Tracing>
<OutputFile>stdout</OutputFile> <Verbosity>config</Verbosity>
</Tracing> <OutputFile>stdout</OutputFile>
</Tracing>
</Domain>
</CycloneDDS> </CycloneDDS>
$ export CYCLONEDDS_URI=file://$PWD/cyclonedds.xml $ export CYCLONEDDS_URI=file://$PWD/cyclonedds.xml

View file

@ -46,5 +46,5 @@ build_script:
- cd ../../../../../.. - cd ../../../../../..
test_script: test_script:
- set "CYCLONEDDS_URI=<CycloneDDS><DDSI2E><Internal><EnableExpensiveChecks>all</EnableExpensiveChecks></Internal></DDSI2E></CycloneDDS>" - set "CYCLONEDDS_URI=<CycloneDDS><Domain><Internal><EnableExpensiveChecks>all</EnableExpensiveChecks></Internal></Domain></CycloneDDS>"
- ctest --output-on-failure --parallel 4 --test-action test --build-config %CONFIGURATION% - ctest --output-on-failure --parallel 4 --test-action test --build-config %CONFIGURATION%

View file

@ -45,11 +45,32 @@ static dds_return_t dds_domain_init (dds_domain *domain, dds_domainid_t domain_i
char * uri = NULL; char * uri = NULL;
uint32_t len; uint32_t len;
domain->m_id = domain_id; domain->gv.tstart = now ();
domain->m_refc = 1; domain->m_refc = 1;
ddsrt_avl_init (&dds_topictree_def, &domain->m_topics); ddsrt_avl_init (&dds_topictree_def, &domain->m_topics);
domain->gv.tstart = now (); /* | domain_id | domain id in config | result
+-----------+---------------------+----------
| DEFAULT | any (or absent) | 0
| DEFAULT | n | n
| n | any (or absent) | n
| n | m = n | n
| n | m /= n | n, entire config ignored
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) */
(void) ddsrt_getenv ("CYCLONEDDS_URI", &uri); (void) ddsrt_getenv ("CYCLONEDDS_URI", &uri);
domain->cfgst = config_init (uri, &domain->gv.config, domain_id); domain->cfgst = config_init (uri, &domain->gv.config, domain_id);
@ -60,30 +81,8 @@ static dds_return_t dds_domain_init (dds_domain *domain, dds_domainid_t domain_i
goto fail_config; goto fail_config;
} }
/* if a domain id was explicitly given, check & fix up the configuration */ assert (domain_id == DDS_DOMAIN_DEFAULT || domain_id == domain->gv.config.domainId);
if (domain_id != DDS_DOMAIN_DEFAULT) domain->m_id = domain->gv.config.domainId;
{
if (domain_id > 230)
{
DDS_ILOG (DDS_LC_ERROR, domain_id, "requested domain id %"PRIu32" is out of range\n", domain_id);
ret = DDS_RETCODE_ERROR;
goto fail_config_domainid;
}
else if (domain->gv.config.domainId.isdefault)
{
domain->gv.config.domainId.value = domain_id;
}
else if (domain_id != domain->gv.config.domainId.value)
{
DDS_ILOG (DDS_LC_ERROR, domain_id, "requested domain id %"PRIu32" is inconsistent with configured value %"PRIu32"\n", domain_id, domain->gv.config.domainId.value);
ret = DDS_RETCODE_ERROR;
goto fail_config_domainid;
}
}
/* FIXME: The gv.config.domainId can change internally in DDSI. So, remember what the
* main configured domain id is. */
domain->m_id = domain->gv.config.domainId.value;
if (rtps_config_prep (&domain->gv, domain->cfgst) != 0) if (rtps_config_prep (&domain->gv, domain->cfgst) != 0)
{ {
@ -146,7 +145,7 @@ static dds_return_t dds_domain_init (dds_domain *domain, dds_domainid_t domain_i
if (rtps_start (&domain->gv) < 0) if (rtps_start (&domain->gv) < 0)
{ {
DDS_LOG (DDS_LC_CONFIG, "Failed to start RTPS\n"); DDS_ILOG (DDS_LC_CONFIG, domain->m_id, "Failed to start RTPS\n");
ret = DDS_RETCODE_ERROR; ret = DDS_RETCODE_ERROR;
goto fail_rtps_start; goto fail_rtps_start;
} }
@ -169,7 +168,6 @@ fail_threadmon_new:
rtps_fini (&domain->gv); rtps_fini (&domain->gv);
fail_rtps_init: fail_rtps_init:
fail_rtps_config: fail_rtps_config:
fail_config_domainid:
config_fini (domain->cfgst); config_fini (domain->cfgst);
fail_config: fail_config:
return ret; return ret;

View file

@ -13,24 +13,23 @@
<CycloneDDS> <CycloneDDS>
<!-- Simple config-file for testing whether a config-file can be picked up <!-- Simple config-file for testing whether a config-file can be picked up
correctly. --> correctly. -->
<Domain> <Domain id="3">
<Id>3</Id> <General>
<NetworkInterfaceAddress>127.0.0.1</NetworkInterfaceAddress>
<AllowMulticast>true</AllowMulticast>
<EnableMulticastLoopback>true</EnableMulticastLoopback>
</General>
<Compatibility>
<StandardsConformance>lax</StandardsConformance>
</Compatibility>
<Tracing>
<Verbosity>warning</Verbosity>
<OutputFile>&#118;&#x6F;rtexdds-<![CDATA[trace]]>.${NON_EXISTENT_ENV_VARIABLE:-l}${CYCLONEDDS_URI:+o}g </OutputFile>
</Tracing>
<Internal>
<MaxParticipants>${MAX_PARTICIPANTS}</MaxParticipants>
<HeartbeatInterval max="10 s"> 100 ms </HeartbeatInterval>
<RediscoveryBlacklistDuration></RediscoveryBlacklistDuration>
</Internal>
</Domain> </Domain>
<General>
<NetworkInterfaceAddress>127.0.0.1</NetworkInterfaceAddress>
<AllowMulticast>true</AllowMulticast>
<EnableMulticastLoopback>true</EnableMulticastLoopback>
</General>
<Compatibility>
<StandardsConformance>lax</StandardsConformance>
</Compatibility>
<Tracing>
<Verbosity>warning</Verbosity>
<OutputFile>&#118;&#x6F;rtexdds-<![CDATA[trace]]>.${NON_EXISTENT_ENV_VARIABLE:-l}${CYCLONEDDS_URI:+o}g </OutputFile>
</Tracing>
<Internal>
<MaxParticipants>${MAX_PARTICIPANTS}</MaxParticipants>
<HeartbeatInterval max="10 s"> 100 ms </HeartbeatInterval>
<RediscoveryBlacklistDuration></RediscoveryBlacklistDuration>
</Internal>
</CycloneDDS> </CycloneDDS>

View file

@ -102,7 +102,7 @@ CU_Test(ddsc_participant, create_multiple_domains)
/* Test for creating participant with valid configuration file */ /* Test for creating participant with valid configuration file */
CU_Test(ddsc_participant, create_with_conf_no_env) { CU_Test(ddsc_participant, create_with_conf_no_env) {
dds_entity_t participant, participant2, participant3; dds_entity_t participant2, participant3;
dds_return_t status; dds_return_t status;
dds_domainid_t domain_id; dds_domainid_t domain_id;
dds_domainid_t valid_domain=3; dds_domainid_t valid_domain=3;
@ -114,10 +114,6 @@ CU_Test(ddsc_participant, create_with_conf_no_env) {
ddsrt_getenv(DDS_PROJECT_NAME_NOSPACE_CAPS"_URI", &env_uri); ddsrt_getenv(DDS_PROJECT_NAME_NOSPACE_CAPS"_URI", &env_uri);
CU_ASSERT_PTR_NOT_EQUAL_FATAL(env_uri, NULL); CU_ASSERT_PTR_NOT_EQUAL_FATAL(env_uri, NULL);
//invalid domain
participant = dds_create_participant (1, NULL, NULL);
CU_ASSERT_FATAL(participant < 0);
//valid specific domain value //valid specific domain value
participant2 = dds_create_participant (valid_domain, NULL, NULL); participant2 = dds_create_participant (valid_domain, NULL, NULL);
CU_ASSERT_FATAL(participant2 > 0); CU_ASSERT_FATAL(participant2 > 0);

View file

@ -224,7 +224,7 @@ struct ssl_min_version {
struct config struct config
{ {
int valid; int valid;
uint32_t enabled_logcats; uint32_t tracemask;
uint32_t enabled_xchecks; uint32_t enabled_xchecks;
char *servicename; char *servicename;
char *pcap_file; char *pcap_file;
@ -233,8 +233,8 @@ struct config
char **networkRecvAddressStrings; char **networkRecvAddressStrings;
char *externalAddressString; char *externalAddressString;
char *externalMaskString; char *externalMaskString;
FILE *tracingOutputFile; FILE *tracefp;
char *tracingOutputFileName; char *tracefile;
int tracingTimestamps; int tracingTimestamps;
int tracingAppendToFile; int tracingAppendToFile;
uint32_t allowMulticast; uint32_t allowMulticast;
@ -244,7 +244,7 @@ struct config
enum boolean_default compat_tcp_enable; enum boolean_default compat_tcp_enable;
int dontRoute; int dontRoute;
int enableMulticastLoopback; int enableMulticastLoopback;
struct config_maybe_uint32 domainId; uint32_t domainId;
int participantIndex; int participantIndex;
int maxAutoParticipantIndex; int maxAutoParticipantIndex;
uint32_t port_base; uint32_t port_base;

View file

@ -76,7 +76,7 @@ typedef int64_t seqno_t;
struct cfgst; struct cfgst;
struct q_globals; struct q_globals;
int rtps_config_prep (struct q_globals *config, struct cfgst *cfgst); int rtps_config_prep (struct q_globals *config, struct cfgst *cfgst);
int rtps_config_open (struct q_globals *config); int rtps_config_open_trace (struct q_globals *config);
int rtps_init (struct q_globals *config); int rtps_init (struct q_globals *config);
int rtps_start (struct q_globals *config); int rtps_start (struct q_globals *config);
void rtps_stop (struct q_globals *config); void rtps_stop (struct q_globals *config);

View file

@ -105,7 +105,7 @@ static int add_addresses_to_addrset_1 (const struct q_globals *gv, struct addrse
assert (gv->config.maxAutoParticipantIndex >= 0); assert (gv->config.maxAutoParticipantIndex >= 0);
for (uint32_t i = 0; i <= (uint32_t) gv->config.maxAutoParticipantIndex; i++) for (uint32_t i = 0; i <= (uint32_t) gv->config.maxAutoParticipantIndex; i++)
{ {
uint32_t port = gv->config.port_base + gv->config.port_dg * gv->config.domainId.value + i * gv->config.port_pg + gv->config.port_d1; uint32_t port = gv->config.port_base + gv->config.port_dg * gv->config.domainId + i * gv->config.port_pg + gv->config.port_d1;
loc.port = (unsigned) port; loc.port = (unsigned) port;
if (i == 0) if (i == 0)
GVLOG (DDS_LC_CONFIG, "%s", ddsi_locator_to_string(gv, buf, sizeof(buf), &loc)); GVLOG (DDS_LC_CONFIG, "%s", ddsi_locator_to_string(gv, buf, sizeof(buf), &loc));
@ -118,7 +118,7 @@ static int add_addresses_to_addrset_1 (const struct q_globals *gv, struct addrse
{ {
uint32_t port; uint32_t port;
if (port_mode == -1) if (port_mode == -1)
port = gv->config.port_base + gv->config.port_dg * gv->config.domainId.value + gv->config.port_d0; port = gv->config.port_base + gv->config.port_dg * gv->config.domainId + gv->config.port_d0;
else else
port = (uint32_t) port_mode; port = (uint32_t) port_mode;
loc.port = (unsigned) port; loc.port = (unsigned) port;

File diff suppressed because it is too large Load diff

View file

@ -76,7 +76,7 @@ static int make_uc_sockets (struct q_globals *gv, uint32_t * pdisc, uint32_t * p
if (gv->config.many_sockets_mode == MSM_NO_UNICAST) if (gv->config.many_sockets_mode == MSM_NO_UNICAST)
{ {
assert (ppid == PARTICIPANT_INDEX_NONE); assert (ppid == PARTICIPANT_INDEX_NONE);
*pdata = *pdisc = (uint32_t) (gv->config.port_base + gv->config.port_dg * gv->config.domainId.value); *pdata = *pdisc = (uint32_t) (gv->config.port_base + gv->config.port_dg * gv->config.domainId);
if (gv->config.allowMulticast) if (gv->config.allowMulticast)
{ {
/* FIXME: ugly hack - but we'll fix up after creating the multicast sockets */ /* FIXME: ugly hack - but we'll fix up after creating the multicast sockets */
@ -87,7 +87,7 @@ static int make_uc_sockets (struct q_globals *gv, uint32_t * pdisc, uint32_t * p
if (ppid >= 0) if (ppid >= 0)
{ {
/* FIXME: verify port numbers are in range instead of truncating them like this */ /* FIXME: verify port numbers are in range instead of truncating them like this */
uint32_t base = gv->config.port_base + (gv->config.port_dg * gv->config.domainId.value) + ((uint32_t) ppid * gv->config.port_pg); uint32_t base = gv->config.port_base + (gv->config.port_dg * gv->config.domainId) + ((uint32_t) ppid * gv->config.port_pg);
*pdisc = base + gv->config.port_d1; *pdisc = base + gv->config.port_d1;
*pdata = base + gv->config.port_d3; *pdata = base + gv->config.port_d3;
} }
@ -286,7 +286,7 @@ static int string_to_default_locator (const struct q_globals *gv, nn_locator_t *
static int set_spdp_address (struct q_globals *gv) static int set_spdp_address (struct q_globals *gv)
{ {
const uint32_t port = (uint32_t) (gv->config.port_base + gv->config.port_dg * gv->config.domainId.value + gv->config.port_d0); const uint32_t port = (uint32_t) (gv->config.port_base + gv->config.port_dg * gv->config.domainId + gv->config.port_d0);
int rc = 0; int rc = 0;
/* FIXME: FIXME: FIXME: */ /* FIXME: FIXME: FIXME: */
gv->loc_spdp_mc.kind = NN_LOCATOR_KIND_INVALID; gv->loc_spdp_mc.kind = NN_LOCATOR_KIND_INVALID;
@ -318,7 +318,7 @@ static int set_spdp_address (struct q_globals *gv)
static int set_default_mc_address (struct q_globals *gv) static int set_default_mc_address (struct q_globals *gv)
{ {
const uint32_t port = (uint32_t) (gv->config.port_base + gv->config.port_dg * gv->config.domainId.value + gv->config.port_d2); const uint32_t port = (uint32_t) (gv->config.port_base + gv->config.port_dg * gv->config.domainId + gv->config.port_d2);
int rc; int rc;
if (!gv->config.defaultMulticastAddressString) if (!gv->config.defaultMulticastAddressString)
gv->loc_default_mc = gv->loc_spdp_mc; gv->loc_default_mc = gv->loc_spdp_mc;
@ -404,11 +404,11 @@ static int check_thread_properties (const struct q_globals *gv)
} }
if (chanprefix[i] == NULL) if (chanprefix[i] == NULL)
{ {
DDS_ILOG (DDS_LC_ERROR, gv->config.domainId.value, "config: DDSI2Service/Threads/Thread[@name=\"%s\"]: unknown thread\n", e->name); DDS_ILOG (DDS_LC_ERROR, gv->config.domainId, "config: DDSI2Service/Threads/Thread[@name=\"%s\"]: unknown thread\n", e->name);
ok = 0; ok = 0;
} }
#else #else
DDS_ILOG (DDS_LC_ERROR, gv->config.domainId.value, "config: DDSI2Service/Threads/Thread[@name=\"%s\"]: unknown thread\n", e->name); DDS_ILOG (DDS_LC_ERROR, gv->config.domainId, "config: DDSI2Service/Threads/Thread[@name=\"%s\"]: unknown thread\n", e->name);
ok = 0; ok = 0;
#endif /* DDSI_INCLUDE_NETWORK_CHANNELS */ #endif /* DDSI_INCLUDE_NETWORK_CHANNELS */
} }
@ -416,30 +416,30 @@ static int check_thread_properties (const struct q_globals *gv)
return ok; return ok;
} }
int rtps_config_open (struct q_globals *gv) int rtps_config_open_trace (struct q_globals *gv)
{ {
DDSRT_WARNING_MSVC_OFF(4996); DDSRT_WARNING_MSVC_OFF(4996);
int status; int status;
if (gv->config.tracingOutputFileName == NULL || *gv->config.tracingOutputFileName == 0 || gv->config.enabled_logcats == 0) if (gv->config.tracefile == NULL || *gv->config.tracefile == 0 || gv->config.tracemask == 0)
{ {
gv->config.enabled_logcats = 0; gv->config.tracemask = 0;
gv->config.tracingOutputFile = NULL; gv->config.tracefp = NULL;
status = 1; status = 1;
} }
else if (ddsrt_strcasecmp (gv->config.tracingOutputFileName, "stdout") == 0) else if (ddsrt_strcasecmp (gv->config.tracefile, "stdout") == 0)
{ {
gv->config.tracingOutputFile = stdout; gv->config.tracefp = stdout;
status = 1; status = 1;
} }
else if (ddsrt_strcasecmp (gv->config.tracingOutputFileName, "stderr") == 0) else if (ddsrt_strcasecmp (gv->config.tracefile, "stderr") == 0)
{ {
gv->config.tracingOutputFile = stderr; gv->config.tracefp = stderr;
status = 1; status = 1;
} }
else if ((gv->config.tracingOutputFile = fopen (gv->config.tracingOutputFileName, gv->config.tracingAppendToFile ? "a" : "w")) == NULL) else if ((gv->config.tracefp = fopen (gv->config.tracefile, gv->config.tracingAppendToFile ? "a" : "w")) == NULL)
{ {
DDS_ILOG (DDS_LC_ERROR, gv->config.domainId.value, "%s: cannot open for writing\n", gv->config.tracingOutputFileName); DDS_ILOG (DDS_LC_ERROR, gv->config.domainId, "%s: cannot open for writing\n", gv->config.tracefile);
status = 0; status = 0;
} }
else else
@ -447,7 +447,7 @@ int rtps_config_open (struct q_globals *gv)
status = 1; status = 1;
} }
dds_log_cfg_init (&gv->logconfig, gv->config.domainId.value, gv->config.enabled_logcats, stderr, gv->config.tracingOutputFile); dds_log_cfg_init (&gv->logconfig, gv->config.domainId, gv->config.tracemask, stderr, gv->config.tracefp);
return status; return status;
DDSRT_WARNING_MSVC_ON(4996); DDSRT_WARNING_MSVC_ON(4996);
} }
@ -466,7 +466,7 @@ int rtps_config_prep (struct q_globals *gv, struct cfgst *cfgst)
gv->config.whc_init_highwater_mark.value < gv->config.whc_lowwater_mark || gv->config.whc_init_highwater_mark.value < gv->config.whc_lowwater_mark ||
gv->config.whc_init_highwater_mark.value > gv->config.whc_highwater_mark) gv->config.whc_init_highwater_mark.value > gv->config.whc_highwater_mark)
{ {
DDS_ILOG (DDS_LC_ERROR, gv->config.domainId.value, "Invalid watermark settings\n"); DDS_ILOG (DDS_LC_ERROR, gv->config.domainId, "Invalid watermark settings\n");
goto err_config_late_error; goto err_config_late_error;
} }
@ -478,7 +478,7 @@ int rtps_config_prep (struct q_globals *gv, struct cfgst *cfgst)
inherited by readers/writers), but in many sockets mode each inherited by readers/writers), but in many sockets mode each
participant has its own socket, and therefore unique address participant has its own socket, and therefore unique address
set */ set */
DDS_ILOG (DDS_LC_ERROR, gv->config.domainId.value, "Minimal built-in endpoint set mode and ManySocketsMode are incompatible\n"); DDS_ILOG (DDS_LC_ERROR, gv->config.domainId, "Minimal built-in endpoint set mode and ManySocketsMode are incompatible\n");
goto err_config_late_error; goto err_config_late_error;
} }
@ -554,8 +554,8 @@ int rtps_config_prep (struct q_globals *gv, struct cfgst *cfgst)
} }
#endif /* DDSI_INCLUDE_NETWORK_CHANNELS */ #endif /* DDSI_INCLUDE_NETWORK_CHANNELS */
/* Open tracing file after all possible gv->config errors have been printed */ /* Open tracing file after all possible config errors have been printed */
if (! rtps_config_open (gv)) if (! rtps_config_open_trace (gv))
{ {
goto err_config_late_error; goto err_config_late_error;
} }
@ -633,7 +633,7 @@ int joinleave_spdp_defmcip (struct q_globals *gv, int dojoin)
unref_addrset (as); unref_addrset (as);
if (arg.errcount) if (arg.errcount)
{ {
GVERROR ("rtps_init: failed to join multicast groups for domain %"PRIu32" participant %d\n", gv->config.domainId.value, gv->config.participantIndex); GVERROR ("rtps_init: failed to join multicast groups for domain %"PRIu32" participant %d\n", gv->config.domainId, gv->config.participantIndex);
return -1; return -1;
} }
return 0; return 0;
@ -647,7 +647,7 @@ int create_multicast_sockets (struct q_globals *gv)
qos->m_multicast = 1; qos->m_multicast = 1;
/* FIXME: should check for overflow */ /* FIXME: should check for overflow */
port = (uint32_t) (gv->config.port_base + gv->config.port_dg * gv->config.domainId.value + gv->config.port_d0); port = (uint32_t) (gv->config.port_base + gv->config.port_dg * gv->config.domainId + gv->config.port_d0);
if ((disc = ddsi_factory_create_conn (gv->m_factory, port, qos)) == NULL) if ((disc = ddsi_factory_create_conn (gv->m_factory, port, qos)) == NULL)
goto err_disc; goto err_disc;
if (gv->config.many_sockets_mode == MSM_NO_UNICAST) if (gv->config.many_sockets_mode == MSM_NO_UNICAST)
@ -657,7 +657,7 @@ int create_multicast_sockets (struct q_globals *gv)
} }
else else
{ {
port = (uint32_t) (gv->config.port_base + gv->config.port_dg * gv->config.domainId.value + gv->config.port_d2); port = (uint32_t) (gv->config.port_base + gv->config.port_dg * gv->config.domainId + gv->config.port_d2);
if ((data = ddsi_factory_create_conn (gv->m_factory, port, qos)) == NULL) if ((data = ddsi_factory_create_conn (gv->m_factory, port, qos)) == NULL)
goto err_data; goto err_data;
} }
@ -984,7 +984,7 @@ int rtps_init (struct q_globals *gv)
#ifdef DDSI_INCLUDE_NETWORK_PARTITIONS #ifdef DDSI_INCLUDE_NETWORK_PARTITIONS
/* Convert address sets in partition mappings from string to address sets */ /* Convert address sets in partition mappings from string to address sets */
{ {
const uint32_t port = gv->config.port_base + gv->config.port_dg * gv->config.domainId.value + gv->config.port_d2; const uint32_t port = gv->config.port_base + gv->config.port_dg * gv->config.domainId + gv->config.port_d2;
struct config_networkpartition_listelem *np; struct config_networkpartition_listelem *np;
for (np = gv->config.networkPartitions; np; np = np->next) for (np = gv->config.networkPartitions; np; np = np->next)
{ {
@ -1056,7 +1056,7 @@ int rtps_init (struct q_globals *gv)
{ {
if (make_uc_sockets (gv, &port_disc_uc, &port_data_uc, gv->config.participantIndex) < 0) if (make_uc_sockets (gv, &port_disc_uc, &port_data_uc, gv->config.participantIndex) < 0)
{ {
GVERROR ("rtps_init: failed to create unicast sockets for domain %"PRId32" participant %d\n", gv->config.domainId.value, gv->config.participantIndex); GVERROR ("rtps_init: failed to create unicast sockets for domain %"PRId32" participant %d\n", gv->config.domainId, gv->config.participantIndex);
goto err_unicast_sockets; goto err_unicast_sockets;
} }
} }
@ -1074,13 +1074,13 @@ int rtps_init (struct q_globals *gv)
continue; continue;
else /* Oops! */ else /* Oops! */
{ {
GVERROR ("rtps_init: failed to create unicast sockets for domain %"PRId32" participant %d\n", gv->config.domainId.value, ppid); GVERROR ("rtps_init: failed to create unicast sockets for domain %"PRId32" participant %d\n", gv->config.domainId, ppid);
goto err_unicast_sockets; goto err_unicast_sockets;
} }
} }
if (ppid > gv->config.maxAutoParticipantIndex) if (ppid > gv->config.maxAutoParticipantIndex)
{ {
GVERROR ("rtps_init: failed to find a free participant index for domain %"PRId32"\n", gv->config.domainId.value); GVERROR ("rtps_init: failed to find a free participant index for domain %"PRId32"\n", gv->config.domainId);
goto err_unicast_sockets; goto err_unicast_sockets;
} }
gv->config.participantIndex = ppid; gv->config.participantIndex = ppid;
@ -1091,7 +1091,7 @@ int rtps_init (struct q_globals *gv)
} }
GVLOG (DDS_LC_CONFIG, "rtps_init: uc ports: disc %"PRIu32" data %"PRIu32"\n", port_disc_uc, port_data_uc); GVLOG (DDS_LC_CONFIG, "rtps_init: uc ports: disc %"PRIu32" data %"PRIu32"\n", port_disc_uc, port_data_uc);
} }
GVLOG (DDS_LC_CONFIG, "rtps_init: domainid %"PRId32" participantid %d\n", gv->config.domainId.value, gv->config.participantIndex); GVLOG (DDS_LC_CONFIG, "rtps_init: domainid %"PRId32" participantid %d\n", gv->config.domainId, gv->config.participantIndex);
if (gv->config.pcap_file && *gv->config.pcap_file) if (gv->config.pcap_file && *gv->config.pcap_file)
{ {

View file

@ -109,11 +109,21 @@ typedef struct {
} dds_log_data_t; } dds_log_data_t;
/** Function signature that log and trace callbacks must adhere too. */ /** Function signature that log and trace callbacks must adhere too. */
typedef void(*dds_log_write_fn_t)(void *, const dds_log_data_t *); typedef void (*dds_log_write_fn_t) (void *, const dds_log_data_t *);
/** Semi-opaque type for log/trace configuration. */ /** Semi-opaque type for log/trace configuration. */
struct ddsrt_log_cfg_common { struct ddsrt_log_cfg_common {
/** Mask for testing whether the xLOG macro should forward to the
function (and so incur the cost of constructing the parameters).
Messages in DDS_LOG_MASK are rare, so the overhead of calling
the function and then dropping the message is not an issue, unlike
for messages in DDS_TRACE_MASK. */
uint32_t mask; uint32_t mask;
/** The actual configured trace mask */
uint32_t tracemask;
/** Domain id for reporting; UINT32_MAX = no domain */
uint32_t domid; uint32_t domid;
}; };
@ -225,7 +235,7 @@ dds_set_trace_sink(
* other parameters. * other parameters.
* @param[in] domid Numerical identifier in log/trace, UINT32_MAX is * @param[in] domid Numerical identifier in log/trace, UINT32_MAX is
* reserved for global logging. * reserved for global logging.
* @param[in] mask Mask determining what to log/trace. * @param[in] tracemask Mask determining which traces should be written.
* @param[in] log_fp File for default sink. * @param[in] log_fp File for default sink.
* @param[in] trace_fp File for default sink. * @param[in] trace_fp File for default sink.
*/ */
@ -233,7 +243,7 @@ DDS_EXPORT void
dds_log_cfg_init( dds_log_cfg_init(
struct ddsrt_log_cfg *cfg, struct ddsrt_log_cfg *cfg,
uint32_t domid, uint32_t domid,
uint32_t mask, uint32_t tracemask,
FILE *log_fp, FILE *log_fp,
FILE *trace_fp); FILE *trace_fp);
@ -244,7 +254,7 @@ dds_log_cfg_init(
* Direct use of #dds_log is discouraged. Use #DDS_CINFO, #DDS_CWARNING, * Direct use of #dds_log is discouraged. Use #DDS_CINFO, #DDS_CWARNING,
* #DDS_CERROR, #DDS_CTRACE or #DDS_CLOG instead. * #DDS_CERROR, #DDS_CTRACE or #DDS_CLOG instead.
*/ */
DDS_EXPORT int DDS_EXPORT void
dds_log_cfg( dds_log_cfg(
const struct ddsrt_log_cfg *cfg, const struct ddsrt_log_cfg *cfg,
uint32_t prio, uint32_t prio,
@ -264,7 +274,7 @@ dds_log_cfg(
* *
* Direct use of #dds_log_id is discouraged. Use #DDS_ILOG instead. * Direct use of #dds_log_id is discouraged. Use #DDS_ILOG instead.
*/ */
DDS_EXPORT int DDS_EXPORT void
dds_log_id( dds_log_id(
uint32_t prio, uint32_t prio,
uint32_t domid, uint32_t domid,
@ -283,7 +293,7 @@ dds_log_id(
* Direct use of #dds_log is discouraged. Use #DDS_INFO, #DDS_WARNING, * Direct use of #dds_log is discouraged. Use #DDS_INFO, #DDS_WARNING,
* #DDS_ERROR, #DDS_FATAL or #DDS_LOG instead. * #DDS_ERROR, #DDS_FATAL or #DDS_LOG instead.
*/ */
DDS_EXPORT int DDS_EXPORT void
dds_log( dds_log(
uint32_t prio, uint32_t prio,
const char *file, const char *file,

View file

@ -20,10 +20,10 @@
extern "C" { extern "C" {
#endif #endif
typedef int (*ddsrt_xmlp_proc_elem_open_t) (void *varg, uintptr_t parentinfo, uintptr_t *eleminfo, const char *name); typedef int (*ddsrt_xmlp_proc_elem_open_t) (void *varg, uintptr_t parentinfo, uintptr_t *eleminfo, const char *name, int line);
typedef int (*ddsrt_xmlp_proc_attr_t) (void *varg, uintptr_t eleminfo, const char *name, const char *value); typedef int (*ddsrt_xmlp_proc_attr_t) (void *varg, uintptr_t eleminfo, const char *name, const char *value, int line);
typedef int (*ddsrt_xmlp_proc_elem_data_t) (void *varg, uintptr_t eleminfo, const char *data); typedef int (*ddsrt_xmlp_proc_elem_data_t) (void *varg, uintptr_t eleminfo, const char *data, int line);
typedef int (*ddsrt_xmlp_proc_elem_close_t) (void *varg, uintptr_t eleminfo); typedef int (*ddsrt_xmlp_proc_elem_close_t) (void *varg, uintptr_t eleminfo, int line);
typedef void (*ddsrt_xmlp_error) (void *varg, const char *msg, int line); typedef void (*ddsrt_xmlp_error) (void *varg, const char *msg, int line);
struct ddsrt_xmlp_callbacks { struct ddsrt_xmlp_callbacks {
@ -46,8 +46,6 @@ extern "C" {
DDS_EXPORT void ddsrt_xmlp_free (struct ddsrt_xmlp_state *st); DDS_EXPORT void ddsrt_xmlp_free (struct ddsrt_xmlp_state *st);
DDS_EXPORT int ddsrt_xmlp_parse (struct ddsrt_xmlp_state *st); DDS_EXPORT int ddsrt_xmlp_parse (struct ddsrt_xmlp_state *st);
DDS_EXPORT int ddsrt_xmlUnescapeInsitu (char *buffer, size_t *n);
#if defined (__cplusplus) #if defined (__cplusplus)
} }
#endif #endif

View file

@ -44,7 +44,7 @@ static char *expand_env (const char *name, char op, const char *alt, expand_fn e
} else if (strcmp (name, "$") == 0 || strcmp (name, "CYCLONEDDS_PID") == 0) { } else if (strcmp (name, "$") == 0 || strcmp (name, "CYCLONEDDS_PID") == 0) {
snprintf (idstr, sizeof (idstr), "%"PRIdPID, ddsrt_getpid ()); snprintf (idstr, sizeof (idstr), "%"PRIdPID, ddsrt_getpid ());
env = idstr; env = idstr;
} else if (strcmp (name, "CYCLONEDDS_DOMAIN_ID") == 0) { } else if (strcmp (name, "CYCLONEDDS_DOMAIN_ID") == 0 && domid != UINT32_MAX) {
snprintf (idstr, sizeof (idstr), "%"PRIu32, domid); snprintf (idstr, sizeof (idstr), "%"PRIu32, domid);
env = idstr; env = idstr;
} }

View file

@ -33,7 +33,7 @@ typedef struct {
} log_buffer_t; } log_buffer_t;
typedef struct { typedef struct {
dds_log_write_fn_t funcs[2]; dds_log_write_fn_t func;
void *ptr; void *ptr;
FILE *out; FILE *out;
} log_sink_t; } log_sink_t;
@ -52,25 +52,20 @@ DDSRT_STATIC_ASSERT (sizeof (struct ddsrt_log_cfg_impl) <= sizeof (struct ddsrt_
static void default_sink (void *ptr, const dds_log_data_t *data) static void default_sink (void *ptr, const dds_log_data_t *data)
{ {
fwrite (data->message - data->hdrsize, 1, data->hdrsize + data->size + 1, (FILE *) ptr); if (ptr)
fflush ((FILE *) ptr); {
} fwrite (data->message - data->hdrsize, 1, data->hdrsize + data->size + 1, (FILE *) ptr);
fflush ((FILE *) ptr);
static void nop_sink (void *ptr, const dds_log_data_t *data) }
{
(void) ptr;
(void) data;
return;
} }
#define LOG (0) #define LOG (0)
#define TRACE (1) #define TRACE (1)
#define USE (0)
#define SET (1)
static struct ddsrt_log_cfg_impl logconfig = { static struct ddsrt_log_cfg_impl logconfig = {
.c = { .c = {
.mask = DDS_LC_ERROR | DDS_LC_WARNING, .mask = DDS_LC_ERROR | DDS_LC_WARNING,
.tracemask = 0,
.domid = UINT32_MAX .domid = UINT32_MAX
}, },
.sink_fps = { .sink_fps = {
@ -80,11 +75,11 @@ static struct ddsrt_log_cfg_impl logconfig = {
}; };
static log_sink_t sinks[2] = { static log_sink_t sinks[2] = {
[LOG] = { .funcs = { [USE] = default_sink, [SET] = default_sink }, .ptr = NULL, .out = NULL }, [LOG] = { .func = default_sink, .ptr = NULL, .out = NULL },
[TRACE] = { .funcs = { [USE] = default_sink, [SET] = default_sink }, .ptr = NULL, .out = NULL } [TRACE] = { .func = default_sink, .ptr = NULL, .out = NULL }
}; };
uint32_t *const dds_log_mask = &logconfig.c.mask; uint32_t * const dds_log_mask = &logconfig.c.mask;
static void init_lock (void) static void init_lock (void)
{ {
@ -112,17 +107,6 @@ static void unlock_sink (void)
ddsrt_rwlock_unlock (&lock); ddsrt_rwlock_unlock (&lock);
} }
static void set_active_log_sinks (void)
{
sinks[LOG].funcs[USE] = sinks[LOG].funcs[SET];
sinks[TRACE].funcs[USE] = sinks[TRACE].funcs[SET];
if (sinks[LOG].funcs[USE] == sinks[TRACE].funcs[USE])
{
if (sinks[LOG].funcs[USE] != default_sink && sinks[LOG].ptr == sinks[TRACE].ptr)
sinks[LOG].funcs[USE] = nop_sink;
}
}
static void set_log_sink (log_sink_t *sink, dds_log_write_fn_t func, void *ptr) static void set_log_sink (log_sink_t *sink, dds_log_write_fn_t func, void *ptr)
{ {
assert (sink != NULL); assert (sink != NULL);
@ -132,9 +116,8 @@ static void set_log_sink (log_sink_t *sink, dds_log_write_fn_t func, void *ptr)
responsible for that. Ensure this operation is deterministic and that on responsible for that. Ensure this operation is deterministic and that on
return, no thread in the DDS stack still uses the deprecated sink. */ return, no thread in the DDS stack still uses the deprecated sink. */
lock_sink (WRLOCK); lock_sink (WRLOCK);
sink->funcs[SET] = (func != 0) ? func : default_sink; sink->func = (func != 0) ? func : default_sink;
sink->ptr = ptr; sink->ptr = ptr;
set_active_log_sinks ();
unlock_sink (); unlock_sink ();
} }
@ -143,7 +126,6 @@ void dds_set_log_file (FILE *file)
{ {
lock_sink (WRLOCK); lock_sink (WRLOCK);
logconfig.sink_fps[LOG] = (file == NULL ? stderr : file); logconfig.sink_fps[LOG] = (file == NULL ? stderr : file);
set_active_log_sinks ();
unlock_sink (); unlock_sink ();
} }
@ -151,7 +133,6 @@ void dds_set_trace_file (FILE *file)
{ {
lock_sink (WRLOCK); lock_sink (WRLOCK);
logconfig.sink_fps[TRACE] = (file == NULL ? stderr : file); logconfig.sink_fps[TRACE] = (file == NULL ? stderr : file);
set_active_log_sinks ();
unlock_sink (); unlock_sink ();
} }
@ -170,17 +151,18 @@ extern inline uint32_t dds_get_log_mask (void);
void dds_set_log_mask (uint32_t cats) void dds_set_log_mask (uint32_t cats)
{ {
lock_sink (WRLOCK); lock_sink (WRLOCK);
*dds_log_mask = (cats & (DDS_LOG_MASK | DDS_TRACE_MASK)); logconfig.c.tracemask = cats & DDS_TRACE_MASK;
set_active_log_sinks (); logconfig.c.mask = (cats & (DDS_LOG_MASK | DDS_TRACE_MASK)) | DDS_LC_FATAL;
unlock_sink (); unlock_sink ();
} }
void dds_log_cfg_init (struct ddsrt_log_cfg *cfg, uint32_t domid, uint32_t mask, FILE *log_fp, FILE *trace_fp) void dds_log_cfg_init (struct ddsrt_log_cfg *cfg, uint32_t domid, uint32_t tracemask, FILE *log_fp, FILE *trace_fp)
{ {
struct ddsrt_log_cfg_impl *cfgimpl = (struct ddsrt_log_cfg_impl *) cfg; struct ddsrt_log_cfg_impl *cfgimpl = (struct ddsrt_log_cfg_impl *) cfg;
assert (domid != UINT32_MAX); /* because that's reserved for global use */ assert (domid != UINT32_MAX); /* because that's reserved for global use */
memset (cfgimpl, 0, sizeof (*cfgimpl)); memset (cfgimpl, 0, sizeof (*cfgimpl));
cfgimpl->c.mask = mask; cfgimpl->c.mask = tracemask | DDS_LOG_MASK;
cfgimpl->c.tracemask = tracemask;
cfgimpl->c.domid = domid; cfgimpl->c.domid = domid;
cfgimpl->sink_fps[LOG] = log_fp; cfgimpl->sink_fps[LOG] = log_fp;
cfgimpl->sink_fps[TRACE] = trace_fp; cfgimpl->sink_fps[TRACE] = trace_fp;
@ -220,7 +202,7 @@ static size_t print_header (char *str, uint32_t id)
return (size_t) cnt; return (size_t) cnt;
} }
static void vlog (const struct ddsrt_log_cfg_impl *cfg, uint32_t cat, uint32_t domid, const char *file, uint32_t line, const char *func, const char *fmt, va_list ap) static void vlog1 (const struct ddsrt_log_cfg_impl *cfg, uint32_t cat, uint32_t domid, const char *file, uint32_t line, const char *func, const char *fmt, va_list ap)
{ {
int n, trunc = 0; int n, trunc = 0;
size_t nrem; size_t nrem;
@ -242,8 +224,8 @@ static void vlog (const struct ddsrt_log_cfg_impl *cfg, uint32_t cat, uint32_t d
/* Thread-local buffer is always initialized with all zeroes. The pos /* Thread-local buffer is always initialized with all zeroes. The pos
member must always be greater or equal to BUF_OFFSET. */ member must always be greater or equal to BUF_OFFSET. */
if (lb->pos < BUF_OFFSET) { if (lb->pos < BUF_OFFSET) {
lb->pos = BUF_OFFSET; lb->pos = BUF_OFFSET;
lb->buf[lb->pos] = 0; lb->buf[lb->pos] = 0;
} }
nrem = sizeof (lb->buf) - lb->pos; nrem = sizeof (lb->buf) - lb->pos;
if (nrem > 0) { if (nrem > 0) {
@ -263,7 +245,8 @@ static void vlog (const struct ddsrt_log_cfg_impl *cfg, uint32_t cat, uint32_t d
} }
} }
if (fmt[strlen (fmt) - 1] == '\n') { if (fmt[strlen (fmt) - 1] == '\n' && lb->pos > BUF_OFFSET + 1) {
assert (lb->pos > BUF_OFFSET);
size_t hdrsize = print_header (lb->buf, domid); size_t hdrsize = print_header (lb->buf, domid);
data.priority = cat; data.priority = cat;
@ -271,32 +254,28 @@ static void vlog (const struct ddsrt_log_cfg_impl *cfg, uint32_t cat, uint32_t d
data.function = func; data.function = func;
data.line = line; data.line = line;
data.message = lb->buf + BUF_OFFSET; data.message = lb->buf + BUF_OFFSET;
data.size = strlen(data.message) - 1; data.size = lb->pos - BUF_OFFSET - 1;
data.hdrsize = hdrsize; data.hdrsize = hdrsize;
dds_log_write_fn_t f = 0; dds_log_write_fn_t f = 0;
void *f_arg = NULL; void *f_arg = NULL;
for (size_t i = (cat & DDS_LOG_MASK) ? LOG : TRACE; if (cat & DDS_LOG_MASK)
i < sizeof (sinks) / sizeof (sinks[0]);
i++)
{ {
if (sinks[i].funcs[USE] != default_sink) { f = sinks[LOG].func;
if (sinks[i].funcs[USE] != f || sinks[i].ptr != f_arg) { f_arg = (f == default_sink) ? cfg->sink_fps[LOG] : sinks[LOG].ptr;
assert (sinks[i].funcs[USE]); assert (f != 0);
sinks[i].funcs[USE] (sinks[i].ptr, &data); f (f_arg, &data);
f = sinks[i].funcs[USE]; f_arg = sinks[i].ptr; }
} /* if tracing is enabled, then print to trace if it matches the
} else if (cfg->sink_fps[i]) { trace flags or if it got written to the log
if (default_sink != f || cfg->sink_fps[i] != f_arg) { (mask == (tracemask | DDS_LOG_MASK)) */
default_sink (cfg->sink_fps[i], &data); if (cfg->c.tracemask && (cat & cfg->c.mask))
f = default_sink; f_arg = cfg->sink_fps[i]; {
} dds_log_write_fn_t const g = sinks[TRACE].func;
} else if (logconfig.sink_fps[i]) { void * const g_arg = (g == default_sink) ? cfg->sink_fps[TRACE] : sinks[TRACE].ptr;
if (default_sink != f || logconfig.sink_fps[i] != f_arg) { assert (g != 0);
default_sink (logconfig.sink_fps[i], &data); if (g != f || g_arg != f_arg)
f = default_sink; f_arg = logconfig.sink_fps[i]; g (g_arg, &data);
}
}
} }
lb->pos = BUF_OFFSET; lb->pos = BUF_OFFSET;
@ -304,51 +283,45 @@ static void vlog (const struct ddsrt_log_cfg_impl *cfg, uint32_t cat, uint32_t d
} }
} }
int dds_log_cfg (const struct ddsrt_log_cfg *cfg, uint32_t cat, const char *file, uint32_t line, const char *func, const char *fmt, ...) static void vlog (const struct ddsrt_log_cfg_impl *cfg, uint32_t cat, uint32_t domid, const char *file, uint32_t line, const char *func, const char *fmt, va_list ap)
{
lock_sink (RDLOCK);
vlog1 (cfg, cat, domid, file, line, func, fmt, ap);
unlock_sink ();
if (cat & DDS_LC_FATAL)
abort();
}
void dds_log_cfg (const struct ddsrt_log_cfg *cfg, uint32_t cat, const char *file, uint32_t line, const char *func, const char *fmt, ...)
{ {
const struct ddsrt_log_cfg_impl *cfgimpl = (const struct ddsrt_log_cfg_impl *) cfg; const struct ddsrt_log_cfg_impl *cfgimpl = (const struct ddsrt_log_cfg_impl *) cfg;
if ((cfgimpl->c.mask & cat) || (cat & DDS_LC_FATAL)) { /* cfgimpl->c.mask is too weak a test because it has all DDS_LOG_MASK bits set,
rather than just the ones in dds_get_log_mask() (so as not to cache the latter
and have to keep them synchronized */
if ((cfgimpl->c.mask & cat) && ((dds_get_log_mask () | cfgimpl->c.tracemask) & cat)) {
va_list ap; va_list ap;
va_start (ap, fmt); va_start (ap, fmt);
lock_sink (RDLOCK);
vlog (cfgimpl, cat, cfgimpl->c.domid, file, line, func, fmt, ap); vlog (cfgimpl, cat, cfgimpl->c.domid, file, line, func, fmt, ap);
unlock_sink ();
va_end (ap); va_end (ap);
} }
if (cat & DDS_LC_FATAL) {
abort();
}
return 0;
} }
int dds_log_id (uint32_t cat, uint32_t id, const char *file, uint32_t line, const char *func, const char *fmt, ...) void dds_log_id (uint32_t cat, uint32_t id, const char *file, uint32_t line, const char *func, const char *fmt, ...)
{ {
if ((dds_get_log_mask () & cat) || (cat & DDS_LC_FATAL)) { if (dds_get_log_mask () & cat) {
va_list ap; va_list ap;
va_start (ap, fmt); va_start (ap, fmt);
lock_sink (RDLOCK);
vlog (&logconfig, cat, id, file, line, func, fmt, ap); vlog (&logconfig, cat, id, file, line, func, fmt, ap);
unlock_sink ();
va_end (ap); va_end (ap);
} }
if (cat & DDS_LC_FATAL) {
abort ();
}
return 0;
} }
int dds_log (uint32_t cat, const char *file, uint32_t line, const char *func, const char *fmt, ...) void dds_log (uint32_t cat, const char *file, uint32_t line, const char *func, const char *fmt, ...)
{ {
if ((dds_get_log_mask () & cat) || (cat & DDS_LC_FATAL)) { if (dds_get_log_mask () & cat) {
va_list ap; va_list ap;
va_start (ap, fmt); va_start (ap, fmt);
lock_sink (RDLOCK);
vlog (&logconfig, cat, UINT32_MAX, file, line, func, fmt, ap); vlog (&logconfig, cat, UINT32_MAX, file, line, func, fmt, ap);
unlock_sink ();
va_end (ap); va_end (ap);
} }
if (cat & DDS_LC_FATAL) {
abort ();
}
return 0;
} }

View file

@ -54,36 +54,40 @@ struct ddsrt_xmlp_state {
struct ddsrt_xmlp_callbacks cb; /* user-supplied callbacks (or stubs) */ struct ddsrt_xmlp_callbacks cb; /* user-supplied callbacks (or stubs) */
}; };
static int cb_null_elem_open (void *varg, uintptr_t parentinfo, uintptr_t *eleminfo, const char *name) static int cb_null_elem_open (void *varg, uintptr_t parentinfo, uintptr_t *eleminfo, const char *name, int line)
{ {
DDSRT_UNUSED_ARG (varg); DDSRT_UNUSED_ARG (varg);
DDSRT_UNUSED_ARG (parentinfo); DDSRT_UNUSED_ARG (parentinfo);
DDSRT_UNUSED_ARG (eleminfo); DDSRT_UNUSED_ARG (eleminfo);
DDSRT_UNUSED_ARG (name); DDSRT_UNUSED_ARG (name);
DDSRT_UNUSED_ARG (line);
return 0; return 0;
} }
static int cb_null_attr (void *varg, uintptr_t eleminfo, const char *name, const char *value) static int cb_null_attr (void *varg, uintptr_t eleminfo, const char *name, const char *value, int line)
{ {
DDSRT_UNUSED_ARG (varg); DDSRT_UNUSED_ARG (varg);
DDSRT_UNUSED_ARG (eleminfo); DDSRT_UNUSED_ARG (eleminfo);
DDSRT_UNUSED_ARG (name); DDSRT_UNUSED_ARG (name);
DDSRT_UNUSED_ARG (value); DDSRT_UNUSED_ARG (value);
DDSRT_UNUSED_ARG (line);
return 0; return 0;
} }
static int cb_null_elem_data (void *varg, uintptr_t eleminfo, const char *data) static int cb_null_elem_data (void *varg, uintptr_t eleminfo, const char *data, int line)
{ {
DDSRT_UNUSED_ARG (varg); DDSRT_UNUSED_ARG (varg);
DDSRT_UNUSED_ARG (eleminfo); DDSRT_UNUSED_ARG (eleminfo);
DDSRT_UNUSED_ARG (data); DDSRT_UNUSED_ARG (data);
DDSRT_UNUSED_ARG (line);
return 0; return 0;
} }
static int cb_null_elem_close (void *varg, uintptr_t eleminfo) static int cb_null_elem_close (void *varg, uintptr_t eleminfo, int line)
{ {
DDSRT_UNUSED_ARG (varg); DDSRT_UNUSED_ARG (varg);
DDSRT_UNUSED_ARG (eleminfo); DDSRT_UNUSED_ARG (eleminfo);
DDSRT_UNUSED_ARG (line);
return 0; return 0;
} }
@ -606,7 +610,7 @@ static int parse_element (struct ddsrt_xmlp_state *st, uintptr_t parentinfo)
PE_LOCAL_ERROR ("expecting '<'", 0); PE_LOCAL_ERROR ("expecting '<'", 0);
} }
if ((ret = st->cb.elem_open (st->varg, parentinfo, &eleminfo, name)) < 0) { if ((ret = st->cb.elem_open (st->varg, parentinfo, &eleminfo, name, st->line)) < 0) {
PE_ERROR ("failed in element open callback", name); PE_ERROR ("failed in element open callback", name);
} }
@ -620,7 +624,7 @@ static int parse_element (struct ddsrt_xmlp_state *st, uintptr_t parentinfo)
ddsrt_free (content); ddsrt_free (content);
PE_LOCAL_ERROR ("expecting string value for attribute", aname); PE_LOCAL_ERROR ("expecting string value for attribute", aname);
} }
ret = st->cb.attr (st->varg, eleminfo, aname, content); ret = st->cb.attr (st->varg, eleminfo, aname, content, st->line);
ddsrt_free (content); ddsrt_free (content);
if (ret < 0) { if (ret < 0) {
PE_ERROR2 ("failed in attribute callback", name, aname); PE_ERROR2 ("failed in attribute callback", name, aname);
@ -633,7 +637,7 @@ static int parse_element (struct ddsrt_xmlp_state *st, uintptr_t parentinfo)
switch (tok) switch (tok)
{ {
case TOK_SHORTHAND_CLOSE_TAG: case TOK_SHORTHAND_CLOSE_TAG:
ret = st->cb.elem_close (st->varg, eleminfo); ret = st->cb.elem_close (st->varg, eleminfo, st->line);
goto ok; goto ok;
case '>': case '>':
st->nest++; st->nest++;
@ -679,7 +683,7 @@ static int parse_element (struct ddsrt_xmlp_state *st, uintptr_t parentinfo)
PE_ERROR ("invalid character sequence", 0); PE_ERROR ("invalid character sequence", 0);
} else if (content != NULL) { } else if (content != NULL) {
if (*content != '\0') { if (*content != '\0') {
ret = st->cb.elem_data (st->varg, eleminfo, content); ret = st->cb.elem_data (st->varg, eleminfo, content, st->line);
ddsrt_free (content); ddsrt_free (content);
if (ret < 0) { if (ret < 0) {
PE_ERROR ("failed in data callback", 0); PE_ERROR ("failed in data callback", 0);
@ -706,7 +710,7 @@ static int parse_element (struct ddsrt_xmlp_state *st, uintptr_t parentinfo)
if (have_input_marker (st)) { if (have_input_marker (st)) {
discard_input_marker (st); discard_input_marker (st);
} }
ret = st->cb.elem_close (st->varg, eleminfo); ret = st->cb.elem_close (st->varg, eleminfo, st->line);
goto ok; goto ok;
default: default:
PE_LOCAL_ERROR ("expecting '/>' or '>'", 0); PE_LOCAL_ERROR ("expecting '/>' or '>'", 0);
@ -742,7 +746,3 @@ int ddsrt_xmlp_parse (struct ddsrt_xmlp_state *st)
} }
} }
} }
int ddsrt_xmlUnescapeInsitu (char *buffer, size_t *n) {
return unescape_insitu (buffer, n);
}

View file

@ -15,14 +15,10 @@ set(CONFJAR_TARGET "${CMAKE_PROJECT_NAME_SMALL}conf")
#set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.8" "-target" "1.8" -Xlint:deprecation) #set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.8" "-target" "1.8" -Xlint:deprecation)
# Oddly enough, add_jar can't deal with a resource having an absolute path (experienced on Windows), so
# generate into the list-dir.
configure_file("metaconfig.xml.in" "${CMAKE_CURRENT_LIST_DIR}/metaconfig.xml" @ONLY)
file(GLOB_RECURSE JAVA_SOURCES LIST_DIRECTORIES true *.java) file(GLOB_RECURSE JAVA_SOURCES LIST_DIRECTORIES true *.java)
set(RESOURCES metaconfig.xml metaconfig.xsd resources/ptlogoc16.png resources/ptlogoc24.png resources/ptlogoc32.png resources/ptlogoc48.png) set(RESOURCES metaconfig.xml metaconfig.xsd )
add_jar(${CONFJAR_TARGET} ${JAVA_SOURCES} ${RESOURCES} ENTRY_POINT org.eclipse.cyclonedds.config.SpliceConfig) add_jar(${CONFJAR_TARGET} ${JAVA_SOURCES} ${RESOURCES} ENTRY_POINT org.eclipse.cyclonedds.config.CycloneConfig)
#add_test(NAME TestHelloWorld COMMAND ${Java_JAVA_EXECUTABLE} -cp ${_jarFile} HelloWorld) #add_test(NAME TestHelloWorld COMMAND ${Java_JAVA_EXECUTABLE} -cp ${_jarFile} HelloWorld)

471
src/tools/config/excx.pl Normal file
View file

@ -0,0 +1,471 @@
: # -*- perl -*-
eval 'exec perl -w -S $0 "$@"'
if 0;
use strict;
# NOTES:
# - very fragile - and very sensitive to input formatting
# - default value may not contain a semicolon
#
# UGLINESSES:
# - knowledge of conversion functions in here
# - hard definitions of enums in here
# - negated_boolean is A BIT WEIRD and special-cased
# - some other hard-coded knowledge of the top level nodes
# - some hard-coded overrides for defaults
$|=1;
my %typehint2xmltype = ("____" => "____",
"networkAddress" => "String",
"partitionAddress" => "String",
"networkAddresses" => "String",
"ipv4" => "String",
"boolean" => "Boolean",
"negated_boolean" => "Boolean",
"boolean_default" => "Enum",
"string" => "String",
"tracingOutputFileName" => "String",
"verbosity" => "Enum",
"tracemask" => "String",
"peer" => "String",
"float" => "Float",
"int" => "Int",
"int32" => "Int",
"uint" => "Int",
"uint32" => "Int",
"natint" => "Int",
"natint_255" => "Int",
"domainId" => "String",
"participantIndex" => "String",
"port" => "Int",
"dyn_port" => "Int",
"duration_inf" => "String",
"duration_ms_1hr" => "String",
"duration_ms_1s" => "String",
"duration_100ms_1hr" => "String",
"duration_us_1s" => "String",
"memsize" => "String",
"bandwidth" => "String",
"standards_conformance" => "Enum",
"locators" => "Enum",
"service_name" => "String",
"sched_class" => "Enum",
"cipher" => "Enum",
"besmode" => "Enum",
"retransmit_merging" => "Enum",
"sched_prio_class" => "Enum",
"sched_class" => "Enum",
"maybe_int32" => "String",
"maybe_memsize" => "String",
"maybe_duration_inf" => "String",
"allow_multicast" => "String",
"transport_selector" => "String",
"many_sockets_mode" => "Enum",
"xcheck" => "String",
"min_tls_version" => "String");
my %typehint2unit = ("duration_inf" => "duration_inf",
"duration_ms_1hr" => "duration",
"duration_100ms_1hr" => "duration",
"duration_ms_1s" => "duration",
"duration_us_1s" => "duration",
"bandwidth" => "bandwidth",
"memsize" => "memsize",
"maybe_memsize" => "memsize",
"maybe_duration_inf" => "duration_inf");
my %enum_values = ("locators" => "local;none",
"standards_conformance" => "lax;strict;pedantic",
"verbosity" => "finest;finer;fine;config;info;warning;severe;none",
"besmode" => "full;writers;minimal",
"retransmit_merging" => "never;adaptive;always",
"sched_prio_class" => "relative;absolute",
"sched_class" => "realtime;timeshare;default",
"cipher" => "null;blowfish;aes128;aes192;aes256",
"boolean_default" => "false;true;default",
"many_sockets_mode" => "false;true;single;none;many");
my %range = ("port" => "1;65535",
"dyn_port" => "-1;65535",
"general_cfgelems/startupmodeduration" => "0;60000",
"natint_255" => "0;255",
"duration_ms_1hr" => "0;1hr",
"duration_100ms_1hr" => "100ms;1hr",
"duration_ms_1s" => "0;1s",
"duration_us_1s" => "0;1s");
my %unit_blurb = ("bandwidth" => "\n<p>The unit must be specified explicitly. Recognised units: <i>X</i>b/s, <i>X</i>bps for bits/s or <i>X</i>B/s, <i>X</i>Bps for bytes/s; where <i>X</i> is an optional prefix: k for 10<sup>3</sup>, Ki for 2<sup>10</sup>, M for 10<sup>6</sup>, Mi for 2<sup>20</sup>, G for 10<sup>9</sup>, Gi for 2<sup>30</sup>.</p>",
"memsize" => "\n<p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p>",
"duration" => "\n<p>The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.</p>",
"duration_inf" => "\n<p>Valid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.</p>");
while (my ($k, $v) = each %typehint2xmltype) {
die "script error: values of enum type $k unknown\n" if $v eq "Enum" && $enum_values{$k} eq "";
}
# Configurator can't handle UINT32_MAX ... instead of fixing it, just use a different
# default for the rare ones that have a problem (that works as long as there is no
# practical difference between the two)
my %default_overrides = ("multiple_recv_threads_attrs/maxretries" => 2000000000);
my ($name, $table, $kind, $subtable, $multiplicity, $defaultvalue, $typehint, $description);
my %tab2elems;
my %elem;
my %desc;
my %typehint_seen;
my $gobbling_description;
my $skip_lite;
my $in_table;
my $rest;
my $deprecated;
############################
sub clean_description {
my ($desc) = @_;
$desc =~ s/^\s*BLURB\s*\(\s*//s;
$desc =~ s/^\s*"//s;
$desc =~ s/\s*"(\s*\))? *(\}\s*,\s*$)?$//s;
$desc =~ s/\\"/"/g;
$desc =~ s/\\n\s*\\/\n/g;
$desc =~ s/\\\\/\\/g;
$desc =~ s/\n\n/\n/g;
# should fix the source ...
$desc =~ s/DDSI2E?/Cyclone DDS/g;
return $desc;
}
sub store_entry {
$name =~ s/\|.*//; # aliases are not visible in osplconf
my $ltable = lc $table;
my $lname = lc $name;
if (not exists $tab2elems{$ltable}) {
$tab2elems{$ltable} = $name;
} else {
$tab2elems{$ltable} .= ";$name";
}
$elem{"$ltable/$lname"} = "$kind;$subtable;$multiplicity;$defaultvalue;$typehint";
my $ub = exists $typehint2unit{$typehint} && exists $unit_blurb{$typehint2unit{$typehint}} ? $unit_blurb{$typehint2unit{$typehint}} : "";
$desc{"$ltable/$lname"} = clean_description($description).$ub;
die "error: no mapping defined for type $typehint\n" if $typehint2xmltype{$typehint} eq "";
$typehint_seen{$typehint} = 1;
#printf "%s - $s\n", "$ltable/$lname", $elem{"$ltable/lname"};
#$typehint = "";
}
sub print_description {
my ($desc, $indent) = @_;
print "$indent <comment><![CDATA[\n";
print "$desc\n";
print "$indent ]]></comment>\n";
}
sub kind_to_kstr {
my ($kind, $typehint, $table, $name, $isroot) = @_;
if ($isroot) {
die unless $kind eq "GROUP";
return "rootElement";
} elsif ($kind eq "GROUP" || $kind eq "MGROUP") {
return "element";
} elsif ($kind eq "ATTR") {
return "attribute$typehint2xmltype{$typehint}";
} elsif ($kind eq "LEAF") {
return "leaf$typehint2xmltype{$typehint}";
} else {
die "error: $kind unrecognized kind ($table/$name)\n";
}
}
sub transform_default {
my (@fs) = @_;
(my $tmp = $fs[3]) =~ s/^"(.*)"$/$1/;
if ($fs[4] ne "negated_boolean") {
return $tmp;
} else {
my %map = ("true" => "false", "false" => "true");
return $map{lc $tmp};
}
}
sub conv_to_xml {
my ($table, $name, $indent, $prefix, $isroot, $force_min_occ_1) = @_;
#, fs,vs,vsn,kstr,ts,tsi,tsn,i,min_occ,max_occ,rr,req) { # fs,vs,kstr,... are locals
my $lctn = lc "$table/$name";
my @fs = split /;/, $elem{$lctn};
#print "$table/$name - \n"; for (my $i = 0; $i < @fs; $i++) { print " - $i $fs[$i]\n" }
my $kstr = kind_to_kstr($fs[0], $fs[4], $table, $name, $isroot);
my ($min_occ, $max_occ);
if ($fs[2] =~ /MAX/) {
$min_occ = $max_occ = 0;
} elsif ($fs[2] == 0 || $fs[2] == 1) {
# multiplicity = 0 => special case, treat as-if 1
# multiplicity = 1 => required if no default
# force_min_occ_1 so we can mark "Domain" as required and have it
# show up in the config editor when creating a new file
if ($force_min_occ_1) {
$min_occ = 1;
} elsif ($fs[0] eq "GROUP" || $fs[0] eq "MGROUP") {
$min_occ = 0;
} elsif ($fs[3] eq "" || $fs[3] eq "NULL") {
$min_occ = 1;
} else {
$min_occ = 0;
}
$max_occ = 1;
} else {
$min_occ = 0; $max_occ = $fs[2];
}
if ($fs[0] eq "ATTR") {
my $req = ($min_occ == 0) ? "false" : "true";
print "$indent<$kstr name=\"$name\" required=\"$req\">\n";
} else {
print "$indent<$kstr name=\"$name\" minOccurrences=\"$min_occ\" maxOccurrences=\"$max_occ\">\n";
}
print_description ("$prefix$desc{$lctn}", $indent);
# enum, int ranges
if (exists $enum_values{$fs[4]}) {
my @vs = split /;/, $enum_values{$fs[4]};
print "$indent <value>$_</value>\n" for @vs;
}
my $rr = exists $range{$lctn} ? $range{$lctn} : "";
if ($rr eq "" && exists $range{$fs[4]}) { $rr = $range{$fs[4]}; }
if ($rr ne "") {
my @vs = split /;/, $rr;
print "$indent <minimum>$vs[0]</minimum>\n";
print "$indent <maximum>$vs[1]</maximum>\n";
}
# remarkably, osplconf can't deal with strings for which no maximum
# length is specified, even though it accepts unlimited length
# strings ...
if ($typehint2xmltype{$fs[4]} eq "String") {
print "$indent <maxLength>0</maxLength>\n";
}
# default not applicable to GROUPs
if ($fs[0] ne "GROUP" && $fs[0] ne "MGROUP") {
my $defover = exists $default_overrides{$lctn} ? $default_overrides{$lctn} : "";
if ($defover ne "") {
print "$indent <default>$defover</default>\n";
} elsif ($fs[3] eq "" || $fs[3] eq "NULL") {
print "$indent <default></default>\n";
} else {
print "$indent <default>".transform_default(@fs)."</default>\n";
}
}
# recurse into subtables if any (except when it is the root: rootElement needs
# special treatment
if (!$isroot && $fs[1] ne "") {
my @ts = sort (split /,/, $fs[1]);
conv_table_to_xml($_, "$indent ", $prefix, 0, 0) for @ts;
}
print "$indent</$kstr>\n";
}
sub conv_table_to_xml {
my ($table, $indent, $prefix, $isroot, $force_min_occ_1) = @_;
return unless exists $tab2elems{$table};
my @ns = sort (split /;/, $tab2elems{$table});
conv_to_xml($table, $_, $indent, ($table eq "unsupp_cfgelems") ? "<b>Internal</b>" : $prefix, $isroot, $force_min_occ_1) for @ns;
}
while (<>) {
if ($gobbling_description) {
$description .= $_;
#print " .. $_\n";
}
if ($gobbling_description && /(^|")(\s*\)) *\} *, *$/) {
$gobbling_description = 0;
store_entry() unless $deprecated;
next;
}
if ($gobbling_description) {
next;
}
if (/^[ \t]*(#[ \t]*(if|ifdef|ifndef|else|endif).*)?$/) { # skip empty lines, preproc
next;
}
if (/^ *END_MARKER *$/) {
if (!$in_table) {
warn "END_MARKER seen while not in a table";
}
$in_table = 0;
#print "END_MARKER $table\n";
next;
}
if (/^static +const +struct +cfgelem +([A-Za-z_0-9]+)\s*\[/) {
$in_table = 1;
$table = $1;
#print "TABLE $table\n";
next;
}
if ($in_table && /^ *WILDCARD *, *$|^ *\{ *(MOVED) *\(/) {
next;
}
# Recognise all "normal" entries: attributes, groups, leaves and
# leaves with attributes. This doesn't recognise the ones used for the
# root groups: those are dealt with by the next pattern
if ($in_table && /^ *\{ *((?:DEPRECATED_)?(?:ATTR|GROUP|GROUP_W_ATTRS|MGROUP|LEAF|LEAF_W_ATTRS)) *\(/) {
$rest = $_;
# extract kind
$rest =~ s/^ *\{ *((?:DEPRECATED_)?(?:ATTR|GROUP|GROUP_W_ATTRS|MGROUP|LEAF|LEAF_W_ATTRS)) *\( *(.*)/$2/;
$kind = $1;
$deprecated = ($kind =~ s/^DEPRECATED_//);
# extract name + reference to subtable
$rest =~ s/\"([A-Za-z_0-9|]+)\" *(.*)/$2/;
$name = $1;
my ($subelems, $subattrs) = ("", "");
if ($kind eq "GROUP" || $kind eq "GROUP_W_ATTRS" || $kind eq "MGROUP") {
$rest =~ s/, *([A-Za-z_0-9]+) *(.*)/$2/;
$subelems = $1;
}
if ($kind eq "LEAF_W_ATTRS" || $kind eq "GROUP_W_ATTRS" || $kind eq "MGROUP") {
$rest =~ s/, *([A-Za-z_0-9]+) *(.*)/$2/;
$subattrs = $1;
}
$subtable = "";
if ($subelems ne "") { $subtable = $subelems; }
if ($subattrs ne "") {
if ($subtable ne "") { $subtable = "$subtable,$subattrs"; }
else { $subtable = $subattrs; }
}
$rest =~ s/ *\) *, *//;
#print " kind $kind name $name subtable $subtable -- $rest\n";
# don't care about the distinction between GROUP/LEAF and
# GROUP/LEAF_W_ATTRS in the remainer of the code: we simply
# rely on subtable.
$kind =~ s/_W_ATTRS//;
}
# Root groups: use a special trick, which allows them to do groups
# with attributes. Which the DDSI2 proper doesn't use, but which the
# service configuration stuff does rely on.
if ($in_table && /^ *\{ *"([A-Za-z_0-9|]+)" *, */) {
$rest = $_;
# root elements are all groups, formatted as: <name>, <subelems>,
# <attrs>, NODATA, description. They're therefore pretty easy to
# parse.
$kind = "GROUP";
$rest =~ s/^ *\{ *\"([A-Za-z_0-9|]+)\" *, *(.*)/$2/;
$name = $1;
# then follow the sub-elements and the attributes
$rest =~ s/([A-Za-z_0-9]+) *, *(.*)/$2/;
my $subelems = $1;
$rest =~ s/([A-Za-z_0-9]+) *, *(.*)/$2/;
my $subattrs = $1;
# then we require NODATA (could do this in the pattern also)
die "error: NODATA expected" unless $rest =~ /^NODATA *,/;
# multiplicity is hard coded: we want to allow multiple ddsi2 services
$multiplicity = 0;
$subtable = "";
if ($subelems ne "NULL") { $subtable = $subelems; }
if ($subattrs ne "NULL") {
if ($subtable ne "") { $subtable = "$subtable,$subattrs"; }
else { $subtable = $subattrs; }
}
$rest =~ s/([A-Za-z_0-9]+) *, *(.*)/$2/;
}
# Extract stuff specific to ATTRs, LEAFs and MGROUPs
if ($in_table && ($kind eq "ATTR" || $kind eq "LEAF" || $kind eq "MGROUP")) {
# extract multiplicity
$rest =~ s/([0-9]+|U?INT(?:16|32|64)?_MAX) *, *(.*)/$2/;
$multiplicity = $1;
# extract default value
$rest =~ s/(\"(?:[^\"]*)\"|NULL|0) *, *(.*)/$2/;
$defaultvalue = $1;
if ($defaultvalue eq "0") { $defaultvalue = "NULL"; }
# skip reference to internal name (either ABSOFF(field),
# RELOFF(field,field) or <int>,<int> (the latter being used by
# "verbosity")
$rest =~ s/(ABSOFF *\( *[A-Za-z_0-9.]+ *\)|RELOFF *\( *[A-Za-z_0-9.]+ *, *[A-Za-z_0-9]+ *\)|[0-9]+ *, *[0-9]+) *, *//;
# skip init function
$rest =~ s/([A-Za-z_0-9]+|0) *, *//;
# type hint from conversion function
$rest =~ s/(uf_(?:[A-Za-z_0-9]+)|NULL|0) *, *(.*)/$2/;
$typehint = $1;
$typehint =~ s/^uf_//;
# accept typehint = NULL for a LEAF_WITH_ATTRS: there is no defined
# "syntax" for groups that have only attributes, pretending it is a
# group because that causes us to emit an "element" and not a
# "leaf".
if ($typehint eq "0" || $typehint eq "NULL") {
$kind = "GROUP";
$typehint = "____";
}
# skip free, print functions
$rest =~ s/([A-Za-z_0-9]+|0) *, *([A-Za-z_0-9]+|0) *, *//;
#print " .. multiplicity $multiplicity default $defaultvalue typehint $typehint\n";
}
# Extract description (or NULL, if not to be included in the configurator XML)
if ($in_table) {
#print " .. $rest\n";
# description or NULL
if ($rest =~ /NULL *\} *, *$/) {
# no description - discard this one/simply continue with next one
} elsif ($rest =~ /(?:BLURB\s*\(\s*)?(".*")(?:\s*\))? *\} *, *$/) {
# description ending on same line
$description = $1;
store_entry() unless $deprecated;
} else {
# strip the quotes &c. once the full text has been gathered
$description = $rest;
$gobbling_description = 1;
}
#print " .. gobbling $gobbling_description";
next;
}
}
#print "$tab2elems{cyclonedds_root_cfgelems}\n";
my @rootnames = split /;/, $tab2elems{cyclonedds_root_cfgelems};
die "error: cyclonedds_root_cfgelems has no or multiple entries\n" if @rootnames != 1;
die "error: root_cfgelems doesn't exist\n" unless exists $tab2elems{root_cfgelems};
# Override the type for ControlTopic/Deaf, .../Mute so that an empty
# string is allowed by the configuration validation in spliced
# (easier than adding a boolean_or_empty to DDSI2 for a quick hack)
#if (elem["control_topic_cfgelems/deaf"] == "" || elem["control_topic_cfgelems/mute"] == "") {
# print FILENAME": error: control_topic_cfgelems/{deaf,mute} missing" > "/dev/stderr";
# exit 1;
#}
#elem["control_topic_cfgelems/deaf"] = "LEAF;;1;\"false\";string";
#elem["control_topic_cfgelems/mute"] = "LEAF;;1;\"false\";string";
print << 'EOT';
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright(c) 2006 to 2019 ADLINK Technology Limited and others
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
v. 1.0 which is available at
http://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
===
generated from src/core/ddsi/src/q_config.c using excx.pl
-->
<splice_meta_config version="1.0">
<!--xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.splice-dds.org/splice_metaconfig.xsd"-->
EOT
conv_table_to_xml("cyclonedds_root_cfgelems", " ", "", 1, 0);
conv_table_to_xml("root_cfgelems", " ", "", 0, 1);
print << 'EOT';
</splice_meta_config>
EOT
while (my ($k, $v) = each %typehint_seen) {
warn "script warning: type mapping defined for $k but not used" if $v == 0;
}

View file

@ -9,47 +9,36 @@
http://www.eclipse.org/org/documents/edl-v10.php. http://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
===
generated from src/core/ddsi/src/q_config.c using excx.pl
--> -->
<splice_meta_config version="1.0"> <splice_meta_config version="1.0">
<!--xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.splice-dds.org/splice_metaconfig.xsd"--> <!--xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.splice-dds.org/splice_metaconfig.xsd"-->
<rootElement name="@CMAKE_PROJECT_NAME@" minOccurrences="1" maxOccurrences="1"> <rootElement name="CycloneDDS" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>@CMAKE_PROJECT_NAME@ is highly configurable, allowing many configuration parameters CycloneDDS configuration
to be chosen by the user at deployment time by means of easily maintainable XML-file(s).</p> ]]></comment>
]]></comment> <maxLength>0</maxLength>
</rootElement> </rootElement>
<element name="Domain" minOccurrences="1" maxOccurrences="1"> <element name="Domain" minOccurrences="1" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>The Domain identifies the scope of communication.</p> <p>The General element specifying Domain related settings.</p>
]]></comment>
<leafString name="Id" minOccurrences="1" maxOccurrences="1">
<comment>
<![CDATA[
This element specifies the domain Id of the instantiated DDS domain. If several different DDS domains are required to run
simultaneously, then they all need to have their own unique domain Id.
Note - for maximum interoperability it is recommended that you only select a domain Id from the range 0 &lt;= n &lt;= 230. The domain Id
value is used by the DDSI2 service to derive values for the required network communiction endpoints and service reconfiguration is
required to use domain id values outside of this range. The special value "any" takes the domain id from the domain argument of the dds_create_participant operation.
Please see section 9.6.1 of the Real-time Publish-Subscribe Wire Protocol DDS Interoperability Wire Protocol specification (DDSI), v2.1, formal/2009-01-05 at
http://www.omg.org/spec/DDSI/2.1/ for further information.
]]></comment>
<maxLength>0</maxLength>
<default>any</default>
</leafString>
</element>
<!-- DDSI2E CONFIGURATION AUTOMAGICALLY GENERATED (see extract-config-xml.pl) -->
<element name="DDSI2E" minOccurrences="0" maxOccurrences="0">
<comment><![CDATA[
<p>DDSI2 settings ...</p>
]]></comment> ]]></comment>
<value>CDR_CLIENT</value> <maxLength>0</maxLength>
<leafString name="Id" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<p>Domain id this configuration applies to, or "any" if it applies to all domain ids.</p>
]]></comment>
<maxLength>0</maxLength>
<default>any</default>
</leafString>
<element name="Channels" minOccurrences="0" maxOccurrences="1"> <element name="Channels" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element is used to group a set of channels. The channels are independent data paths through DDSI2E and by using separate threads and setting their priorities appropriately, chanenls can be used to map transport priorities to operating system scheduler priorities, ensuring system-wide end-to-end priority preservation.</p> <p>This element is used to group a set of channels. The channels are independent data paths through Cyclone DDS and by using separate threads and setting their priorities appropriately, chanenls can be used to map transport priorities to operating system scheduler priorities, ensuring system-wide end-to-end priority preservation.</p>
]]></comment> ]]></comment>
<element name="Channel" minOccurrences="0" maxOccurrences="42"> <maxLength>0</maxLength>
<element name="Channel" minOccurrences="0" maxOccurrences="0">
<comment><![CDATA[ <comment><![CDATA[
<p>This element defines a channel.</p> <p>This element defines a channel.</p>
]]></comment> ]]></comment>
@ -68,7 +57,7 @@
</attributeInt> </attributeInt>
<leafString name="AuxiliaryBandwidthLimit" minOccurrences="0" maxOccurrences="1"> <leafString name="AuxiliaryBandwidthLimit" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element specifies the maximum transmit rate of auxiliary traffic on this channel (e.g. retransmits, heartbeats, etc). Bandwidth limiting uses a leaky bucket scheme. The default value "inf" means DDSI2E imposes no limitation, the underlying operating system and hardware will likely limit the maimum transmit rate.</p> <p>This element specifies the maximum transmit rate of auxiliary traffic on this channel (e.g. retransmits, heartbeats, etc). Bandwidth limiting uses a leaky bucket scheme. The default value "inf" means Cyclone DDS imposes no limitation, the underlying operating system and hardware will likely limit the maimum transmit rate.</p>
<p>The unit must be specified explicitly. Recognised units: <i>X</i>b/s, <i>X</i>bps for bits/s or <i>X</i>B/s, <i>X</i>Bps for bytes/s; where <i>X</i> is an optional prefix: k for 10<sup>3</sup>, Ki for 2<sup>10</sup>, M for 10<sup>6</sup>, Mi for 2<sup>20</sup>, G for 10<sup>9</sup>, Gi for 2<sup>30</sup>.</p> <p>The unit must be specified explicitly. Recognised units: <i>X</i>b/s, <i>X</i>bps for bits/s or <i>X</i>B/s, <i>X</i>Bps for bytes/s; where <i>X</i> is an optional prefix: k for 10<sup>3</sup>, Ki for 2<sup>10</sup>, M for 10<sup>6</sup>, Mi for 2<sup>20</sup>, G for 10<sup>9</sup>, Gi for 2<sup>30</sup>.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
@ -76,7 +65,7 @@
</leafString> </leafString>
<leafString name="DataBandwidthLimit" minOccurrences="0" maxOccurrences="1"> <leafString name="DataBandwidthLimit" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element specifies the maximum transmit rate of new samples and directly related data, for this channel. Bandwidth limiting uses a leaky bucket scheme. The default value "inf" means DDSI2E imposes no limitation, the underlying operating system and hardware will likely limit the maimum transmit rate.</p> <p>This element specifies the maximum transmit rate of new samples and directly related data, for this channel. Bandwidth limiting uses a leaky bucket scheme. The default value "inf" means Cyclone DDS imposes no limitation, the underlying operating system and hardware will likely limit the maimum transmit rate.</p>
<p>The unit must be specified explicitly. Recognised units: <i>X</i>b/s, <i>X</i>bps for bits/s or <i>X</i>B/s, <i>X</i>Bps for bytes/s; where <i>X</i> is an optional prefix: k for 10<sup>3</sup>, Ki for 2<sup>10</sup>, M for 10<sup>6</sup>, Mi for 2<sup>20</sup>, G for 10<sup>9</sup>, Gi for 2<sup>30</sup>.</p> <p>The unit must be specified explicitly. Recognised units: <i>X</i>b/s, <i>X</i>bps for bits/s or <i>X</i>B/s, <i>X</i>Bps for bytes/s; where <i>X</i> is an optional prefix: k for 10<sup>3</sup>, Ki for 2<sup>10</sup>, M for 10<sup>6</sup>, Mi for 2<sup>20</sup>, G for 10<sup>9</sup>, Gi for 2<sup>30</sup>.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
@ -101,19 +90,7 @@ When an application is run without Administrative priveleges then only the diffs
<comment><![CDATA[ <comment><![CDATA[
<p>The Compatibility elements allows specifying various settings related to compatability with standards and with other DDSI implementations.</p> <p>The Compatibility elements allows specifying various settings related to compatability with standards and with other DDSI implementations.</p>
]]></comment> ]]></comment>
<leafInt name="AckNackNumbitsEmptySet" minOccurrences="0" maxOccurrences="1"> <maxLength>0</maxLength>
<comment><![CDATA[
<p>This element governs the representation of an acknowledgement message that does not also negatively-acknowledge some samples. If set to 0, the generated acknowledgements have an invalid form and will be reject by the strict and pedantic conformance modes, but several other implementation require this setting for smooth interoperation.</p>
<p>If set to 1, all acknowledgements sent by DDSI2E adhere the form of acknowledgement messages allowed by the standard, but this causes problems when interoperating with these other implementations. The strict and pedantic standards conformance modes always overrule an AckNackNumbitsEmptySet=0 to prevent the transmitting of invalid messages.</p>
]]></comment>
<default>0</default>
</leafInt>
<leafBoolean name="ArrivalOfDataAssertsPpAndEpLiveliness" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<p>When set to true, arrival of a message from a peer asserts liveliness of that peer. When set to false, only SPDP and explicit lease renewals have this effect.</p>
]]></comment>
<default>true</default>
</leafBoolean>
<leafBoolean name="AssumeRtiHasPmdEndpoints" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="AssumeRtiHasPmdEndpoints" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This option assumes ParticipantMessageData endpoints required by the liveliness protocol are present in RTI participants even when not properly advertised by the participant discovery protocol.</p> <p>This option assumes ParticipantMessageData endpoints required by the liveliness protocol are present in RTI participants even when not properly advertised by the participant discovery protocol.</p>
@ -130,7 +107,7 @@ When an application is run without Administrative priveleges then only the diffs
<leafEnum name="ManySocketsMode" minOccurrences="0" maxOccurrences="1"> <leafEnum name="ManySocketsMode" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This option specifies whether a network socket will be created for each domain participant on a host. The specification seems to assume that each participant has a unique address, and setting this option will ensure this to be the case. This is not the defeault.</p> <p>This option specifies whether a network socket will be created for each domain participant on a host. The specification seems to assume that each participant has a unique address, and setting this option will ensure this to be the case. This is not the defeault.</p>
<p>Disabling it slightly improves performance and reduces network traffic somewhat. It also causes the set of port numbers needed by DDSI2E to become predictable, which may be useful for firewall and NAT configuration.</p> <p>Disabling it slightly improves performance and reduces network traffic somewhat. It also causes the set of port numbers needed by Cyclone DDS to become predictable, which may be useful for firewall and NAT configuration.</p>
]]></comment> ]]></comment>
<value>false</value> <value>false</value>
<value>true</value> <value>true</value>
@ -139,16 +116,9 @@ When an application is run without Administrative priveleges then only the diffs
<value>many</value> <value>many</value>
<default>single</default> <default>single</default>
</leafEnum> </leafEnum>
<leafBoolean name="RespondToRtiInitZeroAckWithInvalidHeartbeat" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<p>This element allows a closer mimicking of the behaviour of some other DDSI implementations, albeit at the cost of generating even more invalid messages. Setting it to true ensures a Heartbeat can be sent at any time when a remote node requests one, setting it to false delays it until a valid one can be sent.</p>
<p>The latter is fully compliant with the specification, and no adverse effects have been observed. It is the default.</p>
]]></comment>
<default>false</default>
</leafBoolean>
<leafEnum name="StandardsConformance" minOccurrences="0" maxOccurrences="1"> <leafEnum name="StandardsConformance" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element sets the level of standards conformance of this instance of the DDSI2E Service. Stricter conformance typically means less interoperability with other implementations. Currently three modes are defined:</p> <p>This element sets the level of standards conformance of this instance of the Cyclone DDS Service. Stricter conformance typically means less interoperability with other implementations. Currently three modes are defined:</p>
<ul><li><i>pedantic</i>: very strictly conform to the specification, ultimately for compliancy testing, but currently of little value because it adheres even to what will most likely turn out to be editing errors in the DDSI standard. Arguably, as long as no errata have been published it is the current text that is in effect, and that is what pedantic currently does.</li> <ul><li><i>pedantic</i>: very strictly conform to the specification, ultimately for compliancy testing, but currently of little value because it adheres even to what will most likely turn out to be editing errors in the DDSI standard. Arguably, as long as no errata have been published it is the current text that is in effect, and that is what pedantic currently does.</li>
<li><i>strict</i>: a slightly less strict view of the standard than does pedantic: it follows the established behaviour where the standard is obviously in error.</li> <li><i>strict</i>: a slightly less strict view of the standard than does pedantic: it follows the established behaviour where the standard is obviously in error.</li>
<li><i>lax</i>: attempt to provide the smoothest possible interoperability, anticipating future revisions of elements in the standard in areas that other implementations do not adhere to, even though there is no good reason not to.</li></ul> <li><i>lax</i>: attempt to provide the smoothest possible interoperability, anticipating future revisions of elements in the standard in areas that other implementations do not adhere to, even though there is no good reason not to.</li></ul>
@ -164,12 +134,7 @@ When an application is run without Administrative priveleges then only the diffs
<comment><![CDATA[ <comment><![CDATA[
<p>The Discovery element allows specifying various parameters related to the discovery of peers.</p> <p>The Discovery element allows specifying various parameters related to the discovery of peers.</p>
]]></comment> ]]></comment>
<leafBoolean name="AdvertiseBuiltinTopicWriters" minOccurrences="0" maxOccurrences="1"> <maxLength>0</maxLength>
<comment><![CDATA[
<p>This element controls whether or not DDSI2E advertises writers for the built-in topics from its discovery for backwards compatibility with older OpenSplice versions.</p>
]]></comment>
<default>true</default>
</leafBoolean>
<leafString name="DSGracePeriod" minOccurrences="0" maxOccurrences="1"> <leafString name="DSGracePeriod" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This setting controls for how long endpoints discovered via a Cloud discovery service will survive after the discovery service disappeared, allowing reconnect without loss of data when the discovery service restarts (or another instance takes over).</p> <p>This setting controls for how long endpoints discovered via a Cloud discovery service will survive after the discovery service disappeared, allowing reconnect without loss of data when the discovery service restarts (or another instance takes over).</p>
@ -193,13 +158,13 @@ When an application is run without Administrative priveleges then only the diffs
</leafBoolean> </leafBoolean>
<leafInt name="MaxAutoParticipantIndex" minOccurrences="0" maxOccurrences="1"> <leafInt name="MaxAutoParticipantIndex" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element specifies the maximum DDSI participant index selected by this instance of the DDSI2E service if the Discovery/ParticipantIndex is "auto".</p> <p>This element specifies the maximum DDSI participant index selected by this instance of the Cyclone DDS service if the Discovery/ParticipantIndex is "auto".</p>
]]></comment> ]]></comment>
<default>9</default> <default>9</default>
</leafInt> </leafInt>
<leafString name="ParticipantIndex" minOccurrences="0" maxOccurrences="1"> <leafString name="ParticipantIndex" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element specifies the DDSI participant index used by this instance of the DDSI2E service for discovery purposes. Only one such participant id is used, independent of the number of actual DomainParticipants on the node. It is either:</p> <p>This element specifies the DDSI participant index used by this instance of the Cyclone DDS service for discovery purposes. Only one such participant id is used, independent of the number of actual DomainParticipants on the node. It is either:</p>
<ul><li><i>auto</i>: which will attempt to automatically determine an available participant index (see also Discovery/MaxAutoParticipantIndex), or</li> <ul><li><i>auto</i>: which will attempt to automatically determine an available participant index (see also Discovery/MaxAutoParticipantIndex), or</li>
<li>a non-negative integer less than 120, or</li> <li>a non-negative integer less than 120, or</li>
<li><i>none</i>:, which causes it to use arbitrary port numbers for unicast sockets which entirely removes the constraints on the participant index but makes unicast discovery impossible.</li></ul> <li><i>none</i>:, which causes it to use arbitrary port numbers for unicast sockets which entirely removes the constraints on the participant index but makes unicast discovery impossible.</li></ul>
@ -313,21 +278,23 @@ When an application is run without Administrative priveleges then only the diffs
</element> </element>
<element name="General" minOccurrences="0" maxOccurrences="1"> <element name="General" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>The General element specifies overall DDSI2E service settings.</p> <p>The General element specifies overall Cyclone DDS service settings.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength>
<leafString name="AllowMulticast" minOccurrences="0" maxOccurrences="1"> <leafString name="AllowMulticast" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element controls whether DDSI2E uses multicasts for data traffic.</p> <p>This element controls whether Cyclone DDS uses multicasts for data traffic.</p>
<p>It is a comma-separated list of some of the following keywords: "spdp", "asm", "ssm", or either of "false" or "true".</p> <p>It is a comma-separated list of some of the following keywords: "spdp", "asm", "ssm", or either of "false" or "true", or "default".</p>
<ul> <ul>
<li><i>spdp</i>: enables the use of ASM (any-source multicast) for participant discovery</li> <li><i>spdp</i>: enables the use of ASM (any-source multicast) for participant discovery, joining the multicast group on the discovery socket, transmitting SPDP messages to this group, but never advertising nor using any multicast address in any discovery message, thus forcing unicast communications for all endpoint discovery and user data.</li>
<li><i>asm</i>: enables the use of ASM for all traffic (including SPDP)</li> <li><i>asm</i>: enables the use of ASM for all traffic, including receiving SPDP but not transmitting SPDP messages via multicast</li>
<li><i>ssm</i>: enables the use of SSM (source-specific multicast) for all non-SPDP traffic (if supported)</li> <li><i>ssm</i>: enables the use of SSM (source-specific multicast) for all non-SPDP traffic (if supported)</li>
</ul> </ul>
<p>When set to "false" all multicasting is disabled. The default, "true" enables full use of multicasts. Listening for multicasts can be controlled by General/MulticastRecvNetworkInterfaceAddresses.</p> <p>When set to "false" all multicasting is disabled. The default, "true" enables full use of multicasts. Listening for multicasts can be controlled by General/MulticastRecvNetworkInterfaceAddresses.</p>
<p>"default" maps on spdp if the network is a WiFi network, on true if it is a wired network</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default>true</default> <default>default</default>
</leafString> </leafString>
<leafBoolean name="DontRoute" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="DontRoute" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
@ -335,22 +302,15 @@ When an application is run without Administrative priveleges then only the diffs
]]></comment> ]]></comment>
<default>false</default> <default>false</default>
</leafBoolean> </leafBoolean>
<leafBoolean name="EnableLoopback" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
[DEPRECATED]
"<p>This element specifies whether DDSI packets are visible to all DDSI participants in the same process. It must be "true" for intra-process communications, i.e. a reader and writer communicating in the same address space. If enabled and using multicast then EnableMulticastLoopback must also be enabled.</p>
]]></comment>
<default>false</default>
</leafBoolean>
<leafBoolean name="EnableMulticastLoopback" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="EnableMulticastLoopback" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element specifies whether DDSI2E allows IP multicast packets to be visible to all DDSI participants in the same node, including itself. It must be "true" for intra-node multicast communications, but if a node runs only a single DDSI2E service and does not host any other DDSI-capable programs, it should be set to "false" for improved performance.</p> <p>This element specifies whether Cyclone DDS allows IP multicast packets to be visible to all DDSI participants in the same node, including itself. It must be "true" for intra-node multicast communications, but if a node runs only a single Cyclone DDS service and does not host any other DDSI-capable programs, it should be set to "false" for improved performance.</p>
]]></comment> ]]></comment>
<default>true</default> <default>true</default>
</leafBoolean> </leafBoolean>
<leafString name="ExternalNetworkAddress" minOccurrences="0" maxOccurrences="1"> <leafString name="ExternalNetworkAddress" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element allows explicitly overruling the network address DDSI2E advertises in the discovery protocol, which by default is the address of the preferred network interface (General/NetworkInterfaceAddress), to allow DDSI2E to communicate across a Network Address Translation (NAT) device.</p> <p>This element allows explicitly overruling the network address Cyclone DDS advertises in the discovery protocol, which by default is the address of the preferred network interface (General/NetworkInterfaceAddress), to allow Cyclone DDS to communicate across a Network Address Translation (NAT) device.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default>auto</default> <default>auto</default>
@ -364,7 +324,7 @@ When an application is run without Administrative priveleges then only the diffs
</leafString> </leafString>
<leafString name="FragmentSize" minOccurrences="0" maxOccurrences="1"> <leafString name="FragmentSize" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element specifies the size of DDSI sample fragments generated by DDSI2E. Samples larger than FragmentSize are fragmented into fragments of FragmentSize bytes each, except the last one, which may be smaller. The DDSI spec mandates a minimum fragment size of 1025 bytes, but DDSI2E will do whatever size is requested, accepting fragments of which the size is at least the minimum of 1025 and FragmentSize.</p> <p>This element specifies the size of DDSI sample fragments generated by Cyclone DDS. Samples larger than FragmentSize are fragmented into fragments of FragmentSize bytes each, except the last one, which may be smaller. The DDSI spec mandates a minimum fragment size of 1025 bytes, but Cyclone DDS will do whatever size is requested, accepting fragments of which the size is at least the minimum of 1025 and FragmentSize.</p>
<p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p> <p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
@ -372,7 +332,7 @@ When an application is run without Administrative priveleges then only the diffs
</leafString> </leafString>
<leafString name="MaxMessageSize" minOccurrences="0" maxOccurrences="1"> <leafString name="MaxMessageSize" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element specifies the maximum size of the UDP payload that DDSI2E will generate. DDSI2E will try to maintain this limit within the bounds of the DDSI specification, which means that in some cases (especially for very low values of MaxMessageSize) larger payloads may sporadically be observed (currently up to 1192 B).</p> <p>This element specifies the maximum size of the UDP payload that Cyclone DDS will generate. Cyclone DDS will try to maintain this limit within the bounds of the DDSI specification, which means that in some cases (especially for very low values of MaxMessageSize) larger payloads may sporadically be observed (currently up to 1192 B).</p>
<p>On some networks it may be necessary to set this item to keep the packetsize below the MTU to prevent IP fragmentation. In those cases, it is generally advisable to also consider reducing Internal/FragmentSize.</p> <p>On some networks it may be necessary to set this item to keep the packetsize below the MTU to prevent IP fragmentation. In those cases, it is generally advisable to also consider reducing Internal/FragmentSize.</p>
<p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p> <p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p>
]]></comment> ]]></comment>
@ -381,15 +341,15 @@ When an application is run without Administrative priveleges then only the diffs
</leafString> </leafString>
<leafString name="MulticastRecvNetworkInterfaceAddresses" minOccurrences="0" maxOccurrences="1"> <leafString name="MulticastRecvNetworkInterfaceAddresses" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element specifies on which network interfaces DDSI2E listens to multicasts. The following options are available:</p> <p>This element specifies on which network interfaces Cyclone DDS listens to multicasts. The following options are available:</p>
<ul> <ul>
<li><i>all</i>: listen for multicasts on all multicast-capable interfaces; or</li> <li><i>all</i>: listen for multicasts on all multicast-capable interfaces; or</li>
<li><i>any</i>: listen for multicasts on the operating system default interface; or</li> <li><i>any</i>: listen for multicasts on the operating system default interface; or</li>
<li><i>preferred</i>: listen for multicasts on the preferred interface (General/NetworkInterfaceAddress); or</li> <li><i>preferred</i>: listen for multicasts on the preferred interface (General/NetworkInterfaceAddress); or</li>
<li><i>none</i>: does not listen for multicasts on any interface; or</li> <li><i>none</i>: does not listen for multicasts on any interface; or</li>
<li>a comma-separated list of network addresses: configures DDSI2E to listen for multicasts on all of the listed addresses.</li> <li>a comma-separated list of network addresses: configures Cyclone DDS to listen for multicasts on all of the listed addresses.</li>
</ul> </ul>
<p>If DDSI2E is in IPv6 mode and the address of the preferred network interface is a link-local address, "all" is treated as a synonym for "preferred" and a comma-separated list is treated as "preferred" if it contains the preferred interface and as "none" if not.</p> <p>If Cyclone DDS is in IPv6 mode and the address of the preferred network interface is a link-local address, "all" is treated as a synonym for "preferred" and a comma-separated list is treated as "preferred" if it contains the preferred interface and as "none" if not.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default>preferred</default> <default>preferred</default>
@ -404,29 +364,17 @@ When an application is run without Administrative priveleges then only the diffs
</leafInt> </leafInt>
<leafString name="NetworkInterfaceAddress" minOccurrences="0" maxOccurrences="1"> <leafString name="NetworkInterfaceAddress" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element specifies the preferred network interface for use by DDSI2E. The preferred network interface determines the IP address that DDSI2E advertises in the discovery protocol (but see also General/ExternalNetworkAddress), and is also the only interface over which multicasts are transmitted. The interface can be identified by its IP address, network interface name or network portion of the address. If the value "auto" is entered here, DDSI2E will select what it considers the most suitable interface.</p> <p>This element specifies the preferred network interface for use by Cyclone DDS. The preferred network interface determines the IP address that Cyclone DDS advertises in the discovery protocol (but see also General/ExternalNetworkAddress), and is also the only interface over which multicasts are transmitted. The interface can be identified by its IP address, network interface name or network portion of the address. If the value "auto" is entered here, Cyclone DDS will select what it considers the most suitable interface.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default>auto</default> <default>auto</default>
</leafString> </leafString>
<leafBoolean name="StartupModeCoversTransient" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="PreferMulticast" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element configures whether startup-mode should also cover transient and persistent data, for configurations where the durability service does not take care of it. Configurations without defined merge policies best leave this enabled.</p> <p>When false (default) Cyclone DDS uses unicast for data whenever there a single unicast suffices. Setting this to true makes it prefer multicasting data, falling back to unicast only when no multicast address is available.</p>
]]></comment> ]]></comment>
<default>true</default> <default>false</default>
</leafBoolean> </leafBoolean>
<leafString name="StartupModeDuration" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<p>This element specifies how long the DDSI2E remains in its "startup" mode. While in "startup" mode all volatile reliable data published on the local node is retained as-if it were transient-local data, allowing existing readers on remote nodes to obtain the data even though discovering them takes some time. Best-effort data by definition need not arrive, and transient and persistent data are covered by the durability service.</p>
<p>Once the system is stable, DDSI2E keeps track of the existence of remote readers whether or not matching writers exist locally, avoiding this discovery delay and ensuring this is merely a node startup issue.</p>
<p>Setting General/StartupModeDuration to 0s will disable it.</p>
<p>The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.</p>
]]></comment>
<minimum>0</minimum>
<maximum>60000</maximum>
<maxLength>0</maxLength>
<default>2 s</default>
</leafString>
<leafString name="Transport" minOccurrences="0" maxOccurrences="1"> <leafString name="Transport" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element allows selecting the transport to be used (udp, udp6, tcp, tcp6, raweth)</p> <p>This element allows selecting the transport to be used (udp, udp6, tcp, tcp6, raweth)</p>
@ -448,18 +396,13 @@ When an application is run without Administrative priveleges then only the diffs
<comment><![CDATA[ <comment><![CDATA[
<p>The Internal elements deal with a variety of settings that evolving and that are not necessarily fully supported. For the vast majority of the Internal settings, the functionality per-se is supported, but the right to change the way the options control the functionality is reserved. This includes renaming or moving options.</p> <p>The Internal elements deal with a variety of settings that evolving and that are not necessarily fully supported. For the vast majority of the Internal settings, the functionality per-se is supported, but the right to change the way the options control the functionality is reserved. This includes renaming or moving options.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength>
<leafInt name="AccelerateRexmitBlockSize" minOccurrences="0" maxOccurrences="1"> <leafInt name="AccelerateRexmitBlockSize" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>Proxy readers that are assumed to sill be retrieving historical data get this many samples retransmitted when they NACK something, even if some of these samples have sequence numbers outside the set covered by the NACK.</p> <b>Internal</b><p>Proxy readers that are assumed to sill be retrieving historical data get this many samples retransmitted when they NACK something, even if some of these samples have sequence numbers outside the set covered by the NACK.</p>
]]></comment> ]]></comment>
<default>0</default> <default>0</default>
</leafInt> </leafInt>
<leafBoolean name="AggressiveKeepLastWhc" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<b>Internal</b><p>This element controls whether to drop a reliable sample from a DDSI2E WHC before all readers have acknowledged it as soon as a later sample becomes available. It only affects DCPS data writers with a history QoS setting of KEEP_LAST with depth 1. The default setting, <i>false</i>, mimics the behaviour of the OpenSplice RT networking and is necessary to make the behaviour of wait_for_acknowledgements() consistent across the networking services.</p>
]]></comment>
<default>true</default>
</leafBoolean>
<leafString name="AssumeMulticastCapable" minOccurrences="0" maxOccurrences="1"> <leafString name="AssumeMulticastCapable" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This element controls which network interfaces are assumed to be capable of multicasting even when the interface flags returned by the operating system state it is not (this provides a workaround for some platforms). It is a comma-separated lists of patterns (with ? and * wildcards) against which the interface names are matched.</p> <b>Internal</b><p>This element controls which network interfaces are assumed to be capable of multicasting even when the interface flags returned by the operating system state it is not (this provides a workaround for some platforms). It is a comma-separated lists of patterns (with ? and * wildcards) against which the interface names are matched.</p>
@ -477,7 +420,7 @@ When an application is run without Administrative priveleges then only the diffs
</leafString> </leafString>
<leafString name="AuxiliaryBandwidthLimit" minOccurrences="0" maxOccurrences="1"> <leafString name="AuxiliaryBandwidthLimit" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This element specifies the maximum transmit rate of auxiliary traffic not bound to a specific channel, such as discovery traffic, as well as auxiliary traffic related to a certain channel if that channel has elected to share this global AuxiliaryBandwidthLimit. Bandwidth limiting uses a leaky bucket scheme. The default value "inf" means DDSI2E imposes no limitation, the underlying operating system and hardware will likely limit the maimum transmit rate.</p> <b>Internal</b><p>This element specifies the maximum transmit rate of auxiliary traffic not bound to a specific channel, such as discovery traffic, as well as auxiliary traffic related to a certain channel if that channel has elected to share this global AuxiliaryBandwidthLimit. Bandwidth limiting uses a leaky bucket scheme. The default value "inf" means Cyclone DDS imposes no limitation, the underlying operating system and hardware will likely limit the maimum transmit rate.</p>
<p>The unit must be specified explicitly. Recognised units: <i>X</i>b/s, <i>X</i>bps for bits/s or <i>X</i>B/s, <i>X</i>Bps for bytes/s; where <i>X</i> is an optional prefix: k for 10<sup>3</sup>, Ki for 2<sup>10</sup>, M for 10<sup>6</sup>, Mi for 2<sup>20</sup>, G for 10<sup>9</sup>, Gi for 2<sup>30</sup>.</p> <p>The unit must be specified explicitly. Recognised units: <i>X</i>b/s, <i>X</i>bps for bits/s or <i>X</i>B/s, <i>X</i>Bps for bytes/s; where <i>X</i> is an optional prefix: k for 10<sup>3</sup>, Ki for 2<sup>10</sup>, M for 10<sup>6</sup>, Mi for 2<sup>20</sup>, G for 10<sup>9</sup>, Gi for 2<sup>30</sup>.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
@ -496,53 +439,10 @@ When an application is run without Administrative priveleges then only the diffs
<value>minimal</value> <value>minimal</value>
<default>writers</default> <default>writers</default>
</leafEnum> </leafEnum>
<leafBoolean name="ConservativeBuiltinReaderStartup" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<b>Internal</b><p>This element forces all DDSI2E built-in discovery-related readers to request all historical data, instead of just one for each "topic". There is no indication that any of the current DDSI implementations requires changing of this setting, but it is conceivable that an implementation might track which participants have been informed of the existence of endpoints and which have not been, refusing communication with those that have "can't" know.</p>
<p>Should it be necessary to hide DDSI2E's shared discovery behaviour, set this to <i>true</i> and Internal/BuiltinEndpointSet to <i>full</i>.</p>
]]></comment>
<default>false</default>
</leafBoolean>
<element name="ControlTopic" minOccurrences="0" maxOccurrences="1"> <element name="ControlTopic" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>The ControlTopic element allows configured whether DDSI2E provides a special control interface via a predefined topic or not.<p> <b>Internal</b><p>The ControlTopic element allows configured whether Cyclone DDS provides a special control interface via a predefined topic or not.<p>
]]></comment> ]]></comment>
<attributeBoolean name="Enable" required="false">
<comment><![CDATA[
<b>Internal</b>[DEPRECATED]
"<p>This element controls whether DDSI2E should create a topic to control DDSI2E's behaviour dynamically.<p>"
},
]]></comment>
<default>false</default>
</attributeBoolean>
<attributeString name="InitialReset" required="false">
<comment><![CDATA[
<b>Internal</b>[DEPRECATED]
"<p>This element controls after how much time an initial deaf/mute state will automatically reset.<p>"
},
<p>Valid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.</p>
]]></comment>
<maxLength>0</maxLength>
<default>inf</default>
</attributeString>
<leafString name="Deaf" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<b>Internal</b>[DEPRECATED]
"<p>This element controls whether DDSI2E defaults to deaf mode or to normal mode. This controls both the initial behaviour and what behaviour it auto-reverts to.</p>
]]></comment>
<maxLength>0</maxLength>
<default>false</default>
</leafString>
<leafString name="Mute" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<b>Internal</b>[DEPRECATED]
"<p>This element controls whether DDSI2E defaults to mute mode or to normal mode. This controls both the initial behaviour and what behaviour it auto-reverts to.</p>
]]></comment>
<maxLength>0</maxLength>
<default>false</default>
</leafString>
</element> </element>
<leafInt name="DDSI2DirectMaxThreads" minOccurrences="0" maxOccurrences="1"> <leafInt name="DDSI2DirectMaxThreads" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
@ -568,12 +468,16 @@ When an application is run without Administrative priveleges then only the diffs
]]></comment> ]]></comment>
<default>256</default> <default>256</default>
</leafInt> </leafInt>
<leafBoolean name="ForwardAllMessages" minOccurrences="0" maxOccurrences="1"> <leafString name="EnableExpensiveChecks" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>Forward all messages from a writer, rather than trying to forward each sample only once. The default of trying to forward each sample only once filters out duplicates for writers in multiple partitions under nearly all circumstances, but may still publish the odd duplicate. Note: the current implementation also can lose in contrived test cases, that publish more than 2**32 samples using a single data writer in conjunction with carefully controlled management of the writer history via cooperating local readers.</p> <b>Internal</b><p>This element enables expensive checks in builds with assertions enabled and is ignored otherwise. Recognised categories are:</p>
<ul><li><i>whc</i>: writer history cache checking</li>
<li><i>rhc</i>: reader history cache checking</li>
<p>In addition, there is the keyword <i>all</i> that enables all checks.</p>
]]></comment> ]]></comment>
<default>false</default> <maxLength>0</maxLength>
</leafBoolean> <default></default>
</leafString>
<leafBoolean name="GenerateKeyhash" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="GenerateKeyhash" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>When true, include keyhashes in outgoing data for topics with keys.</p> <b>Internal</b><p>When true, include keyhashes in outgoing data for topics with keys.</p>
@ -628,27 +532,31 @@ When an application is run without Administrative priveleges then only the diffs
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default>10 s</default> <default>10 s</default>
</leafString> </leafString>
<leafBoolean name="LegacyFragmentation" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<b>Internal</b><p>This option enables a backwards-compatible, non-compliant setting and interpretation of the control flags in fragmented data messages. To be enabled <i>only</i> when requiring interoperability between compliant and non-compliant versions of DDSI2E for large messages.</p>
]]></comment>
<default>false</default>
</leafBoolean>
<leafBoolean name="LivelinessMonitoring" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="LivelinessMonitoring" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This element controls whether or not implementation should internally monitor its own liveliness. If liveliness monitoring is enabled, stack traces can be dumped automatically when some thread appears to have stopped making progress.</p> <b>Internal</b><p>This element controls whether or not implementation should internally monitor its own liveliness. If liveliness monitoring is enabled, stack traces can be dumped automatically when some thread appears to have stopped making progress.</p>
]]></comment> ]]></comment>
<default>false</default> <default>false</default>
<attributeString name="Interval" required="false">
<comment><![CDATA[
<b>Internal</b><p>This element controls the interval at which to check whether threads have been making progress.</p>
<p>The unit must be specified explicitly. Recognised units: ns, us, ms, s, min, hr, day.</p>
]]></comment>
<minimum>100ms</minimum>
<maximum>1hr</maximum>
<maxLength>0</maxLength>
<default>1s</default>
</attributeString>
<attributeBoolean name="StackTraces" required="false"> <attributeBoolean name="StackTraces" required="false">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This element controls whether or not to write stack traces to the DDSI2 trace when a thread fails to make progress (on select platforms only).</p> <b>Internal</b><p>This element controls whether or not to write stack traces to the Cyclone DDS trace when a thread fails to make progress (on select platforms only).</p>
]]></comment> ]]></comment>
<default>true</default> <default>true</default>
</attributeBoolean> </attributeBoolean>
</leafBoolean> </leafBoolean>
<leafInt name="MaxParticipants" minOccurrences="0" maxOccurrences="1"> <leafInt name="MaxParticipants" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This elements configures the maximum number of DCPS domain participants this DDSI2E instance is willing to service. 0 is unlimited.</p> <b>Internal</b><p>This elements configures the maximum number of DCPS domain participants this Cyclone DDS instance is willing to service. 0 is unlimited.</p>
]]></comment> ]]></comment>
<default>0</default> <default>0</default>
</leafInt> </leafInt>
@ -668,7 +576,7 @@ When an application is run without Administrative priveleges then only the diffs
</leafInt> </leafInt>
<leafString name="MaxSampleSize" minOccurrences="0" maxOccurrences="1"> <leafString name="MaxSampleSize" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This setting controls the maximum (CDR) serialised size of samples that DDSI2E will forward in either direction. Samples larger than this are discarded with a warning.</p> <b>Internal</b><p>This setting controls the maximum (CDR) serialised size of samples that Cyclone DDS will forward in either direction. Samples larger than this are discarded with a warning.</p>
<p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p> <p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
@ -676,14 +584,14 @@ When an application is run without Administrative priveleges then only the diffs
</leafString> </leafString>
<leafBoolean name="MeasureHbToAckLatency" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="MeasureHbToAckLatency" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This element enables heartbeat-to-ack latency among DDSI2E services by prepending timestamps to Heartbeat and AckNack messages and calculating round trip times. This is non-standard behaviour. The measured latencies are quite noisy and are currently not used anywhere.</p> <b>Internal</b><p>This element enables heartbeat-to-ack latency among Cyclone DDS services by prepending timestamps to Heartbeat and AckNack messages and calculating round trip times. This is non-standard behaviour. The measured latencies are quite noisy and are currently not used anywhere.</p>
]]></comment> ]]></comment>
<default>false</default> <default>false</default>
</leafBoolean> </leafBoolean>
<leafString name="MinimumSocketReceiveBufferSize" minOccurrences="0" maxOccurrences="1"> <leafString name="MinimumSocketReceiveBufferSize" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This setting controls the minimum size of socket receive buffers. The operating system provides some size receive buffer upon creation of the socket, this option can be used to increase the size of the buffer beyond that initially provided by the operating system. If the buffer size cannot be increased to the specified size, an error is reported.</p> <b>Internal</b><p>This setting controls the minimum size of socket receive buffers. The operating system provides some size receive buffer upon creation of the socket, this option can be used to increase the size of the buffer beyond that initially provided by the operating system. If the buffer size cannot be increased to the specified size, an error is reported.</p>
<p>The default setting is the word "default", which means DDSI2E will attempt to increase the buffer size to 1MB, but will silently accept a smaller buffer should that attempt fail.</p> <p>The default setting is the word "default", which means Cyclone DDS will attempt to increase the buffer size to 1MB, but will silently accept a smaller buffer should that attempt fail.</p>
<p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p> <p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
@ -708,13 +616,12 @@ When an application is run without Administrative priveleges then only the diffs
<b>Internal</b><p>This element controls whether all traffic is handled by a single receive thread or whether multiple receive threads may be used to improve latency. Currently multiple receive threads are only used for connectionless transport (e.g., UDP) and ManySocketsMode not set to single (the default).</p> <b>Internal</b><p>This element controls whether all traffic is handled by a single receive thread or whether multiple receive threads may be used to improve latency. Currently multiple receive threads are only used for connectionless transport (e.g., UDP) and ManySocketsMode not set to single (the default).</p>
]]></comment> ]]></comment>
<default>true</default> <default>true</default>
<attributeString name="maxretries" required="false"> <attributeInt name="maxretries" required="false">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>Receive threads dedicated to a single socket can only be triggered for termination by sending a packet. Reception of any packet will do, so termination failure due to packet loss is exceedingly unlikely, but to eliminate all risks, it will retry as many times as specified by this attribute before aborting.</p> <b>Internal</b><p>Receive threads dedicated to a single socket can only be triggered for termination by sending a packet. Reception of any packet will do, so termination failure due to packet loss is exceedingly unlikely, but to eliminate all risks, it will retry as many times as specified by this attribute before aborting.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <default>2000000000</default>
<default>4294967295</default> </attributeInt>
</attributeString>
</leafBoolean> </leafBoolean>
<leafString name="NackDelay" minOccurrences="0" maxOccurrences="1"> <leafString name="NackDelay" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
@ -740,7 +647,7 @@ When an application is run without Administrative priveleges then only the diffs
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This element sets the maximum size in samples of a primary re-order administration. Each proxy writer has one primary re-order administration to buffer the packet flow in case some packets arrive out of order. Old samples are forwarded to secondary re-order administrations associated with readers in need of historical data.</p> <b>Internal</b><p>This element sets the maximum size in samples of a primary re-order administration. Each proxy writer has one primary re-order administration to buffer the packet flow in case some packets arrive out of order. Old samples are forwarded to secondary re-order administrations associated with readers in need of historical data.</p>
]]></comment> ]]></comment>
<default>64</default> <default>128</default>
</leafInt> </leafInt>
<leafBoolean name="PrioritizeRetransmit" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="PrioritizeRetransmit" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
@ -750,14 +657,14 @@ When an application is run without Administrative priveleges then only the diffs
</leafBoolean> </leafBoolean>
<leafString name="RediscoveryBlacklistDuration" minOccurrences="0" maxOccurrences="1"> <leafString name="RediscoveryBlacklistDuration" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This element controls for how long a remote participant that was previously deleted will remain on a blacklist to prevent rediscovery, giving the software on a node time to perform any cleanup actions it needs to do. To some extent this delay is required internally by DDSI2E, but in the default configuration with the 'enforce' attribute set to false, DDSI2E will reallow rediscovery as soon as it has cleared its internal administration. Setting it to too small a value may result in the entry being pruned from the blacklist before DDSI2E is ready, it is therefore recommended to set it to at least several seconds.</p> <b>Internal</b><p>This element controls for how long a remote participant that was previously deleted will remain on a blacklist to prevent rediscovery, giving the software on a node time to perform any cleanup actions it needs to do. To some extent this delay is required internally by Cyclone DDS, but in the default configuration with the 'enforce' attribute set to false, Cyclone DDS will reallow rediscovery as soon as it has cleared its internal administration. Setting it to too small a value may result in the entry being pruned from the blacklist before Cyclone DDS is ready, it is therefore recommended to set it to at least several seconds.</p>
<p>Valid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.</p> <p>Valid values are finite durations with an explicit unit or the keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, day.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default>10s</default> <default>10s</default>
<attributeBoolean name="enforce" required="false"> <attributeBoolean name="enforce" required="false">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This attribute controls whether the configured time during which recently deleted participants will not be rediscovered (i.e., "black listed") is enforced and following complete removal of the participant in DDSI2E, or whether it can be rediscovered earlier provided all traces of that participant have been removed already.</p> <b>Internal</b><p>This attribute controls whether the configured time during which recently deleted participants will not be rediscovered (i.e., "black listed") is enforced and following complete removal of the participant in Cyclone DDS, or whether it can be rediscovered earlier provided all traces of that participant have been removed already.</p>
]]></comment> ]]></comment>
<default>false</default> <default>false</default>
</attributeBoolean> </attributeBoolean>
@ -768,12 +675,12 @@ When an application is run without Administrative priveleges then only the diffs
<ul><li><i>never</i>: retransmit only to the NACK-ing reader;</li> <ul><li><i>never</i>: retransmit only to the NACK-ing reader;</li>
<li><i>adaptive</i>: attempt to combine retransmits needed for reliability, but send historical (transient-local) data to the requesting reader only;</li> <li><i>adaptive</i>: attempt to combine retransmits needed for reliability, but send historical (transient-local) data to the requesting reader only;</li>
<li><i>always</i>: do not distinguish between different causes, always try to merge.</li></ul> <li><i>always</i>: do not distinguish between different causes, always try to merge.</li></ul>
<p>The default is <i>adaptive</i>. See also Internal/RetransmitMergingPeriod.</p> <p>The default is <i>never</i>. See also Internal/RetransmitMergingPeriod.</p>
]]></comment> ]]></comment>
<value>never</value> <value>never</value>
<value>adaptive</value> <value>adaptive</value>
<value>always</value> <value>always</value>
<default>adaptive</default> <default>never</default>
</leafEnum> </leafEnum>
<leafString name="RetransmitMergingPeriod" minOccurrences="0" maxOccurrences="1"> <leafString name="RetransmitMergingPeriod" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
@ -816,7 +723,7 @@ When an application is run without Administrative priveleges then only the diffs
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This element sets the maximum size in samples of a secondary re-order administration. The secondary re-order administration is per reader in need of historical data.</p> <b>Internal</b><p>This element sets the maximum size in samples of a secondary re-order administration. The secondary re-order administration is per reader in need of historical data.</p>
]]></comment> ]]></comment>
<default>16</default> <default>128</default>
</leafInt> </leafInt>
<leafBoolean name="SendAsync" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="SendAsync" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
@ -826,14 +733,7 @@ When an application is run without Administrative priveleges then only the diffs
</leafBoolean> </leafBoolean>
<leafBoolean name="SquashParticipants" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="SquashParticipants" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This element controls whether DDSI2E advertises all the domain participants it serves in DDSI (when set to <i>false</i>), or rather only one domain participant (the one corresponding to the DDSI2E process; when set to <i>true</i>). In the latter case DDSI2E becomes the virtual owner of all readers and writers of all domain participants, dramatically reducing discovery traffic (a similar effect can be obtained by setting Internal/BuiltinEndpointSet to "minimal" but with less loss of information).</p> <b>Internal</b><p>This element controls whether Cyclone DDS advertises all the domain participants it serves in DDSI (when set to <i>false</i>), or rather only one domain participant (the one corresponding to the Cyclone DDS process; when set to <i>true</i>). In the latter case Cyclone DDS becomes the virtual owner of all readers and writers of all domain participants, dramatically reducing discovery traffic (a similar effect can be obtained by setting Internal/BuiltinEndpointSet to "minimal" but with less loss of information).</p>
]]></comment>
<default>false</default>
</leafBoolean>
<leafBoolean name="SuppressSPDPMulticast" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<b>Internal</b><p>The element controls whether the mandatory multicasting of the participant discovery packets occurs. Completely disabling multicasting requires this element be set to <i>true</i>, and generally requires explicitly listing peers to ping for unicast discovery.</p>
<p>See also General/AllowMulticast.</p>
]]></comment> ]]></comment>
<default>false</default> <default>false</default>
</leafBoolean> </leafBoolean>
@ -880,13 +780,13 @@ When an application is run without Administrative priveleges then only the diffs
]]></comment> ]]></comment>
<leafBoolean name="WhcAdaptive" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="WhcAdaptive" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This element controls whether DDSI2E will adapt the high-water mark to current traffic conditions, based on retransmit requests and transmit pressure.</p> <b>Internal</b><p>This element controls whether Cyclone DDS will adapt the high-water mark to current traffic conditions, based on retransmit requests and transmit pressure.</p>
]]></comment> ]]></comment>
<default>true</default> <default>true</default>
</leafBoolean> </leafBoolean>
<leafString name="WhcHigh" minOccurrences="0" maxOccurrences="1"> <leafString name="WhcHigh" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This element sets the maximum allowed high-water mark for the DDSI2E WHCs, expressed in bytes. A writer is suspended when the WHC reaches this size.</p> <b>Internal</b><p>This element sets the maximum allowed high-water mark for the Cyclone DDS WHCs, expressed in bytes. A writer is suspended when the WHC reaches this size.</p>
<p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p> <p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
@ -894,7 +794,7 @@ When an application is run without Administrative priveleges then only the diffs
</leafString> </leafString>
<leafString name="WhcHighInit" minOccurrences="0" maxOccurrences="1"> <leafString name="WhcHighInit" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This element sets the initial level of the high-water mark for the DDSI2E WHCs, expressed in bytes.</p> <b>Internal</b><p>This element sets the initial level of the high-water mark for the Cyclone DDS WHCs, expressed in bytes.</p>
<p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p> <p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
@ -902,7 +802,7 @@ When an application is run without Administrative priveleges then only the diffs
</leafString> </leafString>
<leafString name="WhcLow" minOccurrences="0" maxOccurrences="1"> <leafString name="WhcLow" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<b>Internal</b><p>This element sets the low-water mark for the DDSI2E WHCs, expressed in bytes. A suspended writer resumes transmitting when its DDSI2E WHC shrinks to this size.</p> <b>Internal</b><p>This element sets the low-water mark for the Cyclone DDS WHCs, expressed in bytes. A suspended writer resumes transmitting when its Cyclone DDS WHC shrinks to this size.</p>
<p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p> <p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
@ -928,19 +828,20 @@ When an application is run without Administrative priveleges then only the diffs
</element> </element>
<element name="Partitioning" minOccurrences="0" maxOccurrences="1"> <element name="Partitioning" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>The Partitioning element specifies DDSI2E network partitions and how DCPS partition/topic combinations are mapped onto the network partitions.</p> <p>The Partitioning element specifies Cyclone DDS network partitions and how DCPS partition/topic combinations are mapped onto the network partitions.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength>
<element name="IgnoredPartitions" minOccurrences="0" maxOccurrences="0"> <element name="IgnoredPartitions" minOccurrences="0" maxOccurrences="0">
<comment><![CDATA[ <comment><![CDATA[
<p>The IgnoredPartitions element specifies DCPS partition/topic combinations that are not distributed over the network.</p> <p>The IgnoredPartitions element specifies DCPS partition/topic combinations that are not distributed over the network.</p>
]]></comment> ]]></comment>
<element name="IgnoredPartition" minOccurrences="0" maxOccurrences="0"> <element name="IgnoredPartition" minOccurrences="0" maxOccurrences="0">
<comment><![CDATA[ <comment><![CDATA[
<p>This element can be used to prevent certain combinations of DCPS partition and topic from being transmitted over the network. DDSI2E will complete ignore readers and writers for which all DCPS partitions as well as their topic is ignored, not even creating DDSI readers and writers to mirror the DCPS ones.</p> <p>This element can be used to prevent certain combinations of DCPS partition and topic from being transmitted over the network. Cyclone DDS will complete ignore readers and writers for which all DCPS partitions as well as their topic is ignored, not even creating DDSI readers and writers to mirror the DCPS ones.</p>
]]></comment> ]]></comment>
<attributeString name="DCPSPartitionTopic" required="true"> <attributeString name="DCPSPartitionTopic" required="true">
<comment><![CDATA[ <comment><![CDATA[
<p>This attribute specifies a partition and a topic expression, separated by a single '.', that are used to determine if a given partition and topic will be ignored or not. The expressions may use the usual wildcards '*' and '?'. DDSI2E will consider an wildcard DCPS partition to match an expression iff there exists a string that satisfies both expressions.</p> <p>This attribute specifies a partition and a topic expression, separated by a single '.', that are used to determine if a given partition and topic will be ignored or not. The expressions may use the usual wildcards '*' and '?'. Cyclone DDS will consider an wildcard DCPS partition to match an expression iff there exists a string that satisfies both expressions.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default></default> <default></default>
@ -949,11 +850,11 @@ When an application is run without Administrative priveleges then only the diffs
</element> </element>
<element name="NetworkPartitions" minOccurrences="0" maxOccurrences="0"> <element name="NetworkPartitions" minOccurrences="0" maxOccurrences="0">
<comment><![CDATA[ <comment><![CDATA[
<p>The NetworkPartitions element specifies the DDSI2E network partitions.</p> <p>The NetworkPartitions element specifies the Cyclone DDS network partitions.</p>
]]></comment> ]]></comment>
<element name="NetworkPartition" minOccurrences="0" maxOccurrences="0"> <element name="NetworkPartition" minOccurrences="0" maxOccurrences="0">
<comment><![CDATA[ <comment><![CDATA[
<p>This element defines a DDSI2E network partition.</p> <p>This element defines a Cyclone DDS network partition.</p>
]]></comment> ]]></comment>
<attributeString name="Address" required="true"> <attributeString name="Address" required="true">
<comment><![CDATA[ <comment><![CDATA[
@ -970,14 +871,14 @@ When an application is run without Administrative priveleges then only the diffs
</attributeBoolean> </attributeBoolean>
<attributeString name="Name" required="true"> <attributeString name="Name" required="true">
<comment><![CDATA[ <comment><![CDATA[
<p>This attribute specifies the name of this DDSI2E network partition. Two network partitions cannot have the same name.</p> <p>This attribute specifies the name of this Cyclone DDS network partition. Two network partitions cannot have the same name.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default></default> <default></default>
</attributeString> </attributeString>
<attributeString name="SecurityProfile" required="false"> <attributeString name="SecurityProfile" required="false">
<comment><![CDATA[ <comment><![CDATA[
<p>This attribute selects the DDSI2E security profile for encrypting the traffic mapped to this DDSI2E network partition. The default "null" means the network partition is unsecured; any other name refers to a security profile defined using the Security/SecurityProfile elements.</p> <p>This attribute selects the Cyclone DDS security profile for encrypting the traffic mapped to this Cyclone DDS network partition. The default "null" means the network partition is unsecured; any other name refers to a security profile defined using the Security/SecurityProfile elements.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default>null</default> <default>null</default>
@ -986,22 +887,22 @@ When an application is run without Administrative priveleges then only the diffs
</element> </element>
<element name="PartitionMappings" minOccurrences="0" maxOccurrences="0"> <element name="PartitionMappings" minOccurrences="0" maxOccurrences="0">
<comment><![CDATA[ <comment><![CDATA[
<p>The PartitionMappings element specifies the mapping from DCPS partition/topic combinations to DDSI2E network partitions.</p> <p>The PartitionMappings element specifies the mapping from DCPS partition/topic combinations to Cyclone DDS network partitions.</p>
]]></comment> ]]></comment>
<element name="PartitionMapping" minOccurrences="0" maxOccurrences="0"> <element name="PartitionMapping" minOccurrences="0" maxOccurrences="0">
<comment><![CDATA[ <comment><![CDATA[
<p>This element defines a mapping from a DCPS partition/topic combination to a DDSI2E network partition. This allows partitioning data flows by using special multicast addresses for part of the data and possibly also encrypting the data flow.</p> <p>This element defines a mapping from a DCPS partition/topic combination to a Cyclone DDS network partition. This allows partitioning data flows by using special multicast addresses for part of the data and possibly also encrypting the data flow.</p>
]]></comment> ]]></comment>
<attributeString name="DCPSPartitionTopic" required="true"> <attributeString name="DCPSPartitionTopic" required="true">
<comment><![CDATA[ <comment><![CDATA[
<p>This attribute specifies a partition and a topic expression, separated by a single '.', that are used to determine if a given partition and topic maps to the DDSI2E network partition named by the NetworkPartition attribute in this PartitionMapping element. The expressions may use the usual wildcards '*' and '?'. DDSI2E will consider a wildcard DCPS partition to match an expression if there exists a string that satisfies both expressions.</p> <p>This attribute specifies a partition and a topic expression, separated by a single '.', that are used to determine if a given partition and topic maps to the Cyclone DDS network partition named by the NetworkPartition attribute in this PartitionMapping element. The expressions may use the usual wildcards '*' and '?'. Cyclone DDS will consider a wildcard DCPS partition to match an expression if there exists a string that satisfies both expressions.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default></default> <default></default>
</attributeString> </attributeString>
<attributeString name="NetworkPartition" required="true"> <attributeString name="NetworkPartition" required="true">
<comment><![CDATA[ <comment><![CDATA[
<p>This attribute specifies which DDSI2E network partition is to be used for DCPS partition/topic combinations matching the DCPSPartitionTopic attribute within this PartitionMapping element.</p> <p>This attribute specifies which Cyclone DDS network partition is to be used for DCPS partition/topic combinations matching the DCPSPartitionTopic attribute within this PartitionMapping element.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default></default> <default></default>
@ -1013,6 +914,7 @@ When an application is run without Administrative priveleges then only the diffs
<comment><![CDATA[ <comment><![CDATA[
<p>The SSL element allows specifying various parameters related to using SSL/TLS for DDSI over TCP.</p> <p>The SSL element allows specifying various parameters related to using SSL/TLS for DDSI over TCP.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength>
<leafBoolean name="CertificateVerification" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="CertificateVerification" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>If disabled this allows SSL connections to occur even if an X509 certificate fails verification.</p> <p>If disabled this allows SSL connections to occur even if an X509 certificate fails verification.</p>
@ -1053,14 +955,13 @@ When an application is run without Administrative priveleges then only the diffs
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default>keystore</default> <default>keystore</default>
</leafString> </leafString>
<leafEnum name="MinimumTLSVersion" minOccurrences="0" maxOccurrences="1"> <leafString name="MinimumTLSVersion" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>The minimum TLS version that may be negotiated, valid values are 1.2 and 1.3.</p> <p>The minimum TLS version that may be negotiated, valid values are 1.2 and 1.3.</p>
]]></comment> ]]></comment>
<value>1.2</value> <maxLength>0</maxLength>
<value>1.3</value>
<default>1.3</default> <default>1.3</default>
</leafEnum> </leafString>
<leafBoolean name="SelfSignedCertificates" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="SelfSignedCertificates" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This enables the use of self signed X509 certificates.</p> <p>This enables the use of self signed X509 certificates.</p>
@ -1076,11 +977,12 @@ When an application is run without Administrative priveleges then only the diffs
</element> </element>
<element name="Security" minOccurrences="0" maxOccurrences="1"> <element name="Security" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>The Security element specifies DDSI2E security profiles that can be used to encrypt traffic mapped to DDSI2E network partitions.</p> <p>The Security element specifies Cyclone DDS security profiles that can be used to encrypt traffic mapped to Cyclone DDS network partitions.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength>
<element name="SecurityProfile" minOccurrences="0" maxOccurrences="0"> <element name="SecurityProfile" minOccurrences="0" maxOccurrences="0">
<comment><![CDATA[ <comment><![CDATA[
<p>This element defines a DDSI2E security profile.</p> <p>This element defines a Cyclone DDS security profile.</p>
]]></comment> ]]></comment>
<attributeEnum name="Cipher" required="false"> <attributeEnum name="Cipher" required="false">
<comment><![CDATA[ <comment><![CDATA[
@ -1111,7 +1013,7 @@ When an application is run without Administrative priveleges then only the diffs
</attributeString> </attributeString>
<attributeString name="Name" required="true"> <attributeString name="Name" required="true">
<comment><![CDATA[ <comment><![CDATA[
<p>This attribute specifies the name of this DDSI2E security profile. Two security profiles cannot have the same name.</p> <p>This attribute specifies the name of this Cyclone DDS security profile. Two security profiles cannot have the same name.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default></default> <default></default>
@ -1122,6 +1024,7 @@ When an application is run without Administrative priveleges then only the diffs
<comment><![CDATA[ <comment><![CDATA[
<p>The Sizing element specifies a variety of configuration settings dealing with expected system sizes, buffer sizes, &c.</p> <p>The Sizing element specifies a variety of configuration settings dealing with expected system sizes, buffer sizes, &c.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength>
<leafString name="ReceiveBufferChunkSize" minOccurrences="0" maxOccurrences="1"> <leafString name="ReceiveBufferChunkSize" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element specifies the size of one allocation unit in the receive buffer. Must be greater than the maximum packet size by a modest amount (too large packets are dropped). Each allocation is shrunk immediately after processing a message, or freed straightaway.</p> <p>This element specifies the size of one allocation unit in the receive buffer. Must be greater than the maximum packet size by a modest amount (too large packets are dropped). Each allocation is shrunk immediately after processing a message, or freed straightaway.</p>
@ -1130,48 +1033,20 @@ When an application is run without Administrative priveleges then only the diffs
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default>128 KiB</default> <default>128 KiB</default>
</leafString> </leafString>
<element name="Watermarks" minOccurrences="0" maxOccurrences="1"> <leafString name="ReceiveBufferSize" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element sets the size of a single receive buffer. Many receive buffers may be needed. The minimum workable size a little bit larger than Sizing/ReceiveBufferChunkSize, and the value used is taken as the configured value and the actual minimum workable size.</p>
{ LEAF("ReceiveBufferSize"), 1, "1 MiB", ABSOFF(rbuf_size), 0, uf_memsize, 0, pf_memsize, <p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p>
"<p>This element sets the size of a single receive buffer. Many receive buffers may be needed. Their size must be greater than ReceiveBufferChunkSize by a modest amount.</p>
]]></comment> ]]></comment>
<leafBoolean name="WhcAdaptive" minOccurrences="0" maxOccurrences="1"> <maxLength>0</maxLength>
<comment><![CDATA[ <default>1 MiB</default>
<p>This element controls whether DDSI2E will adapt the high-water mark to current traffic conditions, based on retransmit requests and transmit pressure.</p> </leafString>
]]></comment>
<default>true</default>
</leafBoolean>
<leafString name="WhcHigh" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<p>This element sets the maximum allowed high-water mark for the DDSI2E WHCs, expressed in bytes. A writer is suspended when the WHC reaches this size.</p>
<p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p>
]]></comment>
<maxLength>0</maxLength>
<default>100 kB</default>
</leafString>
<leafString name="WhcHighInit" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<p>This element sets the initial level of the high-water mark for the DDSI2E WHCs, expressed in bytes.</p>
<p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p>
]]></comment>
<maxLength>0</maxLength>
<default>30 kB</default>
</leafString>
<leafString name="WhcLow" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<p>This element sets the low-water mark for the DDSI2E WHCs, expressed in bytes. A suspended writer resumes transmitting when its DDSI2E WHC shrinks to this size.</p>
<p>The unit must be specified explicitly. Recognised units: B (bytes), kB & KiB (2<sup>10</sup> bytes), MB & MiB (2<sup>20</sup> bytes), GB & GiB (2<sup>30</sup> bytes).</p>
]]></comment>
<maxLength>0</maxLength>
<default>1 kB</default>
</leafString>
</element>
</element> </element>
<element name="TCP" minOccurrences="0" maxOccurrences="1"> <element name="TCP" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>The TCP element allows specifying various parameters related to running DDSI over TCP.</p> <p>The TCP element allows specifying various parameters related to running DDSI over TCP.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength>
<leafBoolean name="AlwaysUsePeeraddrForUnicast" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="AlwaysUsePeeraddrForUnicast" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>Setting this to true means the unicast addresses in SPDP packets will be ignored and the peer address from the TCP connection will be used instead. This may help work around incorrectly advertised addresses when using TCP.</p> <p>Setting this to true means the unicast addresses in SPDP packets will be ignored and the peer address from the TCP connection will be used instead. This may help work around incorrectly advertised addresses when using TCP.</p>
@ -1195,7 +1070,7 @@ When an application is run without Administrative priveleges then only the diffs
</leafBoolean> </leafBoolean>
<leafInt name="Port" minOccurrences="0" maxOccurrences="1"> <leafInt name="Port" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element specifies the TCP port number on which DDSI2E accepts connections. If the port is set it is used in entity locators, published with DDSI discovery. Dynamically allocated if zero. Disabled if -1 or not configured. If disabled other DDSI services will not be able to establish connections with the service, the service can only communicate by establishing connections to other services.</p> <p>This element specifies the TCP port number on which Cyclone DDS accepts connections. If the port is set it is used in entity locators, published with DDSI discovery. Dynamically allocated if zero. Disabled if -1 or not configured. If disabled other DDSI services will not be able to establish connections with the service, the service can only communicate by establishing connections to other services.</p>
]]></comment> ]]></comment>
<minimum>-1</minimum> <minimum>-1</minimum>
<maximum>65535</maximum> <maximum>65535</maximum>
@ -1226,6 +1101,7 @@ When an application is run without Administrative priveleges then only the diffs
<comment><![CDATA[ <comment><![CDATA[
<p>The ThreadPool element allows specifying various parameters related to using a thread pool to send DDSI messages to multiple unicast addresses (TCP or UDP).</p> <p>The ThreadPool element allows specifying various parameters related to using a thread pool to send DDSI messages to multiple unicast addresses (TCP or UDP).</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength>
<leafBoolean name="Enable" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="Enable" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element enables the optional thread pool.</p> <p>This element enables the optional thread pool.</p>
@ -1249,7 +1125,8 @@ When an application is run without Administrative priveleges then only the diffs
<comment><![CDATA[ <comment><![CDATA[
<p>This element is used to set thread properties.</p> <p>This element is used to set thread properties.</p>
]]></comment> ]]></comment>
<element name="Thread" minOccurrences="0" maxOccurrences="1000"> <maxLength>0</maxLength>
<element name="Thread" minOccurrences="0" maxOccurrences="0">
<comment><![CDATA[ <comment><![CDATA[
<p>This element is used to set thread properties.</p> <p>This element is used to set thread properties.</p>
]]></comment> ]]></comment>
@ -1304,6 +1181,7 @@ When an application is run without Administrative priveleges then only the diffs
<comment><![CDATA[ <comment><![CDATA[
<p>The Tracing element controls the amount and type of information that is written into the tracing log by the DDSI service. This is useful to track the DDSI service during application development.</p> <p>The Tracing element controls the amount and type of information that is written into the tracing log by the DDSI service. This is useful to track the DDSI service during application development.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength>
<leafBoolean name="AppendToFile" minOccurrences="0" maxOccurrences="1"> <leafBoolean name="AppendToFile" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This option specifies whether the output is to be appended to an existing log file. The default is to create a new log file each time, which is generally the best option if a detailed log is generated.</p> <p>This option specifies whether the output is to be appended to an existing log file. The default is to create a new log file each time, which is generally the best option if a detailed log is generated.</p>
@ -1338,7 +1216,7 @@ When an application is run without Administrative priveleges then only the diffs
<p>This option specifies where the logging is printed to. Note that <i>stdout</i> and <i>stderr</i> are treated as special values, representing "standard out" and "standard error" respectively. No file is created unless logging categories are enabled using the Tracing/Verbosity or Tracing/EnabledCategory settings.</p> <p>This option specifies where the logging is printed to. Note that <i>stdout</i> and <i>stderr</i> are treated as special values, representing "standard out" and "standard error" respectively. No file is created unless logging categories are enabled using the Tracing/Verbosity or Tracing/EnabledCategory settings.</p>
]]></comment> ]]></comment>
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default>.log</default> <default>cyclonedds.log</default>
</leafString> </leafString>
<leafString name="PacketCaptureFile" minOccurrences="0" maxOccurrences="1"> <leafString name="PacketCaptureFile" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
@ -1347,22 +1225,10 @@ When an application is run without Administrative priveleges then only the diffs
<maxLength>0</maxLength> <maxLength>0</maxLength>
<default></default> <default></default>
</leafString> </leafString>
<leafBoolean name="Timestamps" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<p>This option has no effect.</p>
]]></comment>
<default>true</default>
<attributeBoolean name="absolute" required="false">
<comment><![CDATA[
<p>This option has no effect</p>
]]></comment>
<default>true</default>
</attributeBoolean>
</leafBoolean>
<leafEnum name="Verbosity" minOccurrences="0" maxOccurrences="1"> <leafEnum name="Verbosity" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[ <comment><![CDATA[
<p>This element enables standard groups of categories, based on a desired verbosity level. This is in addition to the categories enabled by the Tracing/EnableCategory setting. Recognised verbosity levels and the categories they map to are:</p> <p>This element enables standard groups of categories, based on a desired verbosity level. This is in addition to the categories enabled by the Tracing/EnableCategory setting. Recognised verbosity levels and the categories they map to are:</p>
<ul><li><i>none</i>: no DDSI2E log</li> <ul><li><i>none</i>: no Cyclone DDS log</li>
<li><i>severe</i>: error and fatal</li> <li><i>severe</i>: error and fatal</li>
<li><i>warning</i>: <i>severe</i> + warning</li> <li><i>warning</i>: <i>severe</i> + warning</li>
<li><i>info</i>: <i>warning</i> + info</li> <li><i>info</i>: <i>warning</i> + info</li>
@ -1370,7 +1236,7 @@ When an application is run without Administrative priveleges then only the diffs
<li><i>fine</i>: <i>config</i> + discovery</li> <li><i>fine</i>: <i>config</i> + discovery</li>
<li><i>finer</i>: <i>fine</i> + traffic and timing</li> <li><i>finer</i>: <i>fine</i> + traffic and timing</li>
<li><i>finest</i>: <i>finer</i> + trace</li></ul> <li><i>finest</i>: <i>finer</i> + trace</li></ul>
<p>While <i>none</i> prevents any message from being written to a DDSI2 log file.</p> <p>While <i>none</i> prevents any message from being written to a Cyclone DDS log file.</p>
<p>The categorisation of tracing output is incomplete and hence most of the verbosity levels and categories are not of much use in the current release. This is an ongoing process and here we describe the target situation rather than the current situation. Currently, the most useful verbosity levels are <i>config</i>, <i>fine</i> and <i>finest</i>.</p> <p>The categorisation of tracing output is incomplete and hence most of the verbosity levels and categories are not of much use in the current release. This is an ongoing process and here we describe the target situation rather than the current situation. Currently, the most useful verbosity levels are <i>config</i>, <i>fine</i> and <i>finest</i>.</p>
]]></comment> ]]></comment>
<value>finest</value> <value>finest</value>
@ -1384,40 +1250,5 @@ When an application is run without Administrative priveleges then only the diffs
<default>none</default> <default>none</default>
</leafEnum> </leafEnum>
</element> </element>
<element name="Watchdog" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<p>This element specifies the type of OS scheduling class will be used by the thread that announces its liveliness periodically.</p>
]]></comment>
<element name="Scheduling" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<p>This element specifies the type of OS scheduling class will be used by the thread that announces its liveliness periodically.</p>
]]></comment>
<leafEnum name="Class" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<p>This element specifies the thread scheduling class that will be used by the watchdog thread. The user may need the appropriate privileges from the underlying operating system to be able to assign some of the privileged scheduling classes.</p>
]]></comment>
<value>realtime</value>
<value>timeshare</value>
<value>default</value>
<default>default</default>
</leafEnum>
<leafInt name="Priority" minOccurrences="0" maxOccurrences="1">
<comment><![CDATA[
<p>This element specifies the thread priority. Only priorities that are supported by the underlying operating system can be assigned to this element. The user may need special privileges from the underlying operating system to be able to assign some of the privileged priorities.</p>
]]></comment>
<default>0</default>
<attributeEnum name="priority_kind" required="false">
<comment><![CDATA[
<p>This attribute specifies whether the specified Priority is a relative or absolute priority.</p>
]]></comment>
<value>relative</value>
<value>absolute</value>
<default>relative</default>
</attributeEnum>
</leafInt>
</element>
</element>
</element> </element>
<!-- END DDSI2E CONFIGURATION AUTOMAGICALLY GENERATED (see extract-config-xml.pl) -->
</splice_meta_config> </splice_meta_config>

View file

@ -15,17 +15,16 @@ import org.eclipse.cyclonedds.common.util.Initializer;
import org.eclipse.cyclonedds.common.util.Report; import org.eclipse.cyclonedds.common.util.Report;
import org.eclipse.cyclonedds.config.swing.ConfigWindow; import org.eclipse.cyclonedds.config.swing.ConfigWindow;
public class SpliceConfig extends Initializer { public class CycloneConfig extends Initializer {
/** /**
* Starts Splice Tuner. This function is the main class of Splice Tuner; * Starts configuration. This function is the main class.
* - It checks for the right version of the JVM, this must be 1.5.0. *
* - It passes on the commandline arguments. Arguments that are supported * - It passes on the commandline arguments. Arguments that are supported
* are: * are:
* -# <java_properties_file> * -# <java_properties_file>
* *
* @param args These are passed on to the initialize function of the * @param args These are passed on to the initialize function
* SpliceTuner object.
*/ */
public static void main(String[] args) { public static void main(String[] args) {
boolean redirect = true; boolean redirect = true;
@ -33,7 +32,7 @@ public class SpliceConfig extends Initializer {
String[] args2; String[] args2;
String uri = null; String uri = null;
SpliceConfig t = new SpliceConfig(); CycloneConfig t = new CycloneConfig();
for (int i = 0; i < args.length; i++) { for (int i = 0; i < args.length; i++) {
if ("-noredirect".equals(args[i])) { if ("-noredirect".equals(args[i])) {

View file

@ -614,14 +614,8 @@ public class ConfigWindow extends MainWindow implements DataConfigurationListene
try { try {
List<URL> imgUrls = new ArrayList<URL>(4); List<URL> imgUrls = new ArrayList<URL>(4);
// Expected location of the icons in tuner jar // Expected location of the icons in tuner jar
URL url = getClass().getResource("/resources/ptlogoc16.png"); //URL url = getClass().getResource("/resources/LOGO.png");
imgUrls.add(url != null ? url : getClass().getResource("/ptlogoc16.png")); //imgUrls.add(url != null ? url : getClass().getResource("/ptlogoc16.png"));
url = getClass().getResource("/resources/ptlogoc24.png");
imgUrls.add(url != null ? url : getClass().getResource("/ptlogoc24.png"));
url = getClass().getResource("/resources/ptlogoc32.png");
imgUrls.add(url != null ? url : getClass().getResource("/ptlogoc32.png"));
url = getClass().getResource("/resources/ptlogoc48.png");
imgUrls.add(url != null ? url : getClass().getResource("/ptlogoc48.png"));
appLogos = new ArrayList<Image>(4); appLogos = new ArrayList<Image>(4);
for (URL imgUrl : imgUrls) { for (URL imgUrl : imgUrls) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 717 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 929 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -1549,6 +1549,7 @@ OPTIONS:\n\
-M DUR require those participants to match within DUR seconds\n\ -M DUR require those participants to match within DUR seconds\n\
-R TREF timestamps in the output relative to TREF instead of\n\ -R TREF timestamps in the output relative to TREF instead of\n\
process start\n\ process start\n\
-i ID use domain ID instead of the default domain\n\
\n\ \n\
MODE... is zero or more of:\n\ MODE... is zero or more of:\n\
ping [R[Hz]] [size S] [waitset|listener]\n\ ping [R[Hz]] [size S] [waitset|listener]\n\
@ -1856,7 +1857,7 @@ int main (int argc, char *argv[])
argv0 = argv[0]; argv0 = argv[0];
while ((opt = getopt (argc, argv, "cd:D:n:k:uLK:T:M:N:R:h")) != EOF) while ((opt = getopt (argc, argv, "cd:D:i:n:k:uLK:T:M:N:R:h")) != EOF)
{ {
switch (opt) switch (opt)
{ {
@ -1872,6 +1873,7 @@ int main (int argc, char *argv[])
break; break;
} }
case 'D': dur = atof (optarg); if (dur <= 0) dur = HUGE_VAL; break; case 'D': dur = atof (optarg); if (dur <= 0) dur = HUGE_VAL; break;
case 'i': did = (dds_domainid_t) atoi (optarg); break;
case 'n': nkeyvals = (unsigned) atoi (optarg); break; case 'n': nkeyvals = (unsigned) atoi (optarg); break;
case 'u': reliable = false; break; case 'u': reliable = false; break;
case 'k': histdepth = atoi (optarg); if (histdepth < 0) histdepth = 0; break; case 'k': histdepth = atoi (optarg); if (histdepth < 0) histdepth = 0; break;