Table-driven parameter list handling
The old parameter list parsing was a mess of custom code with tons of duplicated checks, even though parameter list parsing really is a fairly straightforward affair. This commit changes it to a mostly table-driven implementation, where the vast majority of the settings are handled by a generic deserializer and the irregular ones (like reliability, locators) are handled by custom functions. The crazy ones (IPv4 address and port rely on additional state and are completely special-cased). Given these tables, the serialization, finalisation, validation, merging, unalias'ing can all be handled by a very small amount of custom code and an appropriately defined generic function for the common cases. This also makes it possible to have all QoS validation in place, and so removes the need for the specialized implementations for the various entity kinds in the upper layer. QoS inapplicable to an entity were previously ignored, allowing one to have invalid values set in a QoS object when creating an entity, provided that the invalid values are irrelevant to that entity. Whether this is a good thing or not is debatable, but certainly it is a good thing to avoid copying in inapplicable QoS settings. That in turn means the behaviour of the API can remain the same. It does turn out that the code used to return "inconsistent QoS" also for invalid values. That has now been rectified, and it returns "inconsistent QoS" or "bad parameter" as appropriate. Tests have been updated accordingly. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
8ae81db490
commit
3322fc086d
36 changed files with 2367 additions and 2735 deletions
|
@ -374,7 +374,8 @@ dds_qset_durability_service (
|
|||
* @param[in,out] qos - Pointer to a dds_qos_t structure that will store the policy
|
||||
* @param[in] ignore - True if readers and writers owned by the same participant should be ignored
|
||||
*/
|
||||
DDS_EXPORT void dds_qset_ignorelocal (
|
||||
DDS_EXPORT void
|
||||
dds_qset_ignorelocal (
|
||||
dds_qos_t * __restrict qos,
|
||||
dds_ignorelocal_kind_t ignore);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue