DomainParticipantFactoryQos factory_qos = new DomainParticipantFactoryQos(); try { factory.get_qos(factory_qos); } catch (DDS.Exception) { Console.WriteLine( "***Error: failed to get domain participant factory qos"); } // Change the QosPolicy to create disabled participants factory_qos.entity_factory.autoenable_created_entities = false; try { factory.set_qos(factory_qos); } catch (DDS.Exception) { Console.WriteLine( "***Error: failed to set domain participant factory qos"); }
DomainParticipantFactory factory = DomainParticipantFactory.get_instance(); if (factory == null) { Console.WriteLine( "***Error: failed to get domain participant factory"); }
DomainParticipantQos participant_qos = new DomainParticipantQos(); DomainParticipantListener participant_listener = null; /* Set the initial peers. These list all the computers the application may communicate with along with the maximum number of RTI Data Distribution Service participants that can concurrently run on that computer. This list only needs to be a superset of the actual list of computers and participants that will be running at any time. */ String[] NDDS_DISCOVERY_INITIAL_PEERS = { "host1", "10.10.30.192", "1@localhost", "2@host2", "my://", // all unicast addresses on transport plugins with alias "my" "2@shmem://", // shared memory "FF00:ABCD::0", "sf://0/0/R", // StarFabric transport plugin "1@FF00:0:1234::0", "225.1.2.3", "3@225.1.0.55", "FAA0::0#0/0/R", }; // initialize participant_qos with default values try { factory.get_default_participant_qos(participant_qos); } catch (DDS.Exception) { Console.WriteLine( "***Error: failed to get default participant qos"); } participant_qos.discovery.initial_peers.from_array( NDDS_DISCOVERY_INITIAL_PEERS); // Create the participant DomainParticipant participant = factory.create_participant( domain_id, participant_qos, participant_listener, StatusMask.STATUS_MASK_NONE); if (participant == null) { Console.WriteLine( "***Error: failed to create domain participant"); }
try { factory.delete_participant(ref participant); } catch (DDS.Exception) { Console.WriteLine( "***Error: failed to delete domain participant"); }