Eliminate domain-specific global variables

This commit moves all but a handful of the global variables into the
domain object, in particular including the DDSI configuration, globals
and all transport internal state.

The goal of this commit is not to produce the nicest code possible, but
to get a working version that can support multiple simultaneous domains.
Various choices are driven by this desire and it is expected that some
of the changes will have to be undone.  (E.g., passing the DDSI globals
into address set operations and locator printing because there is no
other way to figure out what transport to use for a given locator;
storing the transport pointer inside the locator would solve that.)

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-07-04 20:49:22 +02:00 committed by eboasson
parent 8a591fdc9b
commit c1f3ad8a22
93 changed files with 2802 additions and 2915 deletions

View file

@ -147,6 +147,9 @@ static dds_entity_t prepare_dds(dds_entity_t *writer, const char *partitionName)
if (participant < 0)
DDS_FATAL("dds_create_participant: %s\n", dds_strretcode(-participant));
/* Enable write batching */
dds_write_set_batch (true);
/* A topic is created for our sample type on the domain participant. */
topic = dds_create_topic (participant, &ThroughputModule_DataType_desc, "Throughput", NULL, NULL);
if (topic < 0)
@ -171,9 +174,6 @@ static dds_entity_t prepare_dds(dds_entity_t *writer, const char *partitionName)
DDS_FATAL("dds_create_writer: %s\n", dds_strretcode(-*writer));
dds_delete_qos (dwQos);
/* Enable write batching */
dds_write_set_batch (true);
return participant;
}