Commit graph

25 commits

Author SHA1 Message Date
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
aa2715f4fe Add support for FreeRTOS and lwIP (#166)
Add support for FreeRTOS and lwIP

Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2019-05-23 14:27:56 +02:00
Erik Boasson
c92820677d enable printf format checking for dds_log
Also remove superfluous parameters in a TRACE statement and fix a format
specification in pong.c.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-04-21 16:05:06 +02:00
Jeroen Koekkoek
63a5c87baf Fix format strings and signatures for fixed size integers
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2019-04-11 10:04:06 +02:00
Erik Boasson
c39cc74e13 using explicit fflush instead of setvbuf (#133)
Because line-buffering doesn't exist on Windows ...

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-03-23 15:40:29 +01:00
Erik Boasson
959a096372 make timeout argument in ping work again (#126)
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-03-23 15:40:29 +01: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
Jeroen Koekkoek
1e1e9987bc Disable line buffering in Throughput examples on Windows
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
2019-03-08 15:13:09 +01:00
Erik Boasson
c7906f296d consistently use Eclipse Cyclone DDS in documentation
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-02-15 11:35:00 +01:00
Erik Boasson
0f7145fe7c eliminate a race condition on taking/processing samples in throughput subscriber
In listener mode, the main thread would still periodically try to take samples. When this happens concurrently with the listener invocation, the result is a spurious warning that some samples were delivered out-of-order.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-01-22 09:15:18 +01:00
Erik Boasson
84a25ab92d use standard-C SIGINT handling instead of platform-specific one in throughput example
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-01-22 09:15:18 +01:00
Erik Boasson
6e7e1ca448 set stdout line-buffering in throughput tests
Line buffering allows monitoring progress via pipes or files, and as there is just one line of output per second, it doesn't affect performance

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-01-22 09:15:18 +01:00
Erik Boasson
cd02110af0 add listener-, waitset- and polling-mode to thorughput subscriber
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-01-17 10:18:14 +01:00
Erik Boasson
ed06ab8f4b trivial modifications to pacify gcc -O2 and clang --analyze
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-01-02 15:03:20 +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
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
d1c5cd9b57 set ^C handler just before writing samples and rely on default action to terminate the process when waiting a matching subscriber
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-10-14 14:02:47 +08:00
Erik Boasson
40f046ea3a switch to reporting (one-way) latency instead of round-trip times
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-09-21 11:00:43 +02:00
Erik Boasson
098378cd89 fix roundtrip cleanup code trying to delete non-existent entities
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-09-21 11:00:43 +02: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
Erik Boasson
e062da6798 rework roundtrip to print 99 percentile & max and to optionally use listeners
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-08-03 11:32:08 +02:00
Erik Boasson
5c0bdddc2a clean up unused variables/functions
Signed-off-by: Erik Boasson <eb@ilities.com>
2018-08-03 11:32:08 +02:00
PatrickM-adlink
1289c7f7dc Change cmake files to make documentation optional (#2)
* CHAM-613 - Add cmake options for building and downloading docs

Signed-off-by: Patrick Masselink <patrick.masselink@adlinktech.com>
2018-05-07 14:08:20 +02:00
Michiel Beemster
11d9ce37aa Initial contribution 2018-04-10 17:03:59 +02:00