Commit graph

13 commits

Author SHA1 Message Date
Erik Boasson
45c0f432a9 Add dds_get_guid to get the GUID of a local entity
This is merely a more convenient way of obtaining it: otherwise one has
subscribe to the correct built-in topic, read the sample corresponding
to the entity's instance handle and get the "key" field.  That's a bit
of a detour to get the network-wide unique identifier.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-04-09 17:02:11 +02:00
Erik Boasson
0b12ff5cfc Promote domains and Cyclone library to entities
This commit adds two entity types: a "domain", which is the parent of
participants and which is instantiated for each domain that has at least
one participant in it; and "cyclonedds", which is a representation of
the (initialized) Cyclone DDS library in the process and that is the
parent of all domain entities.  The handle of the latter is a
compile-constant, DDS_CYCLONEDDS_HANDLE.

This changes the return value from dds_get_parent when executed on a
participant: it now returns the handle of the entity representing the
domain the participant is attached to.  Two participants in the same
domain self-evidently return the same domain entity.

This allows deleting all participants in a domain by calling dds_delete
on the domain entity, or tearing down everything and deinitializing the
library by calling dds_delete on the top-level entity.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-09-11 10:06:24 +02:00
Erik Boasson
966ec0dda7 Make logging config per-domain
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-08-21 14:16:51 +02:00
Erik Boasson
32b683bf37 Enable "missing prototypes" warning for gcc, clang
Missing prototypes for exported functions cause a really huge issue on
Windows.  Enabling the "missing prototypes" warning makes it much easier
to catch this problem.  Naturally, any warnings caused by this have been
fixed.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-06-13 12:54:35 +02:00
Erik Boasson
a4d8aba4f9 Add limited support for QoS changes
This commit adds support for changing all mutable QoS except those that
affect reader/writer matching (i.e., deadline, latency budget and
partition).  This is simply because the recalculation of the matches
hasn't been implemented yet, it is not a fundamental limitation.

Implementing this basically forced fixing up a bunch of inconsistencies
in handling QoS in entity creation.  A silly multi-process ping-pong
test built on changing the value of user data has been added.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-06-13 12:54:35 +02:00
Erik Boasson
19aec98b8a Clean up return code types
* Remove dds_return_t / dds_retcode_t distinction (now there is only
  dds_return_t and all error codes are always negative)

* Remove Q_ERR_... error codes and replace them by DDS_RETCODE_...
  ones so that there is only one set of error codes

* Replace a whole bunch "int" return types that were used to return
  Q_ERR_... codes by "dds_return_t" return types

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-06-10 10:42:52 +02:00
Jeroen Koekkoek
cd6742ee12 Rearrange and fixup abstraction layer
- Replace os_result by dds_retcode_t and move DDS return code defines down.
  Eliminates the need to convert between different return code types.

- Move dds_time_t down and remove os_time.
  Eliminates the need to convert between different time representations and
  reduces code duplication.

- Remove use of Microsoft source-code annotation language (SAL).
  SAL annotations are Microsoft specific and not very well documented. This
  makes it very difficult for contributers to write.

- Rearrange the abstraction layer to be feature-based. The previous layout
  falsely assumed that the operating system dictates which implementation is
  best suited. For general purpose operating systems this is mostly true, but
  embedded targets require a slightly different approach and may not even offer
  all features. The new layout makes it possible to mix-and-match feature
  implementations and allows for features to not be implemented at all.

- Replace the os prefix by ddsrt to avoid name collisions.

- Remove various portions of unused and unwanted code.

- Export thread names on all supported platforms.

- Return native thread identifier on POSIX compatible platforms.

- Add timed wait for condition variables that takes an absolute time.

- Remove system abstraction for errno. The os_getErrno and os_setErrno were
  incorrect. Functions that might fail now simply return a DDS return code
  instead.

- Remove thread-specific memory abstraction. os_threadMemGet and accompanying
  functions were a mess and their use has been eliminated by other changes in
  this commit.

- Replace attribute (re)defines by ddsrt_ prefixed equivalents to avoid name
  collisions and problems with faulty __nonnull__ attributes.

Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2019-03-22 15:19:09 +01:00
Firas Sahli
05f961dec1
Rename get and set of enabled status to mask
Signed-off-by: Firas Sahli <firas.sahli@adlinktech.com>
2018-12-11 11:07:09 +01:00
Jeroen Koekkoek
74a48c5731 Replace Criterion by CUnit
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-12-06 14:48:30 +01:00
Erik Boasson
ec68eeac29 Bring listener operations naming scheme in line with the rest
The main naming scheme is OPER_TYPE (i.e., dds_create_participant) but the listener operations were named TYPE_OPER (i.e., dds_listener_create). This commit brings the listener scheme in line with the rest, retaining the old names as a deprecated interface.

Signed-off-by: Erik Boasson <eb@ilities.com>
2018-11-09 14:18:51 +01:00
Erik Boasson
651bdfee06 Bring QoS operations naming scheme in line with the rest
The main naming scheme is OPER_TYPE (i.e., dds_create_participant) but the QoS operations were named TYPE_OPER (i.e., dds_qos_create). This commit brings the QoS scheme in line with the rest, retaining the old names as a deprecated interface.

Signed-off-by: Erik Boasson <eb@ilities.com>
2018-11-09 14:18:47 +01:00
Erik Boasson
b7487b18a6 stricter warning checks and the corresponding fixes
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-08-09 09:23:03 +02:00
Michiel Beemster
11d9ce37aa Initial contribution 2018-04-10 17:03:59 +02:00