MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / initialize

Method initialize

dds/InfoRepo/FederatorManagerImpl.cpp:80–788  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void
81ManagerImpl::initialize()
82{
83 if (OpenDDS::DCPS::DCPS_debug_level > 0) {
84 ACE_DEBUG((LM_DEBUG,
85 ACE_TEXT("(%P|%t) Federation::ManagerImpl::initialize()\n")));
86 }
87
88 // Let the listeners know which repository we are to filter samples at
89 // the earliest opportunity.
90 this->ownerListener_.federationId(this->id());
91 this->topicListener_.federationId(this->id());
92 this->participantListener_.federationId(this->id());
93 this->publicationListener_.federationId(this->id());
94 this->subscriptionListener_.federationId(this->id());
95
96 // Add participant for Federation domain
97 DDS::DomainParticipantFactory_var dpf = TheParticipantFactory;
98 federationParticipant_ = dpf->create_participant(
99 this->config_.federationDomain(),
100 PARTICIPANT_QOS_DEFAULT,
101 DDS::DomainParticipantListener::_nil(),
102 OpenDDS::DCPS::DEFAULT_STATUS_MASK);
103 if (!federationParticipant_) {
104 ACE_ERROR((LM_ERROR,
105 ACE_TEXT("(%P|%t) ERROR: create_participant failed for ")
106 ACE_TEXT("repository %d in federation domain %d.\n"),
107 this->id().id(),
108 this->config_.federationDomain()));
109 throw Incomplete();
110 }
111
112 //
113 // Add type support for update topics
114 //
115
116 OwnerUpdateTypeSupportImpl::_var_type ownerUpdate = new OwnerUpdateTypeSupportImpl();
117
118 if (DDS::RETCODE_OK != ownerUpdate->register_type(
119 this->federationParticipant_.in(),
120 OWNERUPDATETYPENAME)) {
121 ACE_ERROR((LM_ERROR,
122 ACE_TEXT("(%P|%t) ERROR: Unable to install ")
123 ACE_TEXT("OwnerUpdate type support for repository %d.\n"),
124 this->id().id()));
125 throw Incomplete();
126 }
127
128 ParticipantUpdateTypeSupportImpl::_var_type participantUpdate = new ParticipantUpdateTypeSupportImpl();
129
130 if (DDS::RETCODE_OK != participantUpdate->register_type(
131 this->federationParticipant_.in(),
132 PARTICIPANTUPDATETYPENAME)) {
133 ACE_ERROR((LM_ERROR,
134 ACE_TEXT("(%P|%t) ERROR: Unable to install ")
135 ACE_TEXT("ParticipantUpdate type support for repository %d.\n"),
136 this->id().id()));
137 throw Incomplete();

Callers 1

join_federationMethod · 0.95

Calls 15

instanceFunction · 0.85
federationDomainMethod · 0.80
register_handlerMethod · 0.80
federationIdMethod · 0.45
idMethod · 0.45
create_participantMethod · 0.45
register_typeMethod · 0.45
inMethod · 0.45
create_configMethod · 0.45
create_instMethod · 0.45
create_subscriberMethod · 0.45

Tested by

no test coverage detected