00001
00002
00003
00004
00005
00006
00007
00008 #ifndef DCPS_IR_PUBLICATION_H
00009 #define DCPS_IR_PUBLICATION_H
00010
00011 #include "inforepo_export.h"
00012 #include "UpdateDataTypes.h"
00013 #include "dds/DdsDcpsInfrastructureC.h"
00014 #include "dds/DdsDcpsPublicationC.h"
00015 #include "dds/DCPS/InfoRepoDiscovery/InfoC.h"
00016 #include "dds/DCPS/InfoRepoDiscovery/DataWriterRemoteC.h"
00017 #include "ace/Unbounded_Set.h"
00018
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 #pragma once
00021 #endif
00022
00023
00024 class DCPS_IR_Participant;
00025 class DCPS_IR_Topic;
00026 class DCPS_IR_Topic_Description;
00027
00028 class DCPS_IR_Subscription;
00029 typedef ACE_Unbounded_Set<DCPS_IR_Subscription*> DCPS_IR_Subscription_Set;
00030
00031
00032
00033
00034
00035
00036
00037
00038 class OpenDDS_InfoRepoLib_Export DCPS_IR_Publication {
00039 public:
00040 DCPS_IR_Publication(const OpenDDS::DCPS::RepoId& id,
00041 DCPS_IR_Participant* participant,
00042 DCPS_IR_Topic* topic,
00043 OpenDDS::DCPS::DataWriterRemote_ptr writer,
00044 const DDS::DataWriterQos& qos,
00045 const OpenDDS::DCPS::TransportLocatorSeq& info,
00046 const DDS::PublisherQos& publisherQos);
00047
00048 ~DCPS_IR_Publication();
00049
00050
00051
00052
00053
00054
00055 int add_associated_subscription(DCPS_IR_Subscription* sub, bool active);
00056
00057
00058
00059
00060
00061 void association_complete(const OpenDDS::DCPS::RepoId& remote);
00062
00063
00064
00065 void call_association_complete(const OpenDDS::DCPS::RepoId& remote);
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079 int remove_associated_subscription(DCPS_IR_Subscription* sub,
00080 CORBA::Boolean sendNotify,
00081 CORBA::Boolean notify_lost,
00082 bool notify_both_side = false);
00083
00084
00085
00086
00087
00088
00089
00090 int remove_associations(CORBA::Boolean notify_lost);
00091
00092
00093 void disassociate_participant(OpenDDS::DCPS::RepoId id,
00094 bool reassociate = false);
00095
00096
00097 void disassociate_topic(OpenDDS::DCPS::RepoId id);
00098
00099
00100 void disassociate_subscription(OpenDDS::DCPS::RepoId id,
00101 bool reassociate = false);
00102
00103
00104
00105 void update_incompatible_qos();
00106
00107
00108
00109
00110 CORBA::Boolean is_subscription_ignored(OpenDDS::DCPS::RepoId partId,
00111 OpenDDS::DCPS::RepoId topicId,
00112 OpenDDS::DCPS::RepoId subId);
00113
00114
00115
00116 DDS::DataWriterQos* get_datawriter_qos();
00117
00118
00119
00120 DDS::PublisherQos* get_publisher_qos();
00121
00122
00123
00124 bool set_qos(const DDS::DataWriterQos & qos,
00125 const DDS::PublisherQos & publisherQos,
00126 Update::SpecificQos& specificQos);
00127
00128
00129 void set_qos(const DDS::DataWriterQos& qos);
00130
00131
00132 void set_qos(const DDS::PublisherQos& qos);
00133
00134 OpenDDS::DCPS::TransportLocatorSeq get_transportLocatorSeq() const;
00135
00136
00137
00138 OpenDDS::DCPS::IncompatibleQosStatus* get_incompatibleQosStatus();
00139
00140 OpenDDS::DCPS::RepoId get_id();
00141 OpenDDS::DCPS::RepoId get_topic_id();
00142 OpenDDS::DCPS::RepoId get_participant_id();
00143
00144 DCPS_IR_Topic* get_topic();
00145 DCPS_IR_Topic_Description* get_topic_description();
00146
00147 DDS::InstanceHandle_t get_handle();
00148 void set_handle(DDS::InstanceHandle_t handle);
00149
00150 CORBA::Boolean is_bit();
00151 void set_bit_status(CORBA::Boolean isBIT);
00152
00153
00154 OpenDDS::DCPS::DataWriterRemote_ptr writer();
00155
00156 void reevaluate_defunct_associations();
00157
00158
00159
00160
00161
00162
00163
00164 void reevaluate_existing_associations();
00165
00166
00167
00168
00169
00170 bool reevaluate_association(DCPS_IR_Subscription* subscription);
00171
00172 void update_expr_params(OpenDDS::DCPS::RepoId readerId,
00173 const DDS::StringSeq& params);
00174
00175 std::string dump_to_string(const std::string& prefix, int depth) const;
00176
00177 private:
00178
00179 OpenDDS::DCPS::RepoId id_;
00180 DCPS_IR_Participant* participant_;
00181 DCPS_IR_Topic* topic_;
00182 DDS::InstanceHandle_t handle_;
00183 CORBA::Boolean isBIT_;
00184
00185
00186 OpenDDS::DCPS::DataWriterRemote_var writer_;
00187 DDS::DataWriterQos qos_;
00188 OpenDDS::DCPS::TransportLocatorSeq info_;
00189 DDS::PublisherQos publisherQos_;
00190
00191 DCPS_IR_Subscription_Set associations_;
00192 DCPS_IR_Subscription_Set defunct_;
00193
00194 OpenDDS::DCPS::IncompatibleQosStatus incompatibleQosStatus_;
00195 };
00196
00197 #endif