This list is closed, nobody may subscribe to it.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(7) |
Oct
|
Nov
(10) |
Dec
|
| 2008 |
Jan
(15) |
Feb
(17) |
Mar
|
Apr
(22) |
May
(18) |
Jun
(10) |
Jul
(8) |
Aug
(22) |
Sep
(17) |
Oct
(10) |
Nov
(22) |
Dec
(29) |
| 2009 |
Jan
(18) |
Feb
(4) |
Mar
(5) |
Apr
(23) |
May
(11) |
Jun
(2) |
Jul
(1) |
Aug
(19) |
Sep
(6) |
Oct
(26) |
Nov
(15) |
Dec
(7) |
| 2010 |
Jan
(3) |
Feb
(9) |
Mar
(9) |
Apr
(20) |
May
(2) |
Jun
(3) |
Jul
(13) |
Aug
(7) |
Sep
(4) |
Oct
(2) |
Nov
|
Dec
|
| 2011 |
Jan
(3) |
Feb
(3) |
Mar
(12) |
Apr
(7) |
May
|
Jun
(16) |
Jul
(13) |
Aug
(5) |
Sep
|
Oct
(5) |
Nov
(5) |
Dec
|
| 2012 |
Jan
(1) |
Feb
|
Mar
(7) |
Apr
(3) |
May
(3) |
Jun
(2) |
Jul
(20) |
Aug
(11) |
Sep
(1) |
Oct
|
Nov
(7) |
Dec
(2) |
| 2013 |
Jan
(2) |
Feb
(14) |
Mar
(2) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
| 2014 |
Jan
(5) |
Feb
(1) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(20) |
Nov
(3) |
Dec
(1) |
| 2015 |
Jan
(6) |
Feb
(16) |
Mar
(3) |
Apr
(5) |
May
|
Jun
(12) |
Jul
(10) |
Aug
(4) |
Sep
(5) |
Oct
(6) |
Nov
|
Dec
(1) |
| 2016 |
Jan
|
Feb
(4) |
Mar
(15) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
| 2017 |
Jan
(6) |
Feb
(7) |
Mar
(8) |
Apr
(7) |
May
(10) |
Jun
(1) |
Jul
|
Aug
|
Sep
(4) |
Oct
(7) |
Nov
|
Dec
(3) |
| 2018 |
Jan
(5) |
Feb
(9) |
Mar
(5) |
Apr
(2) |
May
|
Jun
|
Jul
(8) |
Aug
(8) |
Sep
(1) |
Oct
(1) |
Nov
(6) |
Dec
|
| 2019 |
Jan
(13) |
Feb
(13) |
Mar
(6) |
Apr
(11) |
May
|
Jun
(3) |
Jul
(5) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
(1) |
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(7) |
Oct
(3) |
Nov
(2) |
Dec
(2) |
| 2021 |
Jan
(6) |
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(1) |
| 2022 |
Jan
(3) |
Feb
(4) |
Mar
(10) |
Apr
(3) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
| 2023 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Justin W. <wi...@un...> - 2023-08-21 16:29:58
|
To all: Based on the feedback from the community, we are closing the mailing lists. Please use GitHub Issues <https://github.com/OpenDDS/OpenDDS/issues> to report bugs and GitHub Discussions <https://github.com/OpenDDS/OpenDDS/discussions> for questions. We will also use GitHub Discussions for release announcements. Thank you. Justin Wilson On Fri, Jul 28, 2023 at 3:36 PM Justin Wilson <wi...@un...> wrote: > To all: > > OpenDDS has been hosted on GitHub <https://github.com/OpenDDS/OpenDDS> > since 2015. Since then, we have seen a steady decline in the activity of > the SourceForge mailing lists and a steady increase in the use of GitHub > features like Issues <https://github.com/OpenDDS/OpenDDS/issues> and > Discussions <https://github.com/OpenDDS/OpenDDS/discussions>. The > OpenDDS Foundation intends to close the SourceForge mailing lists to unify > the community around a single forum for the benefit of all users. However, > before taking any action, we are soliciting feedback from mailing list > users (via a mailing list post) to determine if this will be a positive > change for the OpenDDS user community. > > Thanks. > > Justin Wilson > |
|
From: Justin W. <wi...@un...> - 2023-07-28 21:35:55
|
To all: OpenDDS has been hosted on GitHub <https://github.com/OpenDDS/OpenDDS> since 2015. Since then, we have seen a steady decline in the activity of the SourceForge mailing lists and a steady increase in the use of GitHub features like Issues <https://github.com/OpenDDS/OpenDDS/issues> and Discussions <https://github.com/OpenDDS/OpenDDS/discussions>. The OpenDDS Foundation intends to close the SourceForge mailing lists to unify the community around a single forum for the benefit of all users. However, before taking any action, we are soliciting feedback from mailing list users (via a mailing list post) to determine if this will be a positive change for the OpenDDS user community. Thanks. Justin Wilson |
|
From: Fred H. <hor...@un...> - 2023-04-11 21:33:35
|
OpenDDS version 3.24.0 is now available for download at https://github.com/OpenDDS/OpenDDS/releases/tag/DDS-3.24 The OpenDDS Developer's Guide for this version is available at https://opendds.readthedocs.io/en/dds-3.24 Updates in this version: Additions: - The OpenDDS Developer's Guide is now available at https://opendds.readthedocs.io/ (#4051 <https://github.com/OpenDDS/OpenDDS/pull/4051>, #4094 <https://github.com/OpenDDS/OpenDDS/pull/4094>, #4092 <https://github.com/OpenDDS/OpenDDS/pull/4092>, #4100 <https://github.com/OpenDDS/OpenDDS/pull/4100>, #4101 <https://github.com/OpenDDS/OpenDDS/pull/4101>, #4095 <https://github.com/OpenDDS/OpenDDS/pull/4095>, #4103 <https://github.com/OpenDDS/OpenDDS/pull/4103>, #4102 <https://github.com/OpenDDS/OpenDDS/pull/4102>, #4104 <https://github.com/OpenDDS/OpenDDS/pull/4104>, #4105 <https://github.com/OpenDDS/OpenDDS/pull/4105>) - The Sphinx/reStructuredText source for this new format is now located in the repo at docs/devguide - DOCGroup ACE6/TAO2 is now the default ACE/TAO for OpenDDS, OCI ACE/TAO is no longer supported (#4069 <https://github.com/OpenDDS/OpenDDS/pull/4069>) - Dynamic content subscription (#3988 <https://github.com/OpenDDS/OpenDDS/pull/3988>) - This allows DynamicDataReaders to use QueryCondition and ContentFilteredTopic and allows DynamicDataWriters to do filtering on behalf of matched DataReaders that use ContentFilteredTopic. - DynamicData: - Can now read and write enum members as strings (#4022 <https://github.com/OpenDDS/OpenDDS/pull/4022>) - get_int64_value and get_uint64_value can now cast from different types (#4078 <https://github.com/OpenDDS/OpenDDS/pull/4078>) - DynamicDataImpl now uses lazy initialization to reduce memory usage (#4024 <https://github.com/OpenDDS/OpenDDS/pull/4024>) - Added aliases for IDL types from XTypes spec such as DDS::UInt32 (#3994 <https://github.com/OpenDDS/OpenDDS/pull/3994>) - See DdsDcpsCore.idl for all of them. - Added PublicationMatchedStatus Current Count To RtpsRelay Statistics ( #4006 <https://github.com/OpenDDS/OpenDDS/pull/4006>) - Allow reassembly of overlapping fragment ranges in RTPS (#4035 <https://github.com/OpenDDS/OpenDDS/pull/4035>, #4047 <https://github.com/OpenDDS/OpenDDS/pull/4047>) - Can now cross-compile on macOS (#4048 <https://github.com/OpenDDS/OpenDDS/pull/4048>) - Added hardening features to RtpsRelay (#4045 <https://github.com/OpenDDS/OpenDDS/pull/4045>) - These are configured with the new options -MaxAddrSetSize and -RejectedAddressDuration. - Expanded support for using C++ keywords in IDL (#4073 <https://github.com/OpenDDS/OpenDDS/pull/4073>) - Improved support for anonymous types in unions branches (#4078 <https://github.com/OpenDDS/OpenDDS/pull/4078>) - IDL file and generated TypeSupport.idl can now be in different directories (#4077 <https://github.com/OpenDDS/OpenDDS/pull/4077>) Fixes: - Fixed rtps_relay_address_change deadlocks (#3989 <https://github.com/OpenDDS/OpenDDS/pull/3989>) - Fixed RtpsUdpTransport data race from relay_stun_mutex_ (#3990 <https://github.com/OpenDDS/OpenDDS/pull/3990>) - Fixed invalid socket handles in RtpsUdpTransport (#4002 <https://github.com/OpenDDS/OpenDDS/pull/4002>) - Fixed index increment in GuidPartitionTable::prepare_relay_partitions ( #4005 <https://github.com/OpenDDS/OpenDDS/pull/4005>) - Fixed a bug in content filtering with enum comparisons on serialized samples (#4038 <https://github.com/OpenDDS/OpenDDS/pull/4038>) - Fixed transport config and transport instance derived from template conflicting (#4058 <https://github.com/OpenDDS/OpenDDS/pull/4058>) - Improved reliability of the shared memory transport (#4028 <https://github.com/OpenDDS/OpenDDS/pull/4028>) - Secure writers and readers in same participant can now associate (#4041 <https://github.com/OpenDDS/OpenDDS/pull/4041>) - Fixed issue with using -o in tao_idl/opendds_idl options in OPENDDS_TARGET_SOURCES and those directories are now automatically included (#4071 <https://github.com/OpenDDS/OpenDDS/pull/4071>) - XTypes (#4078 <https://github.com/OpenDDS/OpenDDS/pull/4078>): - TypeObjects struct and union members used to be sorted by member ID, but they are now sorted by declaration order as the XTypes spec calls for. By default member IDs increment starting at 0, and in that case the TypeObjects will be the same. If @autoid(hash), --default-autoid hash, or @id(ID) are being used then the order could be different. This could cause some reader/writer matching incompatibility with older versions of OpenDDS: - Topics with final and appendable structs will no longer match. - If DISALLOW_TYPE_COERCION QoS is being used, then all topics where the order differ will not longer match. Note that this is true for any time the type hash changes. - Pass the --old-typeobject-member-order option to opendds_idl to use the non-standard order. - The size of XCDR2 member parameters in mutable structs and unions is now correctly interpreted when the "length code" is 5, 6, or 7. - This is an optimization that OpenDDS doesn't serialize samples with, so this could only be an issue when dealing with samples from other DDS implementations. - DynamicDataImpl (DynamicData made by DynamicDataFactory that can be passed to DynamicDataWriter): - get_member_id_at_index now returns ids for members that haven't been initialized yet. - Fixed incorrect serialization of keyed unions for instance registration, disposal, and unregistration samples. - Fixed errors from serializing some cases of arrays and sequences. Notes: - Release files will only be uploaded to GitHub from now on - OpenDDS::DCPS::RepoId has been removed, if needed use OpenDDS::DCPS::GUID_t instead (#3972 <https://github.com/OpenDDS/OpenDDS/pull/3972>) |
|
From: Fred H. <hor...@ob...> - 2023-02-01 20:58:02
|
OpenDDS version 3.23.1 is now available for download at https://download.objectcomputing.com/OpenDDS/ Updates in this version: - Addressed a DDS Security issue where participants can sign their own permissions file if the same CA is used for both identity and permissions ( #3992 <https://github.com/OpenDDS/OpenDDS/pull/3992>) - Addressed CVE-2023-23932, where untrusted sources can use invalid CDR strings in RTPS messages to crash OpenDDS applications (#4010 <https://github.com/OpenDDS/OpenDDS/pull/4010>, #4016 <https://github.com/OpenDDS/OpenDDS/pull/4016>, #4018 <https://github.com/OpenDDS/OpenDDS/pull/4018>) - Thanks to Seulbae Kim (@squizz617 <https://github.com/squizz617>) for discovering this. - Fixed an issue in DynamicData::get_*_values and print_dynamic_data ( #3952 <https://github.com/OpenDDS/OpenDDS/pull/3952>) - Fixed a bug where DynamicDataReader wouldn't be able to read a topic type with final or mutable extensibility (#3993 <https://github.com/OpenDDS/OpenDDS/pull/3993>) - Fixed race conditions involving reference counted objects (#3999 <https://github.com/OpenDDS/OpenDDS/pull/3999>) |
|
From: Justin W. <wi...@ob...> - 2022-09-19 20:44:59
|
OpenDDS version 3.22.0 is now available for download at https://download.objectcomputing.com/OpenDDS/ An updated version of the OpenDDS Developer's Guide PDF is available from https://download.objectcomputing.com/OpenDDS/OpenDDS-3.22.pdf Updates in this version: - Sequences in FACE mapping: support == for any type (#3604 <https://github.com/objectcomputing/OpenDDS/pull/3604>) - Implement instance security methods from DDS Security Spec (#3557 <https://github.com/objectcomputing/OpenDDS/pull/3557>) - Added meta-discovery server to RtpsRelay (#3655 <https://github.com/objectcomputing/OpenDDS/pull/3655>) - Support building for VxWorks 21.03 (#3723 <https://github.com/objectcomputing/OpenDDS/pull/3723>) - alive and active flags now have timestamps in RtpsRelay (#3579 <https://github.com/objectcomputing/OpenDDS/pull/3579>) - Fixed bug where partitions for RtpsRelay client were not updated (#3583 <https://github.com/objectcomputing/OpenDDS/pull/3583>) - Fixed data race on status flag which causes missing listener invocation for BIT readers (#3584 <https://github.com/objectcomputing/OpenDDS/pull/3584>) - Fixed bug where SEDP removes crypto handles before dissassociating ( #3597 <https://github.com/objectcomputing/OpenDDS/pull/3597>) - Fixed null BIT subscriber in ConnectionRecord (#3610 <https://github.com/objectcomputing/OpenDDS/pull/3610>) - Fixed bug where user data reverts to original for RtpsRelay clients ( #3613 <https://github.com/objectcomputing/OpenDDS/pull/3613>) - Removed warning about unexpected register in MulticastManager (#3608 <https://github.com/objectcomputing/OpenDDS/pull/3608>) - Fixed reference counting issue that blocks SPDP shutdown (#3619 <https://github.com/objectcomputing/OpenDDS/pull/3619>) - Fixed dds_suppress_anys=0 (#3656 <https://github.com/objectcomputing/OpenDDS/pull/3656>) - Ignore interfaces with no FQDN in AddressLookup (#3660 <https://github.com/objectcomputing/OpenDDS/pull/3660>) - Fixed memory leak where DataWriter doesn't remove unregistered instances (#3684 <https://github.com/objectcomputing/OpenDDS/pull/3684>) - Update TransportClient's use of PendingAssoc's lock (#3652 <https://github.com/objectcomputing/OpenDDS/pull/3652>) - Clone Google Test and RapidJSON if not found (#3691 <https://github.com/objectcomputing/OpenDDS/pull/3691>) - Set extensibility on enums (#3686 <https://github.com/objectcomputing/OpenDDS/pull/3686>) - Do not use fixed-size buffer for partition parsing (#3704 <https://github.com/objectcomputing/OpenDDS/pull/3704>) - Prevent Use Of IPv4-mapped IPv6 'Any' Addresses In RTPS Locators (#3713 <https://github.com/objectcomputing/OpenDDS/pull/3713>) - Removed wait param in TransportRegistry::create_inst (#3644 <https://github.com/objectcomputing/OpenDDS/pull/3644>) - Changed Multicast Group Join Errors to Warnings (#3558 <https://github.com/objectcomputing/OpenDDS/pull/3558>) - Remove Leading :: from TypeObject Names (#3679 <https://github.com/objectcomputing/OpenDDS/pull/3679>) - Updates to the ValueReader/ValueWriter/ValueDispatcher framework (#3719 <https://github.com/objectcomputing/OpenDDS/pull/3719>) -- Justin Wilson Principal Software Engineer objectcomputing.com YOUR OUTCOMES ENGINEERED™ -- Justin Wilson Principal Software Engineer objectcomputing.com YOUR OUTCOMES ENGINEERED™ |
|
From: Fred H. <hor...@ob...> - 2022-06-24 21:12:02
|
OpenDDS version 3.21.0 is now available for download at http://download.objectcomputing.com/OpenDDS An updated version of the OpenDDS Developer's Guide and other helpful documents are available at https://opendds.org/documents Updates in this version: Additions: - Reduced code generation for XTypes (#3456 <https://github.com/objectcomputing/OpenDDS/pull/3456>) - ValueWriter::begin_struct_member now takes a member descriptor for identifying key fields (#3459 <https://github.com/objectcomputing/OpenDDS/pull/3459>) - Added detailed logging for invalid QoS (#3475 <https://github.com/objectcomputing/OpenDDS/pull/3475>) - Added example usage for inspect (#3493 <https://github.com/objectcomputing/OpenDDS/pull/3493>) - RTPS: - Added debug logging for non-final RTPS messages (#3504 <https://github.com/objectcomputing/OpenDDS/pull/3504>) - ConnectionRecord now reports the round-trip latency to the RtpsRelay (#3506 <https://github.com/objectcomputing/OpenDDS/pull/3506>) Fixes: - Add locking to RecorderImpl (#3531 <https://github.com/objectcomputing/OpenDDS/pull/3531>) - Fixed minor issues with choosing addresses and hostnames in NetworkResource (#3527 <https://github.com/objectcomputing/OpenDDS/pull/3527>) - RTPS: - PropertySeq now checks for invalid length (#3432 <https://github.com/objectcomputing/OpenDDS/pull/3432>) - UseXTypes RTPS discovery option now accepts descriptive values ( #3493 <https://github.com/objectcomputing/OpenDDS/pull/3493>) - This was added in OpenDDS 3.20.0, but wasn't functional. - Performance improvements for RTPS (#3500 <https://github.com/objectcomputing/OpenDDS/pull/3500>, #3508 <https://github.com/objectcomputing/OpenDDS/pull/3508>) - Fixed a bug where heartbeats were being sent to readers that didn't exist anymore (#3540 <https://github.com/objectcomputing/OpenDDS/pull/3540>) |
|
From: Kip C. <kc...@av...> - 2022-04-29 14:45:23
|
I understand there is no guarantee but I doubt Im dropping packets. It is repeatable every time I run. They are all in the same process and sub match seems to happen in the order I create them. Network is a single linux pc with one process with the datawriter and another process with the 3 data reaaders.
Ill look into how to add that to my code to set a time out value and see if that helps with reliable exiting so I know for the future.
Thank you,
Kip Carr Jr.
Sr. Software and Gaming Engineer
[cid:image001.png@01D85BB5.DC2F86A0]
407.381.5311 x114 (o)
863.221.2022 (c)
AVT PROPRIETARY MESSAGE: Only the intended recipient may disseminate this communication
From: Timothy Simpson <sim...@ob...>
Sent: Friday, April 29, 2022 10:07 AM
To: About developing OpenDDS or applications that use OpenDDS <ope...@li...>
Subject: [External] - Re: [opendds-devel] Transient local with Best Effort
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
With BEST_EFFORT there's no guarantee of delivery, but it does sound odd that the first datareader gets the durable message but the others don't. Is this repeatable behavior? Is it always the first process you launch, or the first process to read subscription_matched? What does your host / network setup look like (how many machines, how many interfaces, etc)?
As for the disconnect issue, you could try using DCPSPendingTimeout to prevent hanging. Our tests often append "-DCPSPendingTimeout 3" to the command line arguments to avoid processes from taking a long time to shutdown.
On Fri, Apr 29, 2022 at 9:00 AM Kip Carr <kc...@av...<mailto:kc...@av...>> wrote:
Hi,
I am currently trying to use transient local durability so that late joiners will get last message. My qos setup is below for DataWriters and Readers.
DDS::DataWriterQos qos;
_pub->get_default_datawriter_qos(qos);
qos.history.kind = DDS::KEEP_LAST_HISTORY_QOS;
qos.history.depth = 1L;
qos.durability.kind = DDS::TRANSIENT_LOCAL_DURABILITY_QOS;
I create my datawriter and it will send out a topic. Some time later (5-10sec) I create 3 datareaders for that topic and their listeners all within the same frame. The first datareader/listener I create gets an update of the topic but the others do not. All 3 listeners show a subscription match. Now if I change reliability from best effort to reliable all 3 get the initial message. Is there some stipulation with best effort that I am missing or should all 3 get the message?
I would prefer to keep it as best effort if possible but if not my next problem is that I have a 3rd party application that doesn't close nicely some times and it seems to hang my reliable readers and writers forever so they wont close. Is there a way to stop them from hanging?
Thank you,
Kip Carr Jr.
________________________________
The information contained in this e-mail and any attachments from AVT Simulation may contain confidential and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments.
_______________________________________________
opendds-devel mailing list
ope...@li...<mailto:ope...@li...>
https://lists.sourceforge.net/lists/listinfo/opendds-devel<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopendds-devel&data=04%7C01%7C%7Cf3435ffff74a4749783608da29ed69cc%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637868397885835614%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=QvW9eP8NnukQYfqF9vE%2Bpf2hHFTBysiwvt1riWcj19M%3D&reserved=0>
|
|
From: Timothy S. <sim...@ob...> - 2022-04-29 14:34:38
|
With BEST_EFFORT there's no guarantee of delivery, but it does sound odd that the first datareader gets the durable message but the others don't. Is this repeatable behavior? Is it always the first process you launch, or the first process to read subscription_matched? What does your host / network setup look like (how many machines, how many interfaces, etc)? As for the disconnect issue, you could try using DCPSPendingTimeout to prevent hanging. Our tests often append "-DCPSPendingTimeout 3" to the command line arguments to avoid processes from taking a long time to shutdown. On Fri, Apr 29, 2022 at 9:00 AM Kip Carr <kc...@av...> wrote: > Hi, > > > > I am currently trying to use transient local durability so that late > joiners will get last message. My qos setup is below for DataWriters and > Readers. > > > > DDS::DataWriterQos qos; > > _pub->get_default_datawriter_qos(qos); > > qos.history.kind = DDS::KEEP_LAST_HISTORY_QOS; > > qos.history.depth = 1L; > > qos.durability.kind = DDS::TRANSIENT_LOCAL_DURABILITY_QOS; > > > > I create my datawriter and it will send out a topic. Some time later > (5-10sec) I create 3 datareaders for that topic and their listeners all > within the same frame. The first datareader/listener I create gets an > update of the topic but the others do not. All 3 listeners show a > subscription match. Now if I change reliability from best effort to > reliable all 3 get the initial message. Is there some stipulation with > best effort that I am missing or should all 3 get the message? > > > > I would prefer to keep it as best effort if possible but if not my next > problem is that I have a 3rd party application that doesn’t close nicely > some times and it seems to hang my reliable readers and writers forever so > they wont close. Is there a way to stop them from hanging? > > > > Thank you, > > > > *Kip Carr Jr.* > ------------------------------ > The information contained in this e-mail and any attachments from AVT > Simulation may contain confidential and/or proprietary information, and is > intended only for the named recipient to whom it was originally addressed. > If you are not the intended recipient, any disclosure, distribution, or > copying of this e-mail or its attachments is strictly prohibited. If you > have received this e-mail in error, please notify the sender immediately by > return e-mail and permanently delete the e-mail and any attachments. > _______________________________________________ > opendds-devel mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/opendds-devel > |
|
From: Kip C. <kc...@av...> - 2022-04-29 14:00:21
|
Hi,
I am currently trying to use transient local durability so that late joiners will get last message. My qos setup is below for DataWriters and Readers.
DDS::DataWriterQos qos;
_pub->get_default_datawriter_qos(qos);
qos.history.kind = DDS::KEEP_LAST_HISTORY_QOS;
qos.history.depth = 1L;
qos.durability.kind = DDS::TRANSIENT_LOCAL_DURABILITY_QOS;
I create my datawriter and it will send out a topic. Some time later (5-10sec) I create 3 datareaders for that topic and their listeners all within the same frame. The first datareader/listener I create gets an update of the topic but the others do not. All 3 listeners show a subscription match. Now if I change reliability from best effort to reliable all 3 get the initial message. Is there some stipulation with best effort that I am missing or should all 3 get the message?
I would prefer to keep it as best effort if possible but if not my next problem is that I have a 3rd party application that doesn’t close nicely some times and it seems to hang my reliable readers and writers forever so they wont close. Is there a way to stop them from hanging?
Thank you,
Kip Carr Jr.
________________________________
The information contained in this e-mail and any attachments from AVT Simulation may contain confidential and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments.
|
|
From: Kip C. <kc...@av...> - 2022-03-29 17:51:30
|
Adam, It looks like the ip route add did the trick. It also seems to allow communication from different hosts but I need to test more to verify that. Thanks for the help! Kip From: Adam Mitz <mi...@ob...> Sent: Tuesday, March 29, 2022 9:31 AM To: ope...@li... Subject: Re: [opendds-devel] [External] - Re: Simple network setup CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Hi Kip, On 3/28/2022 7:35 AM, Kip Carr wrote: Enp0s8 was my dhcp to the internet. I have a static IP on enp0s3. Both nics show multicast capable and as far as I know Centos 8 is capable of multicast considering it works with other nic. We've found that default routing and firewall rules on many Linux distros prevent two processes on that host from exchanging multicast traffic. You may need to manually adjust the routing table or iptables (or similar firewall/filtering rules). One of my colleagues reported using "ip route add 224.0.0.0/4 dev eth0" -- I'm not sure if you're running in to the exact same problem. I tried it with the multicast turned off in config but I get same results. With use_multicast=0 it seems to still use multicast for sdpd, Im assuming that is what you are referring to with the bootstrap? Yes, this is by design. When you set use_multicast in the transport section of the configuration file, that doesn't apply to discovery. Also can you point me to where instructions are on changing the SpdpSendAddrs to something not using multicast? Right now my setup is really one host trying to communicate to itself but later I hope to have many more hosts talking to each other. SpdpSendAddrs is in "Table 7-5 RTPS Discovery Configuration Options" in the OpenDDS Developer's Guide. Thanks, Adam Mitz Principal Software Engineer and Partner Object Computing, Inc. ________________________________ The information contained in this e-mail and any attachments from AVT Simulation may contain confidential and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments. |
|
From: Adam M. <mi...@ob...> - 2022-03-29 13:32:22
|
Hi Kip, The settings for Simple Endpoint Discovery Protocol (SEDP) do not apply to Simple Participant Discovery Protocol (SPDP). Thanks, Adam Mitz Principal Software Engineer and Partner Object Computing, Inc. On 3/28/2022 3:02 PM, Kip Carr wrote: > > Adam, > > > > I was able to try with the DCPSInfoRepo and it works that way. I still need to get it to work with RTPS though. The network I am working with is sort of Adhoc so I never know which of the machines will be linked so I cant dedicate one to be the repo and there is a restriction that there cant be multiple repos per domain. I also tried to play around with setting SedpMulticast=0 but it didn’t fix it, though I could see it change the sedp in the log files to not use multicast. > > > > Thanks, > > Kip > > > > *From:* Adam Mitz <mi...@ob...> > *Sent:* Thursday, March 24, 2022 6:54 PM > *To:* ope...@li... > *Subject:* Re: [opendds-devel] [External] - Re: Simple network setup > > > > *CAUTION:*This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. > > > > Hi Kip, > > > > It seems like a significant difference between publisher_broke.log and publisher_working.log is in the network interfaces used for participant discovery (SPDP) multicast: > > > > broke: > > 2022-03-23 08:50:50.928@LM_INFO@(4866|4873) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on lo > 2022-03-23 08:50:50.928@LM_INFO@(4866|4873) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on enp0s3 > 2022-03-23 08:50:50.928@LM_INFO@(4866|4873) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on virbr0 > > > > working: > > 2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on lo > 2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on enp0s3 > 2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on enp0s8 > 2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on virbr0 > > > > The "broke" log also has the following warning: > > 2022-03-23 08:50:50.930@LM_WARNING@(4866|4873) WARNING: Spdp::SpdpTransport::send() - destination 239.255.0.1:17900 failed send: Network is unreachable > > > > If you have a system that isn't capable of multicast you'll need to bootstrap discovery some other way, such as setting the SpdpSendAddrs configuration value or using the RtpsRelay to forward SPDP announcements. > > > > Thanks, > Adam Mitz > Principal Software Engineer and Partner > Object Computing, Inc. > > > > On 3/23/2022 8:07 AM, Kip Carr wrote: > > Attached are the logs for pub and sub from the Messenger Dev example run with ./run_test.pl –rtps. Main thing that stands out to me is the multicast cant be reached so I changed the rtps.ini to include use_multicast=0. Full ini is here: > > > > [common] > > DCPSDefaultDiscovery=DEFAULT_RTPS > > DCPSGlobalTransportConfig=$file > > > > [transport/the_rtps_transport] > > transport_type=rtps_udp > > use_multicast=0 > > > > I attached those (no_mulit_broke)as well and it looks like same issue. > > > > Thank you, > > Kip > > > > *From:* Adam Mitz <mi...@ob...> <mailto:mi...@ob...> > *Sent:* Tuesday, March 22, 2022 4:54 PM > *To:* ope...@li... > *Subject:* [External] - Re: [opendds-devel] Simple network setup > > > > *CAUTION:*This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. > > > > Hi Kip, > > > > Could you please attach logs and/or wireshark captures for both the working and broken cases? > > > > Thanks, > > Adam Mitz > Principal Software Engineer and Partner > > Object Computing, Inc. > > > > On 3/22/2022 3:07 PM, Kip Carr wrote: > > Hi, > > > > Im trying to get OpenDDS working on a very simple network and I am having issues. I have tried running even the examples and they fail. The network is just a single interface setup with a static ip address. Here is the ifconfig from linux. > > > > enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 > > inet 192.168.100.181 netmask 255.255.255.0 broadcast 192.168.100.255 > > inet6 fe80::a00:27ff:fea8:6d32 prefixlen 64 scopeid 0x20<link> > > RX packets 3793135 bytes 552823938 (527.2 MiB) > > RX errors 0 dropped 0 overruns 0 frame 0 > > TX packets 2477753 bytes 163887343 (156.2 MiB) > > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > > > My ini file looks like below but of course the DevGuide example doesn’t use that and it doesn’t work in my code or examples. > > > > [common] > > DCPSGlobalTransportConfig=defaultConfig > > DCPSDefaultDiscovery=DEFAULT_RTPS > > DCPSLogLevel=debug > > DCPSDebugLEvel=4 > > DCPSTransportDebugLevel=2 > > > > [config/defaultConfig] > > transports=autoRtps > > > > [transport_template/autoRtps] > > transport_type=rtps_udp > > instantiation_rule=per_participant > > use_multicast=0 > > #local_address=enp0s3: > > > > I can get it to work if I set the NIC to use DHCP and get an address from our servers. I am not sure what about the network setup would be an issue. I assume DDS should work if I just had all the computers with static ips and hooked up to a hub, is this not true? > > > > Thank you, > > */Kip/* > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > The information contained in this e-mail and any attachments from AVT Simulation may contain confidential and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments. > > > > > > _______________________________________________ > > opendds-devel mailing list > > ope...@li... > > https://lists.sourceforge.net/lists/listinfo/opendds-devel <https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopendds-devel&data=04%7C01%7C%7C1603b1b8efd647ee01d908da0dea35cb%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637837597786032606%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=p8fxUOCEOwfxRrX%2BYrQs%2FqkOKHGTZhYI9NO%2Ft42GX0o%3D&reserved=0> > > > > > > > _______________________________________________ > > opendds-devel mailing list > > ope...@li... > > https://lists.sourceforge.net/lists/listinfo/opendds-devel <https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopendds-devel&data=04%7C01%7C%7C1603b1b8efd647ee01d908da0dea35cb%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637837597786032606%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=p8fxUOCEOwfxRrX%2BYrQs%2FqkOKHGTZhYI9NO%2Ft42GX0o%3D&reserved=0> > > > > > > _______________________________________________ > opendds-devel mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/opendds-devel |
|
From: Adam M. <mi...@ob...> - 2022-03-29 13:31:14
|
Hi Kip, On 3/28/2022 7:35 AM, Kip Carr wrote: > > Enp0s8 was my dhcp to the internet. I have a static IP on enp0s3. Both nics show multicast capable and as far as I know Centos 8 is capable of multicast considering it works with other nic. > We've found that default routing and firewall rules on many Linux distros prevent two processes on that host from exchanging multicast traffic. You may need to manually adjust the routing table or iptables (or similar firewall/filtering rules). One of my colleagues reported using "ip route add 224.0.0.0/4 dev eth0" -- I'm not sure if you're running in to the exact same problem. > I tried it with the multicast turned off in config but I get same results. With use_multicast=0 it seems to still use multicast for sdpd, Im assuming that is what you are referring to with the bootstrap? > Yes, this is by design. When you set use_multicast in the transport section of the configuration file, that doesn't apply to discovery. > Also can you point me to where instructions are on changing the SpdpSendAddrs to something not using multicast? Right now my setup is really one host trying to communicate to itself but later I hope to have many more hosts talking to each other. > SpdpSendAddrs is in "Table 7-5 RTPS Discovery Configuration Options" in the OpenDDS Developer's Guide. Thanks, Adam Mitz Principal Software Engineer and Partner Object Computing, Inc. |
|
From: Kip C. <kc...@av...> - 2022-03-28 20:03:01
|
Adam,
I was able to try with the DCPSInfoRepo and it works that way. I still need to get it to work with RTPS though. The network I am working with is sort of Adhoc so I never know which of the machines will be linked so I cant dedicate one to be the repo and there is a restriction that there cant be multiple repos per domain. I also tried to play around with setting SedpMulticast=0 but it didn't fix it, though I could see it change the sedp in the log files to not use multicast.
Thanks,
Kip
From: Adam Mitz <mi...@ob...>
Sent: Thursday, March 24, 2022 6:54 PM
To: ope...@li...
Subject: Re: [opendds-devel] [External] - Re: Simple network setup
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Kip,
It seems like a significant difference between publisher_broke.log and publisher_working.log is in the network interfaces used for participant discovery (SPDP) multicast:
broke:
2022-03-23 08:50:50.928@LM_INFO@(4866|4873) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on lo
2022-03-23 08:50:50.928@LM_INFO@(4866|4873) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on enp0s3
2022-03-23 08:50:50.928@LM_INFO@(4866|4873) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on virbr0
working:
2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on lo
2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on enp0s3
2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on enp0s8
2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on virbr0
The "broke" log also has the following warning:
2022-03-23 08:50:50.930@LM_WARNING@(4866|4873) WARNING: Spdp::SpdpTransport::send() - destination 239.255.0.1:17900 failed send: Network is unreachable
If you have a system that isn't capable of multicast you'll need to bootstrap discovery some other way, such as setting the SpdpSendAddrs configuration value or using the RtpsRelay to forward SPDP announcements.
Thanks,
Adam Mitz
Principal Software Engineer and Partner
Object Computing, Inc.
On 3/23/2022 8:07 AM, Kip Carr wrote:
Attached are the logs for pub and sub from the Messenger Dev example run with ./run_test.pl -rtps. Main thing that stands out to me is the multicast cant be reached so I changed the rtps.ini to include use_multicast=0. Full ini is here:
[common]
DCPSDefaultDiscovery=DEFAULT_RTPS
DCPSGlobalTransportConfig=$file
[transport/the_rtps_transport]
transport_type=rtps_udp
use_multicast=0
I attached those (no_mulit_broke)as well and it looks like same issue.
Thank you,
Kip
From: Adam Mitz <mi...@ob...><mailto:mi...@ob...>
Sent: Tuesday, March 22, 2022 4:54 PM
To: ope...@li...<mailto:ope...@li...>
Subject: [External] - Re: [opendds-devel] Simple network setup
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Kip,
Could you please attach logs and/or wireshark captures for both the working and broken cases?
Thanks,
Adam Mitz
Principal Software Engineer and Partner
Object Computing, Inc.
On 3/22/2022 3:07 PM, Kip Carr wrote:
Hi,
Im trying to get OpenDDS working on a very simple network and I am having issues. I have tried running even the examples and they fail. The network is just a single interface setup with a static ip address. Here is the ifconfig from linux.
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.181 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::a00:27ff:fea8:6d32 prefixlen 64 scopeid 0x20<link>
RX packets 3793135 bytes 552823938 (527.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2477753 bytes 163887343 (156.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
My ini file looks like below but of course the DevGuide example doesn't use that and it doesn't work in my code or examples.
[common]
DCPSGlobalTransportConfig=defaultConfig
DCPSDefaultDiscovery=DEFAULT_RTPS
DCPSLogLevel=debug
DCPSDebugLEvel=4
DCPSTransportDebugLevel=2
[config/defaultConfig]
transports=autoRtps
[transport_template/autoRtps]
transport_type=rtps_udp
instantiation_rule=per_participant
use_multicast=0
#local_address=enp0s3:
I can get it to work if I set the NIC to use DHCP and get an address from our servers. I am not sure what about the network setup would be an issue. I assume DDS should work if I just had all the computers with static ips and hooked up to a hub, is this not true?
Thank you,
Kip
________________________________
The information contained in this e-mail and any attachments from AVT Simulation may contain confidential and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments.
_______________________________________________
opendds-devel mailing list
ope...@li...<mailto:ope...@li...>
https://lists.sourceforge.net/lists/listinfo/opendds-devel<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopendds-devel&data=04%7C01%7C%7C1603b1b8efd647ee01d908da0dea35cb%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637837597786032606%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=p8fxUOCEOwfxRrX%2BYrQs%2FqkOKHGTZhYI9NO%2Ft42GX0o%3D&reserved=0>
_______________________________________________
opendds-devel mailing list
ope...@li...<mailto:ope...@li...>
https://lists.sourceforge.net/lists/listinfo/opendds-devel<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopendds-devel&data=04%7C01%7C%7C1603b1b8efd647ee01d908da0dea35cb%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637837597786032606%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=p8fxUOCEOwfxRrX%2BYrQs%2FqkOKHGTZhYI9NO%2Ft42GX0o%3D&reserved=0>
|
|
From: Kip C. <kc...@av...> - 2022-03-28 12:50:10
|
Adam,
Enp0s8 was my dhcp to the internet. I have a static IP on enp0s3. Both nics show multicast capable and as far as I know Centos 8 is capable of multicast considering it works with other nic. I tried it with the multicast turned off in config but I get same results. With use_multicast=0 it seems to still use multicast for sdpd, Im assuming that is what you are referring to with the bootstrap? Also can you point me to where instructions are on changing the SpdpSendAddrs to something not using multicast? Right now my setup is really one host trying to communicate to itself but later I hope to have many more hosts talking to each other.
I will try look into the Rtps relay in the mean time.
Thank you,
Kip Carr Jr.
From: Adam Mitz <mi...@ob...>
Sent: Thursday, March 24, 2022 6:54 PM
To: ope...@li...
Subject: Re: [opendds-devel] [External] - Re: Simple network setup
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Kip,
It seems like a significant difference between publisher_broke.log and publisher_working.log is in the network interfaces used for participant discovery (SPDP) multicast:
broke:
2022-03-23 08:50:50.928@LM_INFO@(4866|4873) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on lo
2022-03-23 08:50:50.928@LM_INFO@(4866|4873) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on enp0s3
2022-03-23 08:50:50.928@LM_INFO@(4866|4873) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on virbr0
working:
2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on lo
2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on enp0s3
2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on enp0s8
2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on virbr0
The "broke" log also has the following warning:
2022-03-23 08:50:50.930@LM_WARNING@(4866|4873) WARNING: Spdp::SpdpTransport::send() - destination 239.255.0.1:17900 failed send: Network is unreachable
If you have a system that isn't capable of multicast you'll need to bootstrap discovery some other way, such as setting the SpdpSendAddrs configuration value or using the RtpsRelay to forward SPDP announcements.
Thanks,
Adam Mitz
Principal Software Engineer and Partner
Object Computing, Inc.
On 3/23/2022 8:07 AM, Kip Carr wrote:
Attached are the logs for pub and sub from the Messenger Dev example run with ./run_test.pl -rtps. Main thing that stands out to me is the multicast cant be reached so I changed the rtps.ini to include use_multicast=0. Full ini is here:
[common]
DCPSDefaultDiscovery=DEFAULT_RTPS
DCPSGlobalTransportConfig=$file
[transport/the_rtps_transport]
transport_type=rtps_udp
use_multicast=0
I attached those (no_mulit_broke)as well and it looks like same issue.
Thank you,
Kip
From: Adam Mitz <mi...@ob...><mailto:mi...@ob...>
Sent: Tuesday, March 22, 2022 4:54 PM
To: ope...@li...<mailto:ope...@li...>
Subject: [External] - Re: [opendds-devel] Simple network setup
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Kip,
Could you please attach logs and/or wireshark captures for both the working and broken cases?
Thanks,
Adam Mitz
Principal Software Engineer and Partner
Object Computing, Inc.
On 3/22/2022 3:07 PM, Kip Carr wrote:
Hi,
Im trying to get OpenDDS working on a very simple network and I am having issues. I have tried running even the examples and they fail. The network is just a single interface setup with a static ip address. Here is the ifconfig from linux.
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.181 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::a00:27ff:fea8:6d32 prefixlen 64 scopeid 0x20<link>
RX packets 3793135 bytes 552823938 (527.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2477753 bytes 163887343 (156.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
My ini file looks like below but of course the DevGuide example doesn't use that and it doesn't work in my code or examples.
[common]
DCPSGlobalTransportConfig=defaultConfig
DCPSDefaultDiscovery=DEFAULT_RTPS
DCPSLogLevel=debug
DCPSDebugLEvel=4
DCPSTransportDebugLevel=2
[config/defaultConfig]
transports=autoRtps
[transport_template/autoRtps]
transport_type=rtps_udp
instantiation_rule=per_participant
use_multicast=0
#local_address=enp0s3:
I can get it to work if I set the NIC to use DHCP and get an address from our servers. I am not sure what about the network setup would be an issue. I assume DDS should work if I just had all the computers with static ips and hooked up to a hub, is this not true?
Thank you,
Kip
________________________________
The information contained in this e-mail and any attachments from AVT Simulation may contain confidential and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments.
_______________________________________________
opendds-devel mailing list
ope...@li...<mailto:ope...@li...>
https://lists.sourceforge.net/lists/listinfo/opendds-devel<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopendds-devel&data=04%7C01%7C%7C1603b1b8efd647ee01d908da0dea35cb%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637837597786032606%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=p8fxUOCEOwfxRrX%2BYrQs%2FqkOKHGTZhYI9NO%2Ft42GX0o%3D&reserved=0>
_______________________________________________
opendds-devel mailing list
ope...@li...<mailto:ope...@li...>
https://lists.sourceforge.net/lists/listinfo/opendds-devel<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopendds-devel&data=04%7C01%7C%7C1603b1b8efd647ee01d908da0dea35cb%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637837597786032606%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=p8fxUOCEOwfxRrX%2BYrQs%2FqkOKHGTZhYI9NO%2Ft42GX0o%3D&reserved=0>
|
|
From: Fred H. <hor...@ob...> - 2022-03-25 23:23:57
|
OpenDDS version 3.20.0 is now available for download at http://download.objectcomputing.com/OpenDDS An updated version of the OpenDDS Developer's Guide and other helpful documents are available at https://opendds.org/documents Updates in this version: Additions: - Added the host_name shared memory transport config option (#3386 <https://github.com/objectcomputing/OpenDDS/pull/3386>) - Added an example test for demonstrating issues (#3322 <https://github.com/objectcomputing/OpenDDS/pull/3322>) - Added the --old-typeobject-encoding option to opendds_idl for compatibility with TypeObject before OpenDDS 3.18.0 (#3263 <https://github.com/objectcomputing/OpenDDS/pull/3263>) - Added return code to ServiceParticipant::shutdown() (#3159 <https://github.com/objectcomputing/OpenDDS/pull/3159>, #3270 <https://github.com/objectcomputing/OpenDDS/pull/3270>) - CMake Module: - Improved support for installing CMake projects that use OpenDDS ( #3315 <https://github.com/objectcomputing/OpenDDS/pull/3315>, #3354 <https://github.com/objectcomputing/OpenDDS/pull/3354>, #3367 <https://github.com/objectcomputing/OpenDDS/pull/3367>, #3368 <https://github.com/objectcomputing/OpenDDS/pull/3368>, #3393 <https://github.com/objectcomputing/OpenDDS/pull/3393>) - OpenDDS, ACE, and TAO libraries can now be installed using install(IMPORTED_RUNTIME_ARTIFACTS) if using CMake 3.21 or later - To help facilitate this, a new function called opendds_get_library_dependencies has been added. - To help install generated files, OPENDDS_TARGET_SOURCES now adds lists of the files that were passed in and generated that are part of the PUBLIC and INTERFACE scopes as properties on the target - See docs/cmake.md for details on all of these new features - Added an OPENDDS_DEFAULT_SCOPE option that allows changing the default scope of OPENDDS_TARGET_SOURCES (#3315 <https://github.com/objectcomputing/OpenDDS/pull/3315>) - Support INSTALL_LIB being used with make install to change the name of the lib directory (#2879 <https://github.com/objectcomputing/OpenDDS/pull/2879>) - NOTE: This required changing the CMake module installation destination from lib to share. Platform Support and Dependencies: - Support for Visual Studio 2022 (#3267 <https://github.com/objectcomputing/OpenDDS/pull/3267>) - Updated to work with the C++20 standard library (#3288 <https://github.com/objectcomputing/OpenDDS/pull/3288>) - Support for OpenSSL 3.0.1 and later (#3358 <https://github.com/objectcomputing/OpenDDS/pull/3358>, #3404 <https://github.com/objectcomputing/OpenDDS/pull/3404>) - Updated Wireshark dissector to work with GLib 2.68 and later (#2918 <https://github.com/objectcomputing/OpenDDS/pull/2918>) - Removed Boost as an optional dependency (#3323 <https://github.com/objectcomputing/OpenDDS/pull/3323>) - Updated the RapidJSON submodule (#3284 <https://github.com/objectcomputing/OpenDDS/pull/3284>) Fixes: - Fixed issue preventing 2 sequence<string> anonymous types in the same struct (#3415 <https://github.com/objectcomputing/OpenDDS/pull/3415>) - Fixed issues with entity association when using the multicast transport (#3377 <https://github.com/objectcomputing/OpenDDS/pull/3377>) - Fixed issue #3268 <https://github.com/objectcomputing/OpenDDS/issues/3268>, a segfault in opendds_idl (#3374 <https://github.com/objectcomputing/OpenDDS/pull/3374> ) - Fixed thread safety of DataReaderImpl_T's allocator (#3335 <https://github.com/objectcomputing/OpenDDS/pull/3335>, #3403 <https://github.com/objectcomputing/OpenDDS/pull/3403>) - Improvements to how data representation is handled (#3233 <https://github.com/objectcomputing/OpenDDS/pull/3233>) - Fixed instance lifetime issue with assert_liveliness (#3241 <https://github.com/objectcomputing/OpenDDS/pull/3241>) - RTPS: - Improved internal handling of remote addresses to reduce initial traffic (#3375 <https://github.com/objectcomputing/OpenDDS/pull/3375>) - General ICE improvements (#3298 <https://github.com/objectcomputing/OpenDDS/pull/3298>, #3218 <https://github.com/objectcomputing/OpenDDS/pull/3218>) - Improvements to RtpsRelay (#3257 <https://github.com/objectcomputing/OpenDDS/pull/3257>, #3240 <https://github.com/objectcomputing/OpenDDS/pull/3240>, #3237 <https://github.com/objectcomputing/OpenDDS/pull/3237>) - Check for invalid RTPS Parameter length (#3405 <https://github.com/objectcomputing/OpenDDS/pull/3405>) - CMake Module: - Fixed issue when using install(EXPORT) on a target used with OPENDDS_TARGET_SOURCES (#3315 <https://github.com/objectcomputing/OpenDDS/pull/3315>) - Fixed issue #1297 <https://github.com/objectcomputing/OpenDDS/issues/1297> where opendds_idl generates an incorrect include path (#3315 <https://github.com/objectcomputing/OpenDDS/pull/3315>) |
|
From: Adam M. <mi...@ob...> - 2022-03-24 23:01:08
|
Hi Kip, It seems like a significant difference between publisher_broke.log and publisher_working.log is in the network interfaces used for participant discovery (SPDP) multicast: broke: 2022-03-23 08:50:50.928@LM_INFO@(4866|4873) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on lo 2022-03-23 08:50:50.928@LM_INFO@(4866|4873) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on enp0s3 2022-03-23 08:50:50.928@LM_INFO@(4866|4873) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on virbr0 working: 2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on lo 2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on enp0s3 2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on enp0s8 2022-03-23 08:48:02.290@LM_INFO@(4618|4623) Spdp::SpdpTransport::join_multicast_group joining group 239.255.0.1:17900 on virbr0 The "broke" log also has the following warning: 2022-03-23 08:50:50.930@LM_WARNING@(4866|4873) WARNING: Spdp::SpdpTransport::send() - destination 239.255.0.1:17900 failed send: Network is unreachable If you have a system that isn't capable of multicast you'll need to bootstrap discovery some other way, such as setting the SpdpSendAddrs configuration value or using the RtpsRelay to forward SPDP announcements. Thanks, Adam Mitz Principal Software Engineer and Partner Object Computing, Inc. On 3/23/2022 8:07 AM, Kip Carr wrote: > > Attached are the logs for pub and sub from the Messenger Dev example run with ./run_test.pl –rtps. Main thing that stands out to me is the multicast cant be reached so I changed the rtps.ini to include use_multicast=0. Full ini is here: > > > > [common] > > DCPSDefaultDiscovery=DEFAULT_RTPS > > DCPSGlobalTransportConfig=$file > > > > [transport/the_rtps_transport] > > transport_type=rtps_udp > > use_multicast=0 > > > > I attached those (no_mulit_broke)as well and it looks like same issue. > > > > Thank you, > > Kip > > > > *From:* Adam Mitz <mi...@ob...> > *Sent:* Tuesday, March 22, 2022 4:54 PM > *To:* ope...@li... > *Subject:* [External] - Re: [opendds-devel] Simple network setup > > > > *CAUTION:*This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. > > > > Hi Kip, > > > > Could you please attach logs and/or wireshark captures for both the working and broken cases? > > > > Thanks, > > Adam Mitz > Principal Software Engineer and Partner > > Object Computing, Inc. > > > > On 3/22/2022 3:07 PM, Kip Carr wrote: > > Hi, > > > > Im trying to get OpenDDS working on a very simple network and I am having issues. I have tried running even the examples and they fail. The network is just a single interface setup with a static ip address. Here is the ifconfig from linux. > > > > enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 > > inet 192.168.100.181 netmask 255.255.255.0 broadcast 192.168.100.255 > > inet6 fe80::a00:27ff:fea8:6d32 prefixlen 64 scopeid 0x20<link> > > RX packets 3793135 bytes 552823938 (527.2 MiB) > > RX errors 0 dropped 0 overruns 0 frame 0 > > TX packets 2477753 bytes 163887343 (156.2 MiB) > > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > > > My ini file looks like below but of course the DevGuide example doesn’t use that and it doesn’t work in my code or examples. > > > > [common] > > DCPSGlobalTransportConfig=defaultConfig > > DCPSDefaultDiscovery=DEFAULT_RTPS > > DCPSLogLevel=debug > > DCPSDebugLEvel=4 > > DCPSTransportDebugLevel=2 > > > > [config/defaultConfig] > > transports=autoRtps > > > > [transport_template/autoRtps] > > transport_type=rtps_udp > > instantiation_rule=per_participant > > use_multicast=0 > > #local_address=enp0s3: > > > > I can get it to work if I set the NIC to use DHCP and get an address from our servers. I am not sure what about the network setup would be an issue. I assume DDS should work if I just had all the computers with static ips and hooked up to a hub, is this not true? > > > > Thank you, > > */Kip/* > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > The information contained in this e-mail and any attachments from AVT Simulation may contain confidential and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments. > > > > > _______________________________________________ > > opendds-devel mailing list > > ope...@li... > > https://lists.sourceforge.net/lists/listinfo/opendds-devel <https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopendds-devel&data=04%7C01%7C%7Cecdb3eb7f23945e0988c08da0c4617f0%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637835793424499182%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=0XiXrhP9AaXVZ8RnIIrIV7dHkrqZevEUmIUOc1k2o5c%3D&reserved=0> > > > > > > _______________________________________________ > opendds-devel mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/opendds-devel |
|
From: Kip C. <kc...@av...> - 2022-03-23 13:23:37
|
Attached are the logs for pub and sub from the Messenger Dev example run with ./run_test.pl -rtps. Main thing that stands out to me is the multicast cant be reached so I changed the rtps.ini to include use_multicast=0. Full ini is here:
[common]
DCPSDefaultDiscovery=DEFAULT_RTPS
DCPSGlobalTransportConfig=$file
[transport/the_rtps_transport]
transport_type=rtps_udp
use_multicast=0
I attached those (no_mulit_broke)as well and it looks like same issue.
Thank you,
Kip
From: Adam Mitz <mi...@ob...>
Sent: Tuesday, March 22, 2022 4:54 PM
To: ope...@li...
Subject: [External] - Re: [opendds-devel] Simple network setup
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Kip,
Could you please attach logs and/or wireshark captures for both the working and broken cases?
Thanks,
Adam Mitz
Principal Software Engineer and Partner
Object Computing, Inc.
On 3/22/2022 3:07 PM, Kip Carr wrote:
Hi,
Im trying to get OpenDDS working on a very simple network and I am having issues. I have tried running even the examples and they fail. The network is just a single interface setup with a static ip address. Here is the ifconfig from linux.
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.181 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::a00:27ff:fea8:6d32 prefixlen 64 scopeid 0x20<link>
RX packets 3793135 bytes 552823938 (527.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2477753 bytes 163887343 (156.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
My ini file looks like below but of course the DevGuide example doesn't use that and it doesn't work in my code or examples.
[common]
DCPSGlobalTransportConfig=defaultConfig
DCPSDefaultDiscovery=DEFAULT_RTPS
DCPSLogLevel=debug
DCPSDebugLEvel=4
DCPSTransportDebugLevel=2
[config/defaultConfig]
transports=autoRtps
[transport_template/autoRtps]
transport_type=rtps_udp
instantiation_rule=per_participant
use_multicast=0
#local_address=enp0s3:
I can get it to work if I set the NIC to use DHCP and get an address from our servers. I am not sure what about the network setup would be an issue. I assume DDS should work if I just had all the computers with static ips and hooked up to a hub, is this not true?
Thank you,
Kip
________________________________
The information contained in this e-mail and any attachments from AVT Simulation may contain confidential and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments.
_______________________________________________
opendds-devel mailing list
ope...@li...<mailto:ope...@li...>
https://lists.sourceforge.net/lists/listinfo/opendds-devel<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopendds-devel&data=04%7C01%7C%7Cecdb3eb7f23945e0988c08da0c4617f0%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637835793424499182%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=0XiXrhP9AaXVZ8RnIIrIV7dHkrqZevEUmIUOc1k2o5c%3D&reserved=0>
|
|
From: Adam M. <mi...@ob...> - 2022-03-22 20:53:52
|
Hi Kip, Could you please attach logs and/or wireshark captures for both the working and broken cases? Thanks, Adam Mitz Principal Software Engineer and Partner Object Computing, Inc. On 3/22/2022 3:07 PM, Kip Carr wrote: > > Hi, > > > > Im trying to get OpenDDS working on a very simple network and I am having issues. I have tried running even the examples and they fail. The network is just a single interface setup with a static ip address. Here is the ifconfig from linux. > > > > enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 > > inet 192.168.100.181 netmask 255.255.255.0 broadcast 192.168.100.255 > > inet6 fe80::a00:27ff:fea8:6d32 prefixlen 64 scopeid 0x20<link> > > RX packets 3793135 bytes 552823938 (527.2 MiB) > > RX errors 0 dropped 0 overruns 0 frame 0 > > TX packets 2477753 bytes 163887343 (156.2 MiB) > > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > > > My ini file looks like below but of course the DevGuide example doesn’t use that and it doesn’t work in my code or examples. > > > > [common] > > DCPSGlobalTransportConfig=defaultConfig > > DCPSDefaultDiscovery=DEFAULT_RTPS > > DCPSLogLevel=debug > > DCPSDebugLEvel=4 > > DCPSTransportDebugLevel=2 > > > > [config/defaultConfig] > > transports=autoRtps > > > > [transport_template/autoRtps] > > transport_type=rtps_udp > > instantiation_rule=per_participant > > use_multicast=0 > > #local_address=enp0s3: > > > > I can get it to work if I set the NIC to use DHCP and get an address from our servers. I am not sure what about the network setup would be an issue. I assume DDS should work if I just had all the computers with static ips and hooked up to a hub, is this not true? > > > > Thank you, > > */Kip/* > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > The information contained in this e-mail and any attachments from AVT Simulation may contain confidential and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments. > > > _______________________________________________ > opendds-devel mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/opendds-devel |
|
From: Kip C. <kc...@av...> - 2022-03-22 20:22:51
|
Hi,
Im trying to get OpenDDS working on a very simple network and I am having issues. I have tried running even the examples and they fail. The network is just a single interface setup with a static ip address. Here is the ifconfig from linux.
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.181 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::a00:27ff:fea8:6d32 prefixlen 64 scopeid 0x20<link>
RX packets 3793135 bytes 552823938 (527.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2477753 bytes 163887343 (156.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
My ini file looks like below but of course the DevGuide example doesn't use that and it doesn't work in my code or examples.
[common]
DCPSGlobalTransportConfig=defaultConfig
DCPSDefaultDiscovery=DEFAULT_RTPS
DCPSLogLevel=debug
DCPSDebugLEvel=4
DCPSTransportDebugLevel=2
[config/defaultConfig]
transports=autoRtps
[transport_template/autoRtps]
transport_type=rtps_udp
instantiation_rule=per_participant
use_multicast=0
#local_address=enp0s3:
I can get it to work if I set the NIC to use DHCP and get an address from our servers. I am not sure what about the network setup would be an issue. I assume DDS should work if I just had all the computers with static ips and hooked up to a hub, is this not true?
Thank you,
Kip
________________________________
The information contained in this e-mail and any attachments from AVT Simulation may contain confidential and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments.
|
|
From: Justin W. <wi...@ob...> - 2022-02-03 14:23:55
|
Kip:
Most tests are using either a listener or a wait set with a read condition
(grep for ReadCondition).
Reading in a polling loop should work. (I assume that you have a sleep or
something.)
I would continue to use RTPS as it might be the cause of the problem.
Two classes can share a data reader, so long as they agree on how the data
is accessed (as you have found out).
Alternatively, you can create multiple readers so they are not constrained
by the needs of another class.
Let me know when you submit your example as a PR.
Justin
On Wed, Feb 2, 2022 at 4:51 PM Kip Carr <kc...@av...> wrote:
> Justin,
>
>
>
> Thanks for the reply. Ill see if I can get a test case going. Do you
> know of a current test case that has polling I can work with, most seam to
> use the Listener? In the meantime to answer some of what you wrote:
>
>
>
> I can change from RTPS to something else if needed to try. My readers do
> see the NOT_ALIVE_DISPOSED_INSTANCE_STATE when the publisher app exits. Ill
> see if I can find where the timeout value is so I can put It in my ini file
> and see if its due to reader being in timeout waitiung for publisher. My
> publisher and reader apps all exit on destruction of the DdsCore class
> which calls:
>
>
>
> participant->delete_contained_entities();
>
> _dpf->delete_participant(_participant.in());
>
> TheServiceParticipant->shutdown();
>
>
>
> You are correct I am not using reliable atm. Currently Im running all my
> processes on the same PC and when I am looking at the prints Im not seeing
> any missed packets going by the count field.
>
>
>
> For your third point I originally tried take and Read non-read. My issue
> with both is I have two different classes that need that same data. If one
> takes it the other isn’t seeing it and if one reads it with only reading
> non-read the other one wasn’t seeing it as well. If there is a proper way
> to have two classes get the same topic info please let me know. Right now
> they both share the same Topic DataReader and its all publishing to one
> instance but I don’t do anything filtering by instance.
>
>
>
> Here is the IDL I cant believe I forgot it but it is the Message example
> just renamed so I could tell when I was talking about the class, struct,
> type, etc.
>
>
>
> module TestModule {
>
>
>
> @topic
>
> struct TestMsg {
>
> string from;
>
> string subject;
>
> @key long subject_id;
>
> string text;
>
> long count;
>
> };
>
> };
>
> My prints show the subject_id which is the key and it is hardcoded to 1 so
> I am pretty sure that it is all the same instance. Here is a sample output
> after my Publisher app is closed. You can see the 3rd message is showing
> disposed but I have 2 other messages.
>
>
>
> 22:15:07 D DDS::Read test message!
>
> 22:15:07 D Simulator Reading Messages:3 with info len: 3
>
> 22:15:07 D Message: subject = DDS test module
>
> subject_id = 1
>
> from = AH App
>
> count = 1089
>
> text = Test messages
>
> 22:15:07 D Message: subject = DDS test module
>
> subject_id = 1
>
> from = AH App
>
> count = 1090
>
> text = Test messages
>
> 22:15:07 D instance is disposed
>
> 22:15:07 D DDS::Returned test message!
>
> 22:15:07 D Simulator Returned Loan.
>
> 22:15:07 D DDS::Read test message!
>
> 22:15:07 D MainWindow Reading Messages:3
>
> 22:15:07 D Message: subject = DDS test module
>
> subject_id = 1
>
> from = AH App
>
> count = 1089
>
> text = Test messages
>
> 22:15:07 D Message: subject = DDS test module
>
> subject_id = 1
>
> from = AH App
>
> count = 1090
>
> text = Test messages
>
> 22:15:07 D instance is disposed
>
> 22:15:07 D DDS::Returned test message!
>
> 22:15:07 D MainWindow Returned Loan.
>
>
>
> Thank you,
>
> *Kip Carr*
>
> *From:* Justin Wilson <wi...@ob...>
> *Sent:* Wednesday, February 2, 2022 3:44 PM
> *To:* About developing OpenDDS or applications that use OpenDDS <
> ope...@li...>
> *Subject:* [External] - Re: [opendds-devel] MessageSequence bug when
> publisher ends and restarts
>
>
>
> *CAUTION:* This email originated from outside of the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe.
>
>
>
> Kip:
>
>
>
> I don't think there is enough here to definitively say what's going on.
>
> However, I'll try to give you ideas.
>
>
>
> First, the application is using RTPS for discovery which means that the
> subscribers might not be able to detect that a publisher is gone until that
> participant expires.
>
> The default expiration is 5 minutes.
>
> How the publisher exits will have an impact.
>
>
>
> Second, the application is not using reliability in the subscribers.
>
> Most people assume that DataReaders are reliable by default but they are
> not.
>
>
>
> Third, the application is reading all of the samples.
>
> You might want to think about only read non-read samples or using take.
>
>
>
> Fourth, the IDL for the application is missing so it is impossible to say
> what comprises the instance key.
>
> Are you sure that each publisher is not creating an instance?
>
>
>
> My suggestion is to
>
> 1. fork OpenDDS on github
> 2. add a test under tests/DCPS that reproduces what you are seeing
> 3. create a pull request
>
> Then, we can compile and run exactly what you are running.
>
>
>
> Justin Wilson
>
>
>
>
>
> On Wed, Feb 2, 2022 at 9:41 AM Kip Carr <kc...@av...> wrote:
>
> Hello,
>
>
>
> Im currently having a strange issue when using Sequences to get messages
> in my Readers. I have one publisher application writing out to one topic
> and instance, I have a second application with 2 readers that are polling
> and printing out the topic message sequence. Every time my publisher app
> closes and stops sending the message que increases by one. Then next time
> the publisher connects my readers see 2 messages in the sequence. This
> keeps increasing each time. Here is a timeline of it, hopefully that helps
>
>
>
> Start Subscriber app (2 reads occurring using same datareader) = 0
> messages in
>
> Start Publisher app (publishing one message with same instance id) = 1
> message in for both readers.
>
> Stop Publisher app = 2 messages in buffer, 1st msg is last data in and 2nd
> message is instance dispose
>
> Start Publisher app = 2 messages in buffer, 1st msg is last send, 2nd
> message is most recent (ie my count field would be 31 and then 32)
>
> Stop Publisher app = 3 messages in buffer, 1+2 look like above with 3rd
> being disposed
>
> …
>
> Stop X Publisher = X messages in buffer, all but last look like history is
> X, last being disposed.
>
>
>
> I would expect the code to have 1 message the entire time switching
> between disposed or valid data. Am I doing something wrong or is this a
> bug?
>
>
>
> Below is my code for wrapping DDS. Each application creates one instance
> of this and calls the Publish/Read depending on the application.
>
>
>
> namespace Core
>
> {
>
>
>
> DdsCore::DdsCore():
>
> _participant(0),
>
> _dpf(0),
>
> _typeSupport(0),
>
> _pub(0),
>
> _writer(0),
>
> _sub(0),
>
> _reader(0),
>
> _topic(0)
>
> {
>
> }
>
>
>
> DdsCore::~DdsCore()
>
> {
>
> _participant->delete_contained_entities();
>
> _dpf->delete_participant(_participant.in
> <https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Fparticipant.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=k5YTTxUVzCpu0XTT9WjjP21cR%2F%2BXnkHKLTB5U5To%2BDs%3D&reserved=0>
> ());
>
> TheServiceParticipant->shutdown();
>
> }
>
>
>
> int DdsCore::CreateParticipant()
>
> {
>
> if(!_participant)
>
> {
>
> try
>
> {
>
> // Initialize
> DomainParticipantFactory
>
> char* args[2];
>
> args[0] =
> "-DCPSConfigFile";
>
> args[1] =
> "../configs/rtps.ini";
>
> int sizeArgs = 2;
>
> _dpf =
> TheParticipantFactoryWithArgs(sizeArgs, args);
>
>
>
> // Create DomainParticipant
>
> _participant =
>
>
> _dpf->create_participant(42,
>
>
> PARTICIPANT_QOS_DEFAULT,
>
>
> DDS::DomainParticipantListener::_nil(),
>
>
> OpenDDS::DCPS::DEFAULT_STATUS_MASK);
>
>
>
> if (!_participant)
>
> {
>
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("ERROR: %N:%l: CreateParticipant() -")
>
>
> ACE_TEXT(" create_participant failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
>
>
> //SEtup some trial QoS
> policies
>
> DDS::TopicQos dTopQos;
>
>
> _participant->get_default_topic_qos(dTopQos);
>
> dTopQos.history.kind =
> DDS::KEEP_LAST_HISTORY_QOS;
>
> dTopQos.history.depth = 1L;
>
>
>
>
>
> // Register TypeSupport
> (Messenger::Message)
>
> _typeSupport = new
> TestModule::TestMsgTypeSupportImpl;
>
>
>
> if
> (_typeSupport->register_type(_participant, "") != DDS::RETCODE_OK)
>
> {
>
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("ERROR: %N:%l: CreateParticipant() -")
>
>
> ACE_TEXT(" register_type failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
>
>
> // Create Topic
>
> CORBA::String_var
> type_name = _typeSupport->get_type_name();
>
> _topic =
> _participant->create_topic("TestMsgInst",
>
>
> type_name.in
> <https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Ftype_name.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=liluw6xZ7vXT2rsC2ZvtkItoGjfAwkoDj3aYlmsA218%3D&reserved=0>
> (),
>
>
> dTopQos,
>
>
> DDS::TopicListener::_nil(),
>
>
> OpenDDS::DCPS::DEFAULT_STATUS_MASK);
>
> if (!_topic) {
>
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("%N:%l: CreateParticipant()")
>
>
> ACE_TEXT(" ERROR:
> create_topic failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
> LOGS_D("Created
> Participant successfully.");
>
> }
>
> catch (const CORBA::Exception& e)
>
> {
>
>
> e._tao_print_exception("Exception caught in CreateParticipant():");
>
> return 1;
>
> }
>
> }
>
> return 0;
>
> }
>
>
>
> int DdsCore::CreatePublisher()
>
> {
>
> int status = EXIT_SUCCESS;
>
> if(_participant && !_pub)
>
> {
>
> try
>
> {
>
> // Create Publisher
>
> _pub =
> _participant->create_publisher(PUBLISHER_QOS_DEFAULT,
>
>
> DDS::PublisherListener::_nil(),
>
>
> OpenDDS::DCPS::DEFAULT_STATUS_MASK);
>
> if (!_pub) {
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("%N:%l: main()")
>
>
> ACE_TEXT(" ERROR: create_publisher failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
>
>
> DDS::DataWriterQos qos;
>
>
> _pub->get_default_datawriter_qos(qos);
>
> qos.history.kind =
> DDS::KEEP_LAST_HISTORY_QOS;
>
> qos.history.depth = 1L;
>
>
>
> // Create DataWriter
>
> _writer =
> _pub->create_datawriter(_topic.in
> <https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Ftopic.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=fpnwabvt%2BrExjhAWgOeOm8wti%2FaGUZZTqgw7Wc4wTbE%3D&reserved=0>
> (),
>
>
> qos,
>
>
> DDS::DataWriterListener::_nil(),
>
>
> OpenDDS::DCPS::DEFAULT_STATUS_MASK);
>
> if (!_writer) {
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("%N:%l: main()")
>
>
> ACE_TEXT(" ERROR: create_datawriter failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
> LOGS_D("Created Publisher
> successfully.");
>
> }
>
> catch (const CORBA::Exception& e)
>
> {
>
>
> e._tao_print_exception("Exception caught in CreatePublisher():");
>
> status = EXIT_FAILURE;
>
> }
>
> }
>
> return status;
>
> }
>
>
>
> int DdsCore::CreateSubscriber()
>
> {
>
> int status = EXIT_SUCCESS;
>
> if(_participant && !_sub)
>
> {
>
> try
>
> {
>
> _sub =
> _participant->create_subscriber(SUBSCRIBER_QOS_DEFAULT,
>
>
> DDS::SubscriberListener::_nil(),
>
>
> OpenDDS::DCPS::DEFAULT_STATUS_MASK);
>
> if (!_sub) {
>
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("%N:%l main()")
>
>
> ACE_TEXT(" ERROR: create_subscriber() failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
>
>
> // Create DataReader
>
> //DataReaderListenerImpl*
> const listener_servant = new DataReaderListenerImpl;
>
>
> //DDS::DataReaderListener_var listener(listener_servant);
>
>
>
> DDS::DataReaderQos dr_qos;
>
>
> _sub->get_default_datareader_qos(dr_qos);
>
>
> _sub->get_default_datareader_qos(dr_qos);
>
> dr_qos.history.kind =
> DDS::KEEP_LAST_HISTORY_QOS;
>
> dr_qos.history.depth = 1L;
>
>
>
> _reader =
> _sub->create_datareader(_topic.in
> <https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Ftopic.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=fpnwabvt%2BrExjhAWgOeOm8wti%2FaGUZZTqgw7Wc4wTbE%3D&reserved=0>
> (),
>
>
> dr_qos,
>
>
> DDS::DataReaderListener::_nil(), /*listener.in
> <https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Flistener.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=nQ3dw1W1SqkUJ%2FK%2FZaVXu9ZTbaS4VM2o5Kz7gtvPl4o%3D&reserved=0>
> (),*/
>
>
> OpenDDS::DCPS::DEFAULT_STATUS_MASK);
>
> if (!_reader) {
>
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("%N:%l main()")
>
>
> ACE_TEXT(" ERROR: create_datareader() failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
> }
>
> catch (const CORBA::Exception& e)
>
> {
>
>
> e._tao_print_exception("Exception caught in CreateSubscriber():");
>
> status = EXIT_FAILURE;
>
> }
>
> LOGS_D("Created Subscriber successfully.");
>
> }
>
> return status;
>
> }
>
>
>
> int DdsCore::Publish(const TestModule::TestMsg& msg)
>
> {
>
> TestModule::TestMsgDataWriter_var testMsgWriter =
>
>
> TestModule::TestMsgDataWriter::_narrow(_writer);
>
> DDS::ReturnCode_t error = testMsgWriter->write(msg,
> DDS::HANDLE_NIL);
>
>
>
> if (error != DDS::RETCODE_OK)
>
> {
>
> ACE_ERROR((LM_ERROR,
>
> ACE_TEXT("ERROR: %N:%l:
> Publish() -")
>
> ACE_TEXT(" write
> returned %d!\n"), error));
>
> return EXIT_FAILURE;
>
> }
>
> LOGS_D("Published test message!");
>
> return EXIT_SUCCESS;
>
> }
>
>
>
> int DdsCore::Read(TestModule::TestMsgSeq& seq, DDS::SampleInfoSeq& info)
>
> {
>
> DDS::ReturnCode_t status = EXIT_SUCCESS;
>
> TestModule::TestMsgDataReader_var testMsgReader =
>
>
> TestModule::TestMsgDataReader::_narrow(_reader);
>
> if (!testMsgReader)
>
> {
>
> ACE_ERROR((LM_ERROR,
>
>
> ACE_TEXT("%N:%l: Read()")
>
> ACE_TEXT("
> ERROR: _narrow failed!\n")));
>
> ACE_OS::exit(EXIT_FAILURE);
>
> }
>
>
>
> status = testMsgReader->read(seq, info,
>
> DDS::LENGTH_UNLIMITED,
>
> DDS::ANY_SAMPLE_STATE,
>
> DDS::ANY_VIEW_STATE,
>
> DDS::ANY_INSTANCE_STATE);
>
>
>
> if (status == DDS::RETCODE_NO_DATA)
>
> {
>
> LOGS_D("WARNING: reader received
> DDS::RETCODE_NO_DATA!" << std::endl);
>
> }
>
> else if (status != DDS::RETCODE_OK)
>
> {
>
> ACE_ERROR((LM_ERROR,
>
> ACE_TEXT("ERROR: %N:%l:
> Read() -")
>
> ACE_TEXT(" returned
> %d!\n"), status));
>
> status = EXIT_FAILURE;
>
> }
>
>
>
> LOGS_D("DDS::Read test message!");
>
>
>
> //need to return loan if zero copy
>
> return status;
>
> }
>
>
>
> int DdsCore::ReturnLoan(TestModule::TestMsgSeq& seq, DDS::SampleInfoSeq&
> info)
>
> {
>
> TestModule::TestMsgDataReader_var testMsgReader =
>
>
> TestModule::TestMsgDataReader::_narrow(_reader);
>
> if (!testMsgReader)
>
> {
>
> ACE_ERROR((LM_ERROR,
>
>
> ACE_TEXT("%N:%l: ReturnLoan()")
>
> ACE_TEXT("
> ERROR: _narrow failed!\n")));
>
> ACE_OS::exit(EXIT_FAILURE);
>
> }
>
>
>
> DDS::ReturnCode_t error = testMsgReader->return_loan(seq,
> info);
>
>
>
> if (error != DDS::RETCODE_OK)
>
> {
>
> ACE_ERROR((LM_ERROR,
>
> ACE_TEXT("ERROR: %N:%l:
> ReturnLoan() -")
>
> ACE_TEXT(" returned
> %d!\n"), error));
>
> return EXIT_FAILURE;
>
> }
>
> LOGS_D("DDS::Returned test message!");
>
> return EXIT_SUCCESS;
>
> }
>
>
>
> } //end Core
>
>
>
> Here is my basic publish run each frame:
>
>
>
> static uint cnt = 1u;
>
> TestModule::TestMsg testMsg;
>
> testMsg.count = cnt;
>
> testMsg.from = "AH64 App";
>
> testMsg.subject = "DDS test module";
>
> testMsg.subject_id = 1u;
>
> testMsg.text = "Test messages";
>
> cnt++;
>
>
>
> _ddsCore->Publish(testMsg);
>
>
>
> And here are my reads and prints:
>
>
>
> DDS::ReturnCode_t status = EXIT_SUCCESS;
>
>
>
> status = _ddsCore->Read(_msgSeq, _infoSeq);
>
>
>
> size_t seqLength = _msgSeq.length();
>
> LOGS_D("MainWindow Reading Messages:" << seqLength);
>
>
>
> if (status == DDS::RETCODE_OK)
>
> {
>
> for(auto i = 0; i < seqLength; ++i)
>
> {
>
> if(_infoSeq[i].valid_data)
>
> {
>
>
> LOGS_D( "Message: subject = " << _msgSeq[i].subject.in
> <https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Fsubject.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=8zhax1gEcwNzt9Su7JFeNx2vL0tJ7CFF12xKDEDKuxM%3D&reserved=0>()
> << std::endl
>
>
> << " subject_id = " << _msgSeq[i].subject_id << std::endl
>
>
> << " from = " << _msgSeq[i].from.in
> <https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Ffrom.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Tt%2BcLtKHzvKE2aW3%2FWH1lvPuhIe8c%2FxI61Z2w%2BOTUOE%3D&reserved=0>()
> << std::endl
>
>
> << " count = " << _msgSeq[i].count << std::endl
>
>
> << " text = " << _msgSeq[i].text.in
> <https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Ftext.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=FqcbH2jPiLk1p8D%2Fzl9FYsIe0tHwmrtCC4jom4b0Eqw%3D&reserved=0>()
> << std::endl);
>
> }
>
> else if
> (_infoSeq[i].instance_state == DDS::NOT_ALIVE_DISPOSED_INSTANCE_STATE)
>
> {
>
>
> LOGS_D("instance is disposed" << std::endl);
>
> }
>
> else if
> (_infoSeq[i].instance_state == DDS::NOT_ALIVE_NO_WRITERS_INSTANCE_STATE)
>
> {
>
>
> LOGS_D("instance is unregistered" << std::endl);
>
> }
>
> else
>
> {
>
>
> LOGS_E("ERROR: received unknown instance state "
>
>
> << _infoSeq[i].instance_state << std::endl);
>
> }
>
> }
>
> }
>
> else if (status != DDS::RETCODE_NO_DATA) //no data is
> still ok but nothing else
>
> {
>
> ACE_ERROR((LM_ERROR,
>
> ACE_TEXT("ERROR: %N:%l:
> Process() -")
>
> ACE_TEXT(" Read dds
> %d!\n"), status));
>
> return EXIT_FAILURE;
>
> }
>
>
>
> _ddsCore->ReturnLoan(_msgSeq, _infoSeq);
>
>
>
> Thank you,
>
> Kip
> ------------------------------
>
> The information contained in this e-mail and any attachments from AVT
> Simulation may contain confidential and/or proprietary information, and is
> intended only for the named recipient to whom it was originally addressed.
> If you are not the intended recipient, any disclosure, distribution, or
> copying of this e-mail or its attachments is strictly prohibited. If you
> have received this e-mail in error, please notify the sender immediately by
> return e-mail and permanently delete the e-mail and any attachments.
>
> _______________________________________________
> opendds-devel mailing list
> ope...@li...
> https://lists.sourceforge.net/lists/listinfo/opendds-devel
> <https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopendds-devel&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=IfjLiQ%2BmGNIzK826%2BB9R0EtLUMPWqJWyJv5BoZ5nV6U%3D&reserved=0>
>
>
>
>
> --
>
> Justin Wilson
>
> Principal Software Engineer
>
>
>
> Disruptive solutions for a connected world.™
>
> tel (314) 579-0066
>
> objectcomputing.com
> <https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fobjectcomputing.com%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=r%2Fg2c1xKXUdn%2Biw%2B0KRAdqi2F36RT23grcE9dcoSgRE%3D&reserved=0>
> _______________________________________________
> opendds-devel mailing list
> ope...@li...
> https://lists.sourceforge.net/lists/listinfo/opendds-devel
>
--
Justin Wilson
Principal Software Engineer
objectcomputing.com
YOUR OUTCOMES ENGINEERED™
|
|
From: Kip C. <kc...@av...> - 2022-02-02 22:51:06
|
Justin,
Thanks for the reply. Ill see if I can get a test case going. Do you know of a current test case that has polling I can work with, most seam to use the Listener? In the meantime to answer some of what you wrote:
I can change from RTPS to something else if needed to try. My readers do see the NOT_ALIVE_DISPOSED_INSTANCE_STATE when the publisher app exits. Ill see if I can find where the timeout value is so I can put It in my ini file and see if its due to reader being in timeout waitiung for publisher. My publisher and reader apps all exit on destruction of the DdsCore class which calls:
participant->delete_contained_entities();
_dpf->delete_participant(_participant.in());
TheServiceParticipant->shutdown();
You are correct I am not using reliable atm. Currently Im running all my processes on the same PC and when I am looking at the prints Im not seeing any missed packets going by the count field.
For your third point I originally tried take and Read non-read. My issue with both is I have two different classes that need that same data. If one takes it the other isn't seeing it and if one reads it with only reading non-read the other one wasn't seeing it as well. If there is a proper way to have two classes get the same topic info please let me know. Right now they both share the same Topic DataReader and its all publishing to one instance but I don't do anything filtering by instance.
Here is the IDL I cant believe I forgot it but it is the Message example just renamed so I could tell when I was talking about the class, struct, type, etc.
module TestModule {
@topic
struct TestMsg {
string from;
string subject;
@key long subject_id;
string text;
long count;
};
};
My prints show the subject_id which is the key and it is hardcoded to 1 so I am pretty sure that it is all the same instance. Here is a sample output after my Publisher app is closed. You can see the 3rd message is showing disposed but I have 2 other messages.
22:15:07 D DDS::Read test message!
22:15:07 D Simulator Reading Messages:3 with info len: 3
22:15:07 D Message: subject = DDS test module
subject_id = 1
from = AH App
count = 1089
text = Test messages
22:15:07 D Message: subject = DDS test module
subject_id = 1
from = AH App
count = 1090
text = Test messages
22:15:07 D instance is disposed
22:15:07 D DDS::Returned test message!
22:15:07 D Simulator Returned Loan.
22:15:07 D DDS::Read test message!
22:15:07 D MainWindow Reading Messages:3
22:15:07 D Message: subject = DDS test module
subject_id = 1
from = AH App
count = 1089
text = Test messages
22:15:07 D Message: subject = DDS test module
subject_id = 1
from = AH App
count = 1090
text = Test messages
22:15:07 D instance is disposed
22:15:07 D DDS::Returned test message!
22:15:07 D MainWindow Returned Loan.
Thank you,
Kip Carr
From: Justin Wilson <wi...@ob...>
Sent: Wednesday, February 2, 2022 3:44 PM
To: About developing OpenDDS or applications that use OpenDDS <ope...@li...>
Subject: [External] - Re: [opendds-devel] MessageSequence bug when publisher ends and restarts
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Kip:
I don't think there is enough here to definitively say what's going on.
However, I'll try to give you ideas.
First, the application is using RTPS for discovery which means that the subscribers might not be able to detect that a publisher is gone until that participant expires.
The default expiration is 5 minutes.
How the publisher exits will have an impact.
Second, the application is not using reliability in the subscribers.
Most people assume that DataReaders are reliable by default but they are not.
Third, the application is reading all of the samples.
You might want to think about only read non-read samples or using take.
Fourth, the IDL for the application is missing so it is impossible to say what comprises the instance key.
Are you sure that each publisher is not creating an instance?
My suggestion is to
1. fork OpenDDS on github
2. add a test under tests/DCPS that reproduces what you are seeing
3. create a pull request
Then, we can compile and run exactly what you are running.
Justin Wilson
On Wed, Feb 2, 2022 at 9:41 AM Kip Carr <kc...@av...<mailto:kc...@av...>> wrote:
Hello,
Im currently having a strange issue when using Sequences to get messages in my Readers. I have one publisher application writing out to one topic and instance, I have a second application with 2 readers that are polling and printing out the topic message sequence. Every time my publisher app closes and stops sending the message que increases by one. Then next time the publisher connects my readers see 2 messages in the sequence. This keeps increasing each time. Here is a timeline of it, hopefully that helps
Start Subscriber app (2 reads occurring using same datareader) = 0 messages in
Start Publisher app (publishing one message with same instance id) = 1 message in for both readers.
Stop Publisher app = 2 messages in buffer, 1st msg is last data in and 2nd message is instance dispose
Start Publisher app = 2 messages in buffer, 1st msg is last send, 2nd message is most recent (ie my count field would be 31 and then 32)
Stop Publisher app = 3 messages in buffer, 1+2 look like above with 3rd being disposed
...
Stop X Publisher = X messages in buffer, all but last look like history is X, last being disposed.
I would expect the code to have 1 message the entire time switching between disposed or valid data. Am I doing something wrong or is this a bug?
Below is my code for wrapping DDS. Each application creates one instance of this and calls the Publish/Read depending on the application.
namespace Core
{
DdsCore::DdsCore():
_participant(0),
_dpf(0),
_typeSupport(0),
_pub(0),
_writer(0),
_sub(0),
_reader(0),
_topic(0)
{
}
DdsCore::~DdsCore()
{
_participant->delete_contained_entities();
_dpf->delete_participant(_participant.in<https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Fparticipant.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=k5YTTxUVzCpu0XTT9WjjP21cR%2F%2BXnkHKLTB5U5To%2BDs%3D&reserved=0>());
TheServiceParticipant->shutdown();
}
int DdsCore::CreateParticipant()
{
if(!_participant)
{
try
{
// Initialize DomainParticipantFactory
char* args[2];
args[0] = "-DCPSConfigFile";
args[1] = "../configs/rtps.ini";
int sizeArgs = 2;
_dpf = TheParticipantFactoryWithArgs(sizeArgs, args);
// Create DomainParticipant
_participant =
_dpf->create_participant(42,
PARTICIPANT_QOS_DEFAULT,
DDS::DomainParticipantListener::_nil(),
OpenDDS::DCPS::DEFAULT_STATUS_MASK);
if (!_participant)
{
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("ERROR: %N:%l: CreateParticipant() -")
ACE_TEXT(" create_participant failed!\n")),
EXIT_FAILURE);
}
//SEtup some trial QoS policies
DDS::TopicQos dTopQos;
_participant->get_default_topic_qos(dTopQos);
dTopQos.history.kind = DDS::KEEP_LAST_HISTORY_QOS;
dTopQos.history.depth = 1L;
// Register TypeSupport (Messenger::Message)
_typeSupport = new TestModule::TestMsgTypeSupportImpl;
if (_typeSupport->register_type(_participant, "") != DDS::RETCODE_OK)
{
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("ERROR: %N:%l: CreateParticipant() -")
ACE_TEXT(" register_type failed!\n")),
EXIT_FAILURE);
}
// Create Topic
CORBA::String_var type_name = _typeSupport->get_type_name();
_topic = _participant->create_topic("TestMsgInst",
type_name.in<https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Ftype_name.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=liluw6xZ7vXT2rsC2ZvtkItoGjfAwkoDj3aYlmsA218%3D&reserved=0>(),
dTopQos,
DDS::TopicListener::_nil(),
OpenDDS::DCPS::DEFAULT_STATUS_MASK);
if (!_topic) {
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("%N:%l: CreateParticipant()")
ACE_TEXT(" ERROR: create_topic failed!\n")),
EXIT_FAILURE);
}
LOGS_D("Created Participant successfully.");
}
catch (const CORBA::Exception& e)
{
e._tao_print_exception("Exception caught in CreateParticipant():");
return 1;
}
}
return 0;
}
int DdsCore::CreatePublisher()
{
int status = EXIT_SUCCESS;
if(_participant && !_pub)
{
try
{
// Create Publisher
_pub = _participant->create_publisher(PUBLISHER_QOS_DEFAULT,
DDS::PublisherListener::_nil(),
OpenDDS::DCPS::DEFAULT_STATUS_MASK);
if (!_pub) {
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("%N:%l: main()")
ACE_TEXT(" ERROR: create_publisher failed!\n")),
EXIT_FAILURE);
}
DDS::DataWriterQos qos;
_pub->get_default_datawriter_qos(qos);
qos.history.kind = DDS::KEEP_LAST_HISTORY_QOS;
qos.history.depth = 1L;
// Create DataWriter
_writer = _pub->create_datawriter(_topic.in<https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Ftopic.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=fpnwabvt%2BrExjhAWgOeOm8wti%2FaGUZZTqgw7Wc4wTbE%3D&reserved=0>(),
qos,
DDS::DataWriterListener::_nil(),
OpenDDS::DCPS::DEFAULT_STATUS_MASK);
if (!_writer) {
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("%N:%l: main()")
ACE_TEXT(" ERROR: create_datawriter failed!\n")),
EXIT_FAILURE);
}
LOGS_D("Created Publisher successfully.");
}
catch (const CORBA::Exception& e)
{
e._tao_print_exception("Exception caught in CreatePublisher():");
status = EXIT_FAILURE;
}
}
return status;
}
int DdsCore::CreateSubscriber()
{
int status = EXIT_SUCCESS;
if(_participant && !_sub)
{
try
{
_sub = _participant->create_subscriber(SUBSCRIBER_QOS_DEFAULT,
DDS::SubscriberListener::_nil(),
OpenDDS::DCPS::DEFAULT_STATUS_MASK);
if (!_sub) {
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("%N:%l main()")
ACE_TEXT(" ERROR: create_subscriber() failed!\n")),
EXIT_FAILURE);
}
// Create DataReader
//DataReaderListenerImpl* const listener_servant = new DataReaderListenerImpl;
//DDS::DataReaderListener_var listener(listener_servant);
DDS::DataReaderQos dr_qos;
_sub->get_default_datareader_qos(dr_qos);
_sub->get_default_datareader_qos(dr_qos);
dr_qos.history.kind = DDS::KEEP_LAST_HISTORY_QOS;
dr_qos.history.depth = 1L;
_reader = _sub->create_datareader(_topic.in<https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Ftopic.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=fpnwabvt%2BrExjhAWgOeOm8wti%2FaGUZZTqgw7Wc4wTbE%3D&reserved=0>(),
dr_qos,
DDS::DataReaderListener::_nil(), /*listener.in<https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Flistener.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=nQ3dw1W1SqkUJ%2FK%2FZaVXu9ZTbaS4VM2o5Kz7gtvPl4o%3D&reserved=0>(),*/
OpenDDS::DCPS::DEFAULT_STATUS_MASK);
if (!_reader) {
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("%N:%l main()")
ACE_TEXT(" ERROR: create_datareader() failed!\n")),
EXIT_FAILURE);
}
}
catch (const CORBA::Exception& e)
{
e._tao_print_exception("Exception caught in CreateSubscriber():");
status = EXIT_FAILURE;
}
LOGS_D("Created Subscriber successfully.");
}
return status;
}
int DdsCore::Publish(const TestModule::TestMsg& msg)
{
TestModule::TestMsgDataWriter_var testMsgWriter =
TestModule::TestMsgDataWriter::_narrow(_writer);
DDS::ReturnCode_t error = testMsgWriter->write(msg, DDS::HANDLE_NIL);
if (error != DDS::RETCODE_OK)
{
ACE_ERROR((LM_ERROR,
ACE_TEXT("ERROR: %N:%l: Publish() -")
ACE_TEXT(" write returned %d!\n"), error));
return EXIT_FAILURE;
}
LOGS_D("Published test message!");
return EXIT_SUCCESS;
}
int DdsCore::Read(TestModule::TestMsgSeq& seq, DDS::SampleInfoSeq& info)
{
DDS::ReturnCode_t status = EXIT_SUCCESS;
TestModule::TestMsgDataReader_var testMsgReader =
TestModule::TestMsgDataReader::_narrow(_reader);
if (!testMsgReader)
{
ACE_ERROR((LM_ERROR,
ACE_TEXT("%N:%l: Read()")
ACE_TEXT(" ERROR: _narrow failed!\n")));
ACE_OS::exit(EXIT_FAILURE);
}
status = testMsgReader->read(seq, info,
DDS::LENGTH_UNLIMITED,
DDS::ANY_SAMPLE_STATE,
DDS::ANY_VIEW_STATE,
DDS::ANY_INSTANCE_STATE);
if (status == DDS::RETCODE_NO_DATA)
{
LOGS_D("WARNING: reader received DDS::RETCODE_NO_DATA!" << std::endl);
}
else if (status != DDS::RETCODE_OK)
{
ACE_ERROR((LM_ERROR,
ACE_TEXT("ERROR: %N:%l: Read() -")
ACE_TEXT(" returned %d!\n"), status));
status = EXIT_FAILURE;
}
LOGS_D("DDS::Read test message!");
//need to return loan if zero copy
return status;
}
int DdsCore::ReturnLoan(TestModule::TestMsgSeq& seq, DDS::SampleInfoSeq& info)
{
TestModule::TestMsgDataReader_var testMsgReader =
TestModule::TestMsgDataReader::_narrow(_reader);
if (!testMsgReader)
{
ACE_ERROR((LM_ERROR,
ACE_TEXT("%N:%l: ReturnLoan()")
ACE_TEXT(" ERROR: _narrow failed!\n")));
ACE_OS::exit(EXIT_FAILURE);
}
DDS::ReturnCode_t error = testMsgReader->return_loan(seq, info);
if (error != DDS::RETCODE_OK)
{
ACE_ERROR((LM_ERROR,
ACE_TEXT("ERROR: %N:%l: ReturnLoan() -")
ACE_TEXT(" returned %d!\n"), error));
return EXIT_FAILURE;
}
LOGS_D("DDS::Returned test message!");
return EXIT_SUCCESS;
}
} //end Core
Here is my basic publish run each frame:
static uint cnt = 1u;
TestModule::TestMsg testMsg;
testMsg.count = cnt;
testMsg.from = "AH64 App";
testMsg.subject = "DDS test module";
testMsg.subject_id = 1u;
testMsg.text = "Test messages";
cnt++;
_ddsCore->Publish(testMsg);
And here are my reads and prints:
DDS::ReturnCode_t status = EXIT_SUCCESS;
status = _ddsCore->Read(_msgSeq, _infoSeq);
size_t seqLength = _msgSeq.length();
LOGS_D("MainWindow Reading Messages:" << seqLength);
if (status == DDS::RETCODE_OK)
{
for(auto i = 0; i < seqLength; ++i)
{
if(_infoSeq[i].valid_data)
{
LOGS_D( "Message: subject = " << _msgSeq[i].subject.in<https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Fsubject.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=8zhax1gEcwNzt9Su7JFeNx2vL0tJ7CFF12xKDEDKuxM%3D&reserved=0>() << std::endl
<< " subject_id = " << _msgSeq[i].subject_id << std::endl
<< " from = " << _msgSeq[i].from.in<https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Ffrom.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Tt%2BcLtKHzvKE2aW3%2FWH1lvPuhIe8c%2FxI61Z2w%2BOTUOE%3D&reserved=0>() << std::endl
<< " count = " << _msgSeq[i].count << std::endl
<< " text = " << _msgSeq[i].text.in<https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Ftext.in%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=FqcbH2jPiLk1p8D%2Fzl9FYsIe0tHwmrtCC4jom4b0Eqw%3D&reserved=0>() << std::endl);
}
else if (_infoSeq[i].instance_state == DDS::NOT_ALIVE_DISPOSED_INSTANCE_STATE)
{
LOGS_D("instance is disposed" << std::endl);
}
else if (_infoSeq[i].instance_state == DDS::NOT_ALIVE_NO_WRITERS_INSTANCE_STATE)
{
LOGS_D("instance is unregistered" << std::endl);
}
else
{
LOGS_E("ERROR: received unknown instance state "
<< _infoSeq[i].instance_state << std::endl);
}
}
}
else if (status != DDS::RETCODE_NO_DATA) //no data is still ok but nothing else
{
ACE_ERROR((LM_ERROR,
ACE_TEXT("ERROR: %N:%l: Process() -")
ACE_TEXT(" Read dds %d!\n"), status));
return EXIT_FAILURE;
}
_ddsCore->ReturnLoan(_msgSeq, _infoSeq);
Thank you,
Kip
________________________________
The information contained in this e-mail and any attachments from AVT Simulation may contain confidential and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments.
_______________________________________________
opendds-devel mailing list
ope...@li...<mailto:ope...@li...>
https://lists.sourceforge.net/lists/listinfo/opendds-devel<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopendds-devel&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=IfjLiQ%2BmGNIzK826%2BB9R0EtLUMPWqJWyJv5BoZ5nV6U%3D&reserved=0>
--
Justin Wilson
Principal Software Engineer
Disruptive solutions for a connected world.(tm)
tel (314) 579-0066
objectcomputing.com<https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fobjectcomputing.com%2F&data=04%7C01%7C%7C5f3563f3236e40627dbd08d9e69adc26%7C5fb1aad8e0fd4d458b5f6f078fa49255%7C0%7C0%7C637794375095541289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=r%2Fg2c1xKXUdn%2Biw%2B0KRAdqi2F36RT23grcE9dcoSgRE%3D&reserved=0>
|
|
From: Justin W. <wi...@ob...> - 2022-02-02 22:24:52
|
Kip:
I don't think there is enough here to definitively say what's going on.
However, I'll try to give you ideas.
First, the application is using RTPS for discovery which means that the
subscribers might not be able to detect that a publisher is gone until that
participant expires.
The default expiration is 5 minutes.
How the publisher exits will have an impact.
Second, the application is not using reliability in the subscribers.
Most people assume that DataReaders are reliable by default but they are
not.
Third, the application is reading all of the samples.
You might want to think about only read non-read samples or using take.
Fourth, the IDL for the application is missing so it is impossible to say
what comprises the instance key.
Are you sure that each publisher is not creating an instance?
My suggestion is to
1. fork OpenDDS on github
2. add a test under tests/DCPS that reproduces what you are seeing
3. create a pull request
Then, we can compile and run exactly what you are running.
Justin Wilson
On Wed, Feb 2, 2022 at 9:41 AM Kip Carr <kc...@av...> wrote:
> Hello,
>
>
>
> Im currently having a strange issue when using Sequences to get messages
> in my Readers. I have one publisher application writing out to one topic
> and instance, I have a second application with 2 readers that are polling
> and printing out the topic message sequence. Every time my publisher app
> closes and stops sending the message que increases by one. Then next time
> the publisher connects my readers see 2 messages in the sequence. This
> keeps increasing each time. Here is a timeline of it, hopefully that helps
>
>
>
> Start Subscriber app (2 reads occurring using same datareader) = 0
> messages in
>
> Start Publisher app (publishing one message with same instance id) = 1
> message in for both readers.
>
> Stop Publisher app = 2 messages in buffer, 1st msg is last data in and 2nd
> message is instance dispose
>
> Start Publisher app = 2 messages in buffer, 1st msg is last send, 2nd
> message is most recent (ie my count field would be 31 and then 32)
>
> Stop Publisher app = 3 messages in buffer, 1+2 look like above with 3rd
> being disposed
>
> …
>
> Stop X Publisher = X messages in buffer, all but last look like history is
> X, last being disposed.
>
>
>
> I would expect the code to have 1 message the entire time switching
> between disposed or valid data. Am I doing something wrong or is this a
> bug?
>
>
>
> Below is my code for wrapping DDS. Each application creates one instance
> of this and calls the Publish/Read depending on the application.
>
>
>
> namespace Core
>
> {
>
>
>
> DdsCore::DdsCore():
>
> _participant(0),
>
> _dpf(0),
>
> _typeSupport(0),
>
> _pub(0),
>
> _writer(0),
>
> _sub(0),
>
> _reader(0),
>
> _topic(0)
>
> {
>
> }
>
>
>
> DdsCore::~DdsCore()
>
> {
>
> _participant->delete_contained_entities();
>
> _dpf->delete_participant(_participant.in());
>
> TheServiceParticipant->shutdown();
>
> }
>
>
>
> int DdsCore::CreateParticipant()
>
> {
>
> if(!_participant)
>
> {
>
> try
>
> {
>
> // Initialize
> DomainParticipantFactory
>
> char* args[2];
>
> args[0] =
> "-DCPSConfigFile";
>
> args[1] =
> "../configs/rtps.ini";
>
> int sizeArgs = 2;
>
> _dpf =
> TheParticipantFactoryWithArgs(sizeArgs, args);
>
>
>
> // Create DomainParticipant
>
> _participant =
>
>
> _dpf->create_participant(42,
>
>
> PARTICIPANT_QOS_DEFAULT,
>
>
> DDS::DomainParticipantListener::_nil(),
>
>
> OpenDDS::DCPS::DEFAULT_STATUS_MASK);
>
>
>
> if (!_participant)
>
> {
>
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("ERROR: %N:%l: CreateParticipant() -")
>
>
> ACE_TEXT(" create_participant failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
>
>
> //SEtup some trial QoS
> policies
>
> DDS::TopicQos dTopQos;
>
>
> _participant->get_default_topic_qos(dTopQos);
>
> dTopQos.history.kind =
> DDS::KEEP_LAST_HISTORY_QOS;
>
> dTopQos.history.depth = 1L;
>
>
>
>
>
> // Register TypeSupport
> (Messenger::Message)
>
> _typeSupport = new
> TestModule::TestMsgTypeSupportImpl;
>
>
>
> if
> (_typeSupport->register_type(_participant, "") != DDS::RETCODE_OK)
>
> {
>
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("ERROR: %N:%l: CreateParticipant() -")
>
>
> ACE_TEXT(" register_type failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
>
>
> // Create Topic
>
> CORBA::String_var
> type_name = _typeSupport->get_type_name();
>
> _topic =
> _participant->create_topic("TestMsgInst",
>
>
> type_name.in(),
>
>
> dTopQos,
>
>
> DDS::TopicListener::_nil(),
>
>
> OpenDDS::DCPS::DEFAULT_STATUS_MASK);
>
> if (!_topic) {
>
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("%N:%l: CreateParticipant()")
>
>
> ACE_TEXT(" ERROR:
> create_topic failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
> LOGS_D("Created
> Participant successfully.");
>
> }
>
> catch (const CORBA::Exception& e)
>
> {
>
>
> e._tao_print_exception("Exception caught in CreateParticipant():");
>
> return 1;
>
> }
>
> }
>
> return 0;
>
> }
>
>
>
> int DdsCore::CreatePublisher()
>
> {
>
> int status = EXIT_SUCCESS;
>
> if(_participant && !_pub)
>
> {
>
> try
>
> {
>
> // Create Publisher
>
> _pub =
> _participant->create_publisher(PUBLISHER_QOS_DEFAULT,
>
>
> DDS::PublisherListener::_nil(),
>
>
> OpenDDS::DCPS::DEFAULT_STATUS_MASK);
>
> if (!_pub) {
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("%N:%l: main()")
>
>
> ACE_TEXT(" ERROR: create_publisher failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
>
>
> DDS::DataWriterQos qos;
>
>
> _pub->get_default_datawriter_qos(qos);
>
> qos.history.kind =
> DDS::KEEP_LAST_HISTORY_QOS;
>
> qos.history.depth = 1L;
>
>
>
> // Create DataWriter
>
> _writer =
> _pub->create_datawriter(_topic.in(),
>
>
> qos,
>
>
> DDS::DataWriterListener::_nil(),
>
>
> OpenDDS::DCPS::DEFAULT_STATUS_MASK);
>
> if (!_writer) {
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("%N:%l: main()")
>
>
> ACE_TEXT(" ERROR: create_datawriter failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
> LOGS_D("Created Publisher
> successfully.");
>
> }
>
> catch (const CORBA::Exception& e)
>
> {
>
>
> e._tao_print_exception("Exception caught in CreatePublisher():");
>
> status = EXIT_FAILURE;
>
> }
>
> }
>
> return status;
>
> }
>
>
>
> int DdsCore::CreateSubscriber()
>
> {
>
> int status = EXIT_SUCCESS;
>
> if(_participant && !_sub)
>
> {
>
> try
>
> {
>
> _sub =
> _participant->create_subscriber(SUBSCRIBER_QOS_DEFAULT,
>
>
> DDS::SubscriberListener::_nil(),
>
>
> OpenDDS::DCPS::DEFAULT_STATUS_MASK);
>
> if (!_sub) {
>
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("%N:%l main()")
>
>
> ACE_TEXT(" ERROR: create_subscriber() failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
>
>
> // Create DataReader
>
> //DataReaderListenerImpl*
> const listener_servant = new DataReaderListenerImpl;
>
>
> //DDS::DataReaderListener_var listener(listener_servant);
>
>
>
> DDS::DataReaderQos dr_qos;
>
>
> _sub->get_default_datareader_qos(dr_qos);
>
>
> _sub->get_default_datareader_qos(dr_qos);
>
> dr_qos.history.kind =
> DDS::KEEP_LAST_HISTORY_QOS;
>
> dr_qos.history.depth = 1L;
>
>
>
> _reader =
> _sub->create_datareader(_topic.in(),
>
>
> dr_qos,
>
>
> DDS::DataReaderListener::_nil(), /*listener.in(),*/
>
>
> OpenDDS::DCPS::DEFAULT_STATUS_MASK);
>
> if (!_reader) {
>
>
> ACE_ERROR_RETURN((LM_ERROR,
>
>
> ACE_TEXT("%N:%l main()")
>
>
> ACE_TEXT(" ERROR: create_datareader() failed!\n")),
>
>
> EXIT_FAILURE);
>
> }
>
> }
>
> catch (const CORBA::Exception& e)
>
> {
>
>
> e._tao_print_exception("Exception caught in CreateSubscriber():");
>
> status = EXIT_FAILURE;
>
> }
>
> LOGS_D("Created Subscriber successfully.");
>
> }
>
> return status;
>
> }
>
>
>
> int DdsCore::Publish(const TestModule::TestMsg& msg)
>
> {
>
> TestModule::TestMsgDataWriter_var testMsgWriter =
>
>
> TestModule::TestMsgDataWriter::_narrow(_writer);
>
> DDS::ReturnCode_t error = testMsgWriter->write(msg,
> DDS::HANDLE_NIL);
>
>
>
> if (error != DDS::RETCODE_OK)
>
> {
>
> ACE_ERROR((LM_ERROR,
>
> ACE_TEXT("ERROR: %N:%l:
> Publish() -")
>
> ACE_TEXT(" write
> returned %d!\n"), error));
>
> return EXIT_FAILURE;
>
> }
>
> LOGS_D("Published test message!");
>
> return EXIT_SUCCESS;
>
> }
>
>
>
> int DdsCore::Read(TestModule::TestMsgSeq& seq, DDS::SampleInfoSeq& info)
>
> {
>
> DDS::ReturnCode_t status = EXIT_SUCCESS;
>
> TestModule::TestMsgDataReader_var testMsgReader =
>
>
> TestModule::TestMsgDataReader::_narrow(_reader);
>
> if (!testMsgReader)
>
> {
>
> ACE_ERROR((LM_ERROR,
>
>
> ACE_TEXT("%N:%l: Read()")
>
> ACE_TEXT("
> ERROR: _narrow failed!\n")));
>
> ACE_OS::exit(EXIT_FAILURE);
>
> }
>
>
>
> status = testMsgReader->read(seq, info,
>
> DDS::LENGTH_UNLIMITED,
>
> DDS::ANY_SAMPLE_STATE,
>
> DDS::ANY_VIEW_STATE,
>
> DDS::ANY_INSTANCE_STATE);
>
>
>
> if (status == DDS::RETCODE_NO_DATA)
>
> {
>
> LOGS_D("WARNING: reader received
> DDS::RETCODE_NO_DATA!" << std::endl);
>
> }
>
> else if (status != DDS::RETCODE_OK)
>
> {
>
> ACE_ERROR((LM_ERROR,
>
> ACE_TEXT("ERROR: %N:%l:
> Read() -")
>
> ACE_TEXT(" returned
> %d!\n"), status));
>
> status = EXIT_FAILURE;
>
> }
>
>
>
> LOGS_D("DDS::Read test message!");
>
>
>
> //need to return loan if zero copy
>
> return status;
>
> }
>
>
>
> int DdsCore::ReturnLoan(TestModule::TestMsgSeq& seq, DDS::SampleInfoSeq&
> info)
>
> {
>
> TestModule::TestMsgDataReader_var testMsgReader =
>
>
> TestModule::TestMsgDataReader::_narrow(_reader);
>
> if (!testMsgReader)
>
> {
>
> ACE_ERROR((LM_ERROR,
>
>
> ACE_TEXT("%N:%l: ReturnLoan()")
>
> ACE_TEXT("
> ERROR: _narrow failed!\n")));
>
> ACE_OS::exit(EXIT_FAILURE);
>
> }
>
>
>
> DDS::ReturnCode_t error = testMsgReader->return_loan(seq,
> info);
>
>
>
> if (error != DDS::RETCODE_OK)
>
> {
>
> ACE_ERROR((LM_ERROR,
>
> ACE_TEXT("ERROR: %N:%l:
> ReturnLoan() -")
>
> ACE_TEXT(" returned
> %d!\n"), error));
>
> return EXIT_FAILURE;
>
> }
>
> LOGS_D("DDS::Returned test message!");
>
> return EXIT_SUCCESS;
>
> }
>
>
>
> } //end Core
>
>
>
> Here is my basic publish run each frame:
>
>
>
> static uint cnt = 1u;
>
> TestModule::TestMsg testMsg;
>
> testMsg.count = cnt;
>
> testMsg.from = "AH64 App";
>
> testMsg.subject = "DDS test module";
>
> testMsg.subject_id = 1u;
>
> testMsg.text = "Test messages";
>
> cnt++;
>
>
>
> _ddsCore->Publish(testMsg);
>
>
>
> And here are my reads and prints:
>
>
>
> DDS::ReturnCode_t status = EXIT_SUCCESS;
>
>
>
> status = _ddsCore->Read(_msgSeq, _infoSeq);
>
>
>
> size_t seqLength = _msgSeq.length();
>
> LOGS_D("MainWindow Reading Messages:" << seqLength);
>
>
>
> if (status == DDS::RETCODE_OK)
>
> {
>
> for(auto i = 0; i < seqLength; ++i)
>
> {
>
> if(_infoSeq[i].valid_data)
>
> {
>
>
> LOGS_D( "Message: subject = " << _msgSeq[i].subject.in() <<
> std::endl
>
>
> << " subject_id = " << _msgSeq[i].subject_id << std::endl
>
>
> << " from = " << _msgSeq[i].from.in() << std::endl
>
>
> << " count = " << _msgSeq[i].count << std::endl
>
>
> << " text = " << _msgSeq[i].text.in() << std::endl);
>
> }
>
> else if
> (_infoSeq[i].instance_state == DDS::NOT_ALIVE_DISPOSED_INSTANCE_STATE)
>
> {
>
>
> LOGS_D("instance is disposed" << std::endl);
>
> }
>
> else if
> (_infoSeq[i].instance_state == DDS::NOT_ALIVE_NO_WRITERS_INSTANCE_STATE)
>
> {
>
>
> LOGS_D("instance is unregistered" << std::endl);
>
> }
>
> else
>
> {
>
>
> LOGS_E("ERROR: received unknown instance state "
>
>
> << _infoSeq[i].instance_state << std::endl);
>
> }
>
> }
>
> }
>
> else if (status != DDS::RETCODE_NO_DATA) //no data is
> still ok but nothing else
>
> {
>
> ACE_ERROR((LM_ERROR,
>
> ACE_TEXT("ERROR: %N:%l:
> Process() -")
>
> ACE_TEXT(" Read dds
> %d!\n"), status));
>
> return EXIT_FAILURE;
>
> }
>
>
>
> _ddsCore->ReturnLoan(_msgSeq, _infoSeq);
>
>
>
> Thank you,
>
> Kip
> ------------------------------
> The information contained in this e-mail and any attachments from AVT
> Simulation may contain confidential and/or proprietary information, and is
> intended only for the named recipient to whom it was originally addressed.
> If you are not the intended recipient, any disclosure, distribution, or
> copying of this e-mail or its attachments is strictly prohibited. If you
> have received this e-mail in error, please notify the sender immediately by
> return e-mail and permanently delete the e-mail and any attachments.
> _______________________________________________
> opendds-devel mailing list
> ope...@li...
> https://lists.sourceforge.net/lists/listinfo/opendds-devel
>
--
Justin Wilson
Principal Software Engineer
Disruptive solutions for a connected world.™
tel (314) 579-0066
objectcomputing.com
|
|
From: Kip C. <kc...@av...> - 2022-02-02 15:41:00
|
Hello,
Im currently having a strange issue when using Sequences to get messages in my Readers. I have one publisher application writing out to one topic and instance, I have a second application with 2 readers that are polling and printing out the topic message sequence. Every time my publisher app closes and stops sending the message que increases by one. Then next time the publisher connects my readers see 2 messages in the sequence. This keeps increasing each time. Here is a timeline of it, hopefully that helps
Start Subscriber app (2 reads occurring using same datareader) = 0 messages in
Start Publisher app (publishing one message with same instance id) = 1 message in for both readers.
Stop Publisher app = 2 messages in buffer, 1st msg is last data in and 2nd message is instance dispose
Start Publisher app = 2 messages in buffer, 1st msg is last send, 2nd message is most recent (ie my count field would be 31 and then 32)
Stop Publisher app = 3 messages in buffer, 1+2 look like above with 3rd being disposed
...
Stop X Publisher = X messages in buffer, all but last look like history is X, last being disposed.
I would expect the code to have 1 message the entire time switching between disposed or valid data. Am I doing something wrong or is this a bug?
Below is my code for wrapping DDS. Each application creates one instance of this and calls the Publish/Read depending on the application.
namespace Core
{
DdsCore::DdsCore():
_participant(0),
_dpf(0),
_typeSupport(0),
_pub(0),
_writer(0),
_sub(0),
_reader(0),
_topic(0)
{
}
DdsCore::~DdsCore()
{
_participant->delete_contained_entities();
_dpf->delete_participant(_participant.in());
TheServiceParticipant->shutdown();
}
int DdsCore::CreateParticipant()
{
if(!_participant)
{
try
{
// Initialize DomainParticipantFactory
char* args[2];
args[0] = "-DCPSConfigFile";
args[1] = "../configs/rtps.ini";
int sizeArgs = 2;
_dpf = TheParticipantFactoryWithArgs(sizeArgs, args);
// Create DomainParticipant
_participant =
_dpf->create_participant(42,
PARTICIPANT_QOS_DEFAULT,
DDS::DomainParticipantListener::_nil(),
OpenDDS::DCPS::DEFAULT_STATUS_MASK);
if (!_participant)
{
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("ERROR: %N:%l: CreateParticipant() -")
ACE_TEXT(" create_participant failed!\n")),
EXIT_FAILURE);
}
//SEtup some trial QoS policies
DDS::TopicQos dTopQos;
_participant->get_default_topic_qos(dTopQos);
dTopQos.history.kind = DDS::KEEP_LAST_HISTORY_QOS;
dTopQos.history.depth = 1L;
// Register TypeSupport (Messenger::Message)
_typeSupport = new TestModule::TestMsgTypeSupportImpl;
if (_typeSupport->register_type(_participant, "") != DDS::RETCODE_OK)
{
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("ERROR: %N:%l: CreateParticipant() -")
ACE_TEXT(" register_type failed!\n")),
EXIT_FAILURE);
}
// Create Topic
CORBA::String_var type_name = _typeSupport->get_type_name();
_topic = _participant->create_topic("TestMsgInst",
type_name.in(),
dTopQos,
DDS::TopicListener::_nil(),
OpenDDS::DCPS::DEFAULT_STATUS_MASK);
if (!_topic) {
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("%N:%l: CreateParticipant()")
ACE_TEXT(" ERROR: create_topic failed!\n")),
EXIT_FAILURE);
}
LOGS_D("Created Participant successfully.");
}
catch (const CORBA::Exception& e)
{
e._tao_print_exception("Exception caught in CreateParticipant():");
return 1;
}
}
return 0;
}
int DdsCore::CreatePublisher()
{
int status = EXIT_SUCCESS;
if(_participant && !_pub)
{
try
{
// Create Publisher
_pub = _participant->create_publisher(PUBLISHER_QOS_DEFAULT,
DDS::PublisherListener::_nil(),
OpenDDS::DCPS::DEFAULT_STATUS_MASK);
if (!_pub) {
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("%N:%l: main()")
ACE_TEXT(" ERROR: create_publisher failed!\n")),
EXIT_FAILURE);
}
DDS::DataWriterQos qos;
_pub->get_default_datawriter_qos(qos);
qos.history.kind = DDS::KEEP_LAST_HISTORY_QOS;
qos.history.depth = 1L;
// Create DataWriter
_writer = _pub->create_datawriter(_topic.in(),
qos,
DDS::DataWriterListener::_nil(),
OpenDDS::DCPS::DEFAULT_STATUS_MASK);
if (!_writer) {
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("%N:%l: main()")
ACE_TEXT(" ERROR: create_datawriter failed!\n")),
EXIT_FAILURE);
}
LOGS_D("Created Publisher successfully.");
}
catch (const CORBA::Exception& e)
{
e._tao_print_exception("Exception caught in CreatePublisher():");
status = EXIT_FAILURE;
}
}
return status;
}
int DdsCore::CreateSubscriber()
{
int status = EXIT_SUCCESS;
if(_participant && !_sub)
{
try
{
_sub = _participant->create_subscriber(SUBSCRIBER_QOS_DEFAULT,
DDS::SubscriberListener::_nil(),
OpenDDS::DCPS::DEFAULT_STATUS_MASK);
if (!_sub) {
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("%N:%l main()")
ACE_TEXT(" ERROR: create_subscriber() failed!\n")),
EXIT_FAILURE);
}
// Create DataReader
//DataReaderListenerImpl* const listener_servant = new DataReaderListenerImpl;
//DDS::DataReaderListener_var listener(listener_servant);
DDS::DataReaderQos dr_qos;
_sub->get_default_datareader_qos(dr_qos);
_sub->get_default_datareader_qos(dr_qos);
dr_qos.history.kind = DDS::KEEP_LAST_HISTORY_QOS;
dr_qos.history.depth = 1L;
_reader = _sub->create_datareader(_topic.in(),
dr_qos,
DDS::DataReaderListener::_nil(), /*listener.in(),*/
OpenDDS::DCPS::DEFAULT_STATUS_MASK);
if (!_reader) {
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT("%N:%l main()")
ACE_TEXT(" ERROR: create_datareader() failed!\n")),
EXIT_FAILURE);
}
}
catch (const CORBA::Exception& e)
{
e._tao_print_exception("Exception caught in CreateSubscriber():");
status = EXIT_FAILURE;
}
LOGS_D("Created Subscriber successfully.");
}
return status;
}
int DdsCore::Publish(const TestModule::TestMsg& msg)
{
TestModule::TestMsgDataWriter_var testMsgWriter =
TestModule::TestMsgDataWriter::_narrow(_writer);
DDS::ReturnCode_t error = testMsgWriter->write(msg, DDS::HANDLE_NIL);
if (error != DDS::RETCODE_OK)
{
ACE_ERROR((LM_ERROR,
ACE_TEXT("ERROR: %N:%l: Publish() -")
ACE_TEXT(" write returned %d!\n"), error));
return EXIT_FAILURE;
}
LOGS_D("Published test message!");
return EXIT_SUCCESS;
}
int DdsCore::Read(TestModule::TestMsgSeq& seq, DDS::SampleInfoSeq& info)
{
DDS::ReturnCode_t status = EXIT_SUCCESS;
TestModule::TestMsgDataReader_var testMsgReader =
TestModule::TestMsgDataReader::_narrow(_reader);
if (!testMsgReader)
{
ACE_ERROR((LM_ERROR,
ACE_TEXT("%N:%l: Read()")
ACE_TEXT(" ERROR: _narrow failed!\n")));
ACE_OS::exit(EXIT_FAILURE);
}
status = testMsgReader->read(seq, info,
DDS::LENGTH_UNLIMITED,
DDS::ANY_SAMPLE_STATE,
DDS::ANY_VIEW_STATE,
DDS::ANY_INSTANCE_STATE);
if (status == DDS::RETCODE_NO_DATA)
{
LOGS_D("WARNING: reader received DDS::RETCODE_NO_DATA!" << std::endl);
}
else if (status != DDS::RETCODE_OK)
{
ACE_ERROR((LM_ERROR,
ACE_TEXT("ERROR: %N:%l: Read() -")
ACE_TEXT(" returned %d!\n"), status));
status = EXIT_FAILURE;
}
LOGS_D("DDS::Read test message!");
//need to return loan if zero copy
return status;
}
int DdsCore::ReturnLoan(TestModule::TestMsgSeq& seq, DDS::SampleInfoSeq& info)
{
TestModule::TestMsgDataReader_var testMsgReader =
TestModule::TestMsgDataReader::_narrow(_reader);
if (!testMsgReader)
{
ACE_ERROR((LM_ERROR,
ACE_TEXT("%N:%l: ReturnLoan()")
ACE_TEXT(" ERROR: _narrow failed!\n")));
ACE_OS::exit(EXIT_FAILURE);
}
DDS::ReturnCode_t error = testMsgReader->return_loan(seq, info);
if (error != DDS::RETCODE_OK)
{
ACE_ERROR((LM_ERROR,
ACE_TEXT("ERROR: %N:%l: ReturnLoan() -")
ACE_TEXT(" returned %d!\n"), error));
return EXIT_FAILURE;
}
LOGS_D("DDS::Returned test message!");
return EXIT_SUCCESS;
}
} //end Core
Here is my basic publish run each frame:
static uint cnt = 1u;
TestModule::TestMsg testMsg;
testMsg.count = cnt;
testMsg.from = "AH64 App";
testMsg.subject = "DDS test module";
testMsg.subject_id = 1u;
testMsg.text = "Test messages";
cnt++;
_ddsCore->Publish(testMsg);
And here are my reads and prints:
DDS::ReturnCode_t status = EXIT_SUCCESS;
status = _ddsCore->Read(_msgSeq, _infoSeq);
size_t seqLength = _msgSeq.length();
LOGS_D("MainWindow Reading Messages:" << seqLength);
if (status == DDS::RETCODE_OK)
{
for(auto i = 0; i < seqLength; ++i)
{
if(_infoSeq[i].valid_data)
{
LOGS_D( "Message: subject = " << _msgSeq[i].subject.in() << std::endl
<< " subject_id = " << _msgSeq[i].subject_id << std::endl
<< " from = " << _msgSeq[i].from.in() << std::endl
<< " count = " << _msgSeq[i].count << std::endl
<< " text = " << _msgSeq[i].text.in() << std::endl);
}
else if (_infoSeq[i].instance_state == DDS::NOT_ALIVE_DISPOSED_INSTANCE_STATE)
{
LOGS_D("instance is disposed" << std::endl);
}
else if (_infoSeq[i].instance_state == DDS::NOT_ALIVE_NO_WRITERS_INSTANCE_STATE)
{
LOGS_D("instance is unregistered" << std::endl);
}
else
{
LOGS_E("ERROR: received unknown instance state "
<< _infoSeq[i].instance_state << std::endl);
}
}
}
else if (status != DDS::RETCODE_NO_DATA) //no data is still ok but nothing else
{
ACE_ERROR((LM_ERROR,
ACE_TEXT("ERROR: %N:%l: Process() -")
ACE_TEXT(" Read dds %d!\n"), status));
return EXIT_FAILURE;
}
_ddsCore->ReturnLoan(_msgSeq, _infoSeq);
Thank you,
Kip
________________________________
The information contained in this e-mail and any attachments from AVT Simulation may contain confidential and/or proprietary information, and is intended only for the named recipient to whom it was originally addressed. If you are not the intended recipient, any disclosure, distribution, or copying of this e-mail or its attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the e-mail and any attachments.
|