Commit graph

913 commits

Author SHA1 Message Date
Erik Boasson
e0d5587639 Unified key-to-iid map means a backref to the map is no longer needed
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-01-02 12:13:40 +01:00
Erik Boasson
781c644800 participants are not hidden built-in entities in built-in topics and should get an instance handle consistent with the DCPSParticipant topic
Signed-off-by: Erik Boasson <erik.boasson@prismtech.com>
2019-01-01 18:52:27 +01:00
Erik Boasson
7a9f845636 enable address sanitizer on clang Debug builds by default
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-25 12:40:05 +01:00
Erik Boasson
179a35d192 fix race conditions in instance id-to-key lookup
this is just an intermediate step: firstly, iid-to-key lookup is a linear scan; secondly, the lookup should happen on the RHC or the WHC and not on some internal map to associates key values with instance handles and is independent of entities

Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-25 12:40:05 +01:00
Erik Boasson
0f7ce1ac43 instance operations must also ensure thread is considered awake or GC may free tkmap instances prematurely
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-25 12:40:05 +01:00
Erik Boasson
84506b8518 rollback changes to dispose counts when resource limits reached during RHC update
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-25 12:40:05 +01:00
Erik Boasson
e96a47f3f9 fix test issues detected by address sanitizer
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-25 12:40:05 +01:00
Erik Boasson
98c53db057 fix leak of config data if a domain id problem leads to an initialization failure
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-25 12:40:05 +01:00
eboasson
97c5e06b6a
Merge pull request #69 from FirasSahliADLinktech/rename-functions
Make function names more consistent:

* ``dds_topic_{get,set}_filter`` -> ``dds_{get,set}_topic_filter``
* ``dds_{get,set}_enabled_status`` -> ``dds_{get,set}_status_mask``
* ``dds_instance_lookup`` -> ``dds_lookup_instance``

