Rename nn_plist, xqos to ddsi_plist, xqos

This already was leaking out in the interface, so this name change was
needed too.  The relationship between plist and xqos being so intimate,
doing the one but not the other made no sense.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2020-02-03 10:35:31 +01:00 committed by eboasson
parent 551dae69a4
commit ad19f571ae
45 changed files with 481 additions and 482 deletions

View file

@ -50,6 +50,8 @@ extern "C" {
#endif
struct dds_rhc;
struct ddsi_plist;
struct ddsi_sertopic;
struct ddsi_serdata;
#define DDS_MIN_PSEUDO_HANDLE ((dds_entity_t) 0x7fff0000)
@ -996,8 +998,6 @@ dds_create_topic(
const dds_qos_t *qos,
const dds_listener_t *listener);
struct ddsi_sertopic;
struct nn_plist;
/**
* @brief Creates a new topic with arbitrary type handling.
*
@ -1036,7 +1036,7 @@ dds_create_topic_arbitrary (
struct ddsi_sertopic *sertopic,
const dds_qos_t *qos,
const dds_listener_t *listener,
const struct nn_plist *sedp_plist);
const struct ddsi_plist *sedp_plist);
/**
* @brief Finds a named topic.

View file

@ -12,7 +12,7 @@
#ifndef _DDS_QOS_H_
#define _DDS_QOS_H_
#include "dds/ddsi/q_xqos.h"
#include "dds/ddsi/ddsi_xqos.h"
#if defined (__cplusplus)
extern "C" {

View file

@ -12,7 +12,7 @@
#ifndef DDSI_SERDATA_BUILTINTOPIC_H
#define DDSI_SERDATA_BUILTINTOPIC_H
#include "dds/ddsi/q_xqos.h"
#include "dds/ddsi/ddsi_xqos.h"
#include "dds/ddsi/ddsi_serdata.h"
#include "dds/ddsi/ddsi_sertopic.h"

View file

@ -16,7 +16,7 @@
#include "dds/ddsi/q_thread.h"
#include "dds/ddsi/q_config.h"
#include "dds/ddsi/ddsi_domaingv.h"
#include "dds/ddsi/q_plist.h" /* for nn_keyhash */
#include "dds/ddsi/ddsi_plist.h"
#include "dds__init.h"
#include "dds__domain.h"
#include "dds__participant.h"

View file

@ -23,7 +23,7 @@
#include "dds__topic.h"
#include "dds/version.h"
#include "dds/ddsi/ddsi_pmd.h"
#include "dds/ddsi/q_xqos.h"
#include "dds/ddsi/ddsi_xqos.h"
#include "dds/ddsi/q_transmit.h"
extern inline dds_entity *dds_entity_from_handle_link (struct dds_handle_link *hdllink);
@ -670,7 +670,7 @@ dds_return_t dds_get_qos (dds_entity_t entity, dds_qos_t *qos)
}
dds_reset_qos (qos);
nn_xqos_mergein_missing (qos, entity_qos, ~(QP_TOPIC_NAME | QP_TYPE_NAME));
ddsi_xqos_mergein_missing (qos, entity_qos, ~(QP_TOPIC_NAME | QP_TYPE_NAME));
ret = DDS_RETCODE_OK;
}
dds_entity_unlock(e);
@ -685,9 +685,9 @@ static dds_return_t dds_set_qos_locked_raw (dds_entity *e, dds_qos_t **e_qos_ptr
but a single QoS for a topic in a participant while there can be multiple definitions of it,
and hence, multiple sertopics. Those are needed for multi-language support. */
dds_qos_t *newqos = dds_create_qos ();
nn_xqos_mergein_missing (newqos, qos, mask);
nn_xqos_mergein_missing (newqos, *e_qos_ptr, ~(uint64_t)0);
if ((ret = nn_xqos_valid (logcfg, newqos)) != DDS_RETCODE_OK)
ddsi_xqos_mergein_missing (newqos, qos, mask);
ddsi_xqos_mergein_missing (newqos, *e_qos_ptr, ~(uint64_t)0);
if ((ret = ddsi_xqos_valid (logcfg, newqos)) != DDS_RETCODE_OK)
{
/* invalid or inconsistent QoS settings */
goto error_or_nochange;
@ -698,7 +698,7 @@ static dds_return_t dds_set_qos_locked_raw (dds_entity *e, dds_qos_t **e_qos_ptr
}
else
{
const uint64_t delta = nn_xqos_delta (*e_qos_ptr, newqos, ~(uint64_t)0);
const uint64_t delta = ddsi_xqos_delta (*e_qos_ptr, newqos, ~(uint64_t)0);
if (delta == 0)
{
/* new settings are identical to the old */

View file

@ -135,7 +135,7 @@ static dds_builtintopic_endpoint_t *make_builtintopic_endpoint (const ddsi_guid_
tmp = nn_hton_guid (*ppguid);
memcpy (&ep->participant_key, &tmp, sizeof (ep->participant_key));
ep->qos = dds_create_qos ();
nn_xqos_mergein_missing (ep->qos, qos, ~(QP_TOPIC_NAME | QP_TYPE_NAME));
ddsi_xqos_mergein_missing (ep->qos, qos, ~(QP_TOPIC_NAME | QP_TYPE_NAME));
ep->topic_name = dds_string_dup (qos->topic_name);
ep->type_name = dds_string_dup (qos->type_name);
return ep;

View file

@ -17,7 +17,7 @@
#include "dds/ddsi/q_entity.h"
#include "dds/ddsi/q_thread.h"
#include "dds/ddsi/q_config.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_plist.h"
#include "dds/ddsi/ddsi_domaingv.h"
#include "dds/ddsi/ddsi_entity_index.h"
#include "dds/version.h"
@ -69,8 +69,8 @@ static dds_return_t dds_participant_qos_set (dds_entity *e, const dds_qos_t *qos
thread_state_awake (lookup_thread_state (), &e->m_domain->gv);
if ((pp = entidx_lookup_participant_guid (e->m_domain->gv.entity_index, &e->m_guid)) != NULL)
{
nn_plist_t plist;
nn_plist_init_empty (&plist);
ddsi_plist_t plist;
ddsi_plist_init_empty (&plist);
plist.qos.present = plist.qos.aliased = qos->present;
plist.qos = *qos;
update_participant_plist (pp, &plist);
@ -94,7 +94,7 @@ dds_entity_t dds_create_participant (const dds_domainid_t domain, const dds_qos_
dds_entity_t ret;
ddsi_guid_t guid;
dds_participant * pp;
nn_plist_t plist;
ddsi_plist_t plist;
dds_qos_t *new_qos = NULL;
char *config = "";
@ -109,19 +109,19 @@ dds_entity_t dds_create_participant (const dds_domainid_t domain, const dds_qos_
new_qos = dds_create_qos ();
if (qos != NULL)
nn_xqos_mergein_missing (new_qos, qos, DDS_PARTICIPANT_QOS_MASK);
nn_xqos_mergein_missing (new_qos, &dom->gv.default_local_plist_pp.qos, ~(uint64_t)0);
if ((ret = nn_xqos_valid (&dom->gv.logconfig, new_qos)) < 0)
ddsi_xqos_mergein_missing (new_qos, qos, DDS_PARTICIPANT_QOS_MASK);
ddsi_xqos_mergein_missing (new_qos, &dom->gv.default_local_plist_pp.qos, ~(uint64_t)0);
if ((ret = ddsi_xqos_valid (&dom->gv.logconfig, new_qos)) < 0)
goto err_qos_validation;
/* Translate qos */
nn_plist_init_empty (&plist);
ddsi_plist_init_empty (&plist);
dds_merge_qos (&plist.qos, new_qos);
thread_state_awake (lookup_thread_state (), &dom->gv);
ret = new_participant (&guid, &dom->gv, 0, &plist);
thread_state_asleep (lookup_thread_state ());
nn_plist_fini (&plist);
ddsi_plist_fini (&plist);
if (ret < 0)
{
ret = DDS_RETCODE_ERROR;

View file

@ -55,9 +55,9 @@ dds_entity_t dds__create_publisher_l (dds_participant *par, bool implicit, const
new_qos = dds_create_qos ();
if (qos)
nn_xqos_mergein_missing (new_qos, qos, DDS_PUBLISHER_QOS_MASK);
nn_xqos_mergein_missing (new_qos, &par->m_entity.m_domain->gv.default_xqos_pub, ~(uint64_t)0);
if ((ret = nn_xqos_valid (&par->m_entity.m_domain->gv.logconfig, new_qos)) != DDS_RETCODE_OK)
ddsi_xqos_mergein_missing (new_qos, qos, DDS_PUBLISHER_QOS_MASK);
ddsi_xqos_mergein_missing (new_qos, &par->m_entity.m_domain->gv.default_xqos_pub, ~(uint64_t)0);
if ((ret = ddsi_xqos_valid (&par->m_entity.m_domain->gv.logconfig, new_qos)) != DDS_RETCODE_OK)
{
dds_participant_unlock (par);
return ret;

View file

@ -15,7 +15,7 @@
#include "dds/dds.h"
#include "dds/ddsrt/heap.h"
#include "dds/ddsrt/string.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_plist.h"
static void dds_qos_data_copy_in (ddsi_octetseq_t *data, const void * __restrict value, size_t sz, bool overwrite)
{
@ -51,7 +51,7 @@ static bool dds_qos_data_copy_out (const ddsi_octetseq_t *data, void **value, si
dds_qos_t *dds_create_qos (void)
{
dds_qos_t *qos = ddsrt_malloc (sizeof (dds_qos_t));
nn_xqos_init_empty (qos);
ddsi_xqos_init_empty (qos);
return qos;
}
@ -64,8 +64,8 @@ void dds_reset_qos (dds_qos_t * __restrict qos)
{
if (qos)
{
nn_xqos_fini (qos);
nn_xqos_init_empty (qos);
ddsi_xqos_fini (qos);
ddsi_xqos_init_empty (qos);
}
}
@ -78,7 +78,7 @@ void dds_delete_qos (dds_qos_t * __restrict qos)
{
if (qos)
{
nn_xqos_fini (qos);
ddsi_xqos_fini (qos);
ddsrt_free (qos);
}
}
@ -92,7 +92,7 @@ dds_return_t dds_copy_qos (dds_qos_t * __restrict dst, const dds_qos_t * __restr
{
if (src == NULL || dst == NULL)
return DDS_RETCODE_BAD_PARAMETER;
nn_xqos_copy (dst, src);
ddsi_xqos_copy (dst, src);
return DDS_RETCODE_OK;
}
@ -105,7 +105,7 @@ void dds_merge_qos (dds_qos_t * __restrict dst, const dds_qos_t * __restrict src
{
/* Copy qos from source to destination unless already set */
if (src != NULL && dst != NULL)
nn_xqos_mergein_missing (dst, src, ~(uint64_t)0);
ddsi_xqos_mergein_missing (dst, src, ~(uint64_t)0);
}
void dds_qos_merge (dds_qos_t * __restrict dst, const dds_qos_t * __restrict src)
@ -121,7 +121,7 @@ bool dds_qos_equal (const dds_qos_t * __restrict a, const dds_qos_t * __restrict
else if (a == NULL || b == NULL)
return false;
else
return nn_xqos_delta (a, b, ~(uint64_t)0) == 0;
return ddsi_xqos_delta (a, b, ~(uint64_t)0) == 0;
}
void dds_qset_userdata (dds_qos_t * __restrict qos, const void * __restrict value, size_t sz)

View file

@ -432,14 +432,14 @@ static dds_entity_t dds_create_reader_int (dds_entity_t participant_or_subscribe
argument, but that isn't the case here */
rqos = dds_create_qos ();
if (qos)
nn_xqos_mergein_missing (rqos, qos, DDS_READER_QOS_MASK);
ddsi_xqos_mergein_missing (rqos, qos, DDS_READER_QOS_MASK);
if (sub->m_entity.m_qos)
nn_xqos_mergein_missing (rqos, sub->m_entity.m_qos, ~(uint64_t)0);
ddsi_xqos_mergein_missing (rqos, sub->m_entity.m_qos, ~(uint64_t)0);
if (tp->m_ktopic->qos)
nn_xqos_mergein_missing (rqos, tp->m_ktopic->qos, ~(uint64_t)0);
nn_xqos_mergein_missing (rqos, &sub->m_entity.m_domain->gv.default_xqos_rd, ~(uint64_t)0);
ddsi_xqos_mergein_missing (rqos, tp->m_ktopic->qos, ~(uint64_t)0);
ddsi_xqos_mergein_missing (rqos, &sub->m_entity.m_domain->gv.default_xqos_rd, ~(uint64_t)0);
if ((rc = nn_xqos_valid (&sub->m_entity.m_domain->gv.logconfig, rqos)) < 0 ||
if ((rc = ddsi_xqos_valid (&sub->m_entity.m_domain->gv.logconfig, rqos)) < 0 ||
(rc = validate_reader_qos(rqos)) != DDS_RETCODE_OK)
{
dds_delete_qos (rqos);

View file

@ -32,7 +32,7 @@
#include "dds/ddsrt/avl.h"
#include "dds/ddsrt/circlist.h"
#include "dds/ddsi/ddsi_rhc.h"
#include "dds/ddsi/q_xqos.h"
#include "dds/ddsi/ddsi_xqos.h"
#include "dds/ddsi/q_unused.h"
#include "dds/ddsi/q_config.h"
#include "dds/ddsi/ddsi_domaingv.h"

View file

@ -19,7 +19,7 @@
#include "dds/ddsi/q_bswap.h"
#include "dds/ddsi/q_config.h"
#include "dds/ddsi/q_freelist.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_plist.h"
#include "dds__stream.h"
#include "dds__serdata_builtintopic.h"
#include "dds/ddsi/ddsi_tkmap.h"
@ -60,7 +60,7 @@ static void serdata_builtin_free(struct ddsi_serdata *dcmn)
{
struct ddsi_serdata_builtintopic *d = (struct ddsi_serdata_builtintopic *)dcmn;
if (d->c.kind == SDK_DATA)
nn_xqos_fini (&d->xqos);
ddsi_xqos_fini (&d->xqos);
ddsrt_free (d);
}
@ -73,13 +73,13 @@ static struct ddsi_serdata_builtintopic *serdata_builtin_new(const struct ddsi_s
static void from_entity_pp (struct ddsi_serdata_builtintopic *d, const struct participant *pp)
{
nn_xqos_copy(&d->xqos, &pp->plist->qos);
ddsi_xqos_copy(&d->xqos, &pp->plist->qos);
d->pphandle = pp->e.iid;
}
static void from_entity_proxypp (struct ddsi_serdata_builtintopic *d, const struct proxy_participant *proxypp)
{
nn_xqos_copy(&d->xqos, &proxypp->plist->qos);
ddsi_xqos_copy(&d->xqos, &proxypp->plist->qos);
d->pphandle = proxypp->e.iid;
}
@ -100,14 +100,14 @@ static void set_topic_type_from_sertopic (struct ddsi_serdata_builtintopic *d, c
static void from_entity_rd (struct ddsi_serdata_builtintopic *d, const struct reader *rd)
{
d->pphandle = rd->c.pp->e.iid;
nn_xqos_copy(&d->xqos, rd->xqos);
ddsi_xqos_copy(&d->xqos, rd->xqos);
set_topic_type_from_sertopic(d, rd->topic);
}
static void from_entity_prd (struct ddsi_serdata_builtintopic *d, const struct proxy_reader *prd)
{
d->pphandle = prd->c.proxypp->e.iid;
nn_xqos_copy(&d->xqos, prd->c.xqos);
ddsi_xqos_copy(&d->xqos, prd->c.xqos);
assert (d->xqos.present & QP_TOPIC_NAME);
assert (d->xqos.present & QP_TYPE_NAME);
}
@ -115,14 +115,14 @@ static void from_entity_prd (struct ddsi_serdata_builtintopic *d, const struct p
static void from_entity_wr (struct ddsi_serdata_builtintopic *d, const struct writer *wr)
{
d->pphandle = wr->c.pp->e.iid;
nn_xqos_copy(&d->xqos, wr->xqos);
ddsi_xqos_copy(&d->xqos, wr->xqos);
set_topic_type_from_sertopic(d, wr->topic);
}
static void from_entity_pwr (struct ddsi_serdata_builtintopic *d, const struct proxy_writer *pwr)
{
d->pphandle = pwr->c.proxypp->e.iid;
nn_xqos_copy(&d->xqos, pwr->c.xqos);
ddsi_xqos_copy(&d->xqos, pwr->c.xqos);
assert (d->xqos.present & QP_TOPIC_NAME);
assert (d->xqos.present & QP_TYPE_NAME);
}
@ -196,10 +196,10 @@ static dds_qos_t *dds_qos_from_xqos_reuse (dds_qos_t *old, const dds_qos_t *src)
old = ddsrt_malloc (sizeof (*old));
else
{
nn_xqos_fini (old);
ddsi_xqos_fini (old);
}
nn_xqos_init_empty (old);
nn_xqos_mergein_missing (old, src, ~(QP_TOPIC_NAME | QP_TYPE_NAME));
ddsi_xqos_init_empty (old);
ddsi_xqos_mergein_missing (old, src, ~(QP_TOPIC_NAME | QP_TYPE_NAME));
return old;
}

View file

@ -55,9 +55,9 @@ dds_entity_t dds__create_subscriber_l (dds_participant *participant, bool implic
new_qos = dds_create_qos ();
if (qos)
nn_xqos_mergein_missing (new_qos, qos, DDS_SUBSCRIBER_QOS_MASK);
nn_xqos_mergein_missing (new_qos, &participant->m_entity.m_domain->gv.default_xqos_sub, ~(uint64_t)0);
if ((ret = nn_xqos_valid (&participant->m_entity.m_domain->gv.logconfig, new_qos)) != DDS_RETCODE_OK)
ddsi_xqos_mergein_missing (new_qos, qos, DDS_SUBSCRIBER_QOS_MASK);
ddsi_xqos_mergein_missing (new_qos, &participant->m_entity.m_domain->gv.default_xqos_sub, ~(uint64_t)0);
if ((ret = ddsi_xqos_valid (&participant->m_entity.m_domain->gv.logconfig, new_qos)) != DDS_RETCODE_OK)
{
dds_delete_qos (new_qos);
return ret;

View file

@ -30,7 +30,7 @@
#include "dds/ddsi/ddsi_sertopic.h"
#include "dds/ddsi/q_ddsi_discovery.h"
#include "dds/ddsi/ddsi_iid.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_plist.h"
#include "dds/ddsi/ddsi_domaingv.h"
#include "dds__serdata_builtintopic.h"
@ -246,7 +246,7 @@ static dds_return_t lookup_and_check_ktopic (struct dds_ktopic **ktp_out, dds_pa
}
}
static dds_entity_t create_topic_pp_locked (struct dds_participant *pp, struct dds_ktopic *ktp, bool implicit, struct ddsi_sertopic *sertopic_registered, const dds_listener_t *listener, const nn_plist_t *sedp_plist)
static dds_entity_t create_topic_pp_locked (struct dds_participant *pp, struct dds_ktopic *ktp, bool implicit, struct ddsi_sertopic *sertopic_registered, const dds_listener_t *listener, const ddsi_plist_t *sedp_plist)
{
dds_entity_t hdl;
dds_topic *tp = dds_alloc (sizeof (*tp));
@ -260,17 +260,17 @@ static dds_entity_t create_topic_pp_locked (struct dds_participant *pp, struct d
if (sedp_plist)
{
struct participant *ddsi_pp;
nn_plist_t plist;
ddsi_plist_t plist;
thread_state_awake (lookup_thread_state (), &pp->m_entity.m_domain->gv);
ddsi_pp = entidx_lookup_participant_guid (pp->m_entity.m_domain->gv.entity_index, &pp->m_entity.m_guid);
assert (ddsi_pp);
nn_plist_init_empty (&plist);
nn_plist_mergein_missing (&plist, sedp_plist, ~(uint64_t)0, ~(uint64_t)0);
nn_xqos_mergein_missing (&plist.qos, ktp->qos, ~(uint64_t)0);
ddsi_plist_init_empty (&plist);
ddsi_plist_mergein_missing (&plist, sedp_plist, ~(uint64_t)0, ~(uint64_t)0);
ddsi_xqos_mergein_missing (&plist.qos, ktp->qos, ~(uint64_t)0);
sedp_write_topic (ddsi_pp, &plist);
nn_plist_fini (&plist);
ddsi_plist_fini (&plist);
thread_state_asleep (lookup_thread_state ());
}
@ -278,7 +278,7 @@ static dds_entity_t create_topic_pp_locked (struct dds_participant *pp, struct d
return hdl;
}
dds_entity_t dds_create_topic_arbitrary (dds_entity_t participant, struct ddsi_sertopic *sertopic, const dds_qos_t *qos, const dds_listener_t *listener, const nn_plist_t *sedp_plist)
dds_entity_t dds_create_topic_arbitrary (dds_entity_t participant, struct ddsi_sertopic *sertopic, const dds_qos_t *qos, const dds_listener_t *listener, const ddsi_plist_t *sedp_plist)
{
dds_return_t rc;
dds_participant *pp;
@ -303,10 +303,10 @@ dds_entity_t dds_create_topic_arbitrary (dds_entity_t participant, struct ddsi_s
new_qos = dds_create_qos ();
if (qos)
nn_xqos_mergein_missing (new_qos, qos, DDS_TOPIC_QOS_MASK);
ddsi_xqos_mergein_missing (new_qos, qos, DDS_TOPIC_QOS_MASK);
/* One would expect this:
*
* nn_xqos_mergein_missing (new_qos, &gv.default_xqos_tp, ~(uint64_t)0);
* ddsi_xqos_mergein_missing (new_qos, &gv.default_xqos_tp, ~(uint64_t)0);
*
* but the crazy defaults of the DDS specification has a default setting
* for reliability that is dependent on the entity type: readers and
@ -316,7 +316,7 @@ dds_entity_t dds_create_topic_arbitrary (dds_entity_t participant, struct ddsi_s
* best-effort will do "the right thing" and let a writer still default to
* reliable ... (and keep behaviour unchanged) */
struct ddsi_domaingv * const gv = &pp->m_entity.m_domain->gv;
if ((rc = nn_xqos_valid (&gv->logconfig, new_qos)) != DDS_RETCODE_OK)
if ((rc = ddsi_xqos_valid (&gv->logconfig, new_qos)) != DDS_RETCODE_OK)
{
dds_delete_qos (new_qos);
dds_entity_unpin (&pp->m_entity);
@ -383,7 +383,7 @@ dds_entity_t dds_create_topic_arbitrary (dds_entity_t participant, struct ddsi_s
dds_entity_t dds_create_topic (dds_entity_t participant, const dds_topic_descriptor_t *desc, const char *name, const dds_qos_t *qos, const dds_listener_t *listener)
{
struct ddsi_sertopic_default *st;
nn_plist_t plist;
ddsi_plist_t plist;
dds_entity_t hdl;
struct dds_entity *ppent;
dds_return_t ret;
@ -409,7 +409,7 @@ dds_entity_t dds_create_topic (dds_entity_t participant, const dds_topic_descrip
DDS_CTRACE (&ppent->m_domain->gv.logconfig, "Marshalling for type: %s is %soptimised\n", desc->m_typename, st->opt_size ? "" : "not ");
}
nn_plist_init_empty (&plist);
ddsi_plist_init_empty (&plist);
/* Set Topic meta data (for SEDP publication) */
plist.qos.topic_name = ddsrt_strdup (st->c.name);
plist.qos.type_name = ddsrt_strdup (st->c.type_name);
@ -432,7 +432,7 @@ dds_entity_t dds_create_topic (dds_entity_t participant, const dds_topic_descrip
hdl = dds_create_topic_arbitrary (participant, &st->c, qos, listener, &plist);
ddsi_sertopic_unref (&st->c);
dds_entity_unpin (ppent);
nn_plist_fini (&plist);
ddsi_plist_fini (&plist);
return hdl;
}

View file

@ -48,7 +48,7 @@ struct whc_node {
seqno_t seq;
uint64_t total_bytes; /* cumulative number of bytes up to and including this node */
size_t size;
struct nn_plist *plist; /* 0 if nothing special */
struct ddsi_plist *plist; /* 0 if nothing special */
unsigned unacked: 1; /* counted in whc::unacked_bytes iff 1 */
unsigned borrowed: 1; /* at most one can borrow it at any time */
nn_mtime_t last_rexmit_ts;
@ -155,7 +155,7 @@ static uint32_t whc_default_remove_acked_messages_full (struct whc_impl *whc, se
static uint32_t whc_default_remove_acked_messages (struct whc *whc, seqno_t max_drop_seq, struct whc_state *whcst, struct whc_node **deferred_free_list);
static void whc_default_free_deferred_free_list (struct whc *whc, struct whc_node *deferred_free_list);
static void whc_default_get_state (const struct whc *whc, struct whc_state *st);
static int whc_default_insert (struct whc *whc, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct nn_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk);
static int whc_default_insert (struct whc *whc, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct ddsi_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk);
static seqno_t whc_default_next_seq (const struct whc *whc, seqno_t seq);
static bool whc_default_borrow_sample (const struct whc *whc, seqno_t seq, struct whc_borrowed_sample *sample);
static bool whc_default_borrow_sample_key (const struct whc *whc, const struct ddsi_serdata *serdata_key, struct whc_borrowed_sample *sample);
@ -498,7 +498,7 @@ static void free_whc_node_contents (struct whc_node *whcn)
{
ddsi_serdata_unref (whcn->serdata);
if (whcn->plist) {
nn_plist_fini (whcn->plist);
ddsi_plist_fini (whcn->plist);
ddsrt_free (whcn->plist);
}
}
@ -1156,7 +1156,7 @@ static uint32_t whc_default_remove_acked_messages (struct whc *whc_generic, seqn
return cnt;
}
static struct whc_node *whc_default_insert_seq (struct whc_impl *whc, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct nn_plist *plist, struct ddsi_serdata *serdata)
static struct whc_node *whc_default_insert_seq (struct whc_impl *whc, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct ddsi_plist *plist, struct ddsi_serdata *serdata)
{
struct whc_node *newn = NULL;
@ -1228,7 +1228,7 @@ static struct whc_node *whc_default_insert_seq (struct whc_impl *whc, seqno_t ma
return newn;
}
static int whc_default_insert (struct whc *whc_generic, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct nn_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk)
static int whc_default_insert (struct whc *whc_generic, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct ddsi_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk)
{
struct whc_impl * const whc = (struct whc_impl *)whc_generic;
struct whc_node *newn = NULL;
@ -1439,7 +1439,7 @@ static void return_sample_locked (struct whc_impl *whc, struct whc_borrowed_samp
ddsi_serdata_unref (sample->serdata);
if (sample->plist)
{
nn_plist_fini (sample->plist);
ddsi_plist_fini (sample->plist);
ddsrt_free (sample->plist);
}
}

View file

@ -143,7 +143,7 @@ static void bwhc_get_state (const struct whc *whc, struct whc_state *st)
st->unacked_bytes = 0;
}
static int bwhc_insert (struct whc *whc, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct nn_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk)
static int bwhc_insert (struct whc *whc, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct ddsi_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk)
{
(void)whc;
(void)max_drop_seq;

View file

@ -316,14 +316,14 @@ dds_entity_t dds_create_writer (dds_entity_t participant_or_publisher, dds_entit
/* Merge Topic & Publisher qos */
wqos = dds_create_qos ();
if (qos)
nn_xqos_mergein_missing (wqos, qos, DDS_WRITER_QOS_MASK);
ddsi_xqos_mergein_missing (wqos, qos, DDS_WRITER_QOS_MASK);
if (pub->m_entity.m_qos)
nn_xqos_mergein_missing (wqos, pub->m_entity.m_qos, ~(uint64_t)0);
ddsi_xqos_mergein_missing (wqos, pub->m_entity.m_qos, ~(uint64_t)0);
if (tp->m_ktopic->qos)
nn_xqos_mergein_missing (wqos, tp->m_ktopic->qos, ~(uint64_t)0);
nn_xqos_mergein_missing (wqos, &pub->m_entity.m_domain->gv.default_xqos_wr, ~(uint64_t)0);
ddsi_xqos_mergein_missing (wqos, tp->m_ktopic->qos, ~(uint64_t)0);
ddsi_xqos_mergein_missing (wqos, &pub->m_entity.m_domain->gv.default_xqos_wr, ~(uint64_t)0);
if ((rc = nn_xqos_valid (&pub->m_entity.m_domain->gv.logconfig, wqos)) < 0 ||
if ((rc = ddsi_xqos_valid (&pub->m_entity.m_domain->gv.logconfig, wqos)) < 0 ||
(rc = validate_writer_qos(wqos)) != DDS_RETCODE_OK)
{
dds_delete_qos(wqos);

View file

@ -32,6 +32,7 @@ PREPEND(srcs_ddsi "${CMAKE_CURRENT_LIST_DIR}/src"
ddsi_entity_index.c
ddsi_deadline.c
ddsi_deliver_locally.c
ddsi_plist.c
q_addrset.c
q_bitset_inlines.c
q_bswap.c
@ -46,7 +47,6 @@ PREPEND(srcs_ddsi "${CMAKE_CURRENT_LIST_DIR}/src"
q_misc.c
q_nwif.c
q_pcap.c
q_plist.c
q_qosmatch.c
q_radmin.c
q_receive.c
@ -95,6 +95,8 @@ PREPEND(hdrs_private_ddsi "${CMAKE_CURRENT_LIST_DIR}/include/dds/ddsi"
ddsi_deadline.h
ddsi_deliver_locally.h
ddsi_domaingv.h
ddsi_plist.h
ddsi_xqos.h
q_addrset.h
q_bitset.h
q_bswap.h
@ -112,7 +114,6 @@ PREPEND(hdrs_private_ddsi "${CMAKE_CURRENT_LIST_DIR}/include/dds/ddsi"
q_misc.h
q_nwif.h
q_pcap.h
q_plist.h
q_protocol.h
q_qosmatch.h
q_radmin.h
@ -127,7 +128,6 @@ PREPEND(hdrs_private_ddsi "${CMAKE_CURRENT_LIST_DIR}/include/dds/ddsi"
q_whc.h
q_xevent.h
q_xmsg.h
q_xqos.h
sysdeps.h
)
if(ENABLE_LIFESPAN)

View file

@ -20,7 +20,7 @@
#include "dds/ddsrt/sync.h"
#include "dds/ddsrt/fibheap.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_plist.h"
#include "dds/ddsi/q_protocol.h"
#include "dds/ddsi/q_nwif.h"
#include "dds/ddsi/q_sockwaitset.h"
@ -225,8 +225,8 @@ struct ddsi_domaingv {
supplying values for missing QoS settings in incoming discovery
packets); plus the actual QoSs needed for the builtin
endpoints. */
nn_plist_t default_plist_pp;
nn_plist_t default_local_plist_pp;
ddsi_plist_t default_plist_pp;
ddsi_plist_t default_local_plist_pp;
dds_qos_t default_xqos_rd;
dds_qos_t default_xqos_wr;
dds_qos_t default_xqos_wr_nad;

View file

@ -9,18 +9,17 @@
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
#ifndef NN_PLIST_H
#define NN_PLIST_H
#ifndef DDSI_PLIST_H
#define DDSI_PLIST_H
#include "dds/ddsi/q_feature_check.h"
#include "dds/ddsi/q_xqos.h"
#include "dds/ddsi/ddsi_xqos.h"
#include "dds/ddsi/ddsi_tran.h" /* FIXME: eliminate */
#if defined (__cplusplus)
extern "C" {
#endif
#define PP_PROTOCOL_VERSION ((uint64_t)1 << 0)
#define PP_VENDORID ((uint64_t)1 << 1)
#define PP_UNICAST_LOCATOR ((uint64_t)1 << 2)
@ -118,7 +117,7 @@ typedef struct nn_prismtech_eotgroup_tid {
uint32_t transactionId;
} nn_prismtech_eotgroup_tid_t;
typedef struct nn_plist {
typedef struct ddsi_plist {
uint64_t present;
uint64_t aliased;
@ -158,12 +157,12 @@ typedef struct nn_plist {
#endif
uint32_t domain_id;
char *domain_tag;
} nn_plist_t;
} ddsi_plist_t;
/***/
typedef struct nn_plist_src {
typedef struct ddsi_plist_src {
nn_protocol_version_t protocol_version;
nn_vendorid_t vendorid;
int encoding;
@ -172,16 +171,16 @@ typedef struct nn_plist_src {
bool strict;
ddsi_tran_factory_t factory; /* eliminate this */
struct ddsrt_log_cfg *logconfig;
} nn_plist_src_t;
} ddsi_plist_src_t;
void nn_plist_init_tables (void);
DDS_EXPORT void nn_plist_init_empty (nn_plist_t *dest);
DDS_EXPORT void nn_plist_mergein_missing (nn_plist_t *a, const nn_plist_t *b, uint64_t pmask, uint64_t qmask);
DDS_EXPORT void nn_plist_copy (nn_plist_t *dst, const nn_plist_t *src);
DDS_EXPORT nn_plist_t *nn_plist_dup (const nn_plist_t *src);
void ddsi_plist_init_tables (void);
DDS_EXPORT void ddsi_plist_init_empty (ddsi_plist_t *dest);
DDS_EXPORT void ddsi_plist_mergein_missing (ddsi_plist_t *a, const ddsi_plist_t *b, uint64_t pmask, uint64_t qmask);
DDS_EXPORT void ddsi_plist_copy (ddsi_plist_t *dst, const ddsi_plist_t *src);
DDS_EXPORT ddsi_plist_t *ddsi_plist_dup (const ddsi_plist_t *src);
/**
* @brief Initialize an nn_plist_t from a PL_CDR_{LE,BE} paylaod.
* @brief Initialize an ddsi_plist_t from a PL_CDR_{LE,BE} paylaod.
*
* @param[in] pwanted
* PP_... flags indicating which non-QoS parameters are of interest, treated as
@ -206,8 +205,8 @@ DDS_EXPORT nn_plist_t *nn_plist_dup (const nn_plist_t *src);
* input (indicated by the "aliased" bits in the plist/xqos structures), but
* some things cannot be aliased (e.g., the array of pointers to strings for a
* sequence of strings).
* Generally, nn_plist_fini should be called when done with the parameter list,
* even when nn_plist_unlias or nn_xqos_unlias hasn't been called.
* Generally, ddsi_plist_fini should be called when done with the parameter list,
* even when ddsi_plist_unlias or ddsi_xqos_unlias hasn't been called.
* @param[out] nextafterplist
* If non-NULL, *nextafterplist is set to the first byte following the parameter
* list sentinel on successful parse, or to NULL on failure
@ -226,25 +225,25 @@ DDS_EXPORT nn_plist_t *nn_plist_dup (const nn_plist_t *src);
* Input contained an unrecognized parameter with the "incompatible-if-unknown"
* flag set; dest is cleared, *nextafterplist is NULL.
*/
DDS_EXPORT dds_return_t nn_plist_init_frommsg (nn_plist_t *dest, char **nextafterplist, uint64_t pwanted, uint64_t qwanted, const nn_plist_src_t *src);
DDS_EXPORT void nn_plist_fini (nn_plist_t *ps);
DDS_EXPORT void nn_plist_fini_mask (nn_plist_t *plist, uint64_t pmask, uint64_t qmask);
DDS_EXPORT void nn_plist_unalias (nn_plist_t *plist);
DDS_EXPORT void nn_plist_addtomsg (struct nn_xmsg *m, const nn_plist_t *ps, uint64_t pwanted, uint64_t qwanted);
DDS_EXPORT void nn_plist_init_default_participant (nn_plist_t *plist);
DDS_EXPORT void nn_plist_delta (uint64_t *pdelta, uint64_t *qdelta, const nn_plist_t *x, const nn_plist_t *y, uint64_t pmask, uint64_t qmask);
DDS_EXPORT void nn_plist_log (uint32_t cat, const struct ddsrt_log_cfg *logcfg, const nn_plist_t *plist);
DDS_EXPORT size_t nn_plist_print (char * __restrict buf, size_t bufsize, const nn_plist_t *plist);
DDS_EXPORT dds_return_t ddsi_plist_init_frommsg (ddsi_plist_t *dest, char **nextafterplist, uint64_t pwanted, uint64_t qwanted, const ddsi_plist_src_t *src);
DDS_EXPORT void ddsi_plist_fini (ddsi_plist_t *ps);
DDS_EXPORT void ddsi_plist_fini_mask (ddsi_plist_t *plist, uint64_t pmask, uint64_t qmask);
DDS_EXPORT void ddsi_plist_unalias (ddsi_plist_t *plist);
DDS_EXPORT void ddsi_plist_addtomsg (struct nn_xmsg *m, const ddsi_plist_t *ps, uint64_t pwanted, uint64_t qwanted);
DDS_EXPORT void ddsi_plist_init_default_participant (ddsi_plist_t *plist);
DDS_EXPORT void ddsi_plist_delta (uint64_t *pdelta, uint64_t *qdelta, const ddsi_plist_t *x, const ddsi_plist_t *y, uint64_t pmask, uint64_t qmask);
DDS_EXPORT void ddsi_plist_log (uint32_t cat, const struct ddsrt_log_cfg *logcfg, const ddsi_plist_t *plist);
DDS_EXPORT size_t ddsi_plist_print (char * __restrict buf, size_t bufsize, const ddsi_plist_t *plist);
struct nn_rmsg;
struct nn_rsample_info;
struct nn_rdata;
DDS_EXPORT unsigned char *nn_plist_quickscan (struct nn_rsample_info *dest, const struct nn_rmsg *rmsg, const nn_plist_src_t *src);
DDS_EXPORT const unsigned char *nn_plist_findparam_native_unchecked (const void *src, nn_parameterid_t pid);
DDS_EXPORT unsigned char *ddsi_plist_quickscan (struct nn_rsample_info *dest, const struct nn_rmsg *rmsg, const ddsi_plist_src_t *src);
DDS_EXPORT const unsigned char *ddsi_plist_findparam_native_unchecked (const void *src, nn_parameterid_t pid);
#if defined (__cplusplus)
}
#endif
#endif /* NN_PLIST_H */
#endif /* DDSI_PLIST_H */

View file

@ -9,8 +9,8 @@
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
#ifndef NN_XQOS_H
#define NN_XQOS_H
#ifndef DDSI_XQOS_H
#define DDSI_XQOS_H
#include "dds/ddsc/dds_public_qosdefs.h"
/*XXX*/
@ -304,27 +304,27 @@ struct dds_qos {
struct nn_xmsg;
DDS_EXPORT void nn_xqos_init_empty (dds_qos_t *xqos);
DDS_EXPORT void nn_xqos_init_default_reader (dds_qos_t *xqos);
DDS_EXPORT void nn_xqos_init_default_writer (dds_qos_t *xqos);
DDS_EXPORT void nn_xqos_init_default_writer_noautodispose (dds_qos_t *xqos);
DDS_EXPORT void nn_xqos_init_default_subscriber (dds_qos_t *xqos);
DDS_EXPORT void nn_xqos_init_default_publisher (dds_qos_t *xqos);
DDS_EXPORT void nn_xqos_init_default_topic (dds_qos_t *xqos);
DDS_EXPORT void nn_xqos_copy (dds_qos_t *dst, const dds_qos_t *src);
DDS_EXPORT void nn_xqos_unalias (dds_qos_t *xqos);
DDS_EXPORT void nn_xqos_fini (dds_qos_t *xqos);
DDS_EXPORT void nn_xqos_fini_mask (dds_qos_t *xqos, uint64_t mask);
DDS_EXPORT dds_return_t nn_xqos_valid (const struct ddsrt_log_cfg *logcfg, const dds_qos_t *xqos);
DDS_EXPORT void nn_xqos_mergein_missing (dds_qos_t *a, const dds_qos_t *b, uint64_t mask);
DDS_EXPORT uint64_t nn_xqos_delta (const dds_qos_t *a, const dds_qos_t *b, uint64_t mask);
DDS_EXPORT void nn_xqos_addtomsg (struct nn_xmsg *m, const dds_qos_t *xqos, uint64_t wanted);
DDS_EXPORT void nn_xqos_log (uint32_t cat, const struct ddsrt_log_cfg *logcfg, const dds_qos_t *xqos);
DDS_EXPORT size_t nn_xqos_print (char * __restrict buf, size_t bufsize, const dds_qos_t *xqos);
DDS_EXPORT dds_qos_t *nn_xqos_dup (const dds_qos_t *src);
DDS_EXPORT void ddsi_xqos_init_empty (dds_qos_t *xqos);
DDS_EXPORT void ddsi_xqos_init_default_reader (dds_qos_t *xqos);
DDS_EXPORT void ddsi_xqos_init_default_writer (dds_qos_t *xqos);
DDS_EXPORT void ddsi_xqos_init_default_writer_noautodispose (dds_qos_t *xqos);
DDS_EXPORT void ddsi_xqos_init_default_subscriber (dds_qos_t *xqos);
DDS_EXPORT void ddsi_xqos_init_default_publisher (dds_qos_t *xqos);
DDS_EXPORT void ddsi_xqos_init_default_topic (dds_qos_t *xqos);
DDS_EXPORT void ddsi_xqos_copy (dds_qos_t *dst, const dds_qos_t *src);
DDS_EXPORT void ddsi_xqos_unalias (dds_qos_t *xqos);
DDS_EXPORT void ddsi_xqos_fini (dds_qos_t *xqos);
DDS_EXPORT void ddsi_xqos_fini_mask (dds_qos_t *xqos, uint64_t mask);
DDS_EXPORT dds_return_t ddsi_xqos_valid (const struct ddsrt_log_cfg *logcfg, const dds_qos_t *xqos);
DDS_EXPORT void ddsi_xqos_mergein_missing (dds_qos_t *a, const dds_qos_t *b, uint64_t mask);
DDS_EXPORT uint64_t ddsi_xqos_delta (const dds_qos_t *a, const dds_qos_t *b, uint64_t mask);
DDS_EXPORT void ddsi_xqos_addtomsg (struct nn_xmsg *m, const dds_qos_t *xqos, uint64_t wanted);
DDS_EXPORT void ddsi_xqos_log (uint32_t cat, const struct ddsrt_log_cfg *logcfg, const dds_qos_t *xqos);
DDS_EXPORT size_t ddsi_xqos_print (char * __restrict buf, size_t bufsize, const dds_qos_t *xqos);
DDS_EXPORT dds_qos_t *ddsi_xqos_dup (const dds_qos_t *src);
#if defined (__cplusplus)
}
#endif
#endif /* NN_XQOS_H */
#endif /* DDSI_XQOS_H */

View file

@ -14,7 +14,7 @@
#include "dds/ddsi/q_log.h"
#include "dds/ddsi/q_thread.h"
#include "dds/ddsi/q_xqos.h"
#include "dds/ddsi/ddsi_xqos.h"
#include "dds/ddsi/q_feature_check.h"
#include "dds/ddsi/ddsi_portmapping.h"

View file

@ -23,7 +23,7 @@ struct writer;
struct reader;
struct nn_rsample_info;
struct nn_rdata;
struct nn_plist;
struct ddsi_plist;
int spdp_write (struct participant *pp);
int spdp_dispose_unregister (struct participant *pp);
@ -33,7 +33,7 @@ int sedp_write_reader (struct reader *rd);
int sedp_dispose_unregister_writer (struct writer *wr);
int sedp_dispose_unregister_reader (struct reader *rd);
int sedp_write_topic (struct participant *pp, const struct nn_plist *datap);
int sedp_write_topic (struct participant *pp, const struct ddsi_plist *datap);
int builtins_dqueue_handler (const struct nn_rsample_info *sampleinfo, const struct nn_rdata *fragchain, const ddsi_guid_t *rdguid, void *qarg);

View file

@ -40,7 +40,7 @@ struct addrset;
struct ddsi_sertopic;
struct whc;
struct dds_qos;
struct nn_plist;
struct ddsi_plist;
struct lease;
struct proxy_group;
@ -198,7 +198,7 @@ struct participant
dds_duration_t lease_duration; /* constant */
uint32_t bes; /* built-in endpoint set */
unsigned is_ddsi2_pp: 1; /* true for the "federation leader", the ddsi2 participant itself in OSPL; FIXME: probably should use this for broker mode as well ... */
struct nn_plist *plist; /* settings/QoS for this participant */
struct ddsi_plist *plist; /* settings/QoS for this participant */
struct xevent *spdp_xevent; /* timed event for periodically publishing SPDP */
struct xevent *pmd_update_xevent; /* timed event for periodically publishing ParticipantMessageData */
nn_locator_t m_locator;
@ -334,7 +334,7 @@ struct proxy_participant
unsigned bes; /* built-in endpoint set */
unsigned prismtech_bes; /* prismtech-specific extension of built-in endpoints set */
ddsi_guid_t privileged_pp_guid; /* if this PP depends on another PP for its SEDP writing */
struct nn_plist *plist; /* settings/QoS for this participant */
struct ddsi_plist *plist; /* settings/QoS for this participant */
ddsrt_atomic_voidp_t minl_auto; /* lease object for shortest automatic liveliness pwr's lease (includes this proxypp's lease) */
ddsrt_fibheap_t leaseheap_auto; /* keeps leases for this proxypp and leases for pwrs (with liveliness automatic) */
ddsrt_atomic_voidp_t minl_man; /* lease object for shortest manual-by-participant liveliness pwr's lease */
@ -530,7 +530,7 @@ nn_vendorid_t get_entity_vendorid (const struct entity_common *e);
* @retval DDS_RETCODE_OUT_OF_RESOURCES
* The configured maximum number of participants has been reached.
*/
dds_return_t new_participant_guid (const ddsi_guid_t *ppguid, struct ddsi_domaingv *gv, unsigned flags, const struct nn_plist *plist);
dds_return_t new_participant_guid (const ddsi_guid_t *ppguid, struct ddsi_domaingv *gv, unsigned flags, const struct ddsi_plist *plist);
/**
* @brief Create a new participant in the domain. See also new_participant_guid.
@ -554,7 +554,7 @@ dds_return_t new_participant_guid (const ddsi_guid_t *ppguid, struct ddsi_domain
* @retval DDS_RETCODE_OUT_OF_RESOURCES
* The configured maximum number of participants has been reached.
*/
dds_return_t new_participant (struct ddsi_guid *ppguid, struct ddsi_domaingv *gv, unsigned flags, const struct nn_plist *plist);
dds_return_t new_participant (struct ddsi_guid *ppguid, struct ddsi_domaingv *gv, unsigned flags, const struct ddsi_plist *plist);
/**
* @brief Initiate the deletion of the participant:
@ -581,7 +581,7 @@ dds_return_t new_participant (struct ddsi_guid *ppguid, struct ddsi_domaingv *gv
* ppguid lookup failed.
*/
dds_return_t delete_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid);
void update_participant_plist (struct participant *pp, const struct nn_plist *plist);
void update_participant_plist (struct participant *pp, const struct ddsi_plist *plist);
uint64_t get_entity_instance_id (const struct ddsi_domaingv *gv, const struct ddsi_guid *guid);
/* Gets the interval for PMD messages, which is the minimal lease duration for writers
@ -653,11 +653,11 @@ int writer_set_notalive (struct writer *wr, bool notify);
/* Set when this proxy participant is not to be announced on the built-in topics yet */
#define CF_PROXYPP_NO_SPDP (1 << 3)
void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, uint32_t bes, const struct ddsi_guid *privileged_pp_guid, struct addrset *as_default, struct addrset *as_meta, const struct nn_plist *plist, dds_duration_t tlease_dur, nn_vendorid_t vendor, unsigned custom_flags, nn_wctime_t timestamp, seqno_t seq);
void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, uint32_t bes, const struct ddsi_guid *privileged_pp_guid, struct addrset *as_default, struct addrset *as_meta, const struct ddsi_plist *plist, dds_duration_t tlease_dur, nn_vendorid_t vendor, unsigned custom_flags, nn_wctime_t timestamp, seqno_t seq);
int delete_proxy_participant_by_guid (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, nn_wctime_t timestamp, int isimplicit);
int update_proxy_participant_plist_locked (struct proxy_participant *proxypp, seqno_t seq, const struct nn_plist *datap, nn_wctime_t timestamp);
int update_proxy_participant_plist (struct proxy_participant *proxypp, seqno_t seq, const struct nn_plist *datap, nn_wctime_t timestamp);
int update_proxy_participant_plist_locked (struct proxy_participant *proxypp, seqno_t seq, const struct ddsi_plist *datap, nn_wctime_t timestamp);
int update_proxy_participant_plist (struct proxy_participant *proxypp, seqno_t seq, const struct ddsi_plist *datap, nn_wctime_t timestamp);
void proxy_participant_reassign_lease (struct proxy_participant *proxypp, struct lease *newlease);
void purge_proxy_participants (struct ddsi_domaingv *gv, const nn_locator_t *loc, bool delete_from_as_disc);
@ -665,8 +665,8 @@ void purge_proxy_participants (struct ddsi_domaingv *gv, const nn_locator_t *loc
/* To create a new proxy writer or reader; the proxy participant is
determined from the GUID and must exist. */
int new_proxy_writer (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const struct nn_plist *plist, struct nn_dqueue *dqueue, struct xeventq *evq, nn_wctime_t timestamp, seqno_t seq);
int new_proxy_reader (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const struct nn_plist *plist, nn_wctime_t timestamp, seqno_t seq
int new_proxy_writer (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const struct ddsi_plist *plist, struct nn_dqueue *dqueue, struct xeventq *evq, nn_wctime_t timestamp, seqno_t seq);
int new_proxy_reader (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const struct ddsi_plist *plist, nn_wctime_t timestamp, seqno_t seq
#ifdef DDSI_INCLUDE_SSM
, int favours_ssm
#endif

View file

@ -40,8 +40,8 @@ int write_sample_gc_notk (struct thread_state1 * const ts1, struct nn_xpack *xp,
int write_sample_nogc_notk (struct thread_state1 * const ts1, struct nn_xpack *xp, struct writer *wr, struct ddsi_serdata *serdata);
/* When calling the following functions, wr->lock must be held */
dds_return_t create_fragment_message (struct writer *wr, seqno_t seq, const struct nn_plist *plist, struct ddsi_serdata *serdata, unsigned fragnum, struct proxy_reader *prd,struct nn_xmsg **msg, int isnew);
int enqueue_sample_wrlock_held (struct writer *wr, seqno_t seq, const struct nn_plist *plist, struct ddsi_serdata *serdata, struct proxy_reader *prd, int isnew);
dds_return_t create_fragment_message (struct writer *wr, seqno_t seq, const struct ddsi_plist *plist, struct ddsi_serdata *serdata, unsigned fragnum, struct proxy_reader *prd,struct nn_xmsg **msg, int isnew);
int enqueue_sample_wrlock_held (struct writer *wr, seqno_t seq, const struct ddsi_plist *plist, struct ddsi_serdata *serdata, struct proxy_reader *prd, int isnew);
void add_Heartbeat (struct nn_xmsg *msg, struct writer *wr, const struct whc_state *whcst, int hbansreq, int hbliveliness, ddsi_entityid_t dst, int issync);
dds_return_t write_hb_liveliness (struct ddsi_domaingv * const gv, struct ddsi_guid *wr_guid, struct nn_xpack *xp);

View file

@ -20,7 +20,7 @@ extern "C" {
#endif
struct ddsi_serdata;
struct nn_plist;
struct ddsi_plist;
struct ddsi_tkmap_instance;
struct whc_node; /* opaque, but currently used for deferred free lists */
struct whc;
@ -28,7 +28,7 @@ struct whc;
struct whc_borrowed_sample {
seqno_t seq;
struct ddsi_serdata *serdata;
struct nn_plist *plist;
struct ddsi_plist *plist;
bool unacked;
nn_mtime_t last_rexmit_ts;
unsigned rexmit_count;
@ -73,7 +73,7 @@ typedef void (*whc_free_t)(struct whc *whc);
reliable readers that have not acknowledged all data */
/* max_drop_seq must go soon, it's way too ugly. */
/* plist may be NULL or ddsrt_malloc'd, WHC takes ownership of plist */
typedef int (*whc_insert_t)(struct whc *whc, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct nn_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk);
typedef int (*whc_insert_t)(struct whc *whc, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct ddsi_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk);
typedef uint32_t (*whc_downgrade_to_volatile_t)(struct whc *whc, struct whc_state *st);
typedef uint32_t (*whc_remove_acked_messages_t)(struct whc *whc, seqno_t max_drop_seq, struct whc_state *whcst, struct whc_node **deferred_free_list);
typedef void (*whc_free_deferred_free_list_t)(struct whc *whc, struct whc_node *deferred_free_list);
@ -121,7 +121,7 @@ inline bool whc_sample_iter_borrow_next (struct whc_sample_iter *it, struct whc_
inline void whc_free (struct whc *whc) {
whc->ops->free (whc);
}
inline int whc_insert (struct whc *whc, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct nn_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk) {
inline int whc_insert (struct whc *whc, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct ddsi_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk) {
return whc->ops->insert (whc, max_drop_seq, seq, exp, plist, serdata, tk);
}
inline unsigned whc_downgrade_to_volatile (struct whc *whc, struct whc_state *st) {

View file

@ -15,7 +15,7 @@
#include <stddef.h>
#include "dds/ddsi/q_protocol.h" /* for, e.g., SubmessageKind_t */
#include "dds/ddsi/q_xqos.h" /* for, e.g., octetseq, stringseq */
#include "dds/ddsi/ddsi_xqos.h" /* for, e.g., octetseq, stringseq */
#include "dds/ddsi/ddsi_tran.h"
#if defined (__cplusplus)

View file

@ -24,7 +24,7 @@
#include "dds/ddsi/q_bswap.h"
#include "dds/ddsi/q_unused.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_plist.h"
#include "dds/ddsi/q_time.h"
#include "dds/ddsi/q_xmsg.h"
#include "dds/ddsi/ddsi_vendor.h"
@ -33,7 +33,7 @@
#include "dds/ddsi/q_config.h"
#include "dds/ddsi/ddsi_domaingv.h"
#include "dds/ddsi/q_protocol.h" /* for NN_STATUSINFO_... */
#include "dds/ddsi/q_radmin.h" /* for nn_plist_quickscan */
#include "dds/ddsi/q_radmin.h" /* for ddsi_plist_quickscan */
#include "dds/ddsrt/avl.h"
#include "dds/ddsi/q_misc.h" /* for vendor_is_... */
@ -48,7 +48,7 @@ DDSRT_STATIC_ASSERT(DDS_LENGTH_UNLIMITED == -1);
/* These are internal to the parameter list processing. We never
generate them, and we never want to do see them anywhere outside
the actual parsing of an incoming parameter list. (There are
entries in nn_plist, but they are never to be inspected and
entries in ddsi_plist, but they are never to be inspected and
the bits corresponding to them must be 0 except while processing an
incoming parameter list.) */
#define PPTMP_MULTICAST_IPADDRESS (1 << 0)
@ -95,7 +95,7 @@ struct piddesc {
uint16_t flags; /* see PDF_xxx flags */
uint64_t present_flag; /* flag in plist.present / plist.qos.present */
const char *name; /* name for reporting invalid input */
size_t plist_offset; /* offset from start of nn_plist_t */
size_t plist_offset; /* offset from start of ddsi_plist_t */
size_t size; /* in-memory size for copying */
union {
/* descriptor for generic code: 12 is enough for the current set of
@ -125,7 +125,7 @@ static dds_return_t validate_durability_service_qospolicy_acceptzero (const dds_
static dds_return_t do_locator (nn_locators_t *ls, uint64_t *present, uint64_t wanted, uint64_t fl, const struct dd *dd, const struct ddsi_tran_factory *factory);
static dds_return_t final_validation_qos (const dds_qos_t *dest, nn_protocol_version_t protocol_version, nn_vendorid_t vendorid, bool *dursvc_accepted_allzero, bool strict);
static int partitions_equal (const void *srca, const void *srcb, size_t off);
static dds_return_t nn_xqos_valid_strictness (const struct ddsrt_log_cfg *logcfg, const dds_qos_t *xqos, bool strict);
static dds_return_t ddsi_xqos_valid_strictness (const struct ddsrt_log_cfg *logcfg, const dds_qos_t *xqos, bool strict);
static size_t align4size (size_t x)
{
@ -1278,9 +1278,9 @@ static bool print_generic (char * __restrict *buf, size_t * __restrict bufsize,
}
#define membersize(type, member) sizeof (((type *) 0)->member)
#define ENTRY(PFX_, NAME_, member_, flag_, validate_, ...) \
{ PID_##NAME_, flag_, PFX_##_##NAME_, #NAME_, offsetof (struct nn_plist, member_), \
membersize (struct nn_plist, member_), { .desc = { __VA_ARGS__, XSTOP } }, validate_ \
#define ENTRY(PFX_, NAME_, member_, flag_, validate_, ...) \
{ PID_##NAME_, flag_, PFX_##_##NAME_, #NAME_, offsetof (struct ddsi_plist, member_), \
membersize (struct ddsi_plist, member_), { .desc = { __VA_ARGS__, XSTOP } }, validate_ \
}
#define QPV(NAME_, name_, ...) ENTRY(QP, NAME_, qos.name_, PDF_QOS, dvx_##name_, __VA_ARGS__)
#define PPV(NAME_, name_, ...) ENTRY(PP, NAME_, name_, 0, dvx_##name_, __VA_ARGS__)
@ -1361,8 +1361,8 @@ static dds_return_t dvx_reader_favours_ssm (void * __restrict dst, const struct
}
#endif
/* Standardized parameters -- QoS _MUST_ come first (nn_plist_init_tables verifies this) because
it allows early-out when processing a dds_qos_t instead of an nn_plist_t */
/* Standardized parameters -- QoS _MUST_ come first (ddsi_plist_init_tables verifies this) because
it allows early-out when processing a dds_qos_t instead of an ddsi_plist_t */
static const struct piddesc piddesc_omg[] = {
QP (USER_DATA, user_data, XO),
QP (TOPIC_NAME, topic_name, XS),
@ -1381,7 +1381,7 @@ static const struct piddesc piddesc_omg[] = {
QP (PROPERTY_LIST, property, XQ, XbPROP, XS, XS, XSTOP, Xopt, XQ, XbPROP, XS, XO, XSTOP),
/* Reliability encoding does not follow the rules (best-effort/reliable map to 1/2 instead of 0/1 */
{ PID_RELIABILITY, PDF_QOS | PDF_FUNCTION, QP_RELIABILITY, "RELIABILITY",
offsetof (struct nn_plist, qos.reliability), membersize (struct nn_plist, qos.reliability),
offsetof (struct ddsi_plist, qos.reliability), membersize (struct ddsi_plist, qos.reliability),
{ .f = { .deser = deser_reliability, .ser = ser_reliability, .valid = valid_reliability, .equal = equal_reliability, .print = print_reliability } }, 0 },
QP (LIFESPAN, lifespan, XD),
QP (DESTINATION_ORDER, destination_order, XE1),
@ -1412,34 +1412,34 @@ static const struct piddesc piddesc_omg[] = {
PP (DOMAIN_ID, domain_id, Xu),
PP (DOMAIN_TAG, domain_tag, XS),
{ PID_STATUSINFO, PDF_FUNCTION, PP_STATUSINFO, "STATUSINFO",
offsetof (struct nn_plist, statusinfo), membersize (struct nn_plist, statusinfo),
offsetof (struct ddsi_plist, statusinfo), membersize (struct ddsi_plist, statusinfo),
{ .f = { .deser = deser_statusinfo, .ser = ser_statusinfo, .print = print_statusinfo } }, 0 },
/* Locators are difficult to deal with because they can occur multi times to represent a set;
that is manageable for deser, unalias and fini, but it breaks ser because that one only
generates a single parameter header */
{ PID_UNICAST_LOCATOR, PDF_FUNCTION | PDF_ALLOWMULTI,
PP_UNICAST_LOCATOR, "UNICAST_LOCATOR",
offsetof (struct nn_plist, unicast_locators), membersize (struct nn_plist, unicast_locators),
offsetof (struct ddsi_plist, unicast_locators), membersize (struct ddsi_plist, unicast_locators),
{ .f = { .deser = deser_locator, .ser = ser_locator, .unalias = unalias_locator, .fini = fini_locator, .print = print_locator } }, 0 },
{ PID_MULTICAST_LOCATOR, PDF_FUNCTION | PDF_ALLOWMULTI,
PP_MULTICAST_LOCATOR, "MULTICAST_LOCATOR",
offsetof (struct nn_plist, multicast_locators), membersize (struct nn_plist, multicast_locators),
offsetof (struct ddsi_plist, multicast_locators), membersize (struct ddsi_plist, multicast_locators),
{ .f = { .deser = deser_locator, .ser = ser_locator, .unalias = unalias_locator, .fini = fini_locator, .print = print_locator } }, 0 },
{ PID_DEFAULT_UNICAST_LOCATOR, PDF_FUNCTION | PDF_ALLOWMULTI,
PP_DEFAULT_UNICAST_LOCATOR, "DEFAULT_UNICAST_LOCATOR",
offsetof (struct nn_plist, default_unicast_locators), membersize (struct nn_plist, default_unicast_locators),
offsetof (struct ddsi_plist, default_unicast_locators), membersize (struct ddsi_plist, default_unicast_locators),
{ .f = { .deser = deser_locator, .ser = ser_locator, .unalias = unalias_locator, .fini = fini_locator, .print = print_locator } }, 0 },
{ PID_DEFAULT_MULTICAST_LOCATOR, PDF_FUNCTION | PDF_ALLOWMULTI,
PP_DEFAULT_MULTICAST_LOCATOR, "DEFAULT_MULTICAST_LOCATOR",
offsetof (struct nn_plist, default_multicast_locators), membersize (struct nn_plist, default_multicast_locators),
offsetof (struct ddsi_plist, default_multicast_locators), membersize (struct ddsi_plist, default_multicast_locators),
{ .f = { .deser = deser_locator, .ser = ser_locator, .unalias = unalias_locator, .fini = fini_locator, .print = print_locator } }, 0 },
{ PID_METATRAFFIC_UNICAST_LOCATOR, PDF_FUNCTION | PDF_ALLOWMULTI,
PP_METATRAFFIC_UNICAST_LOCATOR, "METATRAFFIC_UNICAST_LOCATOR",
offsetof (struct nn_plist, metatraffic_unicast_locators), membersize (struct nn_plist, metatraffic_unicast_locators),
offsetof (struct ddsi_plist, metatraffic_unicast_locators), membersize (struct ddsi_plist, metatraffic_unicast_locators),
{ .f = { .deser = deser_locator, .ser = ser_locator, .unalias = unalias_locator, .fini = fini_locator, .print = print_locator } }, 0 },
{ PID_METATRAFFIC_MULTICAST_LOCATOR, PDF_FUNCTION | PDF_ALLOWMULTI,
PP_METATRAFFIC_MULTICAST_LOCATOR, "METATRAFFIC_MULTICAST_LOCATOR",
offsetof (struct nn_plist, metatraffic_multicast_locators), membersize (struct nn_plist, metatraffic_multicast_locators),
offsetof (struct ddsi_plist, metatraffic_multicast_locators), membersize (struct ddsi_plist, metatraffic_multicast_locators),
{ .f = { .deser = deser_locator, .ser = ser_locator, .unalias = unalias_locator, .fini = fini_locator, .print = print_locator } }, 0 },
/* PID_..._{IPADDRESS,PORT} is impossible to deal with and are never generated, only accepted.
The problem is that there one needs additional state (and even then there is no clear
@ -1455,7 +1455,7 @@ static const struct piddesc piddesc_eclipse[] = {
QP (PRISMTECH_READER_DATA_LIFECYCLE, reader_data_lifecycle, XDx2),
QP (PRISMTECH_SUBSCRIPTION_KEYS, subscription_keys, XbCOND, XQ, XS, XSTOP),
{ PID_PAD, PDF_QOS, QP_CYCLONE_IGNORELOCAL, "CYCLONE_IGNORELOCAL",
offsetof (struct nn_plist, qos.ignorelocal), membersize (struct nn_plist, qos.ignorelocal),
offsetof (struct ddsi_plist, qos.ignorelocal), membersize (struct ddsi_plist, qos.ignorelocal),
{ .desc = { XE2, XSTOP } }, 0 },
PP (PRISMTECH_PARTICIPANT_VERSION_INFO, prismtech_participant_version_info, Xux5, XS),
PP (PRISMTECH_TYPE_DESCRIPTION, type_description, XS),
@ -1515,7 +1515,7 @@ struct piddesc_index {
Sizes are such that the highest PID (without flags) in
table are the last entry in the array. Checked by
nn_plist_init_tables.
ddsi_plist_init_tables.
FIXME: should compute them at build-time */
#ifdef DDSI_INCLUDE_SSM
@ -1546,7 +1546,7 @@ static const struct piddesc_index piddesc_vendor_index[] = {
#undef INDEX_ANY
/* List of entries that require unalias, fini processing;
initialized by nn_plist_init_tables; will assert when
initialized by ddsi_plist_init_tables; will assert when
table too small or too large */
static const struct piddesc *piddesc_unalias[18];
static const struct piddesc *piddesc_fini[18];
@ -1568,7 +1568,7 @@ static int piddesc_cmp_qos_addr (const void *va, const void *vb)
return ((uintptr_t) *a == (uintptr_t) *b) ? 0 : ((uintptr_t) *a < (uintptr_t) *b) ? -1 : 1;
}
static void nn_plist_init_tables_real (void)
static void ddsi_plist_init_tables_real (void)
{
/* make index of pid -> entry */
for (size_t i = 0; i < sizeof (piddesc_vendor_index) / sizeof (piddesc_vendor_index[0]); i++)
@ -1659,9 +1659,9 @@ static void nn_plist_init_tables_real (void)
#endif
}
void nn_plist_init_tables (void)
void ddsi_plist_init_tables (void)
{
ddsrt_once (&table_init_control, nn_plist_init_tables_real);
ddsrt_once (&table_init_control, ddsi_plist_init_tables_real);
}
static void plist_or_xqos_fini (void * __restrict dst, size_t shift, uint64_t pmask, uint64_t qmask)
@ -1671,7 +1671,7 @@ static void plist_or_xqos_fini (void * __restrict dst, size_t shift, uint64_t pm
/* DDS manipulation can be done without creating a participant, so we may
have to initialize tables just-in-time */
if (piddesc_fini[0] == NULL)
nn_plist_init_tables ();
ddsi_plist_init_tables ();
if (shift > 0)
{
dds_qos_t *qos = dst;
@ -1680,7 +1680,7 @@ static void plist_or_xqos_fini (void * __restrict dst, size_t shift, uint64_t pm
}
else
{
nn_plist_t *plist = dst;
ddsi_plist_t *plist = dst;
pfs = (struct flagset) { .present = &plist->present, .aliased = &plist->aliased };
qfs = (struct flagset) { .present = &plist->qos.present, .aliased = &plist->qos.aliased };
}
@ -1713,7 +1713,7 @@ static void plist_or_xqos_unalias (void * __restrict dst, size_t shift)
/* DDS manipulation can be done without creating a participant, so we may
have to initialize tables just-in-time */
if (piddesc_unalias[0] == NULL)
nn_plist_init_tables ();
ddsi_plist_init_tables ();
if (shift > 0)
{
dds_qos_t *qos = dst;
@ -1722,7 +1722,7 @@ static void plist_or_xqos_unalias (void * __restrict dst, size_t shift)
}
else
{
nn_plist_t *plist = dst;
ddsi_plist_t *plist = dst;
pfs = (struct flagset) { .present = &plist->present, .aliased = &plist->aliased };
qfs = (struct flagset) { .present = &plist->qos.present, .aliased = &plist->qos.aliased };
}
@ -1754,8 +1754,8 @@ static void plist_or_xqos_mergein_missing (void * __restrict dst, const void * _
struct flagset pfs_src, qfs_src;
struct flagset pfs_dst, qfs_dst;
#ifndef NDEBUG
const uint64_t aliased_dst_inp = (shift == 0) ? ((nn_plist_t *) dst)->aliased : 0;
const uint64_t aliased_dst_inq = (shift == 0) ? ((nn_plist_t *) dst)->qos.aliased : ((dds_qos_t *) dst)->aliased;
const uint64_t aliased_dst_inp = (shift == 0) ? ((ddsi_plist_t *) dst)->aliased : 0;
const uint64_t aliased_dst_inq = (shift == 0) ? ((ddsi_plist_t *) dst)->qos.aliased : ((dds_qos_t *) dst)->aliased;
#endif
if (shift > 0)
{
@ -1768,8 +1768,8 @@ static void plist_or_xqos_mergein_missing (void * __restrict dst, const void * _
}
else
{
nn_plist_t *plist_dst = dst;
const nn_plist_t *plist_src = src;
ddsi_plist_t *plist_dst = dst;
const ddsi_plist_t *plist_src = src;
pfs_dst = (struct flagset) { .present = &plist_dst->present, .aliased = &plist_dst->aliased };
qfs_dst = (struct flagset) { .present = &plist_dst->qos.present, .aliased = &plist_dst->qos.aliased };
pfs_src = (struct flagset) { .present = (uint64_t *) &plist_src->present, .aliased = (uint64_t *) &plist_src->aliased };
@ -1830,7 +1830,7 @@ static void plist_or_xqos_addtomsg (struct nn_xmsg *xmsg, const void * __restric
}
else
{
const nn_plist_t *plist = src;
const ddsi_plist_t *plist = src;
pw = plist->present & pwanted;
qw = plist->qos.present & qwanted;
}
@ -1856,26 +1856,26 @@ static void plist_or_xqos_addtomsg (struct nn_xmsg *xmsg, const void * __restric
}
}
void nn_plist_fini (nn_plist_t *plist)
void ddsi_plist_fini (ddsi_plist_t *plist)
{
plist_or_xqos_fini (plist, 0, ~(uint64_t)0, ~(uint64_t)0);
}
void nn_plist_fini_mask (nn_plist_t *plist, uint64_t pmask, uint64_t qmask)
void ddsi_plist_fini_mask (ddsi_plist_t *plist, uint64_t pmask, uint64_t qmask)
{
plist_or_xqos_fini (plist, 0, pmask, qmask);
}
void nn_plist_unalias (nn_plist_t *plist)
void ddsi_plist_unalias (ddsi_plist_t *plist)
{
plist_or_xqos_unalias (plist, 0);
}
static dds_return_t nn_xqos_valid_strictness (const struct ddsrt_log_cfg *logcfg, const dds_qos_t *xqos, bool strict)
static dds_return_t ddsi_xqos_valid_strictness (const struct ddsrt_log_cfg *logcfg, const dds_qos_t *xqos, bool strict)
{
dds_return_t ret;
if (piddesc_unalias[0] == NULL)
nn_plist_init_tables ();
ddsi_plist_init_tables ();
for (size_t k = 0; k < sizeof (piddesc_tables_all) / sizeof (piddesc_tables_all[0]); k++)
{
struct piddesc const * const table = piddesc_tables_all[k];
@ -1886,14 +1886,14 @@ static dds_return_t nn_xqos_valid_strictness (const struct ddsrt_log_cfg *logcfg
break;
if (xqos->present & entry->present_flag)
{
const size_t srcoff = entry->plist_offset - offsetof (nn_plist_t, qos);
const size_t srcoff = entry->plist_offset - offsetof (ddsi_plist_t, qos);
if (!(entry->flags & PDF_FUNCTION))
ret = valid_generic (xqos, srcoff, entry->op.desc);
else
ret = entry->op.f.valid (xqos, srcoff);
if (ret < 0)
{
DDS_CLOG (DDS_LC_PLIST, logcfg, "nn_xqos_valid: %s invalid\n", entry->name);
DDS_CLOG (DDS_LC_PLIST, logcfg, "ddsi_xqos_valid: %s invalid\n", entry->name);
return ret;
}
}
@ -1901,14 +1901,14 @@ static dds_return_t nn_xqos_valid_strictness (const struct ddsrt_log_cfg *logcfg
}
if ((ret = final_validation_qos (xqos, (nn_protocol_version_t) { RTPS_MAJOR, RTPS_MINOR }, NN_VENDORID_ECLIPSE, NULL, strict)) < 0)
{
DDS_CLOG (DDS_LC_PLIST, logcfg, "nn_xqos_valid: final validation failed\n");
DDS_CLOG (DDS_LC_PLIST, logcfg, "ddsi_xqos_valid: final validation failed\n");
}
return ret;
}
dds_return_t nn_xqos_valid (const struct ddsrt_log_cfg *logcfg, const dds_qos_t *xqos)
dds_return_t ddsi_xqos_valid (const struct ddsrt_log_cfg *logcfg, const dds_qos_t *xqos)
{
return nn_xqos_valid_strictness (logcfg, xqos, true);
return ddsi_xqos_valid_strictness (logcfg, xqos, true);
}
static void plist_or_xqos_delta (uint64_t *pdelta, uint64_t *qdelta, const void *srcx, const void *srcy, size_t shift, uint64_t pmask, uint64_t qmask)
@ -1916,7 +1916,7 @@ static void plist_or_xqos_delta (uint64_t *pdelta, uint64_t *qdelta, const void
uint64_t pcheck, qcheck;
if (piddesc_unalias[0] == NULL)
nn_plist_init_tables ();
ddsi_plist_init_tables ();
if (shift > 0)
{
const dds_qos_t *x = srcx;
@ -1928,8 +1928,8 @@ static void plist_or_xqos_delta (uint64_t *pdelta, uint64_t *qdelta, const void
}
else
{
const nn_plist_t *x = srcx;
const nn_plist_t *y = srcy;
const ddsi_plist_t *x = srcx;
const ddsi_plist_t *y = srcy;
*pdelta = (x->present ^ y->present) & pmask;
pcheck = (x->present & y->present) & pmask;
*qdelta = (x->qos.present ^ y->qos.present) & qmask;
@ -1967,14 +1967,14 @@ static void plist_or_xqos_delta (uint64_t *pdelta, uint64_t *qdelta, const void
}
}
uint64_t nn_xqos_delta (const dds_qos_t *x, const dds_qos_t *y, uint64_t mask)
uint64_t ddsi_xqos_delta (const dds_qos_t *x, const dds_qos_t *y, uint64_t mask)
{
uint64_t pdelta, qdelta;
plist_or_xqos_delta (&pdelta, &qdelta, x, y, offsetof (nn_plist_t, qos), 0, mask);
plist_or_xqos_delta (&pdelta, &qdelta, x, y, offsetof (ddsi_plist_t, qos), 0, mask);
return qdelta;
}
void nn_plist_delta (uint64_t *pdelta, uint64_t *qdelta, const nn_plist_t *x, const nn_plist_t *y, uint64_t pmask, uint64_t qmask)
void ddsi_plist_delta (uint64_t *pdelta, uint64_t *qdelta, const ddsi_plist_t *x, const ddsi_plist_t *y, uint64_t pmask, uint64_t qmask)
{
plist_or_xqos_delta (pdelta, qdelta, x, y, 0, pmask, qmask);
}
@ -2197,7 +2197,7 @@ static void locator_from_ipv4address_port (nn_locator_t *loc, const nn_ipv4addre
memcpy (loc->address + 12, a, 4);
}
static dds_return_t do_ipv4address (nn_plist_t *dest, nn_ipaddress_params_tmp_t *dest_tmp, uint64_t wanted, uint32_t fl_tmp, const struct dd *dd, ddsi_tran_factory_t factory)
static dds_return_t do_ipv4address (ddsi_plist_t *dest, nn_ipaddress_params_tmp_t *dest_tmp, uint64_t wanted, uint32_t fl_tmp, const struct dd *dd, ddsi_tran_factory_t factory)
{
nn_ipv4address_t *a;
nn_port_t *p;
@ -2264,7 +2264,7 @@ static dds_return_t do_ipv4address (nn_plist_t *dest, nn_ipaddress_params_tmp_t
}
}
static dds_return_t do_port (nn_plist_t *dest, nn_ipaddress_params_tmp_t *dest_tmp, uint64_t wanted, uint32_t fl_tmp, const struct dd *dd, ddsi_tran_factory_t factory)
static dds_return_t do_port (ddsi_plist_t *dest, nn_ipaddress_params_tmp_t *dest_tmp, uint64_t wanted, uint32_t fl_tmp, const struct dd *dd, ddsi_tran_factory_t factory)
{
nn_ipv4address_t *a;
nn_port_t *p;
@ -2321,7 +2321,7 @@ static dds_return_t do_port (nn_plist_t *dest, nn_ipaddress_params_tmp_t *dest_t
}
}
static dds_return_t return_unrecognized_pid (nn_plist_t *plist, nn_parameterid_t pid)
static dds_return_t return_unrecognized_pid (ddsi_plist_t *plist, nn_parameterid_t pid)
{
if (!(pid & PID_UNRECOGNIZED_INCOMPATIBLE_FLAG))
return 0;
@ -2332,7 +2332,7 @@ static dds_return_t return_unrecognized_pid (nn_plist_t *plist, nn_parameterid_t
}
}
static dds_return_t init_one_parameter (nn_plist_t *plist, nn_ipaddress_params_tmp_t *dest_tmp, uint64_t pwanted, uint64_t qwanted, uint16_t pid, const struct dd *dd, ddsi_tran_factory_t factory, const ddsrt_log_cfg_t *logcfg)
static dds_return_t init_one_parameter (ddsi_plist_t *plist, nn_ipaddress_params_tmp_t *dest_tmp, uint64_t pwanted, uint64_t qwanted, uint16_t pid, const struct dd *dd, ddsi_tran_factory_t factory, const ddsrt_log_cfg_t *logcfg)
{
/* special-cased ipv4address and port, because they have state beyond that what gets
passed into the generic code */
@ -2429,38 +2429,38 @@ static dds_return_t init_one_parameter (nn_plist_t *plist, nn_ipaddress_params_t
return ret;
}
void nn_plist_mergein_missing (nn_plist_t *a, const nn_plist_t *b, uint64_t pmask, uint64_t qmask)
void ddsi_plist_mergein_missing (ddsi_plist_t *a, const ddsi_plist_t *b, uint64_t pmask, uint64_t qmask)
{
plist_or_xqos_mergein_missing (a, b, 0, pmask, qmask);
}
void nn_xqos_mergein_missing (dds_qos_t *a, const dds_qos_t *b, uint64_t mask)
void ddsi_xqos_mergein_missing (dds_qos_t *a, const dds_qos_t *b, uint64_t mask)
{
plist_or_xqos_mergein_missing (a, b, offsetof (nn_plist_t, qos), 0, mask);
plist_or_xqos_mergein_missing (a, b, offsetof (ddsi_plist_t, qos), 0, mask);
}
void nn_plist_copy (nn_plist_t *dst, const nn_plist_t *src)
void ddsi_plist_copy (ddsi_plist_t *dst, const ddsi_plist_t *src)
{
nn_plist_init_empty (dst);
nn_plist_mergein_missing (dst, src, ~(uint64_t)0, ~(uint64_t)0);
ddsi_plist_init_empty (dst);
ddsi_plist_mergein_missing (dst, src, ~(uint64_t)0, ~(uint64_t)0);
}
nn_plist_t *nn_plist_dup (const nn_plist_t *src)
ddsi_plist_t *ddsi_plist_dup (const ddsi_plist_t *src)
{
nn_plist_t *dst;
ddsi_plist_t *dst;
dst = ddsrt_malloc (sizeof (*dst));
nn_plist_copy (dst, src);
ddsi_plist_copy (dst, src);
assert (dst->aliased == 0);
return dst;
}
void nn_plist_init_empty (nn_plist_t *dest)
void ddsi_plist_init_empty (ddsi_plist_t *dest)
{
#ifndef NDEBUG
memset (dest, 0, sizeof (*dest));
#endif
dest->present = dest->aliased = 0;
nn_xqos_init_empty (&dest->qos);
ddsi_xqos_init_empty (&dest->qos);
}
static dds_return_t final_validation_qos (const dds_qos_t *dest, nn_protocol_version_t protocol_version, nn_vendorid_t vendorid, bool *dursvc_accepted_allzero, bool strict)
@ -2540,12 +2540,12 @@ static dds_return_t final_validation_qos (const dds_qos_t *dest, nn_protocol_ver
return 0;
}
static dds_return_t final_validation (nn_plist_t *dest, nn_protocol_version_t protocol_version, nn_vendorid_t vendorid, bool *dursvc_accepted_allzero, bool strict)
static dds_return_t final_validation (ddsi_plist_t *dest, nn_protocol_version_t protocol_version, nn_vendorid_t vendorid, bool *dursvc_accepted_allzero, bool strict)
{
return final_validation_qos (&dest->qos, protocol_version, vendorid, dursvc_accepted_allzero, strict);
}
dds_return_t nn_plist_init_frommsg (nn_plist_t *dest, char **nextafterplist, uint64_t pwanted, uint64_t qwanted, const nn_plist_src_t *src)
dds_return_t ddsi_plist_init_frommsg (ddsi_plist_t *dest, char **nextafterplist, uint64_t pwanted, uint64_t qwanted, const ddsi_plist_src_t *src)
{
const unsigned char *pl;
struct dd dd;
@ -2581,10 +2581,10 @@ dds_return_t nn_plist_init_frommsg (nn_plist_t *dest, char **nextafterplist, uin
src->vendorid.id[0], src->vendorid.id[1], src->encoding);
return DDS_RETCODE_BAD_PARAMETER;
}
nn_plist_init_empty (dest);
ddsi_plist_init_empty (dest);
dest_tmp.present = 0;
DDS_CLOG (DDS_LC_PLIST, src->logconfig, "NN_PLIST_INIT (bswap %d)\n", dd.bswap);
DDS_CLOG (DDS_LC_PLIST, src->logconfig, "DDSI_PLIST_INIT (bswap %d)\n", dd.bswap);
pl = src->buf;
while (pl + sizeof (nn_parameter_t) <= src->buf + src->bufsz)
@ -2605,7 +2605,7 @@ dds_return_t nn_plist_init_frommsg (nn_plist_t *dest, char **nextafterplist, uin
DDS_CLOG (DDS_LC_PLIST, src->logconfig, "%4"PRIx32" PID %"PRIx16"\n", (uint32_t) (pl - src->buf), pid);
if ((res = final_validation (dest, src->protocol_version, src->vendorid, &dursvc_accepted_allzero, src->strict)) < 0)
{
nn_plist_fini (dest);
ddsi_plist_fini (dest);
return res;
}
else
@ -2624,14 +2624,14 @@ dds_return_t nn_plist_init_frommsg (nn_plist_t *dest, char **nextafterplist, uin
{
DDS_CWARNING (src->logconfig, "plist(vendor %u.%u): parameter length %"PRIu16" out of bounds\n",
src->vendorid.id[0], src->vendorid.id[1], length);
nn_plist_fini (dest);
ddsi_plist_fini (dest);
return DDS_RETCODE_BAD_PARAMETER;
}
if ((length % 4) != 0) /* DDSI 9.4.2.11 */
{
DDS_CWARNING (src->logconfig, "plist(vendor %u.%u): parameter length %"PRIu16" mod 4 != 0\n",
src->vendorid.id[0], src->vendorid.id[1], length);
nn_plist_fini (dest);
ddsi_plist_fini (dest);
return DDS_RETCODE_BAD_PARAMETER;
}
@ -2649,7 +2649,7 @@ dds_return_t nn_plist_init_frommsg (nn_plist_t *dest, char **nextafterplist, uin
{
/* make sure we print a trace message on error */
DDS_CTRACE (src->logconfig, "plist(vendor %u.%u): failed at pid=%"PRIx16"\n", src->vendorid.id[0], src->vendorid.id[1], pid);
nn_plist_fini (dest);
ddsi_plist_fini (dest);
return res;
}
pl += sizeof (*par) + length;
@ -2658,11 +2658,11 @@ dds_return_t nn_plist_init_frommsg (nn_plist_t *dest, char **nextafterplist, uin
without encountering a sentinel. That is an error */
DDS_CWARNING (src->logconfig, "plist(vendor %u.%u): invalid parameter list: sentinel missing\n",
src->vendorid.id[0], src->vendorid.id[1]);
nn_plist_fini (dest);
ddsi_plist_fini (dest);
return DDS_RETCODE_BAD_PARAMETER;
}
const unsigned char *nn_plist_findparam_native_unchecked (const void *src, nn_parameterid_t pid)
const unsigned char *ddsi_plist_findparam_native_unchecked (const void *src, nn_parameterid_t pid)
{
/* Scans the parameter list starting at src looking just for pid, returning NULL if not found;
no further checking is done and the input is assumed to valid and in native format. Clearly
@ -2678,11 +2678,11 @@ const unsigned char *nn_plist_findparam_native_unchecked (const void *src, nn_pa
return (unsigned char *) (par + 1);
}
unsigned char *nn_plist_quickscan (struct nn_rsample_info *dest, const struct nn_rmsg *rmsg, const nn_plist_src_t *src)
unsigned char *ddsi_plist_quickscan (struct nn_rsample_info *dest, const struct nn_rmsg *rmsg, const ddsi_plist_src_t *src)
{
/* Sets a few fields in dest, returns address of first byte
following parameter list, or NULL on error. Most errors will go
undetected, unlike nn_plist_init_frommsg(). */
undetected, unlike ddsi_plist_init_frommsg(). */
const unsigned char *pl;
(void)rmsg;
dest->statusinfo = 0;
@ -2709,7 +2709,7 @@ unsigned char *nn_plist_quickscan (struct nn_rsample_info *dest, const struct nn
src->vendorid.id[0], src->vendorid.id[1], src->encoding);
return NULL;
}
DDS_CLOG (DDS_LC_PLIST, src->logconfig, "NN_PLIST_QUICKSCAN (bswap %d)\n", dest->bswap);
DDS_CLOG (DDS_LC_PLIST, src->logconfig, "DDSI_PLIST_QUICKSCAN (bswap %d)\n", dest->bswap);
pl = src->buf;
while (pl + sizeof (nn_parameter_t) <= src->buf + src->bufsz)
{
@ -2770,7 +2770,7 @@ unsigned char *nn_plist_quickscan (struct nn_rsample_info *dest, const struct nn
return NULL;
}
void nn_xqos_init_empty (dds_qos_t *dest)
void ddsi_xqos_init_empty (dds_qos_t *dest)
{
#ifndef NDEBUG
memset (dest, 0, sizeof (*dest));
@ -2778,9 +2778,9 @@ void nn_xqos_init_empty (dds_qos_t *dest)
dest->present = dest->aliased = 0;
}
void nn_plist_init_default_participant (nn_plist_t *plist)
void ddsi_plist_init_default_participant (ddsi_plist_t *plist)
{
nn_plist_init_empty (plist);
ddsi_plist_init_empty (plist);
plist->qos.present |= QP_PRISMTECH_ENTITY_FACTORY;
plist->qos.entity_factory.autoenable_created_entities = 0;
@ -2792,7 +2792,7 @@ void nn_plist_init_default_participant (nn_plist_t *plist)
static void xqos_init_default_common (dds_qos_t *xqos)
{
nn_xqos_init_empty (xqos);
ddsi_xqos_init_empty (xqos);
xqos->present |= QP_PRESENTATION;
xqos->presentation.access_scope = DDS_PRESENTATION_INSTANCE;
@ -2834,7 +2834,7 @@ static void xqos_init_default_common (dds_qos_t *xqos)
xqos->ignorelocal.value = DDS_IGNORELOCAL_NONE;
}
static void nn_xqos_init_default_endpoint (dds_qos_t *xqos)
static void ddsi_xqos_init_default_endpoint (dds_qos_t *xqos)
{
xqos_init_default_common (xqos);
@ -2855,9 +2855,9 @@ static void nn_xqos_init_default_endpoint (dds_qos_t *xqos)
xqos->partition.strs = NULL;
}
void nn_xqos_init_default_reader (dds_qos_t *xqos)
void ddsi_xqos_init_default_reader (dds_qos_t *xqos)
{
nn_xqos_init_default_endpoint (xqos);
ddsi_xqos_init_default_endpoint (xqos);
xqos->present |= QP_RELIABILITY;
xqos->reliability.kind = DDS_RELIABILITY_BEST_EFFORT;
@ -2879,9 +2879,9 @@ void nn_xqos_init_default_reader (dds_qos_t *xqos)
xqos->subscription_keys.key_list.strs = NULL;
}
void nn_xqos_init_default_writer (dds_qos_t *xqos)
void ddsi_xqos_init_default_writer (dds_qos_t *xqos)
{
nn_xqos_init_default_endpoint (xqos);
ddsi_xqos_init_default_endpoint (xqos);
xqos->present |= QP_DURABILITY_SERVICE;
xqos->durability_service.service_cleanup_delay = 0;
@ -2908,13 +2908,13 @@ void nn_xqos_init_default_writer (dds_qos_t *xqos)
xqos->writer_data_lifecycle.autodispose_unregistered_instances = 1;
}
void nn_xqos_init_default_writer_noautodispose (dds_qos_t *xqos)
void ddsi_xqos_init_default_writer_noautodispose (dds_qos_t *xqos)
{
nn_xqos_init_default_writer (xqos);
ddsi_xqos_init_default_writer (xqos);
xqos->writer_data_lifecycle.autodispose_unregistered_instances = 0;
}
void nn_xqos_init_default_topic (dds_qos_t *xqos)
void ddsi_xqos_init_default_topic (dds_qos_t *xqos)
{
xqos_init_default_common (xqos);
@ -2942,9 +2942,9 @@ void nn_xqos_init_default_topic (dds_qos_t *xqos)
xqos->subscription_keys.key_list.strs = NULL;
}
static void nn_xqos_init_default_publisher_subscriber (dds_qos_t *xqos)
static void ddsi_xqos_init_default_publisher_subscriber (dds_qos_t *xqos)
{
nn_xqos_init_empty (xqos);
ddsi_xqos_init_empty (xqos);
xqos->present |= QP_GROUP_DATA;
xqos->group_data.length = 0;
@ -2958,41 +2958,41 @@ static void nn_xqos_init_default_publisher_subscriber (dds_qos_t *xqos)
xqos->partition.strs = NULL;
}
void nn_xqos_init_default_subscriber (dds_qos_t *xqos)
void ddsi_xqos_init_default_subscriber (dds_qos_t *xqos)
{
nn_xqos_init_default_publisher_subscriber (xqos);
ddsi_xqos_init_default_publisher_subscriber (xqos);
}
void nn_xqos_init_default_publisher (dds_qos_t *xqos)
void ddsi_xqos_init_default_publisher (dds_qos_t *xqos)
{
nn_xqos_init_default_publisher_subscriber (xqos);
ddsi_xqos_init_default_publisher_subscriber (xqos);
}
void nn_xqos_copy (dds_qos_t *dst, const dds_qos_t *src)
void ddsi_xqos_copy (dds_qos_t *dst, const dds_qos_t *src)
{
nn_xqos_init_empty (dst);
nn_xqos_mergein_missing (dst, src, ~(uint64_t)0);
ddsi_xqos_init_empty (dst);
ddsi_xqos_mergein_missing (dst, src, ~(uint64_t)0);
}
void nn_xqos_fini (dds_qos_t *xqos)
void ddsi_xqos_fini (dds_qos_t *xqos)
{
plist_or_xqos_fini (xqos, offsetof (nn_plist_t, qos), ~(uint64_t)0, ~(uint64_t)0);
plist_or_xqos_fini (xqos, offsetof (ddsi_plist_t, qos), ~(uint64_t)0, ~(uint64_t)0);
}
void nn_xqos_fini_mask (dds_qos_t *xqos, uint64_t mask)
void ddsi_xqos_fini_mask (dds_qos_t *xqos, uint64_t mask)
{
plist_or_xqos_fini (xqos, offsetof (nn_plist_t, qos), ~(uint64_t)0, mask);
plist_or_xqos_fini (xqos, offsetof (ddsi_plist_t, qos), ~(uint64_t)0, mask);
}
void nn_xqos_unalias (dds_qos_t *xqos)
void ddsi_xqos_unalias (dds_qos_t *xqos)
{
plist_or_xqos_unalias (xqos, offsetof (nn_plist_t, qos));
plist_or_xqos_unalias (xqos, offsetof (ddsi_plist_t, qos));
}
dds_qos_t * nn_xqos_dup (const dds_qos_t *src)
dds_qos_t * ddsi_xqos_dup (const dds_qos_t *src)
{
dds_qos_t *dst = ddsrt_malloc (sizeof (*dst));
nn_xqos_copy (dst, src);
ddsi_xqos_copy (dst, src);
assert (dst->aliased == 0);
return dst;
}
@ -3094,12 +3094,12 @@ static int partitions_equal (const void *srca, const void *srcb, size_t off)
/*************************/
void nn_xqos_addtomsg (struct nn_xmsg *m, const dds_qos_t *xqos, uint64_t wanted)
void ddsi_xqos_addtomsg (struct nn_xmsg *m, const dds_qos_t *xqos, uint64_t wanted)
{
plist_or_xqos_addtomsg (m, xqos, offsetof (struct nn_plist, qos), 0, wanted);
plist_or_xqos_addtomsg (m, xqos, offsetof (struct ddsi_plist, qos), 0, wanted);
}
void nn_plist_addtomsg (struct nn_xmsg *m, const nn_plist_t *ps, uint64_t pwanted, uint64_t qwanted)
void ddsi_plist_addtomsg (struct nn_xmsg *m, const ddsi_plist_t *ps, uint64_t pwanted, uint64_t qwanted)
{
plist_or_xqos_addtomsg (m, ps, 0, pwanted, qwanted);
}
@ -3119,7 +3119,7 @@ static void plist_or_xqos_print (char * __restrict *buf, size_t * __restrict buf
}
else
{
const nn_plist_t *plist = src;
const ddsi_plist_t *plist = src;
pw = plist->present & pwanted;
qw = plist->qos.present & qwanted;
}
@ -3169,16 +3169,16 @@ static void plist_or_xqos_log (uint32_t cat, const struct ddsrt_log_cfg *logcfg,
}
}
size_t nn_xqos_print (char * __restrict buf, size_t bufsize, const dds_qos_t *xqos)
size_t ddsi_xqos_print (char * __restrict buf, size_t bufsize, const dds_qos_t *xqos)
{
const size_t bufsize_in = bufsize;
(void) prtf (&buf, &bufsize, "{");
plist_or_xqos_print (&buf, &bufsize, xqos, offsetof (nn_plist_t, qos), 0, ~(uint64_t)0);
plist_or_xqos_print (&buf, &bufsize, xqos, offsetof (ddsi_plist_t, qos), 0, ~(uint64_t)0);
(void) prtf (&buf, &bufsize, "}");
return bufsize_in - bufsize;
}
size_t nn_plist_print (char * __restrict buf, size_t bufsize, const nn_plist_t *plist)
size_t ddsi_plist_print (char * __restrict buf, size_t bufsize, const ddsi_plist_t *plist)
{
const size_t bufsize_in = bufsize;
(void) prtf (&buf, &bufsize, "{");
@ -3187,12 +3187,12 @@ size_t nn_plist_print (char * __restrict buf, size_t bufsize, const nn_plist_t *
return bufsize_in - bufsize;
}
void nn_xqos_log (uint32_t cat, const struct ddsrt_log_cfg *logcfg, const dds_qos_t *xqos)
void ddsi_xqos_log (uint32_t cat, const struct ddsrt_log_cfg *logcfg, const dds_qos_t *xqos)
{
plist_or_xqos_log (cat, logcfg, xqos, offsetof (nn_plist_t, qos), 0, ~(uint64_t)0);
plist_or_xqos_log (cat, logcfg, xqos, offsetof (ddsi_plist_t, qos), 0, ~(uint64_t)0);
}
void nn_plist_log (uint32_t cat, const struct ddsrt_log_cfg *logcfg, const nn_plist_t *plist)
void ddsi_plist_log (uint32_t cat, const struct ddsrt_log_cfg *logcfg, const ddsi_plist_t *plist)
{
plist_or_xqos_log (cat, logcfg, plist, 0, ~(uint64_t)0, ~(uint64_t)0);
}

View file

@ -462,7 +462,7 @@ static struct ddsi_serdata *serdata_default_from_sample_plist (const struct ddsi
if (d == NULL)
return NULL;
serdata_default_append_blob (&d, 1, sample->size, sample->blob);
const unsigned char *rawkey = nn_plist_findparam_native_unchecked (sample->blob, sample->keyparam);
const unsigned char *rawkey = ddsi_plist_findparam_native_unchecked (sample->blob, sample->keyparam);
#ifndef NDEBUG
size_t keysize;
#endif
@ -659,8 +659,8 @@ static size_t serdata_default_print_plist (const struct ddsi_sertopic *sertopic_
{
const struct ddsi_serdata_default *d = (const struct ddsi_serdata_default *)serdata_common;
const struct ddsi_sertopic_default *tp = (const struct ddsi_sertopic_default *)sertopic_common;
nn_plist_src_t src;
nn_plist_t tmp;
ddsi_plist_src_t src;
ddsi_plist_t tmp;
src.buf = (const unsigned char *) d->data;
src.bufsz = d->pos;
src.encoding = d->hdr.identifier;
@ -670,12 +670,12 @@ static size_t serdata_default_print_plist (const struct ddsi_sertopic *sertopic_
src.protocol_version.minor = RTPS_MINOR;
src.strict = false;
src.vendorid = NN_VENDORID_ECLIPSE;
if (nn_plist_init_frommsg (&tmp, NULL, ~(uint64_t)0, ~(uint64_t)0, &src) < 0)
if (ddsi_plist_init_frommsg (&tmp, NULL, ~(uint64_t)0, ~(uint64_t)0, &src) < 0)
return (size_t) snprintf (buf, size, "(unparseable-plist)");
else
{
size_t ret = nn_plist_print (buf, size, &tmp);
nn_plist_fini (&tmp);
size_t ret = ddsi_plist_print (buf, size, &tmp);
ddsi_plist_fini (&tmp);
return ret;
}
}

View file

@ -27,7 +27,7 @@
#include "dds/ddsi/q_misc.h"
#include "dds/ddsi/q_config.h"
#include "dds/ddsi/q_log.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_plist.h"
#include "dds/ddsi/q_unused.h"
#include "dds/ddsi/q_xevent.h"
#include "dds/ddsi/q_addrset.h"
@ -187,7 +187,7 @@ int spdp_write (struct participant *pp)
{
struct nn_xmsg *mpayload;
struct nn_locators_one def_uni_loc_one, def_multi_loc_one, meta_uni_loc_one, meta_multi_loc_one;
nn_plist_t ps;
ddsi_plist_t ps;
struct writer *wr;
size_t size;
char node[64];
@ -215,7 +215,7 @@ int spdp_write (struct participant *pp)
construct the payload. */
mpayload = nn_xmsg_new (pp->e.gv->xmsgpool, &pp->e.guid.prefix, 0, NN_XMSG_KIND_DATA);
nn_plist_init_empty (&ps);
ddsi_plist_init_empty (&ps);
ps.present |= PP_PARTICIPANT_GUID | PP_BUILTIN_ENDPOINT_SET |
PP_PROTOCOL_VERSION | PP_VENDORID | PP_PARTICIPANT_LEASE_DURATION |
PP_DOMAIN_ID;
@ -321,15 +321,15 @@ int spdp_write (struct participant *pp)
}
/* Participant QoS's insofar as they are set, different from the default, and mapped to the SPDP data, rather than to the PrismTech-specific CMParticipant endpoint. Currently, that means just USER_DATA. */
qosdiff = nn_xqos_delta (&pp->plist->qos, &pp->e.gv->default_plist_pp.qos, QP_USER_DATA);
qosdiff = ddsi_xqos_delta (&pp->plist->qos, &pp->e.gv->default_plist_pp.qos, QP_USER_DATA);
if (pp->e.gv->config.explicitly_publish_qos_set_to_default)
qosdiff |= ~QP_UNRECOGNIZED_INCOMPATIBLE_MASK;
assert (ps.qos.present == 0);
nn_plist_addtomsg (mpayload, &ps, ~(uint64_t)0, 0);
nn_plist_addtomsg (mpayload, pp->plist, 0, qosdiff);
ddsi_plist_addtomsg (mpayload, &ps, ~(uint64_t)0, 0);
ddsi_plist_addtomsg (mpayload, pp->plist, 0, qosdiff);
nn_xmsg_addpar_sentinel (mpayload);
nn_plist_fini (&ps);
ddsi_plist_fini (&ps);
ret = write_mpayload (wr, 1, PID_PARTICIPANT_GUID, mpayload);
nn_xmsg_free (mpayload);
@ -339,7 +339,7 @@ int spdp_write (struct participant *pp)
int spdp_dispose_unregister (struct participant *pp)
{
struct nn_xmsg *mpayload;
nn_plist_t ps;
ddsi_plist_t ps;
struct writer *wr;
int ret;
@ -350,12 +350,12 @@ int spdp_dispose_unregister (struct participant *pp)
}
mpayload = nn_xmsg_new (pp->e.gv->xmsgpool, &pp->e.guid.prefix, 0, NN_XMSG_KIND_DATA);
nn_plist_init_empty (&ps);
ddsi_plist_init_empty (&ps);
ps.present |= PP_PARTICIPANT_GUID;
ps.participant_guid = pp->e.guid;
nn_plist_addtomsg (mpayload, &ps, ~(uint64_t)0, ~(uint64_t)0);
ddsi_plist_addtomsg (mpayload, &ps, ~(uint64_t)0, ~(uint64_t)0);
nn_xmsg_addpar_sentinel (mpayload);
nn_plist_fini (&ps);
ddsi_plist_fini (&ps);
ret = write_mpayload (wr, 0, PID_PARTICIPANT_GUID, mpayload);
nn_xmsg_free (mpayload);
@ -416,7 +416,7 @@ static void respond_to_spdp (const struct ddsi_domaingv *gv, const ddsi_guid_t *
entidx_enum_participant_fini (&est);
}
static int handle_SPDP_dead (const struct receiver_state *rst, nn_wctime_t timestamp, const nn_plist_t *datap, unsigned statusinfo)
static int handle_SPDP_dead (const struct receiver_state *rst, nn_wctime_t timestamp, const ddsi_plist_t *datap, unsigned statusinfo)
{
struct ddsi_domaingv * const gv = rst->gv;
ddsi_guid_t guid;
@ -514,7 +514,7 @@ static void make_participants_dependent_on_ddsi2 (struct ddsi_domaingv *gv, cons
}
}
static int handle_SPDP_alive (const struct receiver_state *rst, seqno_t seq, nn_wctime_t timestamp, const nn_plist_t *datap)
static int handle_SPDP_alive (const struct receiver_state *rst, seqno_t seq, nn_wctime_t timestamp, const ddsi_plist_t *datap)
{
struct ddsi_domaingv * const gv = rst->gv;
const unsigned bes_sedp_announcer_mask =
@ -738,7 +738,7 @@ static int handle_SPDP_alive (const struct receiver_state *rst, seqno_t seq, nn_
}
GVLOGDISC (" QOS={");
nn_xqos_log (DDS_LC_DISCOVERY, &gv->logconfig, &datap->qos);
ddsi_xqos_log (DDS_LC_DISCOVERY, &gv->logconfig, &datap->qos);
GVLOGDISC ("}\n");
maybe_add_pp_as_meta_to_as_disc (gv, as_meta);
@ -808,8 +808,8 @@ static void handle_SPDP (const struct receiver_state *rst, seqno_t seq, nn_wctim
}
else
{
nn_plist_t decoded_data;
nn_plist_src_t src;
ddsi_plist_t decoded_data;
ddsi_plist_src_t src;
int interesting = 0;
dds_return_t plist_ret;
src.protocol_version = rst->protocol_version;
@ -820,7 +820,7 @@ static void handle_SPDP (const struct receiver_state *rst, seqno_t seq, nn_wctim
src.strict = NN_STRICT_P (gv->config);
src.factory = gv->m_factory;
src.logconfig = &gv->logconfig;
if ((plist_ret = nn_plist_init_frommsg (&decoded_data, NULL, ~(uint64_t)0, ~(uint64_t)0, &src)) < 0)
if ((plist_ret = ddsi_plist_init_frommsg (&decoded_data, NULL, ~(uint64_t)0, ~(uint64_t)0, &src)) < 0)
{
if (plist_ret != DDS_RETCODE_UNSUPPORTED)
GVWARNING ("SPDP (vendor %u.%u): invalid qos/parameters\n", src.vendorid.id[0], src.vendorid.id[1]);
@ -840,14 +840,14 @@ static void handle_SPDP (const struct receiver_state *rst, seqno_t seq, nn_wctim
break;
}
nn_plist_fini (&decoded_data);
ddsi_plist_fini (&decoded_data);
GVLOG (interesting ? DDS_LC_DISCOVERY : DDS_LC_TRACE, "\n");
}
}
struct add_locator_to_ps_arg {
struct ddsi_domaingv *gv;
nn_plist_t *ps;
ddsi_plist_t *ps;
};
static void add_locator_to_ps (const nn_locator_t *loc, void *varg)
@ -898,10 +898,10 @@ static int sedp_write_endpoint
const dds_qos_t *defqos = is_writer_entityid (epguid->entityid) ? &gv->default_xqos_wr : &gv->default_xqos_rd;
struct nn_xmsg *mpayload;
uint64_t qosdiff;
nn_plist_t ps;
ddsi_plist_t ps;
int ret;
nn_plist_init_empty (&ps);
ddsi_plist_init_empty (&ps);
ps.present |= PP_ENDPOINT_GUID;
ps.endpoint_guid = *epguid;
@ -950,7 +950,7 @@ static int sedp_write_endpoint
}
#endif
qosdiff = nn_xqos_delta (xqos, defqos, ~(uint64_t)0);
qosdiff = ddsi_xqos_delta (xqos, defqos, ~(uint64_t)0);
if (gv->config.explicitly_publish_qos_set_to_default)
qosdiff |= ~QP_UNRECOGNIZED_INCOMPATIBLE_MASK;
@ -968,10 +968,10 @@ static int sedp_write_endpoint
important, except that they need to be set to reasonable things
or it'll crash */
mpayload = nn_xmsg_new (gv->xmsgpool, &wr->e.guid.prefix, 0, NN_XMSG_KIND_DATA);
nn_plist_addtomsg (mpayload, &ps, ~(uint64_t)0, ~(uint64_t)0);
if (xqos) nn_xqos_addtomsg (mpayload, xqos, qosdiff);
ddsi_plist_addtomsg (mpayload, &ps, ~(uint64_t)0, ~(uint64_t)0);
if (xqos) ddsi_xqos_addtomsg (mpayload, xqos, qosdiff);
nn_xmsg_addpar_sentinel (mpayload);
nn_plist_fini (&ps);
ddsi_plist_fini (&ps);
GVLOGDISC ("sedp: write for "PGUIDFMT" via "PGUIDFMT"\n", PGUID (*epguid), PGUID (wr->e.guid));
ret = write_mpayload (wr, alive, PID_ENDPOINT_GUID, mpayload);
@ -1049,10 +1049,10 @@ static const char *durability_to_string (dds_durability_kind_t k)
return "undefined-durability";
}
static struct proxy_participant *implicitly_create_proxypp (struct ddsi_domaingv *gv, const ddsi_guid_t *ppguid, nn_plist_t *datap /* note: potentially modifies datap */, const ddsi_guid_prefix_t *src_guid_prefix, nn_vendorid_t vendorid, nn_wctime_t timestamp, seqno_t seq)
static struct proxy_participant *implicitly_create_proxypp (struct ddsi_domaingv *gv, const ddsi_guid_t *ppguid, ddsi_plist_t *datap /* note: potentially modifies datap */, const ddsi_guid_prefix_t *src_guid_prefix, nn_vendorid_t vendorid, nn_wctime_t timestamp, seqno_t seq)
{
ddsi_guid_t privguid;
nn_plist_t pp_plist;
ddsi_plist_t pp_plist;
if (memcmp (&ppguid->prefix, src_guid_prefix, sizeof (ppguid->prefix)) == 0)
/* if the writer is owned by the participant itself, we're not interested */
@ -1060,7 +1060,7 @@ static struct proxy_participant *implicitly_create_proxypp (struct ddsi_domaingv
privguid.prefix = *src_guid_prefix;
privguid.entityid = to_entityid (NN_ENTITYID_PARTICIPANT);
nn_plist_init_empty(&pp_plist);
ddsi_plist_init_empty(&pp_plist);
if (vendor_is_cloud (vendorid))
{
@ -1105,9 +1105,9 @@ static struct proxy_participant *implicitly_create_proxypp (struct ddsi_domaingv
goto err;
} else {
struct addrset *as_default, *as_meta;
nn_plist_t tmp_plist;
ddsi_plist_t tmp_plist;
GVTRACE (" from-ddsi2 "PGUIDFMT, PGUID (privguid));
nn_plist_init_empty (&pp_plist);
ddsi_plist_init_empty (&pp_plist);
ddsrt_mutex_lock (&privpp->e.lock);
as_default = ref_addrset(privpp->as_default);
@ -1116,7 +1116,7 @@ static struct proxy_participant *implicitly_create_proxypp (struct ddsi_domaingv
tmp_plist = *privpp->plist;
tmp_plist.present = PP_PARTICIPANT_GUID | PP_PRISMTECH_PARTICIPANT_VERSION_INFO;
tmp_plist.participant_guid = *ppguid;
nn_plist_mergein_missing (&pp_plist, &tmp_plist, ~(uint64_t)0, ~(uint64_t)0);
ddsi_plist_mergein_missing (&pp_plist, &tmp_plist, ~(uint64_t)0, ~(uint64_t)0);
ddsrt_mutex_unlock (&privpp->e.lock);
pp_plist.prismtech_participant_version_info.flags &= ~NN_PRISMTECH_FL_PARTICIPANT_IS_DDSI2;
@ -1125,11 +1125,11 @@ static struct proxy_participant *implicitly_create_proxypp (struct ddsi_domaingv
}
err:
nn_plist_fini (&pp_plist);
ddsi_plist_fini (&pp_plist);
return entidx_lookup_proxy_participant_guid (gv->entity_index, ppguid);
}
static void handle_SEDP_alive (const struct receiver_state *rst, seqno_t seq, nn_plist_t *datap /* note: potentially modifies datap */, const ddsi_guid_prefix_t *src_guid_prefix, nn_vendorid_t vendorid, nn_wctime_t timestamp)
static void handle_SEDP_alive (const struct receiver_state *rst, seqno_t seq, ddsi_plist_t *datap /* note: potentially modifies datap */, const ddsi_guid_prefix_t *src_guid_prefix, nn_vendorid_t vendorid, nn_wctime_t timestamp)
{
#define E(msg, lbl) do { GVLOGDISC (msg); goto lbl; } while (0)
struct ddsi_domaingv * const gv = rst->gv;
@ -1178,11 +1178,11 @@ static void handle_SEDP_alive (const struct receiver_state *rst, seqno_t seq, nn
xqos = &datap->qos;
is_writer = is_writer_entityid (datap->endpoint_guid.entityid);
if (!is_writer)
nn_xqos_mergein_missing (xqos, &gv->default_xqos_rd, ~(uint64_t)0);
ddsi_xqos_mergein_missing (xqos, &gv->default_xqos_rd, ~(uint64_t)0);
else if (vendor_is_eclipse_or_prismtech(vendorid))
nn_xqos_mergein_missing (xqos, &gv->default_xqos_wr, ~(uint64_t)0);
ddsi_xqos_mergein_missing (xqos, &gv->default_xqos_wr, ~(uint64_t)0);
else
nn_xqos_mergein_missing (xqos, &gv->default_xqos_wr_nad, ~(uint64_t)0);
ddsi_xqos_mergein_missing (xqos, &gv->default_xqos_wr_nad, ~(uint64_t)0);
/* After copy + merge, should have at least the ones present in the
input. Also verify reliability and durability are present,
@ -1270,7 +1270,7 @@ static void handle_SEDP_alive (const struct receiver_state *rst, seqno_t seq, nn
GVLOGDISC (" ssm=%u", ssm);
#endif
GVLOGDISC (") QOS={");
nn_xqos_log (DDS_LC_DISCOVERY, &gv->logconfig, xqos);
ddsi_xqos_log (DDS_LC_DISCOVERY, &gv->logconfig, xqos);
GVLOGDISC ("}\n");
if ((datap->endpoint_guid.entityid.u & NN_ENTITYID_SOURCE_MASK) == NN_ENTITYID_SOURCE_VENDOR && !vendor_is_eclipse_or_prismtech (vendorid))
@ -1324,7 +1324,7 @@ err:
#undef E
}
static void handle_SEDP_dead (const struct receiver_state *rst, nn_plist_t *datap, nn_wctime_t timestamp)
static void handle_SEDP_dead (const struct receiver_state *rst, ddsi_plist_t *datap, nn_wctime_t timestamp)
{
struct ddsi_domaingv * const gv = rst->gv;
int res;
@ -1353,8 +1353,8 @@ static void handle_SEDP (const struct receiver_state *rst, seqno_t seq, nn_wctim
}
else
{
nn_plist_t decoded_data;
nn_plist_src_t src;
ddsi_plist_t decoded_data;
ddsi_plist_src_t src;
dds_return_t plist_ret;
src.protocol_version = rst->protocol_version;
src.vendorid = rst->vendor;
@ -1364,7 +1364,7 @@ static void handle_SEDP (const struct receiver_state *rst, seqno_t seq, nn_wctim
src.strict = NN_STRICT_P (gv->config);
src.factory = gv->m_factory;
src.logconfig = &gv->logconfig;
if ((plist_ret = nn_plist_init_frommsg (&decoded_data, NULL, ~(uint64_t)0, ~(uint64_t)0, &src)) < 0)
if ((plist_ret = ddsi_plist_init_frommsg (&decoded_data, NULL, ~(uint64_t)0, ~(uint64_t)0, &src)) < 0)
{
if (plist_ret != DDS_RETCODE_UNSUPPORTED)
GVWARNING ("SEDP (vendor %u.%u): invalid qos/parameters\n", src.vendorid.id[0], src.vendorid.id[1]);
@ -1384,7 +1384,7 @@ static void handle_SEDP (const struct receiver_state *rst, seqno_t seq, nn_wctim
break;
}
nn_plist_fini (&decoded_data);
ddsi_plist_fini (&decoded_data);
}
}
@ -1394,7 +1394,7 @@ static void handle_SEDP (const struct receiver_state *rst, seqno_t seq, nn_wctim
***
*****************************************************************************/
int sedp_write_topic (struct participant *pp, const struct nn_plist *datap)
int sedp_write_topic (struct participant *pp, const struct ddsi_plist *datap)
{
struct writer *sedp_wr;
struct nn_xmsg *mpayload;
@ -1411,10 +1411,10 @@ int sedp_write_topic (struct participant *pp, const struct nn_plist *datap)
sedp_wr = get_sedp_writer (pp, NN_ENTITYID_SEDP_BUILTIN_TOPIC_WRITER);
mpayload = nn_xmsg_new (sedp_wr->e.gv->xmsgpool, &sedp_wr->e.guid.prefix, 0, NN_XMSG_KIND_DATA);
delta = nn_xqos_delta (&datap->qos, &sedp_wr->e.gv->default_xqos_tp, ~(uint64_t)0);
delta = ddsi_xqos_delta (&datap->qos, &sedp_wr->e.gv->default_xqos_tp, ~(uint64_t)0);
if (sedp_wr->e.gv->config.explicitly_publish_qos_set_to_default)
delta |= ~QP_UNRECOGNIZED_INCOMPATIBLE_MASK;
nn_plist_addtomsg (mpayload, datap, ~(uint64_t)0, delta);
ddsi_plist_addtomsg (mpayload, datap, ~(uint64_t)0, delta);
nn_xmsg_addpar_sentinel (mpayload);
ETRACE (pp, "sedp: write topic %s via "PGUIDFMT"\n", datap->qos.topic_name, PGUID (sedp_wr->e.guid));
@ -1473,7 +1473,7 @@ int builtins_dqueue_handler (const struct nn_rsample_info *sampleinfo, const str
ddsi_guid_t srcguid;
Data_DataFrag_common_t *msg;
unsigned char data_smhdr_flags;
nn_plist_t qos;
ddsi_plist_t qos;
unsigned char *datap;
int needs_free;
uint32_t datasz = sampleinfo->size;
@ -1511,12 +1511,12 @@ int builtins_dqueue_handler (const struct nn_rsample_info *sampleinfo, const str
need_keyhash = (datasz == 0 || (data_smhdr_flags & (DATA_FLAG_KEYFLAG | DATA_FLAG_DATAFLAG)) == 0);
if (!(sampleinfo->complex_qos || need_keyhash))
{
nn_plist_init_empty (&qos);
ddsi_plist_init_empty (&qos);
statusinfo = sampleinfo->statusinfo;
}
else
{
nn_plist_src_t src;
ddsi_plist_src_t src;
size_t qos_offset = NN_RDATA_SUBMSG_OFF (fragchain) + offsetof (Data_DataFrag_common_t, octetsToInlineQos) + sizeof (msg->octetsToInlineQos) + msg->octetsToInlineQos;
dds_return_t plist_ret;
src.protocol_version = sampleinfo->rst->protocol_version;
@ -1527,7 +1527,7 @@ int builtins_dqueue_handler (const struct nn_rsample_info *sampleinfo, const str
src.strict = NN_STRICT_P (gv->config);
src.factory = gv->m_factory;
src.logconfig = &gv->logconfig;
if ((plist_ret = nn_plist_init_frommsg (&qos, NULL, PP_STATUSINFO | PP_KEYHASH, 0, &src)) < 0)
if ((plist_ret = ddsi_plist_init_frommsg (&qos, NULL, PP_STATUSINFO | PP_KEYHASH, 0, &src)) < 0)
{
if (plist_ret != DDS_RETCODE_UNSUPPORTED)
GVWARNING ("data(builtin, vendor %u.%u): "PGUIDFMT" #%"PRId64": invalid inline qos\n",

View file

@ -25,7 +25,7 @@
#include "dds/ddsi/q_time.h"
#include "dds/ddsi/q_misc.h"
#include "dds/ddsi/q_log.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_plist.h"
#include "dds/ddsi/ddsi_entity_index.h"
#include "dds/ddsi/ddsi_domaingv.h"
#include "dds/ddsi/q_addrset.h"

View file

@ -27,7 +27,7 @@
#include "dds/ddsi/q_misc.h"
#include "dds/ddsi/q_log.h"
#include "dds/ddsrt/avl.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_plist.h"
#include "dds/ddsi/q_lease.h"
#include "dds/ddsi/q_qosmatch.h"
#include "dds/ddsi/ddsi_entity_index.h"
@ -454,7 +454,7 @@ static bool update_qos_locked (struct entity_common *e, dds_qos_t *ent_qos, cons
{
uint64_t mask;
mask = nn_xqos_delta (ent_qos, xqos, QP_CHANGEABLE_MASK & ~(QP_RXO_MASK | QP_PARTITION)) & xqos->present;
mask = ddsi_xqos_delta (ent_qos, xqos, QP_CHANGEABLE_MASK & ~(QP_RXO_MASK | QP_PARTITION)) & xqos->present;
#if 0
int a = (ent_qos->present & QP_TOPIC_DATA) ? (int) ent_qos->topic_data.length : 6;
int b = (xqos->present & QP_TOPIC_DATA) ? (int) xqos->topic_data.length : 6;
@ -467,7 +467,7 @@ static bool update_qos_locked (struct entity_common *e, dds_qos_t *ent_qos, cons
!!(mask & QP_TOPIC_DATA));
#endif
EELOGDISC (e, "update_qos_locked "PGUIDFMT" delta=%"PRIu64" QOS={", PGUID(e->guid), mask);
nn_xqos_log (DDS_LC_DISCOVERY, &e->gv->logconfig, xqos);
ddsi_xqos_log (DDS_LC_DISCOVERY, &e->gv->logconfig, xqos);
EELOGDISC (e, "}\n");
if (mask == 0)
@ -475,8 +475,8 @@ static bool update_qos_locked (struct entity_common *e, dds_qos_t *ent_qos, cons
return false;
ddsrt_mutex_lock (&e->qos_lock);
nn_xqos_fini_mask (ent_qos, mask);
nn_xqos_mergein_missing (ent_qos, xqos, mask);
ddsi_xqos_fini_mask (ent_qos, mask);
ddsi_xqos_mergein_missing (ent_qos, xqos, mask);
ddsrt_mutex_unlock (&e->qos_lock);
builtintopic_write (e->gv->builtin_topic_interface, e, timestamp, true);
return true;
@ -583,7 +583,7 @@ static void participant_remove_wr_lease_locked (struct participant * pp, struct
}
}
dds_return_t new_participant_guid (const ddsi_guid_t *ppguid, struct ddsi_domaingv *gv, unsigned flags, const nn_plist_t *plist)
dds_return_t new_participant_guid (const ddsi_guid_t *ppguid, struct ddsi_domaingv *gv, unsigned flags, const ddsi_plist_t *plist)
{
struct participant *pp;
ddsi_guid_t subguid, group_guid;
@ -640,13 +640,13 @@ dds_return_t new_participant_guid (const ddsi_guid_t *ppguid, struct ddsi_domain
pp->lease_duration = gv->config.lease_duration;
ddsrt_fibheap_init (&ldur_fhdef, &pp->ldur_auto_wr);
pp->plist = ddsrt_malloc (sizeof (*pp->plist));
nn_plist_copy (pp->plist, plist);
nn_plist_mergein_missing (pp->plist, &gv->default_local_plist_pp, ~(uint64_t)0, ~(uint64_t)0);
ddsi_plist_copy (pp->plist, plist);
ddsi_plist_mergein_missing (pp->plist, &gv->default_local_plist_pp, ~(uint64_t)0, ~(uint64_t)0);
if (gv->logconfig.c.mask & DDS_LC_DISCOVERY)
{
GVLOGDISC ("PARTICIPANT "PGUIDFMT" QOS={", PGUID (pp->e.guid));
nn_xqos_log (DDS_LC_DISCOVERY, &gv->logconfig, &pp->plist->qos);
ddsi_xqos_log (DDS_LC_DISCOVERY, &gv->logconfig, &pp->plist->qos);
GVLOGDISC ("}\n");
}
@ -816,7 +816,7 @@ dds_return_t new_participant_guid (const ddsi_guid_t *ppguid, struct ddsi_domain
return 0;
}
dds_return_t new_participant (ddsi_guid_t *p_ppguid, struct ddsi_domaingv *gv, unsigned flags, const nn_plist_t *plist)
dds_return_t new_participant (ddsi_guid_t *p_ppguid, struct ddsi_domaingv *gv, unsigned flags, const ddsi_plist_t *plist)
{
union { uint64_t u64; uint32_t u32[2]; } u;
u.u32[0] = gv->ppguid_base.prefix.u[1];
@ -829,7 +829,7 @@ dds_return_t new_participant (ddsi_guid_t *p_ppguid, struct ddsi_domaingv *gv, u
return new_participant_guid (p_ppguid, gv, flags, plist);
}
void update_participant_plist (struct participant *pp, const nn_plist_t *plist)
void update_participant_plist (struct participant *pp, const ddsi_plist_t *plist)
{
ddsrt_mutex_lock (&pp->e.lock);
if (update_qos_locked (&pp->e, &pp->plist->qos, &plist->qos, now ()))
@ -987,7 +987,7 @@ static void unref_participant (struct participant *pp, const struct ddsi_guid *g
while longer for it to wakeup. */
ddsi_conn_free (pp->m_conn);
}
nn_plist_fini (pp->plist);
ddsi_plist_fini (pp->plist);
ddsrt_free (pp->plist);
ddsrt_mutex_destroy (&pp->refc_lock);
entity_common_fini (&pp->e);
@ -2998,13 +2998,13 @@ static void new_writer_guid_common_init (struct writer *wr, const struct ddsi_se
/* Copy QoS, merging in defaults */
wr->xqos = ddsrt_malloc (sizeof (*wr->xqos));
nn_xqos_copy (wr->xqos, xqos);
nn_xqos_mergein_missing (wr->xqos, &wr->e.gv->default_xqos_wr, ~(uint64_t)0);
ddsi_xqos_copy (wr->xqos, xqos);
ddsi_xqos_mergein_missing (wr->xqos, &wr->e.gv->default_xqos_wr, ~(uint64_t)0);
assert (wr->xqos->aliased == 0);
set_topic_type_name (wr->xqos, topic);
ELOGDISC (wr, "WRITER "PGUIDFMT" QOS={", PGUID (wr->e.guid));
nn_xqos_log (DDS_LC_DISCOVERY, &wr->e.gv->logconfig, wr->xqos);
ddsi_xqos_log (DDS_LC_DISCOVERY, &wr->e.gv->logconfig, wr->xqos);
ELOGDISC (wr, "}\n");
assert (wr->xqos->present & QP_RELIABILITY);
@ -3319,7 +3319,7 @@ static void gc_delete_writer (struct gcreq *gcreq)
unref_addrset (wr->ssm_as);
#endif
unref_addrset (wr->as); /* must remain until readers gone (rebuilding of addrset) */
nn_xqos_fini (wr->xqos);
ddsi_xqos_fini (wr->xqos);
ddsrt_free (wr->xqos);
local_reader_ary_fini (&wr->rdary);
ddsrt_cond_destroy (&wr->throttle_cond);
@ -3626,15 +3626,15 @@ static dds_return_t new_reader_guid
/* Copy QoS, merging in defaults */
rd->xqos = ddsrt_malloc (sizeof (*rd->xqos));
nn_xqos_copy (rd->xqos, xqos);
nn_xqos_mergein_missing (rd->xqos, &pp->e.gv->default_xqos_rd, ~(uint64_t)0);
ddsi_xqos_copy (rd->xqos, xqos);
ddsi_xqos_mergein_missing (rd->xqos, &pp->e.gv->default_xqos_rd, ~(uint64_t)0);
assert (rd->xqos->aliased == 0);
set_topic_type_name (rd->xqos, topic);
if (rd->e.gv->logconfig.c.mask & DDS_LC_DISCOVERY)
{
ELOGDISC (rd, "READER "PGUIDFMT" QOS={", PGUID (rd->e.guid));
nn_xqos_log (DDS_LC_DISCOVERY, &rd->e.gv->logconfig, rd->xqos);
ddsi_xqos_log (DDS_LC_DISCOVERY, &rd->e.gv->logconfig, rd->xqos);
ELOGDISC (rd, "}\n");
}
assert (rd->xqos->present & QP_RELIABILITY);
@ -3802,7 +3802,7 @@ static void gc_delete_reader (struct gcreq *gcreq)
}
ddsi_sertopic_unref ((struct ddsi_sertopic *) rd->topic);
nn_xqos_fini (rd->xqos);
ddsi_xqos_fini (rd->xqos);
ddsrt_free (rd->xqos);
#ifdef DDSI_INCLUDE_NETWORK_PARTITIONS
unref_addrset (rd->as);
@ -3960,7 +3960,7 @@ static void proxy_participant_remove_pwr_lease_locked (struct proxy_participant
}
}
void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, uint32_t bes, const struct ddsi_guid *privileged_pp_guid, struct addrset *as_default, struct addrset *as_meta, const nn_plist_t *plist, dds_duration_t tlease_dur, nn_vendorid_t vendor, unsigned custom_flags, nn_wctime_t timestamp, seqno_t seq)
void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, uint32_t bes, const struct ddsi_guid *privileged_pp_guid, struct addrset *as_default, struct addrset *as_meta, const ddsi_plist_t *plist, dds_duration_t tlease_dur, nn_vendorid_t vendor, unsigned custom_flags, nn_wctime_t timestamp, seqno_t seq)
{
/* No locking => iff all participants use unique guids, and sedp
runs on a single thread, it can't go wrong. FIXME, maybe? The
@ -4045,8 +4045,8 @@ void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *pp
proxypp->as_default = as_default;
proxypp->as_meta = as_meta;
proxypp->endpoints = NULL;
proxypp->plist = nn_plist_dup (plist);
nn_xqos_mergein_missing (&proxypp->plist->qos, &gv->default_plist_pp.qos, ~(uint64_t)0);
proxypp->plist = ddsi_plist_dup (plist);
ddsi_xqos_mergein_missing (&proxypp->plist->qos, &gv->default_plist_pp.qos, ~(uint64_t)0);
ddsrt_avl_init (&proxypp_groups_treedef, &proxypp->groups);
if (custom_flags & CF_INC_KERNEL_SEQUENCE_NUMBERS)
@ -4096,15 +4096,15 @@ void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *pp
#undef PT_TE
#undef TE
#undef LTE
nn_plist_t plist_rd, plist_wr;
ddsi_plist_t plist_rd, plist_wr;
int i;
/* Note: no entity name or group GUID supplied, but that shouldn't
matter, as these are internal to DDSI and don't use group
coherency */
nn_plist_init_empty (&plist_wr);
nn_plist_init_empty (&plist_rd);
nn_xqos_copy (&plist_wr.qos, &gv->builtin_endpoint_xqos_wr);
nn_xqos_copy (&plist_rd.qos, &gv->builtin_endpoint_xqos_rd);
ddsi_plist_init_empty (&plist_wr);
ddsi_plist_init_empty (&plist_rd);
ddsi_xqos_copy (&plist_wr.qos, &gv->builtin_endpoint_xqos_wr);
ddsi_xqos_copy (&plist_rd.qos, &gv->builtin_endpoint_xqos_rd);
for (i = 0; i < (int) (sizeof (bestab) / sizeof (*bestab)); i++)
{
const struct bestab *te = &bestab[i];
@ -4129,8 +4129,8 @@ void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *pp
}
}
}
nn_plist_fini (&plist_wr);
nn_plist_fini (&plist_rd);
ddsi_plist_fini (&plist_wr);
ddsi_plist_fini (&plist_rd);
}
/* write DCPSParticipant topic before the lease can expire */
@ -4145,7 +4145,7 @@ void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *pp
ddsrt_mutex_unlock (&proxypp->e.lock);
}
int update_proxy_participant_plist_locked (struct proxy_participant *proxypp, seqno_t seq, const struct nn_plist *datap, nn_wctime_t timestamp)
int update_proxy_participant_plist_locked (struct proxy_participant *proxypp, seqno_t seq, const struct ddsi_plist *datap, nn_wctime_t timestamp)
{
if (seq > proxypp->seq)
{
@ -4154,19 +4154,19 @@ int update_proxy_participant_plist_locked (struct proxy_participant *proxypp, se
struct ddsi_domaingv * const gv = proxypp->e.gv;
const uint64_t pmask = PP_ENTITY_NAME;
const uint64_t qmask = QP_USER_DATA;
nn_plist_t *new_plist = ddsrt_malloc (sizeof (*new_plist));
nn_plist_init_empty (new_plist);
nn_plist_mergein_missing (new_plist, datap, pmask, qmask);
nn_plist_mergein_missing (new_plist, &gv->default_plist_pp, ~(uint64_t)0, ~(uint64_t)0);
ddsi_plist_t *new_plist = ddsrt_malloc (sizeof (*new_plist));
ddsi_plist_init_empty (new_plist);
ddsi_plist_mergein_missing (new_plist, datap, pmask, qmask);
ddsi_plist_mergein_missing (new_plist, &gv->default_plist_pp, ~(uint64_t)0, ~(uint64_t)0);
(void) update_qos_locked (&proxypp->e, &proxypp->plist->qos, &new_plist->qos, timestamp);
nn_plist_fini (new_plist);
ddsi_plist_fini (new_plist);
ddsrt_free (new_plist);
proxypp->proxypp_have_spdp = 1;
}
return 0;
}
int update_proxy_participant_plist (struct proxy_participant *proxypp, seqno_t seq, const struct nn_plist *datap, nn_wctime_t timestamp)
int update_proxy_participant_plist (struct proxy_participant *proxypp, seqno_t seq, const struct ddsi_plist *datap, nn_wctime_t timestamp)
{
ddsrt_mutex_lock (&proxypp->e.lock);
update_proxy_participant_plist_locked (proxypp, seq, datap, timestamp);
@ -4234,7 +4234,7 @@ static void unref_proxy_participant (struct proxy_participant *proxypp, struct p
ELOGDISC (proxypp, "unref_proxy_participant("PGUIDFMT"): refc=0, freeing\n", PGUID (proxypp->e.guid));
unref_addrset (proxypp->as_default);
unref_addrset (proxypp->as_meta);
nn_plist_fini (proxypp->plist);
ddsi_plist_fini (proxypp->plist);
ddsrt_free (proxypp->plist);
entity_common_fini (&proxypp->e);
remove_deleted_participant_guid (proxypp->e.gv->deleted_participants, &proxypp->e.guid, DPG_LOCAL | DPG_REMOTE);
@ -4427,7 +4427,7 @@ uint64_t get_entity_instance_id (const struct ddsi_domaingv *gv, const struct dd
/* PROXY-ENDPOINT --------------------------------------------------- */
static int proxy_endpoint_common_init (struct entity_common *e, struct proxy_endpoint_common *c, enum entity_kind kind, const struct ddsi_guid *guid, nn_wctime_t tcreate, seqno_t seq, struct proxy_participant *proxypp, struct addrset *as, const nn_plist_t *plist)
static int proxy_endpoint_common_init (struct entity_common *e, struct proxy_endpoint_common *c, enum entity_kind kind, const struct ddsi_guid *guid, nn_wctime_t tcreate, seqno_t seq, struct proxy_participant *proxypp, struct addrset *as, const ddsi_plist_t *plist)
{
const char *name;
int ret;
@ -4439,7 +4439,7 @@ static int proxy_endpoint_common_init (struct entity_common *e, struct proxy_end
name = (plist->present & PP_ENTITY_NAME) ? plist->entity_name : "";
entity_common_init (e, proxypp->e.gv, guid, name, kind, tcreate, proxypp->vendor, false);
c->xqos = nn_xqos_dup (&plist->qos);
c->xqos = ddsi_xqos_dup (&plist->qos);
c->as = ref_addrset (as);
c->vendor = proxypp->vendor;
c->seq = seq;
@ -4451,7 +4451,7 @@ static int proxy_endpoint_common_init (struct entity_common *e, struct proxy_end
if ((ret = ref_proxy_participant (proxypp, c)) != DDS_RETCODE_OK)
{
nn_xqos_fini (c->xqos);
ddsi_xqos_fini (c->xqos);
ddsrt_free (c->xqos);
unref_addrset (c->as);
entity_common_fini (e);
@ -4464,7 +4464,7 @@ static int proxy_endpoint_common_init (struct entity_common *e, struct proxy_end
static void proxy_endpoint_common_fini (struct entity_common *e, struct proxy_endpoint_common *c)
{
unref_proxy_participant (c->proxypp, c);
nn_xqos_fini (c->xqos);
ddsi_xqos_fini (c->xqos);
ddsrt_free (c->xqos);
unref_addrset (c->as);
entity_common_fini (e);
@ -4472,7 +4472,7 @@ static void proxy_endpoint_common_fini (struct entity_common *e, struct proxy_en
/* PROXY-WRITER ----------------------------------------------------- */
int new_proxy_writer (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const nn_plist_t *plist, struct nn_dqueue *dqueue, struct xeventq *evq, nn_wctime_t timestamp, seqno_t seq)
int new_proxy_writer (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const ddsi_plist_t *plist, struct nn_dqueue *dqueue, struct xeventq *evq, nn_wctime_t timestamp, seqno_t seq)
{
struct proxy_participant *proxypp;
struct proxy_writer *pwr;
@ -4806,7 +4806,7 @@ int proxy_writer_set_notalive (struct proxy_writer *pwr, bool notify)
/* PROXY-READER ----------------------------------------------------- */
int new_proxy_reader (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const nn_plist_t *plist, nn_wctime_t timestamp, seqno_t seq
int new_proxy_reader (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const ddsi_plist_t *plist, nn_wctime_t timestamp, seqno_t seq
#ifdef DDSI_INCLUDE_SSM
, int favours_ssm
#endif

View file

@ -27,7 +27,7 @@
#include "dds/ddsi/q_misc.h"
#include "dds/ddsi/q_config.h"
#include "dds/ddsi/q_log.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_plist.h"
#include "dds/ddsi/q_unused.h"
#include "dds/ddsi/q_bswap.h"
#include "dds/ddsi/q_lat_estim.h"
@ -127,7 +127,7 @@ static enum make_uc_sockets_ret make_uc_sockets (struct ddsi_domaingv *gv, uint3
static void make_builtin_endpoint_xqos (dds_qos_t *q, const dds_qos_t *template)
{
nn_xqos_copy (q, template);
ddsi_xqos_copy (q, template);
q->reliability.kind = DDS_RELIABILITY_RELIABLE;
q->reliability.max_blocking_time = 100 * T_MILLISECOND;
q->durability.kind = DDS_DURABILITY_TRANSIENT_LOCAL;
@ -935,7 +935,7 @@ int rtps_init (struct ddsi_domaingv *gv)
gv->tstart = now (); /* wall clock time, used in logs */
nn_plist_init_tables ();
ddsi_plist_init_tables ();
gv->disc_conn_uc = NULL;
gv->data_conn_uc = NULL;
@ -1082,15 +1082,15 @@ int rtps_init (struct ddsi_domaingv *gv)
gv->xmsgpool = nn_xmsgpool_new ();
gv->serpool = ddsi_serdatapool_new ();
nn_plist_init_default_participant (&gv->default_plist_pp);
nn_plist_init_default_participant (&gv->default_local_plist_pp);
nn_xqos_init_default_reader (&gv->default_xqos_rd);
nn_xqos_init_default_writer (&gv->default_xqos_wr);
nn_xqos_init_default_writer_noautodispose (&gv->default_xqos_wr_nad);
nn_xqos_init_default_topic (&gv->default_xqos_tp);
nn_xqos_init_default_subscriber (&gv->default_xqos_sub);
nn_xqos_init_default_publisher (&gv->default_xqos_pub);
nn_xqos_copy (&gv->spdp_endpoint_xqos, &gv->default_xqos_rd);
ddsi_plist_init_default_participant (&gv->default_plist_pp);
ddsi_plist_init_default_participant (&gv->default_local_plist_pp);
ddsi_xqos_init_default_reader (&gv->default_xqos_rd);
ddsi_xqos_init_default_writer (&gv->default_xqos_wr);
ddsi_xqos_init_default_writer_noautodispose (&gv->default_xqos_wr_nad);
ddsi_xqos_init_default_topic (&gv->default_xqos_tp);
ddsi_xqos_init_default_subscriber (&gv->default_xqos_sub);
ddsi_xqos_init_default_publisher (&gv->default_xqos_pub);
ddsi_xqos_copy (&gv->spdp_endpoint_xqos, &gv->default_xqos_rd);
gv->spdp_endpoint_xqos.durability.kind = DDS_DURABILITY_TRANSIENT_LOCAL;
make_builtin_endpoint_xqos (&gv->builtin_endpoint_xqos_rd, &gv->default_xqos_rd);
make_builtin_endpoint_xqos (&gv->builtin_endpoint_xqos_wr, &gv->default_xqos_wr);
@ -1437,17 +1437,17 @@ err_unicast_sockets:
#endif
ddsrt_hh_free (gv->sertopics);
ddsrt_mutex_destroy (&gv->sertopics_lock);
nn_xqos_fini (&gv->builtin_endpoint_xqos_wr);
nn_xqos_fini (&gv->builtin_endpoint_xqos_rd);
nn_xqos_fini (&gv->spdp_endpoint_xqos);
nn_xqos_fini (&gv->default_xqos_pub);
nn_xqos_fini (&gv->default_xqos_sub);
nn_xqos_fini (&gv->default_xqos_tp);
nn_xqos_fini (&gv->default_xqos_wr_nad);
nn_xqos_fini (&gv->default_xqos_wr);
nn_xqos_fini (&gv->default_xqos_rd);
nn_plist_fini (&gv->default_local_plist_pp);
nn_plist_fini (&gv->default_plist_pp);
ddsi_xqos_fini (&gv->builtin_endpoint_xqos_wr);
ddsi_xqos_fini (&gv->builtin_endpoint_xqos_rd);
ddsi_xqos_fini (&gv->spdp_endpoint_xqos);
ddsi_xqos_fini (&gv->default_xqos_pub);
ddsi_xqos_fini (&gv->default_xqos_sub);
ddsi_xqos_fini (&gv->default_xqos_tp);
ddsi_xqos_fini (&gv->default_xqos_wr_nad);
ddsi_xqos_fini (&gv->default_xqos_wr);
ddsi_xqos_fini (&gv->default_xqos_rd);
ddsi_plist_fini (&gv->default_local_plist_pp);
ddsi_plist_fini (&gv->default_plist_pp);
ddsi_serdatapool_free (gv->serpool);
nn_xmsgpool_free (gv->xmsgpool);
#ifdef DDSI_INCLUDE_NETWORK_PARTITIONS
@ -1784,17 +1784,17 @@ void rtps_fini (struct ddsi_domaingv *gv)
ddsrt_hh_free (gv->sertopics);
ddsrt_mutex_destroy (&gv->sertopics_lock);
nn_xqos_fini (&gv->builtin_endpoint_xqos_wr);
nn_xqos_fini (&gv->builtin_endpoint_xqos_rd);
nn_xqos_fini (&gv->spdp_endpoint_xqos);
nn_xqos_fini (&gv->default_xqos_pub);
nn_xqos_fini (&gv->default_xqos_sub);
nn_xqos_fini (&gv->default_xqos_tp);
nn_xqos_fini (&gv->default_xqos_wr_nad);
nn_xqos_fini (&gv->default_xqos_wr);
nn_xqos_fini (&gv->default_xqos_rd);
nn_plist_fini (&gv->default_local_plist_pp);
nn_plist_fini (&gv->default_plist_pp);
ddsi_xqos_fini (&gv->builtin_endpoint_xqos_wr);
ddsi_xqos_fini (&gv->builtin_endpoint_xqos_rd);
ddsi_xqos_fini (&gv->spdp_endpoint_xqos);
ddsi_xqos_fini (&gv->default_xqos_pub);
ddsi_xqos_fini (&gv->default_xqos_sub);
ddsi_xqos_fini (&gv->default_xqos_tp);
ddsi_xqos_fini (&gv->default_xqos_wr_nad);
ddsi_xqos_fini (&gv->default_xqos_wr);
ddsi_xqos_fini (&gv->default_xqos_rd);
ddsi_plist_fini (&gv->default_local_plist_pp);
ddsi_plist_fini (&gv->default_plist_pp);
ddsrt_mutex_destroy (&gv->lock);

View file

@ -24,7 +24,7 @@
#include "dds/ddsi/q_misc.h"
#include "dds/ddsi/q_config.h"
#include "dds/ddsi/q_log.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_plist.h"
#include "dds/ddsi/q_unused.h"
#include "dds/ddsi/q_xevent.h"
#include "dds/ddsi/q_addrset.h"

View file

@ -13,7 +13,7 @@
#include <assert.h>
#include "dds/ddsi/q_time.h"
#include "dds/ddsi/q_xqos.h"
#include "dds/ddsi/ddsi_xqos.h"
#include "dds/ddsi/q_misc.h"
#include "dds/ddsi/q_qosmatch.h"

View file

@ -36,7 +36,7 @@
#include "dds/ddsi/q_config.h"
#include "dds/ddsi/q_log.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_plist.h"
#include "dds/ddsi/q_unused.h"
#include "dds/ddsi/q_radmin.h"
#include "dds/ddsi/q_bitset.h"

View file

@ -28,7 +28,7 @@
#include "dds/ddsi/q_misc.h"
#include "dds/ddsi/q_config.h"
#include "dds/ddsi/q_log.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_plist.h"
#include "dds/ddsi/q_unused.h"
#include "dds/ddsi/q_bswap.h"
#include "dds/ddsi/q_lat_estim.h"
@ -334,7 +334,7 @@ static int valid_Data (const struct receiver_state *rst, struct nn_rmsg *rmsg, D
ptr = (unsigned char *) msg + offsetof (Data_DataFrag_common_t, octetsToInlineQos) + sizeof (msg->x.octetsToInlineQos) + msg->x.octetsToInlineQos;
if (msg->x.smhdr.flags & DATA_FLAG_INLINE_QOS)
{
nn_plist_src_t src;
ddsi_plist_src_t src;
src.protocol_version = rst->protocol_version;
src.vendorid = rst->vendor;
src.encoding = (msg->x.smhdr.flags & SMFLAG_ENDIANNESS) ? PL_CDR_LE : PL_CDR_BE;
@ -343,7 +343,7 @@ static int valid_Data (const struct receiver_state *rst, struct nn_rmsg *rmsg, D
src.factory = NULL;
src.logconfig = &rst->gv->logconfig;
/* just a quick scan, gathering only what we _really_ need */
if ((ptr = nn_plist_quickscan (sampleinfo, rmsg, &src)) == NULL)
if ((ptr = ddsi_plist_quickscan (sampleinfo, rmsg, &src)) == NULL)
return 0;
}
else
@ -456,7 +456,7 @@ static int valid_DataFrag (const struct receiver_state *rst, struct nn_rmsg *rms
ptr = (unsigned char *) msg + offsetof (Data_DataFrag_common_t, octetsToInlineQos) + sizeof (msg->x.octetsToInlineQos) + msg->x.octetsToInlineQos;
if (msg->x.smhdr.flags & DATAFRAG_FLAG_INLINE_QOS)
{
nn_plist_src_t src;
ddsi_plist_src_t src;
src.protocol_version = rst->protocol_version;
src.vendorid = rst->vendor;
src.encoding = (msg->x.smhdr.flags & SMFLAG_ENDIANNESS) ? PL_CDR_LE : PL_CDR_BE;
@ -465,7 +465,7 @@ static int valid_DataFrag (const struct receiver_state *rst, struct nn_rmsg *rms
src.factory = NULL;
src.logconfig = &rst->gv->logconfig;
/* just a quick scan, gathering only what we _really_ need */
if ((ptr = nn_plist_quickscan (sampleinfo, rmsg, &src)) == NULL)
if ((ptr = ddsi_plist_quickscan (sampleinfo, rmsg, &src)) == NULL)
return 0;
}
else
@ -1737,7 +1737,7 @@ static struct ddsi_serdata *get_serdata (struct ddsi_sertopic const * const topi
struct remote_sourceinfo {
const struct nn_rsample_info *sampleinfo;
unsigned char data_smhdr_flags;
const nn_plist_t *qos;
const ddsi_plist_t *qos;
const struct nn_rdata *fragchain;
unsigned statusinfo;
nn_wctime_t tstamp;
@ -1753,7 +1753,7 @@ static struct ddsi_serdata *remote_make_sample (struct ddsi_tkmap_instance **tk,
const uint32_t statusinfo = si->statusinfo;
const unsigned char data_smhdr_flags = si->data_smhdr_flags;
const nn_wctime_t tstamp = si->tstamp;
const nn_plist_t * __restrict qos = si->qos;
const ddsi_plist_t * __restrict qos = si->qos;
const char *failmsg = NULL;
struct ddsi_serdata *sample = NULL;
@ -1922,7 +1922,7 @@ static int deliver_user_data (const struct nn_rsample_info *sampleinfo, const st
unsigned statusinfo;
Data_DataFrag_common_t *msg;
unsigned char data_smhdr_flags;
nn_plist_t qos;
ddsi_plist_t qos;
int need_keyhash;
if (pwr->ddsi2direct_cb)
@ -1958,12 +1958,12 @@ static int deliver_user_data (const struct nn_rsample_info *sampleinfo, const st
need_keyhash = (sampleinfo->size == 0 || (data_smhdr_flags & (DATA_FLAG_KEYFLAG | DATA_FLAG_DATAFLAG)) == 0);
if (!(sampleinfo->complex_qos || need_keyhash) || !(data_smhdr_flags & DATA_FLAG_INLINE_QOS))
{
nn_plist_init_empty (&qos);
ddsi_plist_init_empty (&qos);
statusinfo = sampleinfo->statusinfo;
}
else
{
nn_plist_src_t src;
ddsi_plist_src_t src;
size_t qos_offset = NN_RDATA_SUBMSG_OFF (fragchain) + offsetof (Data_DataFrag_common_t, octetsToInlineQos) + sizeof (msg->octetsToInlineQos) + msg->octetsToInlineQos;
dds_return_t plist_ret;
src.protocol_version = rst->protocol_version;
@ -1974,7 +1974,7 @@ static int deliver_user_data (const struct nn_rsample_info *sampleinfo, const st
src.strict = NN_STRICT_P (gv->config);
src.factory = gv->m_factory;
src.logconfig = &gv->logconfig;
if ((plist_ret = nn_plist_init_frommsg (&qos, NULL, PP_STATUSINFO | PP_KEYHASH | PP_COHERENT_SET, 0, &src)) < 0)
if ((plist_ret = ddsi_plist_init_frommsg (&qos, NULL, PP_STATUSINFO | PP_KEYHASH | PP_COHERENT_SET, 0, &src)) < 0)
{
if (plist_ret != DDS_RETCODE_UNSUPPORTED)
GVWARNING ("data(application, vendor %u.%u): "PGUIDFMT" #%"PRId64": invalid inline qos\n",
@ -2005,7 +2005,7 @@ static int deliver_user_data (const struct nn_rsample_info *sampleinfo, const st
ddsrt_atomic_st32 (&pwr->next_deliv_seq_lowword, (uint32_t) (sampleinfo->seq + 1));
}
nn_plist_fini (&qos);
ddsi_plist_fini (&qos);
return 0;
}

View file

@ -461,7 +461,7 @@ static dds_return_t create_fragment_message_simple (struct writer *wr, seqno_t s
return 0;
}
dds_return_t create_fragment_message (struct writer *wr, seqno_t seq, const struct nn_plist *plist, struct ddsi_serdata *serdata, unsigned fragnum, struct proxy_reader *prd, struct nn_xmsg **pmsg, int isnew)
dds_return_t create_fragment_message (struct writer *wr, seqno_t seq, const struct ddsi_plist *plist, struct ddsi_serdata *serdata, unsigned fragnum, struct proxy_reader *prd, struct nn_xmsg **pmsg, int isnew)
{
/* We always fragment into FRAGMENT_SIZEd fragments, which are near
the smallest allowed fragment size & can't be bothered (yet) to
@ -730,7 +730,7 @@ static int must_skip_frag (const char *frags_to_skip, unsigned frag)
}
#endif
static void transmit_sample_lgmsg_unlocked (struct nn_xpack *xp, struct writer *wr, const struct whc_state *whcst, seqno_t seq, const struct nn_plist *plist, struct ddsi_serdata *serdata, struct proxy_reader *prd, int isnew, uint32_t nfrags)
static void transmit_sample_lgmsg_unlocked (struct nn_xpack *xp, struct writer *wr, const struct whc_state *whcst, seqno_t seq, const struct ddsi_plist *plist, struct ddsi_serdata *serdata, struct proxy_reader *prd, int isnew, uint32_t nfrags)
{
#if 0
const char *frags_to_skip = getenv ("SKIPFRAGS");
@ -787,7 +787,7 @@ static void transmit_sample_lgmsg_unlocked (struct nn_xpack *xp, struct writer *
}
}
static void transmit_sample_unlocks_wr (struct nn_xpack *xp, struct writer *wr, const struct whc_state *whcst, seqno_t seq, const struct nn_plist *plist, struct ddsi_serdata *serdata, struct proxy_reader *prd, int isnew)
static void transmit_sample_unlocks_wr (struct nn_xpack *xp, struct writer *wr, const struct whc_state *whcst, seqno_t seq, const struct ddsi_plist *plist, struct ddsi_serdata *serdata, struct proxy_reader *prd, int isnew)
{
/* on entry: &wr->e.lock held; on exit: lock no longer held */
struct ddsi_domaingv const * const gv = wr->e.gv;
@ -830,7 +830,7 @@ static void transmit_sample_unlocks_wr (struct nn_xpack *xp, struct writer *wr,
}
}
int enqueue_sample_wrlock_held (struct writer *wr, seqno_t seq, const struct nn_plist *plist, struct ddsi_serdata *serdata, struct proxy_reader *prd, int isnew)
int enqueue_sample_wrlock_held (struct writer *wr, seqno_t seq, const struct ddsi_plist *plist, struct ddsi_serdata *serdata, struct proxy_reader *prd, int isnew)
{
struct ddsi_domaingv const * const gv = wr->e.gv;
uint32_t i, sz, nfrags;
@ -885,7 +885,7 @@ int enqueue_sample_wrlock_held (struct writer *wr, seqno_t seq, const struct nn_
return enqueued ? 0 : -1;
}
static int insert_sample_in_whc (struct writer *wr, seqno_t seq, struct nn_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk)
static int insert_sample_in_whc (struct writer *wr, seqno_t seq, struct ddsi_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk)
{
/* returns: < 0 on error, 0 if no need to insert in whc, > 0 if inserted */
int insres, res = 0;
@ -1084,7 +1084,7 @@ static int maybe_grow_whc (struct writer *wr)
return 0;
}
static int write_sample_eot (struct thread_state1 * const ts1, struct nn_xpack *xp, struct writer *wr, struct nn_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk, int end_of_txn, int gc_allowed)
static int write_sample_eot (struct thread_state1 * const ts1, struct nn_xpack *xp, struct writer *wr, struct ddsi_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk, int end_of_txn, int gc_allowed)
{
struct ddsi_domaingv const * const gv = wr->e.gv;
int r;
@ -1171,7 +1171,7 @@ static int write_sample_eot (struct thread_state1 * const ts1, struct nn_xpack *
if (plist == NULL)
{
plist = ddsrt_malloc (sizeof (*plist));
nn_plist_init_empty (plist);
ddsi_plist_init_empty (plist);
}
assert (!(plist->present & PP_COHERENT_SET));
plist->present |= PP_COHERENT_SET;
@ -1184,7 +1184,7 @@ static int write_sample_eot (struct thread_state1 * const ts1, struct nn_xpack *
ddsrt_mutex_unlock (&wr->e.lock);
if (plist != NULL)
{
nn_plist_fini (plist);
ddsi_plist_fini (plist);
ddsrt_free (plist);
}
}
@ -1200,7 +1200,7 @@ static int write_sample_eot (struct thread_state1 * const ts1, struct nn_xpack *
ddsrt_mutex_unlock (&wr->e.lock);
if (plist != NULL)
{
nn_plist_fini (plist);
ddsi_plist_fini (plist);
ddsrt_free (plist);
}
}
@ -1215,14 +1215,14 @@ static int write_sample_eot (struct thread_state1 * const ts1, struct nn_xpack *
* creating the message, the WHC will free the plist (if any). Currently,
* plist's are only used for coherent sets, which is assumed to be rare,
* which in turn means that an extra copy doesn't hurt too badly ... */
nn_plist_t plist_stk, *plist_copy;
ddsi_plist_t plist_stk, *plist_copy;
struct whc_state whcst, *whcstptr;
if (plist == NULL)
plist_copy = NULL;
else
{
plist_copy = &plist_stk;
nn_plist_copy (plist_copy, plist);
ddsi_plist_copy (plist_copy, plist);
}
if (wr->heartbeat_xevent == NULL)
whcstptr = NULL;
@ -1233,7 +1233,7 @@ static int write_sample_eot (struct thread_state1 * const ts1, struct nn_xpack *
}
transmit_sample_unlocks_wr (xp, wr, whcstptr, seq, plist_copy, serdata, NULL, 1);
if (plist_copy)
nn_plist_fini (plist_copy);
ddsi_plist_fini (plist_copy);
}
else
{
@ -1246,7 +1246,7 @@ static int write_sample_eot (struct thread_state1 * const ts1, struct nn_xpack *
/* If not actually inserted, WHC didn't take ownership of plist */
if (r == 0 && plist != NULL)
{
nn_plist_fini (plist);
ddsi_plist_fini (plist);
ddsrt_free (plist);
}
}

View file

@ -21,7 +21,7 @@ extern inline void whc_return_sample (struct whc *whc, struct whc_borrowed_sampl
extern inline void whc_sample_iter_init (const struct whc *whc, struct whc_sample_iter *it);
extern inline bool whc_sample_iter_borrow_next (struct whc_sample_iter *it, struct whc_borrowed_sample *sample);
extern inline void whc_free (struct whc *whc);
extern int whc_insert (struct whc *whc, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct nn_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk);
extern int whc_insert (struct whc *whc, seqno_t max_drop_seq, seqno_t seq, nn_mtime_t exp, struct ddsi_plist *plist, struct ddsi_serdata *serdata, struct ddsi_tkmap_instance *tk);
extern unsigned whc_downgrade_to_volatile (struct whc *whc, struct whc_state *st);
extern unsigned whc_remove_acked_messages (struct whc *whc, seqno_t max_drop_seq, struct whc_state *whcst, struct whc_node **deferred_free_list);
extern void whc_free_deferred_free_list (struct whc *whc, struct whc_node *deferred_free_list);

View file

@ -950,14 +950,14 @@ static bool resend_spdp_sample_by_guid_key (struct writer *wr, const ddsi_guid_t
is to be preferred */
struct ddsi_domaingv *gv = wr->e.gv;
bool sample_found;
nn_plist_t ps;
nn_plist_init_empty (&ps);
ddsi_plist_t ps;
ddsi_plist_init_empty (&ps);
ps.present |= PP_PARTICIPANT_GUID;
ps.participant_guid = *guid;
struct nn_xmsg *mpayload = nn_xmsg_new (gv->xmsgpool, &guid->prefix, 0, NN_XMSG_KIND_DATA);
nn_plist_addtomsg (mpayload, &ps, ~(uint64_t)0, ~(uint64_t)0);
ddsi_plist_addtomsg (mpayload, &ps, ~(uint64_t)0, ~(uint64_t)0);
nn_xmsg_addpar_sentinel (mpayload);
nn_plist_fini (&ps);
ddsi_plist_fini (&ps);
struct ddsi_plist_sample plist_sample;
nn_xmsg_payload_to_plistsample (&plist_sample, PID_PARTICIPANT_GUID, mpayload);
struct ddsi_serdata *sd = ddsi_serdata_from_sample (gv->plist_topic, SDK_KEY, &plist_sample);

View file

@ -27,7 +27,7 @@
#include "dds/ddsrt/thread_pool.h"
#include "dds/ddsi/q_protocol.h"
#include "dds/ddsi/q_xqos.h"
#include "dds/ddsi/ddsi_xqos.h"
#include "dds/ddsi/q_bswap.h"
#include "dds/ddsi/q_rtps.h"
#include "dds/ddsi/q_addrset.h"

View file

@ -14,15 +14,15 @@
#include "dds/ddsrt/heap.h"
#include "dds/ddsrt/string.h"
#include "dds/ddsrt/endian.h"
#include "dds/ddsi/q_xqos.h"
#include "dds/ddsi/q_plist.h"
#include "dds/ddsi/ddsi_xqos.h"
#include "dds/ddsi/ddsi_plist.h"
CU_Test (ddsi_plist, unalias_copy_merge)
{
/* one int, one string and one string sequence covers most cases */
nn_plist_t p0, p0memcpy;
ddsi_plist_t p0, p0memcpy;
char *p0strs[3];
nn_plist_init_empty (&p0);
ddsi_plist_init_empty (&p0);
p0.present = PP_ENTITY_NAME;
p0.aliased = PP_ENTITY_NAME;
p0.entity_name = "nemo";
@ -36,10 +36,10 @@ CU_Test (ddsi_plist, unalias_copy_merge)
memcpy (&p0memcpy, &p0, sizeof (p0));
/* manually alias one, so we can free it*/
nn_plist_t p0alias;
ddsi_plist_t p0alias;
memcpy (&p0alias, &p0, sizeof (p0));
p0alias.qos.partition.strs = ddsrt_memdup (p0alias.qos.partition.strs, p0.qos.partition.n * sizeof (*p0.qos.partition.strs));
nn_plist_fini (&p0alias);
ddsi_plist_fini (&p0alias);
CU_ASSERT (memcmp (&p0, &p0memcpy, sizeof (p0)) == 0);
CU_ASSERT_STRING_EQUAL (p0.entity_name, "nemo");
CU_ASSERT_STRING_EQUAL (p0.qos.partition.strs[0], p0strs[0]);
@ -47,9 +47,9 @@ CU_Test (ddsi_plist, unalias_copy_merge)
CU_ASSERT_STRING_EQUAL (p0.qos.partition.strs[2], p0strs[2]);
/* copy an aliased one; the original must be unchanged, the copy unaliased */
nn_plist_t p1;
nn_plist_init_empty (&p1);
nn_plist_copy (&p1, &p0);
ddsi_plist_t p1;
ddsi_plist_init_empty (&p1);
ddsi_plist_copy (&p1, &p0);
CU_ASSERT (memcmp (&p0, &p0memcpy, sizeof (p0)) == 0);
CU_ASSERT (p1.present == p0.present);
CU_ASSERT (p1.aliased == 0);
@ -69,13 +69,13 @@ CU_Test (ddsi_plist, unalias_copy_merge)
/* merge-in missing ones from an aliased copy: original must remain unchanged;
existing ones should stay without touching "aliased" only new ones are
added as unaliased ones */
nn_plist_t p2, p2memcpy;
nn_plist_init_empty (&p2);
ddsi_plist_t p2, p2memcpy;
ddsi_plist_init_empty (&p2);
p2.present = PP_ENTITY_NAME;
p2.aliased = PP_ENTITY_NAME;
p2.entity_name = "omen";
memcpy (&p2memcpy, &p2, sizeof (p2));
nn_plist_mergein_missing (&p2, &p0, p0.present, p0.qos.present);
ddsi_plist_mergein_missing (&p2, &p0, p0.present, p0.qos.present);
CU_ASSERT (memcmp (&p0, &p0memcpy, sizeof (p0)) == 0);
CU_ASSERT (p2.present == p0.present);
CU_ASSERT (p2.aliased == p2memcpy.aliased);
@ -93,7 +93,7 @@ CU_Test (ddsi_plist, unalias_copy_merge)
CU_ASSERT_STRING_EQUAL (p2.qos.partition.strs[2], p0.qos.partition.strs[2]);
/* unalias of p0, partition.strs mustn't change, because it, unlike its elements, wasn't aliased */
nn_plist_unalias (&p0);
ddsi_plist_unalias (&p0);
CU_ASSERT (p0.present == p0memcpy.present);
CU_ASSERT (p0.aliased == 0);
CU_ASSERT (p0.qos.present == p0memcpy.qos.present);
@ -111,9 +111,9 @@ CU_Test (ddsi_plist, unalias_copy_merge)
memcpy (&p0memcpy, &p0, sizeof (p0));
/* copy an aliased one; the original must be unchanged, the copy unaliased */
nn_plist_t p3;
nn_plist_init_empty (&p3);
nn_plist_copy (&p3, &p0);
ddsi_plist_t p3;
ddsi_plist_init_empty (&p3);
ddsi_plist_copy (&p3, &p0);
CU_ASSERT (memcmp (&p0, &p0memcpy, sizeof (p0)) == 0);
CU_ASSERT (p3.present == p0.present);
CU_ASSERT (p3.aliased == 0);
@ -133,13 +133,13 @@ CU_Test (ddsi_plist, unalias_copy_merge)
/* merge-in missing ones from an aliased copy: original must remain unchanged;
existing ones should stay without touching "aliased" only new ones are
added as unaliased ones */
nn_plist_t p4, p4memcpy;
nn_plist_init_empty (&p4);
ddsi_plist_t p4, p4memcpy;
ddsi_plist_init_empty (&p4);
p4.present = PP_ENTITY_NAME;
p4.aliased = PP_ENTITY_NAME;
p4.entity_name = "omen";
memcpy (&p4memcpy, &p4, sizeof (p4));
nn_plist_mergein_missing (&p4, &p0, p0.present, p0.qos.present);
ddsi_plist_mergein_missing (&p4, &p0, p0.present, p0.qos.present);
CU_ASSERT (memcmp (&p0, &p0memcpy, sizeof (p0)) == 0);
CU_ASSERT (p4.present == p0.present);
CU_ASSERT (p4.aliased == p4memcpy.aliased);
@ -156,9 +156,9 @@ CU_Test (ddsi_plist, unalias_copy_merge)
CU_ASSERT_STRING_EQUAL (p4.qos.partition.strs[1], p0.qos.partition.strs[1]);
CU_ASSERT_STRING_EQUAL (p4.qos.partition.strs[2], p0.qos.partition.strs[2]);
nn_plist_fini (&p0);
nn_plist_fini (&p1);
nn_plist_fini (&p2);
nn_plist_fini (&p3);
nn_plist_fini (&p4);
ddsi_plist_fini (&p0);
ddsi_plist_fini (&p1);
ddsi_plist_fini (&p2);
ddsi_plist_fini (&p3);
ddsi_plist_fini (&p4);
}

View file

@ -13,7 +13,7 @@
#include "CUnit/Theory.h"
#include "dds/ddsrt/heap.h"
#include "dds/ddsrt/endian.h"
#include "dds/ddsi/q_xqos.h"
#include "dds/ddsi/ddsi_xqos.h"
#include "dds/ddsi/ddsi_plist_generic.h"
struct desc {

View file

@ -176,8 +176,8 @@ static struct proxy_writer *mkwr (const struct ddsi_domaingv *gv, bool auto_disp
xqos = ddsrt_malloc (sizeof (*xqos));
wr_iid = ddsi_iid_gen ();
memset (pwr, 0, sizeof (*pwr));
nn_xqos_init_empty (xqos);
nn_xqos_mergein_missing (xqos, &gv->default_xqos_wr, ~(uint64_t)0);
ddsi_xqos_init_empty (xqos);
ddsi_xqos_mergein_missing (xqos, &gv->default_xqos_wr, ~(uint64_t)0);
xqos->ownership_strength.value = 0;
xqos->writer_data_lifecycle.autodispose_unregistered_instances = auto_dispose;
pwr->e.iid = wr_iid;
@ -195,12 +195,12 @@ static struct dds_rhc *mkrhc (struct ddsi_domaingv *gv, dds_reader *rd, dds_hist
{
struct dds_rhc *rhc;
dds_qos_t rqos;
nn_xqos_init_empty (&rqos);
ddsi_xqos_init_empty (&rqos);
rqos.present |= QP_HISTORY | QP_DESTINATION_ORDER;
rqos.history.kind = hk;
rqos.history.depth = hdepth;
rqos.destination_order.kind = dok;
nn_xqos_mergein_missing (&rqos, &gv->default_xqos_rd, ~(uint64_t)0);
ddsi_xqos_mergein_missing (&rqos, &gv->default_xqos_rd, ~(uint64_t)0);
thread_state_awake_domain_ok (lookup_thread_state ());
rhc = dds_rhc_default_new_xchecks (rd, gv, mdtopic, true);
dds_rhc_set_qos(rhc, &rqos);

View file

@ -23,7 +23,7 @@
#include "dds/ddsrt/heap.h"
#include "dds/ddsrt/log.h"
#include "dds/ddsi/q_xqos.h"
#include "dds/ddsi/ddsi_xqos.h"
#include "rwdata.h"
#include "rw.h"
@ -140,14 +140,14 @@ static bool pubsub_qos_eq_h (const dds_qos_t *a, dds_entity_t ent)
dds_get_qos (ent, b);
/* internal interface is more luxurious that a simple compare for equality, and
using that here saves us a ton of code */
uint64_t delta = nn_xqos_delta (a, b, QP_GROUP_DATA | QP_PRESENTATION | QP_PARTITION);
uint64_t delta = ddsi_xqos_delta (a, b, QP_GROUP_DATA | QP_PRESENTATION | QP_PARTITION);
if (delta)
{
struct ddsrt_log_cfg logcfg;
dds_log_cfg_init (&logcfg, 0, DDS_LC_ERROR, stderr, stderr);
DDS_CLOG (DDS_LC_ERROR, &logcfg, "pub/sub: delta = %"PRIx64"\n", delta);
nn_xqos_log (DDS_LC_ERROR, &logcfg, a); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
nn_xqos_log (DDS_LC_ERROR, &logcfg, b); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
ddsi_xqos_log (DDS_LC_ERROR, &logcfg, a); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
ddsi_xqos_log (DDS_LC_ERROR, &logcfg, b); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
}
dds_delete_qos (b);
return delta == 0;
@ -155,7 +155,7 @@ static bool pubsub_qos_eq_h (const dds_qos_t *a, dds_entity_t ent)
static uint64_t reader_qos_delta (const dds_qos_t *a, const dds_qos_t *b)
{
return nn_xqos_delta (a, b, QP_USER_DATA | QP_TOPIC_DATA | QP_GROUP_DATA | QP_DURABILITY | QP_HISTORY | QP_RESOURCE_LIMITS | QP_PRESENTATION | QP_DEADLINE | QP_LATENCY_BUDGET | QP_OWNERSHIP | QP_LIVELINESS | QP_TIME_BASED_FILTER | QP_PARTITION | QP_RELIABILITY | QP_DESTINATION_ORDER | QP_PRISMTECH_READER_DATA_LIFECYCLE);
return ddsi_xqos_delta (a, b, QP_USER_DATA | QP_TOPIC_DATA | QP_GROUP_DATA | QP_DURABILITY | QP_HISTORY | QP_RESOURCE_LIMITS | QP_PRESENTATION | QP_DEADLINE | QP_LATENCY_BUDGET | QP_OWNERSHIP | QP_LIVELINESS | QP_TIME_BASED_FILTER | QP_PARTITION | QP_RELIABILITY | QP_DESTINATION_ORDER | QP_PRISMTECH_READER_DATA_LIFECYCLE);
}
static bool reader_qos_eq_h (const dds_qos_t *a, dds_entity_t ent)
@ -168,8 +168,8 @@ static bool reader_qos_eq_h (const dds_qos_t *a, dds_entity_t ent)
struct ddsrt_log_cfg logcfg;
dds_log_cfg_init (&logcfg, 0, DDS_LC_ERROR, stderr, stderr);
DDS_CLOG (DDS_LC_ERROR, &logcfg, "reader: delta = %"PRIx64"\n", delta);
nn_xqos_log (DDS_LC_ERROR, &logcfg, a); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
nn_xqos_log (DDS_LC_ERROR, &logcfg, b); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
ddsi_xqos_log (DDS_LC_ERROR, &logcfg, a); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
ddsi_xqos_log (DDS_LC_ERROR, &logcfg, b); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
}
dds_delete_qos (b);
return delta == 0;
@ -177,7 +177,7 @@ static bool reader_qos_eq_h (const dds_qos_t *a, dds_entity_t ent)
static uint64_t writer_qos_delta (const dds_qos_t *a, const dds_qos_t *b)
{
return nn_xqos_delta (a, b, QP_USER_DATA | QP_TOPIC_DATA | QP_GROUP_DATA | QP_DURABILITY | QP_HISTORY | QP_RESOURCE_LIMITS | QP_PRESENTATION | QP_LIFESPAN | QP_DEADLINE | QP_LATENCY_BUDGET | QP_OWNERSHIP | QP_OWNERSHIP_STRENGTH | QP_LIVELINESS | QP_PARTITION | QP_RELIABILITY | QP_DESTINATION_ORDER | QP_PRISMTECH_WRITER_DATA_LIFECYCLE);
return ddsi_xqos_delta (a, b, QP_USER_DATA | QP_TOPIC_DATA | QP_GROUP_DATA | QP_DURABILITY | QP_HISTORY | QP_RESOURCE_LIMITS | QP_PRESENTATION | QP_LIFESPAN | QP_DEADLINE | QP_LATENCY_BUDGET | QP_OWNERSHIP | QP_OWNERSHIP_STRENGTH | QP_LIVELINESS | QP_PARTITION | QP_RELIABILITY | QP_DESTINATION_ORDER | QP_PRISMTECH_WRITER_DATA_LIFECYCLE);
}
static bool writer_qos_eq_h (const dds_qos_t *a, dds_entity_t ent)
@ -190,8 +190,8 @@ static bool writer_qos_eq_h (const dds_qos_t *a, dds_entity_t ent)
struct ddsrt_log_cfg logcfg;
dds_log_cfg_init (&logcfg, 0, DDS_LC_ERROR, stderr, stderr);
DDS_CLOG (DDS_LC_ERROR, &logcfg, "writer: delta = %"PRIx64"\n", delta);
nn_xqos_log (DDS_LC_ERROR, &logcfg, a); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
nn_xqos_log (DDS_LC_ERROR, &logcfg, b); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
ddsi_xqos_log (DDS_LC_ERROR, &logcfg, a); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
ddsi_xqos_log (DDS_LC_ERROR, &logcfg, b); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
}
dds_delete_qos (b);
return delta == 0;
@ -275,8 +275,8 @@ MPT_ProcessEntry (rw_publisher,
struct ddsrt_log_cfg logcfg;
dds_log_cfg_init (&logcfg, 0, DDS_LC_ERROR, stderr, stderr);
DDS_CLOG (DDS_LC_ERROR, &logcfg, "matched reader: delta = %"PRIx64"\n", delta);
nn_xqos_log (DDS_LC_ERROR, &logcfg, qos); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
nn_xqos_log (DDS_LC_ERROR, &logcfg, ep->qos); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
ddsi_xqos_log (DDS_LC_ERROR, &logcfg, qos); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
ddsi_xqos_log (DDS_LC_ERROR, &logcfg, ep->qos); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
}
MPT_ASSERT (delta == 0, "writer %zu %zu matched reader QoS mismatch\n", i, j);
dds_delete_qos (ep->qos);
@ -427,8 +427,8 @@ MPT_ProcessEntry (rw_subscriber,
struct ddsrt_log_cfg logcfg;
dds_log_cfg_init (&logcfg, 0, DDS_LC_ERROR, stderr, stderr);
DDS_CLOG (DDS_LC_ERROR, &logcfg, "matched writer: delta = %"PRIx64"\n", delta);
nn_xqos_log (DDS_LC_ERROR, &logcfg, qos); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
nn_xqos_log (DDS_LC_ERROR, &logcfg, ep->qos); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
ddsi_xqos_log (DDS_LC_ERROR, &logcfg, qos); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
ddsi_xqos_log (DDS_LC_ERROR, &logcfg, ep->qos); DDS_CLOG (DDS_LC_ERROR, &logcfg, "\n");
}
MPT_ASSERT (delta == 0, "reader %zu %zu matched writer QoS mismatch\n", i, j);
dds_delete_qos (ep->qos);