Jump to content
OpenSplice DDS Forum

aphelix

Members
  • Content Count

    14
  • Joined

  • Last visited

About aphelix

  • Rank
    Member

Profile Information

  • Company
    Noname
  1. Hi Eric. I created all qos variables and set all properties first . Then i created topic, reader and writer like you said. It is now working properly. Thank you very much for your help. Best reagards.
  2. Hello Erik. Topic records in persistent xml file are deleted when I stop the publisher, as you mentioned. But i have set autodispose_unregistered_instances value as below; But the result is as you indicate. Note: i have 3 durability type. Doesn't seem very important TRANSIENT -> ospl-volatile RESIDENT -> ospl-transient PERSISTENT -> ospl-persistent CREATING_OSPL_RESOURCE; { ReturnCode_t status; CHAR* topicName = const_cast<CHAR*>(osplParam->topicName.c_str()); //(1) Registering type... CORBA::String_var typeName = osplParam->typeSupport->get_type_name(); status = osplParam->typeSupport->register_type(participant.in(), typeName); if (status != DDS::RETCODE_OK){ const STRING excp = "Cannot call TypeSupport::register_type.RetCode is " + OSPLConnector::RetCodeName[status]; ERROR(excp.c_str()); return false; } TopicQos topic_qos; status = participant->get_default_topic_qos(topic_qos); if (status != DDS::RETCODE_OK){ const STRING excp = "Cannot call DomainParticipant_var::get_default_topic_qos.RetCode is " + OSPLConnector::RetCodeName[status]; ERROR(excp.c_str()); return false; } // RELIABILITY.... switch(osplParam->reliability){ case RELIABLE:{ topic_qos.reliability.kind = RELIABLE_RELIABILITY_QOS; break; } case BEST_EFFORT:{ topic_qos.reliability.kind = BEST_EFFORT_RELIABILITY_QOS; break; } } // DURABILITY.... // Setting topic qos policies... HistoryQosPolicy tmpHistoryQosPolicy; switch(osplParam->durability){ case TRANSIENT:{ topic_qos.durability.kind = VOLATILE_DURABILITY_QOS; tmpHistoryQosPolicy.kind = KEEP_LAST_HISTORY_QOS; tmpHistoryQosPolicy.depth = DpsApplication::GetInstance()->GetTransientBufferSize(); break; } case RESIDENT:{ topic_qos.durability.kind = TRANSIENT_DURABILITY_QOS; tmpHistoryQosPolicy.kind = KEEP_LAST_HISTORY_QOS; tmpHistoryQosPolicy.depth = isKeyed ? 1 : DpsApplication::GetInstance()->GetResidentBufferSize(); break; } case PERSISTENT:{ topic_qos.durability.kind = PERSISTENT_DURABILITY_QOS; tmpHistoryQosPolicy.kind = KEEP_LAST_HISTORY_QOS; tmpHistoryQosPolicy.depth = isKeyed ? 1 : DpsApplication::GetInstance()->GetPersistentBufferSize(); break; } default:{ ERROR("Undefined durability type."); return false; } } // SETTING TOPIC HISTORY QOS. topic_qos.history.kind = tmpHistoryQosPolicy.kind; topic_qos.history.depth = tmpHistoryQosPolicy.depth; //(2) CREATING TOPIC. Topic_ptr topic = participant->create_topic(topicName, typeName, topic_qos, NULL, STATUS_MASK_NONE); if(!topic){ ERROR("Cannot call DDS::DomainParticipant::create_topic."); return false; } //(3) CREATING WRITER. DataWriter_ptr writer = publisher->create_datawriter(topic, DATAWRITER_QOS_USE_TOPIC_QOS, NULL, STATUS_MASK_NONE); if(!writer){ ERROR("while calling DDS::Publisher::create_datawriter."); return false; } //(4) CREATING READER. DataReader_ptr reader = subscriber->create_datareader(topic, DATAREADER_QOS_USE_TOPIC_QOS, NULL, STATUS_MASK_NONE); if(!reader){ ERROR("Cannot call DDS::Subscriber::create_datareader."); return false; } //(5) PERSISTENT SPECIFIC OPERATIONS. if(osplParam->durability == PERSISTENT){ <<<<<<<<<<<<<<<<<<<<<< HERE Erik :)))) /* Topic instances are runtime entities for which DDS keeps track of whether (1) there are any live writers, (2) the instance has appeared in the system for the first time (3) the instance has been disposed--meaning explicitly removed from the system. Setting dataWriter’s autodispose_unregistered_instances QoS policy to FALSE (as default is TRUE causing your persistent samples to become NOT_ALIVE_DISPOSED after termination of your writer application causes the instances to be disposed before being unregistered). */ DataWriterQos dw_qos; writer->get_qos(dw_qos); dw_qos.writer_data_lifecycle.autodispose_unregistered_instances = false; writer->set_qos(dw_qos); /* * The wait_for_historical_data() operation waits (blocks) until all "historical" data is received from matched DataWriters. <<<<<<<<<<<<<<<<<<<<<< WAITING HISTORY HERE Erik :)))) * "Historical" data means DDS samples that were written before the DataReader joined the DDS domain.(For persistent and resident) */ DDS::Duration_t a_timeout; a_timeout.sec = 20; a_timeout.nanosec = 0; reader->wait_for_historical_data(a_timeout); } //(6) Reader qos. DataReaderQos dr_qos; reader->get_qos(dr_qos); dr_qos.history.kind = tmpHistoryQosPolicy.kind; dr_qos.history.depth = tmpHistoryQosPolicy.depth; reader->set_qos(dr_qos); vars->osplTopic = topic; vars->osplWriter = writer; vars->osplReader = reader; osplResourceMap.insert(OSPL_RESOURCE_PAIR(topicName, *vars)); // Storing it. :)) return true; /* * Possible others qos services to do..., * Latency budget * Deadline * Transport priority */ } So. I guess I can't set the qos policies properly :((( Thanks...
  3. Hi! I can see the messages in persistent xml file (MyMessage_Topic.xml) after publishing them. But after a while, restarting the application, the topic records in persistent xml file are deleted. Only a few of them remain.Why are the written records deleted? Is there any configuration that i am missed? Note: I am using opensplice version 6.9 . Thanks in advance for your help.
  4. I think, I have to migrate to 6.9
  5. Another interesting record in ospl-info.log Internals : V5.5.1OSS/DurabilityService/d_durability.c/459/0/187549406 ======================================================================================== Report : WARNING Date : Wed May 29 23:10:13 2019 Description : No heartbeats received from Node 0x194785ff (address 192.168.1.26) Node : debian Process : networking <2133> Thread : Channels/Channel[@name='Reliable'] b6d29b40 Internals : V5.5.1OSS/networking: reliable protocol/nw_plugSendChannel.c/2599/0/332348345 ======================================================================================== Report : WARNING Date : Wed May 29 23:10:13 2019 Description : Node 0x194785ff (address 192.168.1.26) not responding or no heartbeats received, removing it from the reliable protocol Node : debian Process : networking <2133> Thread : Channels/Channel[@name='Reliable'] b6d29b40
  6. Hi Hans.. Unfortunately the problem is still continue. To be more clear; I am using opensplice ver5.5 I. HelloWorld example in HDE directory also does not work. But it works if i run them in same machine. II. 2 machine are virtual(vmware) on win7 and network types are bridge. III. I can test udp broadcast via socat app (port 53370 53380 53390). And it is working in both direction for 2 machines. IV. NetworkInterfaceAdress property is not exist in ospl.xml. But ospl_ddsi2.xml contains it. i changed it as you said. (Adding eth0 value) V. In addition, I've also add this tag block into ospl.xml <General> <NetworkInterfaceAddress>eth0</NetworkInterfaceAddress> <AllowMulticast>false</AllowMulticast> <EnableMulticastLoopback>true</EnableMulticastLoopback> <CoexistWithNativeNetworking>true</CoexistWithNativeNetworking> </General> Here, my configuration files. ospl.xml <OpenSplice> <Domain> <Name>OpenSpliceV5.5.1OSS</Name> <Database> <Size>10485760</Size> </Database> <Lease> <ExpiryTime update_factor="0.05">60.0</ExpiryTime> </Lease> <Service name="networking"> <Command>networking</Command> </Service> <Service name="durability"> <Command>durability</Command> </Service> </Domain> <NetworkService name="networking"> <Partitioning> <GlobalPartition Address="broadcast"/> </Partitioning> <Channels> <Channel default="true" enabled="true" name="BestEffort" reliable="false"> <PortNr>53370</PortNr> </Channel> <Channel enabled="true" name="Reliable" reliable="true"> <PortNr>53380</PortNr> </Channel> </Channels> <Discovery enabled="true"> <PortNr>53390</PortNr> </Discovery> </NetworkService> <DurabilityService name="durability"> <Network> <InitialDiscoveryPeriod>2.0</InitialDiscoveryPeriod> <Alignment> <TimeAlignment>FALSE</TimeAlignment> <RequestCombinePeriod> <Initial>2.5</Initial> <Operational>0.1</Operational> </RequestCombinePeriod> </Alignment> <WaitForAttachment maxWaitCount="10"> <ServiceName>networking</ServiceName> </WaitForAttachment> </Network> <NameSpaces> <NameSpace name="defaultNamespace"> <Partition>*</Partition> </NameSpace> <Policy nameSpace="defaultNamespace" durability="Durable" alignee="Initial" aligner="True"/> </NameSpaces> </DurabilityService> </OpenSplice> ******************************************************************************************************** ospl_ddsi2.xml <OpenSplice> <Domain> <Name>OpenSpliceV5.5_with_DDSI2</Name> <Database> <Size>10485760</Size> </Database> <Service name="ddsi2"> <Command>ddsi2</Command> </Service> <Service name="durability"> <Command>durability</Command> </Service> </Domain> <DDSI2Service name="ddsi2"> <General> <NetworkInterfaceAddress>AUTO</NetworkInterfaceAddress> <AllowMulticast>true</AllowMulticast> <EnableMulticastLoopback>true</EnableMulticastLoopback> <CoexistWithNativeNetworking>false</CoexistWithNativeNetworking> </General> <Compatibility> <!-- see the release notes and ospl_ddsi2_interoperable.xml --> <StandardsConformance>strict</StandardsConformance> </Compatibility> <Discovery> <DomainId>0</DomainId> </Discovery> </DDSI2Service> <DurabilityService name="durability"> <Network> <InitialDiscoveryPeriod>10.0</InitialDiscoveryPeriod> <Alignment> <TimeAlignment>false</TimeAlignment> <RequestCombinePeriod> <Initial>2.5</Initial> <Operational>0.1</Operational> </RequestCombinePeriod> </Alignment> <WaitForAttachment maxWaitCount="1000"> <ServiceName>ddsi2</ServiceName> </WaitForAttachment> </Network> <NameSpaces> <NameSpace name="defaultNamespace"> <Partition>*</Partition> </NameSpace> <Policy alignee="Initial" aligner="true" durability="Durable" nameSpace="defaultNamespace"/> </NameSpaces> </DurabilityService> </OpenSplice> ***************************************************************************************** ospl_ddsi2_with_native.xml <OpenSplice> <Domain> <Name>OpenSpliceV5.5_DDSI2_cohabitation</Name> <Database> <Size>10485760</Size> </Database> <Service name="ddsi2"> <Command>ddsi2</Command> </Service> <Service name="networking"> <Command>networking</Command> </Service> <Service name="durability"> <Command>durability</Command> </Service> </Domain> <NetworkService name="networking"> <Partitioning> <GlobalPartition Address="broadcast"/> </Partitioning> <Channels> <Channel default="true" enabled="true" name="BestEffort" reliable="false"> <PortNr>53340</PortNr> </Channel> <Channel enabled="true" name="Reliable" reliable="true"> <PortNr>53350</PortNr> </Channel> </Channels> <Discovery enabled="true"> <PortNr>53360</PortNr> </Discovery> </NetworkService> <DDSI2Service name="ddsi2"> <General> <NetworkInterfaceAddress>AUTO</NetworkInterfaceAddress> <AllowMulticast>true</AllowMulticast> <EnableMulticastLoopback>true</EnableMulticastLoopback> <CoexistWithNativeNetworking>true</CoexistWithNativeNetworking> </General> <Compatibility> <!-- the following are necessary for general, well-behaved interoperability --> <StandardsConformance>lax</StandardsConformance> <!-- the following one is necessary only for TwinOaks CoreDX DDS compatibility --> <ExplicitlyPublishQosSetToDefault>true</ExplicitlyPublishQosSetToDefault> </Compatibility> <Discovery> <DomainId>0</DomainId> </Discovery> </DDSI2Service> <DurabilityService name="durability"> <Network> <InitialDiscoveryPeriod>10.0</InitialDiscoveryPeriod> <Alignment> <TimeAlignment>false</TimeAlignment> <RequestCombinePeriod> <Initial>2.5</Initial> <Operational>0.1</Operational> </RequestCombinePeriod> </Alignment> <WaitForAttachment> <ServiceName>networking</ServiceName> <ServiceName>ddsi2</ServiceName> </WaitForAttachment> </Network> <NameSpaces> <NameSpace name="defaultNamespace"> <Partition>*</Partition> </NameSpace> <Policy alignee="Initial" aligner="true" durability="Durable" nameSpace="defaultNamespace"/> </NameSpaces> </DurabilityService> </OpenSplice> ******************************************************************************* ospl_no_network.xml <OpenSplice> <Domain> <Name>OpenSpliceV5.5.1OSS</Name> <Database> <Size>10485670</Size> </Database> <Lease> <ExpiryTime update_factor="0.05">60.0</ExpiryTime> </Lease> <Service name="durability"> <Command>durability</Command> </Service> </Domain> <DurabilityService name="durability"> <Network> <InitialDiscoveryPeriod>2.0</InitialDiscoveryPeriod> <Alignment> <RequestCombinePeriod> <Initial>2.5</Initial> <Operational>0.1</Operational> </RequestCombinePeriod> </Alignment> </Network> <NameSpaces> <NameSpace name="defaultNamespace"> <Partition>*</Partition> </NameSpace> <Policy nameSpace="defaultNamespace" durability="Durable" alignee="Initial" aligner="True"/> </NameSpaces> </DurabilityService> </OpenSplice> I would be very glad if you help me!!!! Thanks....
  7. Any suggestions? :((
  8. Hi. I'am currently trying "OpenSplice version : V5.5.1OSS". I have 2 apps. One sends a very basic topic to other. If two apps run on same machine. Everything seems alright. But if they work on different machines, messages cannot be sent. My configuration file ospl.xml OpenSplice> <Domain> <Name>OpenSpliceV5.5.1OSS</Name> <Database> <Size>10485760</Size> </Database> <Lease> <ExpiryTime update_factor="0.05">60.0</ExpiryTime> </Lease> <Service name="networking"> <Command>networking</Command> </Service> <Service name="durability"> <Command>durability</Command> </Service> </Domain> <NetworkService name="networking"> <Partitioning> <GlobalPartition Address="broadcast"/> </Partitioning> <Channels> <Channel default="true" enabled="true" name="BestEffort" reliable="false"> <PortNr>53370</PortNr> </Channel> <Channel enabled="true" name="Reliable" reliable="true"> <PortNr>53380</PortNr> </Channel> </Channels> <Discovery enabled="true"> <PortNr>53390</PortNr> </Discovery> </NetworkService> <DurabilityService name="durability"> <Network> <InitialDiscoveryPeriod>2.0</InitialDiscoveryPeriod> <Alignment> <TimeAlignment>FALSE</TimeAlignment> <RequestCombinePeriod> <Initial>2.5</Initial> <Operational>0.1</Operational> </RequestCombinePeriod> </Alignment> <WaitForAttachment maxWaitCount="10"> <ServiceName>networking</ServiceName> </WaitForAttachment> </Network> <NameSpaces> <NameSpace name="defaultNamespace"> <Partition>*</Partition> </NameSpace> <Policy nameSpace="defaultNamespace" durability="Durable" alignee="Initial" aligner="True"/> </NameSpaces> <Persistent> <StoreDirectory>/opt/dps/rdb</StoreDirectory> </Persistent> </DurabilityService> </OpenSplice> What is the problem ? Thanks...
  9. Hi.. i want to create a query condition that contains a struct type. Example: suppose there is a topic idl that has a struct field and a string field like /////////////////////////////////// struct X{ string xstr }; string str; X x; /////////////////////////////////// what is the condition string ? (str='germany' and x.str='france') or something else...
  10. Hi AndSki... I can get builtin topic information via reading TopicBuiltinTopicData struct TopicBuiltinTopicData { builtinTopicKey_t key; string name; string type_name; DurabilityQosPolicy durability; QosPolicy deadline; LatencyBudgetQosPolicy latency_budget; LivelinessQosPolicy liveliness; ReliabilityQosPolicy reliability; TransportPriorityQosPolicy transport_priority; LifespanQosPolicy lifespan; DestinationOrderQosPolicy destination_order; HistoryQosPolicy history; ResourceLimitsQosPolicy resource_limits; OwnershipQosPolicy ownership; TopicDataQosPolicy topic_data; }; But i want to read published data of this topics.. Suppose there is a topic named TopicA and it's persistent... And there are 2 instances published from somewhere as below. topic_a_instance_1 (Instance of Topic A) topic_a_instance_2 (Instance of Topic A) I want to read this instances. So i think i should create datareader subscriber etc of topic using info existent in TopicBuiltinTopicData... Thanks...
  11. Hi. I'am new to Opensplice.. I try to get builtin topics and subscribe them. I am succeded in getting buitin topics into TopicBuiltinTopicDataSeq. But i cannot create subscriber for getting existent data.. How can i create subscriber for builtin topic via TopicBuiltinTopicDataSeq... Thanks....
  12. Hi again; I remove deadline qos, max data count control for send ... But subscriber froze approximately on 8500 th (not 1500 ) data... Thanks...
  13. Hi! I'm new to opensplice. I tried to execute listener example in opensplice installed directory. I replaced read with take in subscriber.When i try to send data, subscriber froze approximately on 1500 data.Why? Thanks for your help...
  14. Hi... I am new to opensplice dds. I compiled and executed hello program (c++/standalone) on linux..Publisher send the message once. But Subscriber app read two times same instance.. Why...?? Thanks...
×
×
  • Create New...