Plus removal of defunct ddsv2.h.
2018-12-25 12:38:25 +01:00
Erik Boasson
1a0fcea0c2 replace old builtin topics by new ones and add implementation of DCPSSubscription and DCPSPublication
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-14 14:02:08 +01:00
Erik Boasson
78d49b52a0 add new "builtin topic" types and conversion routines
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-14 14:02:08 +01:00
Erik Boasson
945fc94de7 setting "must inspect result" on return_loan is pedantry
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-14 14:02:08 +01:00
Erik Boasson
e631567c35 extend sertopic interface and move the concept of a type descriptor to just the sertopic definition
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-14 14:02:08 +01:00
Erik Boasson
c169df6227 fix refcount leak of tkmap instances when copying transient-local history from a local writer
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-14 14:02:08 +01:00
Erik Boasson
ef65101ad7 pushing released serdata:s onto a freelist was dropped by accident in the rewriting of them
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-14 14:02:08 +01:00
Erik Boasson
29f542b916 iid and tkmap are integral to this DDSI stack and should be part of it
They were made available from the DCPS layer to DDSI using some function pointers, but it makes more sense to have them as part of the DDSI core.

Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-14 14:02:08 +01:00
Firas Sahli
9f51f6f9dc
Rename get and set filter functions for topic
Signed-off-by: Firas Sahli <firas.sahli@adlinktech.com>
2018-12-11 11:07: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
Firas Sahli
99f410bc49
Rename dds_instance_lookup to dds_lookup_instance
Signed-off-by: Firas Sahli <firas.sahli@adlinktech.com>
2018-12-11 11:06:50 +01:00
Firas Sahli
af7e34f143
Remove ddsv2.h
Signed-off-by: Firas Sahli <firas.sahli@adlinktech.com>
2018-12-11 11:06:27 +01:00
Jeroen Koekkoek
3c5a209389 Fix build warnings by passing a message to CU_PASS
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-12-10 13:05:59 +01:00
Jeroen Koekkoek
3b69213f51 Do not require table to contain address if interface is down (Fixes #55)
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-12-10 13:05:59 +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
e16c59e392 use sizeof(buffer) instead of uninitialised variable
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-01 12:58:22 +01:00
Erik Boasson
e62abe623a fix warnings on qos function names and constness
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-12-01 10:01:13 +01:00
Jeroen Koekkoek
7acf32663e Add tests for new logging implementation
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-30 23:42:55 +01:00
Jeroen Koekkoek
5b4ccf3daa Fix bug in CUnit signature parser
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-30 23:42:29 +01:00
Jeroen Koekkoek
1cf03332ca Simplify logging and remove unwanted functions from abstraction layer
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-30 23:42:19 +01:00
Jeroen Koekkoek
ac020f62f7 Add read-write locks for POSIX
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-30 23:32:26 +01:00
eboasson
69f563be5b
Merge pull request #60 from FirasSahliADLinktech/multiple_tests
Some missing unit tests and correct signature
2018-11-30 12:07:44 +01:00
Firas Sahli
6908e3deea
Correct signature and add tests for dds_instance_get_key
Signed-off-by: Firas Sahli <firas.sahli@adlinktech.com>
2018-11-28 10:52:14 +01:00
Firas Sahli
8aa6ceff81
Add test for dds_qos_copy and extra check to dds_qset_partition
Signed-off-by: Firas Sahli <firas.sahli@adlinktech.com>
2018-11-28 10:41:24 +01:00
Firas Sahli
4b627fd9aa
Add simple test for dds_time
Signed-off-by: Firas Sahli <firas.sahli@adlinktech.com>
2018-11-28 10:38:07 +01:00
Erik Boasson
68f2ce9724 Update getting started guide to use new QoS function names
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-11-27 15:28:20 +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
a519d9f597 Eliminate some "possible misuse of comma operator" warnings
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-11-09 12:33:22 +01:00
eboasson
2e2224daea
Merge pull request #31 from eboasson/builtintopics
Refactor sample representation (along with a few small other details)
2018-11-09 12:23:47 +01:00
eboasson
970680468c
Merge pull request #34 from k0ekk0ek/cunit
Cleanup and CUnit integration and add support for theories and fixtures
2018-11-08 17:31:16 +01:00
Jeroen Koekkoek
f56eccf6a6 Fix exit codes returned by CUnit test runner
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-08 11:51:54 +01:00
Jeroen Koekkoek
217def362c Fix location of generated header for CUnit based tests
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-08 09:42:14 +01:00
Jeroen Koekkoek
c903fee0c9 Extend strcasecmp tests and convert them to theories
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-08 09:42:02 +01:00
Jeroen Koekkoek
94722a642e Make cast from CU_ErrorCode to int in CUnit test runner main explicit
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-08 09:41:57 +01:00
Jeroen Koekkoek
6171d44b62 Add -Wno-missing-field-initializers to COMPILE_FLAGS property on test source files
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-08 09:41:42 +01:00
Erik Boasson
263a9b30a3 Do not consider loopback on Windows multicast-capable
Tests with network interface set to 127.0.0.1 don't see any multicasts
despite multicast loopback being enabled.  It therefore seems the
multicast flag on the loopback interface on Windows is at least
unreliable, and so the safest course of action is to disable multicast
by default on that interface.

Internal/AssumeMulticastCapable can still be used to override this and
enable multicasting anyway.

Signed-off-by: Erik Boasson <eb@ilities.com>
2018-11-06 09:32:28 +01:00
Erik Boasson
8ba218dca8 dissociate WSAEvent from sockets handled on dedicated threads
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-11-05 16:00:41 +01:00
Erik Boasson
d05b0a4d13 Use GetSystemTimePreciseAsFileTime
When building for Windows 8 or later, use
GetSystemTimePreciseAsFileTime, otherwise do a run-time lookup of that
function and fall back to GetSystemTimeAsFileTime if it doesn't exist.

Signed-off-by: Erik Boasson <eb@ilities.com>
2018-11-05 08:56:20 +01:00
Jeroen Koekkoek
599bf311cf Fix Windows issues with CUnit fixture initialization
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-02 14:37:43 +01:00
Jeroen Koekkoek
ecaf72c003 Fix test registration on macOS
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-02 13:27:15 +01:00
Jeroen Koekkoek
630178fb12 Cleanup CUnit integration and add support for theories
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2018-11-01 19:32:24 +01:00