RTI Connext C# API  6.1.2
DomainParticipantFactory Class Reference

Singleton that manages the creation of DomainParticipant objects. More...

Inherits IDisposable.

Public Member Functions

void Dispose ()
 Releases global resources used by the middleware. More...
 
DomainParticipant CreateParticipant (int domainId)
 Creates a new DomainParticipant with default QoS. More...
 
DomainParticipant CreateParticipant (int domainId, DomainParticipantQos qos)
 Creates a new DomainParticipant with the given QoS. More...
 
DomainParticipant CreateParticipant (int domainId, DomainParticipantQos qos, Action< DomainParticipant > preEnableAction)
 Creates a new DomainParticipant with the given QoS. More...
 
DomainParticipant LookupParticipant (int domainId)
 Looks up a DomainParticipant by domain ID More...
 
DomainParticipant LookupParticipant (string name)
 Looks up a DomainParticipant by its DomainParticipantQos.ParticipantName More...
 
void RegisterTypeSupport< T > ()
 Provides the name that an XML application can use to refer to a C# type More...
 
void RegisterTypeSupport< T > (string name)
 Provides the name that an XML application can use to refer to a C# type More...
 
void RegisterNamespace (System.Reflection.Assembly assembly, string @namespace)
 Specifies a namespace where QosProvider.CreateParticipantFromConfig(string) can look for the definition of C# types referenced from XML-defined applications. More...
 

Properties

static DomainParticipantFactoryInstance [get]
 Gets the singleton instance of this class. More...
 
DomainParticipantFactoryQos Qos [get, set]
 Get or set the QoS. More...
 
DomainParticipantQos DefaultParticipantQos [get, set]
 Gets or sets the default DomainParticipantQos More...
 
IEnumerable< DomainParticipantParticipants [get]
 Returns all the participants the DomainParticipantFactory has. More...
 
bool Disposed [get]
 Indicates whether this object has been disposed More...
 

Detailed Description

Singleton that manages the creation of DomainParticipant objects.

The full documentation is available in the C API: DDS_DomainParticipantFactory

Member Function Documentation

◆ CreateParticipant() [1/3]

DomainParticipant CreateParticipant ( int  domainId)

Creates a new DomainParticipant with default QoS.

Parameters
domainIdThe domain id to join

The full documentation is available in the C API: DDS_DomainParticipantFactory_create_participant

◆ CreateParticipant() [2/3]

DomainParticipant CreateParticipant ( int  domainId,
DomainParticipantQos  qos 
)

Creates a new DomainParticipant with the given QoS.

Parameters
domainIdThe domain id to join
qosThe QoS to configure the DomainParticipant

The full documentation is available in the C API: DDS_DomainParticipantFactory_create_participant

◆ CreateParticipant() [3/3]

DomainParticipant CreateParticipant ( int  domainId,
DomainParticipantQos  qos,
Action< DomainParticipant preEnableAction 
)

Creates a new DomainParticipant with the given QoS.

Parameters
domainIdThe domain id to join
qosThe QoS to configure the DomainParticipant
preEnableActionAn action that allows performing operations on the DomainParticipant right before it is enabled. For example, if the application needs to receive information about all discovered entities, looking up the readers for the built-in topics in DomainParticipant.BuiltinSubscriber should be done before the DomainParticipant is enabled.

The full documentation is available in the C API: DDS_DomainParticipantFactory_create_participant

◆ Dispose()

void Dispose ( )

Releases global resources used by the middleware.

In most cases calling this function is not necessary. However, some memory-check tools may flag this native heap memory as unreclaimed. So this method provides a way to clean up that memory at the end of the application.

Precondition
All participants created from the factory have been deleted.
Postcondition
All resources belonging to the factory have been reclaimed. A new call to Instance will return a new lifecycle of the singleton.

◆ LookupParticipant() [1/2]

DomainParticipant LookupParticipant ( int  domainId)

Looks up a DomainParticipant by domain ID

The full documentation is available in the C API: DDS_DomainParticipantFactory_lookup_participant

◆ LookupParticipant() [2/2]

DomainParticipant LookupParticipant ( string  name)

Looks up a DomainParticipant by its DomainParticipantQos.ParticipantName

The full documentation is available in the C API: DDS_DomainParticipantFactory_lookup_participant_by_name

◆ RegisterNamespace()

void RegisterNamespace ( System.Reflection.Assembly  assembly,
string @  namespace 
)

Specifies a namespace where QosProvider.CreateParticipantFromConfig(string) can look for the definition of C# types referenced from XML-defined applications.

Parameters
assemblyThe assembly where the namespace is located
namespaceThe namespace within the assembly where the QosProvider can look for types. Nested namespaces are also included.

◆ RegisterTypeSupport< T >() [1/2]

void RegisterTypeSupport< T > ( )

Provides the name that an XML application can use to refer to a C# type

Template Parameters
TThe type to register. The type is registered with the name typeof(T).Name

◆ RegisterTypeSupport< T >() [2/2]

void RegisterTypeSupport< T > ( string  name)

Provides the name that an XML application can use to refer to a C# type

Parameters
nameThe name to register this type with. It must be the same name used in the XML tag register_type
Template Parameters
TThe type to register

Property Documentation

◆ DefaultParticipantQos

DomainParticipantQos DefaultParticipantQos
getset

Gets or sets the default DomainParticipantQos

The full documentation is available in the C API: DDS_DomainParticipantFactory_set_default_participant_qos

◆ Disposed

bool Disposed
get

Indicates whether this object has been disposed

◆ Instance

DomainParticipantFactory? Instance
staticget

Gets the singleton instance of this class.

The full documentation is available in the C API: DDS_DomainParticipantFactory_get_instance

◆ Participants

IEnumerable<DomainParticipant> Participants
get

Returns all the participants the DomainParticipantFactory has.

The full documentation is available in the C API: DDS_DomainParticipantFactory_get_participants

◆ Qos

Get or set the QoS.

The full documentation is available in the C API: DDS_DomainParticipantFactory_get_qos