eclipse-cyclonedds / cyclonedds Goto Github PK
View Code? Open in Web Editor NEWEclipse Cyclone DDS project
Home Page: https://projects.eclipse.org/projects/iot.cyclonedds
License: Other
Eclipse Cyclone DDS project
Home Page: https://projects.eclipse.org/projects/iot.cyclonedds
License: Other
Hi,
In my special linux, the repo only offers cmake 3.4, but it seems that CycloneDDS compiling requried cmake 3.6+ (claimed at the Readme.md).
So, i want to know what's the necessity. In another word, which features in the CMakefile.txt are advanced that only supported by cmake 3.6+.
Thanks a lot~~!
Hi, I found a bug for thread management for user application threads.
Imagine the usecase: the user is creating multiple threads in a for loop.(5 threads created, once they done, 5 new threads created again). In this case, thread id for a new thread may be same with that of an old thread(which is finished by the user application).
However, in Cyclone thread management, the old application thread information will be recorded in the global thread pool.
Function lookup_thread_state:
if ((ts1 = tsd_thread_state) == NULL) {
if ((ts1 = lookup_thread_state_real()) == NULL) {
/* this situation only arises for threads that were not created
using create_thread, aka application threads. since registering
thread state should be fully automatic the name will simply be
the identifier */
tid = os_threadIdSelf();
(void)snprintf(
tname, sizeof(tname), "0x%"PRIxMAX, os_threadIdToInteger(tid));
os_mutexLock(&thread_states.lock);
ts1 = init_thread_state(tname);
if (ts1 != NULL) {
os_osInit();
ts1->extTid = tid;
ts1->tid = tid; //The old thread information is recorded here!
DDS_LOG(DDS_LC_INFO, "started application thread %s\n", tname);
os_threadCleanupPush(&cleanup_thread_state, NULL);
}
assert(ts1->state == THREAD_STATE_ALIVE);
os_mutexUnlock(&thread_states.lock);
}
tsd_thread_state = ts1;
}
When a new thread with the same thread id comes, it will step into lookup_thread_state_real function. It will satisfy os_threadEqual (thread_states.ts[i].tid, tid) condition and return the information about an old thread. Then it will cause two real threads to both acquire one cyclone thread in the pool. This may cause unexpected problems. Can you have a look at it?
struct thread_state1 *lookup_thread_state_real (void)
{
if (thread_states.ts) {
os_threadId tid = os_threadIdSelf ();
unsigned i;
for (i = 0; i < thread_states.nthreads; i++) {
if (os_threadEqual (thread_states.ts[i].tid, tid) ) { //The new thread with the same thread id will satisfy this condition
return &thread_states.ts[i]; //An old finished thread information can be returned here!
}
}
}
return NULL;
}
Hi, when I was using CycloneDDS, I found that the code could get into assert(0) in init_one_parameter in q_plist.c which shows it cannot happen.
When I check the code, I find that when pid equals 53701, it gets into if (pid & PID_UNRECOGNIZED_INCOMPATIBLE_FLAG) then runs into assert(0). Did you design it in that way or is this a bug?
On Ubuntu Bionic with g++ 7.3.0 the build has the following compiler warning:
In file included from /tmp/cyclonedds/src/os/src/posix/os_platform_stdlib.c:20:0:
/tmp/cyclonedds/src/os/src/posix/../snippets/code/os_stdlib_strtod.c: In function ‘os_lcNumericGet’:
/tmp/cyclonedds/src/os/src/posix/../snippets/code/os_stdlib_strtod.c:76:34: warning: ‘%3f’ directive output truncated writing 8 bytes into a region of size 4 [-Wformat-truncation=]
(void) snprintf(num, 4, "%3f", 2.2);
^~~
/tmp/cyclonedds/src/os/src/posix/../snippets/code/os_stdlib_strtod.c:76:9: note: ‘snprintf’ output 9 bytes into a destination of size 4
(void) snprintf(num, 4, "%3f", 2.2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
While the current code tries to "truncate" the number to three characters that is not what %3f
is doing. It only prints a minimum of three digits - it doesn't prevent decimal points to be printed. Based on that snprintf
has to truncate the output to the buffer length (4 - 1
) which results in a compiler warning with g++ (version 7.3.0 on Ubuntu Bionic) since the returned values isn't checked.
Hi,
I tried compiling the cdds.
Context :
Debian Buster GNU/linux
GCC : Debian 7.3.0-21
cmake : version 3.11.2
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
Java :
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-2-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)
maven :
Apache Maven 3.5.3
Maven home: /usr/share/maven
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: fr_FR, platform encoding: UTF-8
but on make
[ 1%] Building JAR file /..../cyclonedds/build/idlc/target/idlc-jar-with-dependencies.jar
---------------------------------------------------
constituent[0]: file:/usr/share/maven/conf/logging/
constituent[1]: file:/usr/share/maven/lib/maven-embedder-3.x.jar
constituent[2]: file:/usr/share/maven/lib/plexus-cipher.jar
constituent[3]: file:/usr/share/maven/lib/sisu-plexus.jar
constituent[4]: file:/usr/share/maven/lib/maven-model-builder-3.x.jar
constituent[5]: file:/usr/share/maven/lib/maven-compat-3.x.jar
constituent[6]: file:/usr/share/maven/lib/slf4j-api.jar
constituent[7]: file:/usr/share/maven/lib/aopalliance.jar
constituent[8]: file:/usr/share/maven/lib/maven-resolver-transport-wagon.jar
constituent[9]: file:/usr/share/maven/lib/maven-slf4j-provider-3.x.jar
constituent[10]: file:/usr/share/maven/lib/jsr250-api.jar
constituent[11]: file:/usr/share/maven/lib/maven-plugin-api-3.x.jar
constituent[12]: file:/usr/share/maven/lib/plexus-component-annotations.jar
constituent[13]: file:/usr/share/maven/lib/wagon-file.jar
constituent[14]: file:/usr/share/maven/lib/maven-builder-support-3.x.jar
constituent[15]: file:/usr/share/maven/lib/sisu-inject.jar
constituent[16]: file:/usr/share/maven/lib/commons-io.jar
constituent[17]: file:/usr/share/maven/lib/plexus-interpolation.jar
constituent[18]: file:/usr/share/maven/lib/maven-repository-metadata-3.x.jar
constituent[19]: file:/usr/share/maven/lib/maven-core-3.x.jar
constituent[20]: file:/usr/share/maven/lib/cdi-api.jar
constituent[21]: file:/usr/share/maven/lib/maven-resolver-impl.jar
constituent[22]: file:/usr/share/maven/lib/maven-resolver-util.jar
constituent[23]: file:/usr/share/maven/lib/plexus-utils.jar
constituent[24]: file:/usr/share/maven/lib/wagon-provider-api.jar
constituent[25]: file:/usr/share/maven/lib/maven-model-3.x.jar
constituent[26]: file:/usr/share/maven/lib/commons-cli.jar
constituent[27]: file:/usr/share/maven/lib/maven-settings-builder-3.x.jar
constituent[28]: file:/usr/share/maven/lib/plexus-sec-dispatcher.jar
constituent[29]: file:/usr/share/maven/lib/guava.jar
constituent[30]: file:/usr/share/maven/lib/maven-settings-3.x.jar
constituent[31]: file:/usr/share/maven/lib/commons-lang3.jar
constituent[32]: file:/usr/share/maven/lib/maven-shared-utils.jar
constituent[33]: file:/usr/share/maven/lib/jcl-over-slf4j.jar
constituent[34]: file:/usr/share/maven/lib/wagon-http-shaded.jar
constituent[35]: file:/usr/share/maven/lib/guice.jar
constituent[36]: file:/usr/share/maven/lib/maven-artifact-3.x.jar
constituent[37]: file:/usr/share/maven/lib/maven-resolver-provider-3.x.jar
constituent[38]: file:/usr/share/maven/lib/maven-resolver-api.jar
constituent[39]: file:/usr/share/maven/lib/jansi.jar
constituent[40]: file:/usr/share/maven/lib/maven-resolver-connector-basic.jar
constituent[41]: file:/usr/share/maven/lib/maven-resolver-spi.jar
constituent[42]: file:/usr/share/maven/lib/javax.inject.jar
---------------------------------------------------
Exception in thread "main" java.lang.NoSuchMethodError: java.nio.ByteBuffer.mark()Ljava/nio/ByteBuffer;
at org.eclipse.aether.connector.basic.ChecksumCalculator.update(ChecksumCalculator.java:202)
at org.eclipse.aether.connector.basic.TransferTransportListener.transportProgressed(TransferTransportListener.java:90)
at org.eclipse.aether.transport.wagon.WagonTransferListener.transferProgress(WagonTransferListener.java:64)
at org.apache.maven.wagon.events.TransferEventSupport.fireTransferProgress(TransferEventSupport.java:121)
at org.apache.maven.wagon.AbstractWagon.fireTransferProgress(AbstractWagon.java:594)
at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:579)
at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:372)
at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:315)
at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:284)
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:97)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run(WagonTransporter.java:567)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:435)
at org.eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.java:412)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:453)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:360)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:583)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:259)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:498)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:399)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:224)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:201)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:261)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:192)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:253)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:103)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:182)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:286)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:244)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.java:169)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.setupMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:154)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:130)
at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:144)
at org.apache.maven.lifecycle.internal.builder.BuilderCommon.resolveBuildPlan(BuilderCommon.java:97)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:111)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
idlc/CMakeFiles/idlc.dir/build.make:160 : la recette pour la cible « idlc/target/idlc-jar-with-dependencies.jar » a échouée
make[2]: *** [idlc/target/idlc-jar-with-dependencies.jar] Erreur 1
CMakeFiles/Makefile2:85 : la recette pour la cible « idlc/CMakeFiles/idlc.dir/all » a échouée
make[1]: *** [idlc/CMakeFiles/idlc.dir/all] Erreur 2
Makefile:151 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2
Currently any valid QoS value is accepted by the implementation, regardless of whether it actually implements the behaviour. The result is confusion ...
It would be much better to reject any attempt at creating entities with unsupported QoS settings.
Hi, we are in the situation that one datareader needs different queryconditions on it to read different data samples with different keys. When one data sample(for example, key = i) comes, it will trigger its corresponding waitset that attach a querycondition(key == i).
When we test it on CycloneDDS, it seems Cyclone currently lacks support for this situation. When different queryconditions created simultaneously in different threads on one datareader, the waitset always return 0 without even reach the desiring wait time(it will return 0 as soon as dds_waitset_wait is executed). Even in one thread, when we create and delete queryconditions multi times, it may fail with the same result. Is it a bug or functions not supported yet?
in API document herehttp://cdds.io/docs/pdf/cdds.pdf doesn't have function name.
Which lists only return value and parameters. How can I associate these informations with appropriate functions?
For example, dds_waitset_wait()
is missing in the document.
Hi,
In my expriment, I want to test HISTORY QoS, but when I test, it seems not work as I want.
Here is the description of HISTORY QoS in OMG specification.
If the kind is set to KEEP_ALL, then the Service will attempt to maintain and deliver all the values of the instance to existing subscribers. The resources that the Service can use to keep this history are limited by the settings of the RESOURCE_LIMITS QoS. If the limit is reached, then the behavior of the Service will depend on the RELIABILITY QoS. If the reliability kind is BEST_EFFORT, then the old values will be discarded. If reliability is RELIABLE, then the Service will block the DataWriter until it can deliver the necessary old values to all subscribers.
So I set the datawriter QoS as belows and change helloworld examples
#dw qos
dwQos = dds_qos_create ();
dds_qset_reliability (dwQos, DDS_RELIABILITY_RELIABLE, DDS_INFINITY);
dds_qset_history (dwQos, DDS_HISTORY_KEEP_ALL, 0);
dds_qset_resource_limits (dwQos, 100, DDS_LENGTH_UNLIMITED, DDS_LENGTH_UNLIMITED);
#my idl
module HelloWorldData
{
struct Msg
{
long userID;
string message;
};
#pragma keylist Msg userID
};
#my write opretion
msg.userID = 1;
char s;
printf ("=== [Publisher] Writing : ");
for (int i=0;i<50;i++)
{
s = (char)i;
msg.message = &s;
ret = dds_write (writer, &msg);
DDS_ERR_CHECK (ret, DDS_CHECK_REPORT | DDS_CHECK_EXIT);
printf ("Message (%d, %d)\n", msg.userID, *msg.message);
dds_sleepfor (DDS_MSECS (1000));
}
As I think, all the msgs I write belongs to the same instance, so all the samples will be saved until all the samples are received by the subscriber's reader.
And I do expriment as belows:
(1)Run two docker containers and bridge to the same network interface---docker0.
(2)container_1 run HelloworldPublisher, then container_2 run HelloworldSubscriber.
(3)container_2 will receive message and till message 20, I use ifconfig docker0 down
to turn off the network interface.
(4)container_2 will stop receiving data.
(5)I use ifconfig docker0 up
to turn on the networkinterface.
(6)container_2 will start to receive message again, but the message starts from message 28.
So my problem is that container_2 doesn't receive message21-27, but in the specification, it said should receive all.
Currently the repository in unbuildable due to missing 3rd party dependencies. Waiting for approval from Eclipse before adding them
The documentation refers to the vortexddslauncher (and the presence of the launcher is also used by the fog05 config scripts, btw) but it looks likes this launcher is not part of Eclipse Cyclone DDS, or is it?
/cc @kydos
On MacOS (not verified if the same issue appears on Linux) a running instance of ThroughputPublisher cannot be terminated by Ctrl-C. It seams that the only way to stop it is to send a kill -9 signal.
Hello,
I noticed dds_read and dds_take are completely same. is this expected implementation?
Or forget to remove one side?
I'm confused when I reading example codes, one is using dds_read, one another is using dds_take
Thanks
Hi. I want to ignore a participant. I wonder where I can create an ignoreList and update it during the interaction between pubs and subs? By reading DDS Spec. (2.2.2.2.1.14). I found it as an irreversible operation. I hope that you can give me some implementation ideas.
We want to introduce an light weight opensource DDS into out IOT project, so we compared some ones, FAST-RTPS,opensplice and cyclone.
FAST-RTPS is writen in C++, and used boost which we do not want to introduce into our project.
OpenSplice is complex and huge.
Cyclone seems meet our requirements, but Cyclone haven't a formal release version, that means it is not stable and we can not use it into our commercial project.
But we also found that, the former Issue said that, Cyclone will release its first version in Q1 of 2019. If this is ture, that will be fine, but if the first release version is too late, such as later than Q2, I think we should consider to make other plans.
Any way, I want to know the Cyclone's exact releasing time. Can you give us a more exact answer.
/*
As the code said, this project is licensed with epl-v2.0 or edl-v1.0.
But it seems that those two licenses have some conflict.
Such as the epl-v2.0 required all the modified code need to be open, but the edl-v1.0 does not have the requirement.
So if we import the Cyclone into our project, do we need to open all the code which we have modified.
Hi, recently, I want to make the size of libddsc.so
smaller, because my hardware has very small RAM size, just 3M
; and libddsc.so
contains all the files in ddsc and the files in ddsi directory, when the example runs, the libddsc.so will be loaded into the RAM, so will take over 1M
(I want it smaller than 1M
). When I check the /proc/$PID/smap
, I get the key information below:
7fab8631b000-7fab8640b000 r-xp 00000000 fd:02 3939856 cyclonedds/build/lib/libddsc.so.0.1.0
Size: 960 kB
Rss: 916 kB
Pss: 480 kB
Shared_Clean: 872 kB
Shared_Dirty: 0 kB
Private_Clean: 44 kB
Private_Dirty: 0 kB
Referenced: 916 kB
Anonymous: 0 kB
AnonHugePages: 0 kB
Shared_Hugetlb: 0 kB
Private_Hugetlb: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
VmFlags: rd ex mr mw me
This lib costs about 916KB
, So how can I make libddsc.so smaller to make the example take less RAM?
Hi, I have found that idlc do not support IDL files with operations and attributes in an interface scope. For the upper layer application (such as rpc) based on dds middleware we need to define the interface with operations and attributes in the IDL file. What should we do if I encounter this situation? Or should we enhance idlc support for interface statements?
Do you plan to implement the DDS-XTypes standard?
Do you plan to implement the C++ interface?
Hi all,
Using Cyclone DDS through the dstore
I got an assertion error when closing the store.
python3: /home/pi/atolab/cyclone/cdds/src/util/src/ut_handleserver.c:272: ut_handle_release: Assertion `hs' failed.
This simple code reproduce the error
from dstore import Store
s = Store('one','r','r/h',100)
s.close()
I also had some gdb diligence:
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) up
#1 0x76d7c824 in __GI_abort () at abort.c:89
89 abort.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x76d7c824 in __GI_abort () at abort.c:89
#2 0x76d741a4 in __assert_fail_base (fmt=0x757ff470 "\001", assertion=0x76236eb8 "hs",
assertion@entry=0x2 <error: Cannot access memory at address 0x2>, file=0x757fec0c " ", file@entry=0x76e8c078 <lock> "", line=272,
line@entry=1971319920, function=function@entry=0x76237020 <__PRETTY_FUNCTION__.9463> "ut_handle_release") at assert.c:92
#3 0x76d74280 in __GI___assert_fail (assertion=0x2 <error: Cannot access memory at address 0x2>, file=0x76e8c078 <lock> "", line=1971319920,
function=0x76237020 <__PRETTY_FUNCTION__.9463> "ut_handle_release") at assert.c:101
#4 0x7620217c in ut_handle_release () from /usr/local/lib/libddsc.so
#5 0x761d99ec in dds_writer_status_cb () from /usr/local/lib/libddsc.so
#6 0x7618c04c in gc_delete_writer () from /usr/local/lib/libddsc.so
#7 0x76191db0 in gcreq_queue_thread () from /usr/local/lib/libddsc.so
#8 0x761c1394 in create_thread_wrapper () from /usr/local/lib/libddsc.so
#9 0x7620fbfc in os_startRoutineWrapper () from /usr/local/lib/libddsc.so
#10 0x76f94fc4 in start_thread (arg=0x757ff470) at pthread_create.c:335
#11 0x76e20bc8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
Need more info?
I want to know when can release the first version of cyclonedds, just like 0.1.0.
It will help us to know what the new features are introduced between two versions, and will be easier to follow this project.
Haha, maybe you already have a plan or a roadmap (like, before the Christmas Day)...
Hi,
I test the example HelloworldPublisher, if over 70 sub, but just one pub, many sub will not receive the message, what's the reason for this? and is there place to configure this
Hello,
I have found three major issues for Cyclone till now.
1. Domain Id is restricted only to DDS_DOMAIN_DEFAULT. Different domain Ids (1~230) cannot be passed in which is different from the API description.
2. Get Instance handle is not supported for publisher, subscriber and topic.
3. StatusCondition seems not supported by Cyclone right now. So how can I wait for a certain status to be triggered using WaitSet?
Thanks!
Hi,
When subscribing on a topic that the same participant is publishing to, how can one filter out the messages sent by this same participant. When searching on the internet regarding this topic, the only solutions that come up are to use the DDS_Entity
API, which does not seem to be supported by Cyclone DDS.
See also: https://community.rti.com/kb/how-do-i-get-datareader-ignore-datawriter-belongs-same-domainparticipant
From dds_sample_info_t
it is possible to access the field publication_handle
of type dds_instance_handle_t
but it seems this handle does not match the instance handle from the sending publisher or participant (gained by calling dds_get_instance_handle
).
It seems the publication_handle
is always 1 when the sender is receiving its own data, can this be relied upon as a workaround filtering criterion? Or is there a different API that can be used?
I would appreciate your help! Thanks,
Max
Hi,
As the code shows, TRANSPORT_PRIORITY
will be implemented by NETWORK CHANNEL
in the future. Can u explain how NETWORK CHANNEL
works. Thanks a lot!
Hi,
Recently I am very interested about QoS, and I meet one problem about qos updating. And the source code will not update and not resend new participant qos. Here is my example:
int main(int argc, char **argv) {
dds_entity_t participant;
dds_entity_t topic;
dds_entity_t writer;
dds_return_t ret;
(void) argc;
(void) argv;
dds_qos_t *qos = dds_qos_create();
char *x = "hello";
dds_qset_userdata(qos, (void *) x, 5);
/* Create a Participant. */
participant = dds_create_participant(DDS_DOMAIN_DEFAULT, qos, NULL);
dds_sleepfor(DDS_SECS(5));
char *y = "yoyol";
dds_qset_userdata(qos, (void *)y, 5);
dds_set_qos(participant, qos);
printf("set done!\n");
while (true);
}
I check source code and there is too many status variables connected with participant qos, very confused.
And I check and the subscriber will not receive the new qos. So if I want to make it, How can I do this?
(1) How to update qos of publisher's participant.
(2)How does the subscriber receive and update the publisher's participant qos.
While trying to run the test cases on my laptop all tests that somehow use a network interface abort. The easiest way to reproduce is to simply run CUnit_os_getifaddrs_ipv4. The output I get is the following:
ctest -T test -C DEBUG -R CUnit_os_getifaddrs_ipv4 -V
UpdateCTestConfiguration from :C:/cyclonedds/build.1/DartConfiguration.tcl
Parse Config file:C:/cyclonedds/build.1/DartConfiguration.tcl
Site: DESKTOP-S7FK1CA
Build name: Win32-MSBuild
UpdateCTestConfiguration from :C:/cyclonedds/build.1/DartConfiguration.tcl
Parse Config file:C:/cyclonedds/build.1/DartConfiguration.tcl
Test project C:/cyclonedds/build.1
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 18
Start 18: CUnit_os_getifaddrs_ipv4
18: Test command: C:\cyclonedds\build.1\bin\abstraction.exe "-a" "-r" "os_getifaddrs-ipv4" "-s" "os_getifaddrs" "-t" "ipv4"
18: Environment variables:
...
18: Test timeout computed to be: 10
18: Assertion failed: eq != 0, file c:\cyclonedds\src\os\src\windows\os_platform_ifaddrs.c, line 190
1/2 Test #18: CUnit_os_getifaddrs_ipv4 ..........***Failed 1.12 sec
test 22
Start 22: CUnit_os_getifaddrs_ipv4_n_ipv6
22: Test command: C:\cyclonedds\build.1\bin\abstraction.exe "-a" "-r" "os_getifaddrs-ipv4_n_ipv6" "-s" "os_getifaddrs" "-t" "ipv4_n_ipv6"
22: Environment variables:
...
22: Test timeout computed to be: 10
22: Assertion failed: eq != 0, file c:\cyclonedds\src\os\src\windows\os_platform_ifaddrs.c, line 190
2/2 Test #22: CUnit_os_getifaddrs_ipv4_n_ipv6 ...***Failed 1.30 sec
0% tests passed, 2 tests failed out of 2
Total Test time (real) = 3.14 sec
The following tests FAILED:
18 - CUnit_os_getifaddrs_ipv4 (Failed)
22 - CUnit_os_getifaddrs_ipv4_n_ipv6 (Failed)
Errors while running CTest
Hello,
I've been reading the source code of Cyclone recently. I have also read the ddsi-rtps (i will call it rtps for convenience) specification and compared it with ddsi in Cyclone. I find that ddsi is different from rtps specification. For example, I haven't found History Cache in ddsi which is important in rtps. And the interface for ddsi also seems different with rtps. How can I code upon ddsi if I want to add some functions in ddsc?
Thanks!
Hi,
If I want to test different qos, how can I find the difference? such as HISTORY kind.
In my test, I set history kind to KEEP_ALL for data writer. So WHC will keep all the values of instance, but when I test, the WHC will only keep 10 data samples.
Dear all, I'd like to discuss the matter of APIs -- other than C -- organisation in cyclone DDS. My proposal is to ensure that API are external repository that have dependencies from the cyclone library.
From my perspective the advantage of keeping the API separated from cyclone core are manyfold. Some of the most relevant being (1) we keep cyclones base small and with minimal set of external dependencies -- BTW, would be good to remove the dependency on JDK to build it; (2) We can more easily have people contribute and experiment with new API; and (3) we can have different level of maturity for APIs and core.
We should also define some guidelines to follow for those that want to implement a new language bindings.
Finally, I'd like to hear from the community what'd their needs would be.
The roundtrip-example, when run on windows displays only zero's for min/mean roundtrip-times.
This is most likely due to using a clock with insufficient resolution
dds_read_wl
/dds_take_wl
allows to read/take samples while loaning the memory that holds the samples themselves. However these APIs currently assume that the buf
passed il pre-allocated to provide, say n slots. Why don't we allow this call to actually allocate buf
when what is passed is a null pointer. We would have to change the signature, tu be able to return the newly allocated buffer, but at least we would make it possible to read all samples in one shot w/o having to issue multiple read/take and while still minimising the memory allocation.
@eboasson what are your thoughts?
A+
There is a deadly embrace between the DDSI writer's lock and the DCPS entity lock, at least when signalling that a matching subscriber no longer exists while the writer is writing a sample. Presumably the same can happen when a new subscriber shows up, and perhaps for some other notifications as well.
2731 Thread_144215 DispatchQueue_1: com.apple.main-thread (serial)
+ 2731 start (in libdyld.dylib) + 1 [0x7fff6fc78085]
+ 2731 main (in ThroughputPublisher) + 381 [0x104c0500d] publisher.c:94
+ 2731 start_writing (in ThroughputPublisher) + 154 [0x104c0552a] publisher.c:244
+ 2731 dds_write (in libddsc.0.dylib) + 103 [0x104c9aef7] dds_write.c:44
+ 2731 dds_write_impl (in libddsc.0.dylib) + 653 [0x104c9b28d] dds_write.c:224
+ 2731 write_sample_gc (in libddsc.0.dylib) + 79 [0x104c68aaf] q_transmit.c:1140
+ 2731 write_sample_eot (in libddsc.0.dylib) + 750 [0x104c68dae] q_transmit.c:1028
+ 2731 os_mutexLock (in libddsc.0.dylib) + 85 [0x104cb4085] os_platform_sync.c:123
+ 2731 _pthread_mutex_firstfit_lock_slow (in libsystem_pthread.dylib) + 226 [0x7fff6fe684c7]
+ 2731 _pthread_mutex_firstfit_lock_wait (in libsystem_pthread.dylib) + 96 [0x7fff6fe6ada0]
+ 2731 __psynch_mutexwait (in libsystem_kernel.dylib) + 10 [0x7fff6fdb3872]
and
+ 2731 thread_start (in libsystem_pthread.dylib) + 13 [0x7fff6fe69425]
+ 2731 _pthread_start (in libsystem_pthread.dylib) + 70 [0x7fff6fe6d2a7]
+ 2731 _pthread_body (in libsystem_pthread.dylib) + 126 [0x7fff6fe6a33d]
+ 2731 os_startRoutineWrapper (in libddsc.0.dylib) + 170 [0x104cb552a] os_posix_thread.c:176
+ 2731 create_thread_wrapper (in libddsc.0.dylib) + 62 [0x104c661ce] q_thread.c:179
+ 2731 gcreq_queue_thread (in libddsc.0.dylib) + 856 [0x104c34bb8] q_gc.c:156
+ 2731 gc_delete_proxy_reader (in libddsc.0.dylib) + 231 [0x104c337f7] q_entity.c:4351
+ 2731 writer_drop_connection (in libddsc.0.dylib) + 284 [0x104c3394c] q_entity.c:1314
+ 2731 dds_writer_status_cb (in libddsc.0.dylib) + 90 [0x104c7b67a] dds_writer.c:80
+ 2731 dds_entity_lock (in libddsc.0.dylib) + 151 [0x104c89af7] dds_entity.c:1034
+ 2731 os_mutexLock (in libddsc.0.dylib) + 85 [0x104cb4085] os_platform_sync.c:123
+ 2731 _pthread_mutex_firstfit_lock_slow (in libsystem_pthread.dylib) + 226 [0x7fff6fe684c7]
+ 2731 _pthread_mutex_firstfit_lock_wait (in libsystem_pthread.dylib) + 96 [0x7fff6fe6ada0]
+ 2731 __psynch_mutexwait (in libsystem_kernel.dylib) + 10 [0x7fff6fdb3872]
When a source file passed to add_cunit_executable
does not contain any test signatures, CMake exits with the following error:
CMake Error at cmake/modules/CUnit.cmake:177 (list):
list sub-command REMOVE_DUPLICATES requires list to be present.
Call Stack (most recent call first):
cmake/modules/CUnit.cmake:219 (process_cunit_source_file)
os/tests/CMakeLists.txt:30 (add_cunit_executable)
Hi,
Recently I find something wired, I don't know whether it is a bug. Here is my test case(based on helloworld example):
#pub
dwQos = dds_create_qos ();
dds_qset_reliability (dwQos, DDS_RELIABILITY_RELIABLE, DDS_SEC
dds_qset_history(dwQos, DDS_HISTORY_KEEP_ALL, 100);
writer = dds_create_writer (participant, topic, dwQos, NULL);
#sub
qos = dds_create_qos ();
dds_qset_reliability (qos, DDS_RELIABILITY_RELIABLE, DDS_SECS (10));
dds_qset_history(qos, DDS_HISTORY_KEEP_ALL, 100);
reader = dds_create_reader (participant, topic, qos, NULL);
When the fist time I restart, it works good, but when I try second time restart, messages 3,4,5,6 again come, why this happen and what is ack message inside?
By the way, when I first time restart sub, it always works good.
By reading the document "VortexDDS Release 0.1.0", I tried to translate "HelloWorldData.idl" into "HelloWorldData.c" and "HelloWorldData.h" with the command “make datatype” in the directory "/examples/helloworld". However, error came with the msg "Could not find or load main class org.eclipse.cyclonedds.compilers.Idlc". Where can I get this ".Idlc". Thx!
Hi, I've been trying with log functions for cyclonedds. dds_public_log.h is included in my project, but when I use it nothing happens. How can I use it in a proper way? Thanks!
While generating the jna interface for java API we noticed that the following functions are defined in headers file but there are no corresponding symbols in libddsc.so :
dds_ssl_plugin
dds_durability_plugin
dds__builtin_participant_cb
dds__builtin_cmparticipant_cb
dds_set_allocator
dds_set_aligned_allocator
dds_rhc_add_waitset
dds_rhc_remove_waitset
dds_stream_from_buffer
dds_ssl_plugin
dds_durability_plugin
serdata_hash
Support for built-in topics is missing, which makes all sorts of things impossible. It is also a showstopper for properly supporting ROS2.
In the file dds_entity.c on line 84 the parameter (e->m_hdl ) was provided to dds_entity_lock this parameter is of the type ( ut_handle_t) but a parameter of the type dds_entity_t is expected.
The same issue appears in the implementation of the function dds_delete_impl on line 373 ( (dds_delete(child->m_hdl) ).
As noted in #49, the value of the lease duration in the (participant) liveliness QoS is completely ignored and the actual lease duration is taken from the configuration file (Domain/Lease/ExpiryTime
setting) instead. An argument can be made that a lease duration is a deployment setting and that a configuration file is a more appropriate place for it than a QoS setting, but to blatantly ignore the QoS setting is definitely not a good approach.
My initial thought is that taking the minimum of the QoS value and the configured would be a sensible approach, but I'd be interested in other people's opinions.
The roundtrip test-app's on windows create 100% load on multiple threads, most easily to be observed when only starting the roundtripPong application and observing that without any traffic (no 'ping') it has 2 spinning threads
Hi, in dds_rhc_take_w_qminv function, a bug is found for taking samples with querycondition. If the sample you want to take is not the latest sample ([s1]-->[s2]-->[s3], if [s2] is desired by the querycondition), rhc will have difficulty to take it out simply because the iterating pointer is not updating in each while loop. To solve this problem, I update psample in each while iteration and it solves the problem. Can you have a look at it? Thanks!
while (n_insts-- > 0 && n < max_samples)
{
struct rhc_instance * const inst1 = inst->next;
iid = inst->iid;
if (handle == DDS_HANDLE_NIL || iid == handle)
{
if (!INST_IS_EMPTY (inst) && (qmask_of_inst (inst) & qminv) == 0)
{
struct trigger_info pre, post;
unsigned nvsamples = inst->nvsamples;
const uint32_t n_first = n;
get_trigger_info (&pre, inst, true);
if (inst->latest)
{
struct rhc_sample * psample = inst->latest;
struct rhc_sample * sample = psample->next;
while (nvsamples--)
{
struct rhc_sample * const sample1 = sample->next;
if ((QMASK_OF_SAMPLE (sample) & qminv) != 0)
{
psample = sample;
}
else
{
set_sample_info (info_seq + n, inst, sample);
ddsi_serdata_to_sample (sample->sample, values[n], 0, 0);
if (cond == NULL
|| (dds_entity_kind(cond->m_entity.m_hdl) != DDS_KIND_COND_QUERY)
|| ( cond->m_query.m_filter != NULL && cond->m_query.m_filter(cond->conds, values[n])))
{
rhc->n_vsamples--;
if (sample->isread)
{
inst->nvread--;
rhc->n_vread--;
}
if (--inst->nvsamples > 0)
{
if (inst->latest == sample) {
inst->latest = psample;
}
psample->next = sample1;
}
else
{
inst->latest = NULL;
}
free_sample (inst, sample);
if (++n == max_samples)
{
break;
}
}
else
{
/* The filter didn't match, so free the deserialised copy. */
ddsi_sertopic_free_sample (rhc->topic, values[n], DDS_FREE_CONTENTS);
}
}
psample = sample; //this line of code is added by me
sample = sample1;
}
}
`
Hi,
I was trying to do the build/install and then use Cyclone DDS on windows (using Visual Studio). I was able to configure cmake with the Visual Studio 15 2017
generator and call
cmake --build . --config Release --target install
with admin rights from the build dir to install the CycloneDDS module. So far so good. Although it would be nice if the build steps for Windows / Visual Studio would be documented as well.
The actual problem I now am stuck with is, that the headers do not seem to be found when trying to use an example project. I copied the "helloworld" example project to a different location and just tried to configure and build it. Configuring the build with the Visual Studio 15 2017
generator works, but actually building the project fails, because the ddsc headers cannot be resolved. Is there an INCLUDE_DIRS variable I can use or something?
I've uploaded the test project here:
https://github.com/Boereck/cyclone-dds-test
If you run the init.ps1
powershell script on windows you should see that the last build step fails.
Thanks!
Hello, I've been testing with userdata qos policy. The project currently has the ability to set the userdata qos. But how can a remote discovered participant get the qos policy I set before? Thanks!
Issue #12 came about because dds_fini
looked like a function that could be called to simply clean up everything, which was more convenient than keeping track of the created participants and deleting them individually. Unfortunately, calling dds_fini
had a slightly more complicated effect.
It probably would be a useful addition to have a function that deletes all participants that currently exist in the process (and that is a no-op if none exist).
Hi,
I tried to install CycloneDDS on a clean Kubuntu 18.04 LTS and bumped into a few issues when following the steps in section ' Building Cyclone DDS' (see https://github.com/eclipse/cyclonedds) along the way. I thought it might benefit the project to let you know about these issues so the documentation can be improved.
The issues I bumped into are:
Scanning dependencies of target idlc [ 0%] Building JAR file /home/lex/Repositories/cyclone/cyclonedds/build/idlc/target/idlc-jar-with-dependencies.jar WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [ERROR] Plugin org.antlr:antlr4-maven-plugin:4.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.antlr:antlr4-maven-plugin:jar:4.5: Could not transfer artifact org.antlr:antlr4-maven-plugin:pom:4.5 from/to central (https://repo.maven.apache.org/maven2): Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException idlc/CMakeFiles/idlc.dir/build.make:183: recipe for target 'idlc/target/idlc-jar-with-dependencies.jar' failed make[2]: *** [idlc/target/idlc-jar-with-dependencies.jar] Error 1 CMakeFiles/Makefile2:85: recipe for target 'idlc/CMakeFiles/idlc.dir/all' failed make[1]: *** [idlc/CMakeFiles/idlc.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: *** [all] Error 2
$ sudo dpkg --purge --force-depends ca-certificates-java
$ sudo apt-get install ca-certificates-java
make install
gave permission errors. Changing it to sudo make install
(assuming the user has sudo priviliges) works.With these changes I was able to build and install.
Hi,
Recently, I want to know the throughput of dds without losing samples. No matter what parameter I set(at the same host), it always loses samples when I run the Throughput example with DDS_RELIABILITY_BEST_EFFORT QoS setting.
# terminal 1
./ThroughputSubscriber
Cycles: 0 | PollingDelay: 0 | Partition: Throughput example
=== [Subscriber] Waiting for samples...
=== [Subscriber] Payload size: 4000 | Total received: 2 samples, 8016 bytes | Out of order: 0 samples Transfer rate: 0.00 samples/s, 0.00 Mbit/s
=== [Subscriber] Payload size: 4000 | Total received: 503 samples, 2016024 bytes | Out of order: 0 samples Transfer rate: 497.05 samples/s, 14.94 Mbit/s
=== [Subscriber] Payload size: 4000 | Total received: 1004 samples, 4024032 bytes | Out of order: 0 samples Transfer rate: 496.97 samples/s, 14.94 Mbit/s
=== [Subscriber] Payload size: 4000 | Total received: 1504 samples, 6028032 bytes | Out of order: 0 samples Transfer rate: 496.07 samples/s, 14.94 Mbit/s
=== [Subscriber] Payload size: 4000 | Total received: 2002 samples, 8024016 bytes | Out of order: 0 samples Transfer rate: 494.16 samples/s, 14.94 Mbit/s
^C=== [Subscriber] Payload size: 4000 | Total received: 2490 samples, 9979920 bytes | Out of order: 0 samples Transfer rate: 493.90 samples/s, 15.24 Mbit/s
Total received: 2490 samples, 9979920 bytes
Out of order: 0 samples
Average transfer rate: 622.50 samples/s, 19.75 Mbit/s
------------------------------------------------------------------------------
# terminal 2
./ThroughputPublisher 4000 20 10 5
payloadSize: 4000 bytes burstInterval: 20 ms burstSize: 10 timeOut: 5 seconds partitionName: Throughput example
=== [Publisher] Waiting for a reader ...
=== [Publisher] Writing samples...
=== [Publisher] Timed out, 2500 samples written.
In my test, the pub writes 2500 samples but the sub just gets 2490 samples. In my opinion, if the load is lite and the pub/sub are running at same host, it should not lose samples. why does this happen?
When trying to use the configurator (tools/config/cycloneddsconf.jar), a couple of issues were observed:
What I'd suggest is:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.