OpenDDS  Snapshot(2023/04/07-19:43)
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
OpenDDS::DCPS::Service_Participant Class Reference

Service entrypoint. More...

#include <Service_Participant.h>

Collaboration diagram for OpenDDS::DCPS::Service_Participant:
Collaboration graph
[legend]

Classes

struct  DiscoveryInfo
 
struct  DomainRange
 

Public Types

enum  { ANY_DOMAIN = -1 }
 Domain value for the default repository IOR. More...
 
enum  TypeObjectEncoding { Encoding_Normal, Encoding_WriteOldFormat, Encoding_ReadOldFormat }
 

Public Member Functions

 Service_Participant ()
 
 ~Service_Participant ()
 
const TimeSourcetime_source () const
 
ACE_Reactor_Timer_Interfacetimer ()
 
ACE_Reactorreactor ()
 
ACE_thread_t reactor_owner () const
 
ReactorInterceptor_rch interceptor () const
 
JobQueue_rch job_queue () const
 
void set_shutdown_listener (RcHandle< ShutdownListener > listener)
 
DDS::DomainParticipantFactory_ptr get_domain_participant_factory (int &argc=zero_argc, ACE_TCHAR *argv[]=0)
 
DDS::ReturnCode_t shutdown ()
 
bool is_shut_down () const
 Accessor for if the participant has been shutdown. More...
 
Discovery_rch get_discovery (const DDS::DomainId_t domain)
 Accessor of the Discovery object for a given domain. More...
 
const DDS::UserDataQosPolicyinitial_UserDataQosPolicy () const
 
const DDS::TopicDataQosPolicyinitial_TopicDataQosPolicy () const
 
const DDS::GroupDataQosPolicyinitial_GroupDataQosPolicy () const
 
const DDS::TransportPriorityQosPolicyinitial_TransportPriorityQosPolicy () const
 
const DDS::LifespanQosPolicyinitial_LifespanQosPolicy () const
 
const DDS::DurabilityQosPolicyinitial_DurabilityQosPolicy () const
 
const DDS::DurabilityServiceQosPolicyinitial_DurabilityServiceQosPolicy () const
 
const DDS::PresentationQosPolicyinitial_PresentationQosPolicy () const
 
const DDS::DeadlineQosPolicyinitial_DeadlineQosPolicy () const
 
const DDS::LatencyBudgetQosPolicyinitial_LatencyBudgetQosPolicy () const
 
const DDS::OwnershipQosPolicyinitial_OwnershipQosPolicy () const
 
const DDS::OwnershipStrengthQosPolicyinitial_OwnershipStrengthQosPolicy () const
 
const DDS::LivelinessQosPolicyinitial_LivelinessQosPolicy () const
 
const DDS::TimeBasedFilterQosPolicyinitial_TimeBasedFilterQosPolicy () const
 
const DDS::PartitionQosPolicyinitial_PartitionQosPolicy () const
 
const DDS::ReliabilityQosPolicyinitial_ReliabilityQosPolicy () const
 
const DDS::DestinationOrderQosPolicyinitial_DestinationOrderQosPolicy () const
 
const DDS::HistoryQosPolicyinitial_HistoryQosPolicy () const
 
const DDS::ResourceLimitsQosPolicyinitial_ResourceLimitsQosPolicy () const
 
const DDS::EntityFactoryQosPolicyinitial_EntityFactoryQosPolicy () const
 
const DDS::WriterDataLifecycleQosPolicyinitial_WriterDataLifecycleQosPolicy () const
 
const DDS::ReaderDataLifecycleQosPolicyinitial_ReaderDataLifecycleQosPolicy () const
 
const DDS::PropertyQosPolicyinitial_PropertyQosPolicy () const
 
const DDS::DataRepresentationQosPolicyinitial_DataRepresentationQosPolicy () const
 
const DDS::DomainParticipantFactoryQosinitial_DomainParticipantFactoryQos () const
 
const DDS::DomainParticipantQosinitial_DomainParticipantQos () const
 
const DDS::TopicQosinitial_TopicQos () const
 
const DDS::DataWriterQosinitial_DataWriterQos () const
 
const DDS::PublisherQosinitial_PublisherQos () const
 
const DDS::DataReaderQosinitial_DataReaderQos () const
 
const DDS::SubscriberQosinitial_SubscriberQos () const
 
const DDS::TypeConsistencyEnforcementQosPolicyinitial_TypeConsistencyEnforcementQosPolicy () const
 
size_t n_chunks () const
 
void n_chunks (size_t chunks)
 Set the value returned by n_chunks() accessor. More...
 
size_t association_chunk_multiplier () const
 
void association_chunk_multiplier (size_t multiplier)
 
void liveliness_factor (int factor)
 
int liveliness_factor () const
 
void add_discovery (Discovery_rch discovery)
 
bool set_repo_ior (const char *ior, Discovery::RepoKey key=Discovery::DEFAULT_REPO, bool attach_participant=true)
 
bool use_bidir_giop () const
 
void remap_domains (Discovery::RepoKey oldKey, Discovery::RepoKey newKey, bool attach_participant=true)
 Rebind a domain from one repository to another. More...
 
void set_repo_domain (const DDS::DomainId_t domain, Discovery::RepoKey repo, bool attach_participant=true)
 Bind DCPSInfoRepo IORs to domains. More...
 
void set_default_discovery (const Discovery::RepoKey &defaultDiscovery)
 
Discovery::RepoKey get_default_discovery ()
 
Discovery::RepoKey domain_to_repo (const DDS::DomainId_t domain) const
 Convert domainId to repository key. More...
 
void repository_lost (Discovery::RepoKey key)
 Failover to a new repository. More...
 
MonotonicTimePoint new_pending_timeout_deadline () const
 Get a new pending timeout deadline. More...
 
OPENDDS_STRING bit_transport_ip () const
 
bool get_security ()
 
void set_security (bool b)
 
bool get_BIT ()
 
void set_BIT (bool b)
 
const NetworkAddressdefault_address () const
 
DataDurabilityCacheget_data_durability_cache (DDS::DurabilityQosPolicy const &durability)
 
typedef OPENDDS_MAP (Discovery::RepoKey, Discovery_rch) RepoKeyDiscoveryMap
 For internal OpenDDS Use (needed for monitor code) More...
 
const RepoKeyDiscoveryMap & discoveryMap () const
 
typedef OPENDDS_MAP (DDS::DomainId_t, Discovery::RepoKey) DomainRepoMap
 
const DomainRepoMap & domainRepoMap () const
 
void register_discovery_type (const char *section_name, Discovery::Config *cfg)
 
ACE_ARGVORB_argv ()
 
Recorder_ptr create_recorder (DDS::DomainParticipant_ptr participant, DDS::Topic_ptr a_topic, const DDS::SubscriberQos &subscriber_qos, const DDS::DataReaderQos &datareader_qos, const RecorderListener_rch &a_listener)
 
DDS::ReturnCode_t delete_recorder (Recorder_ptr recorder)
 
Replayer_ptr create_replayer (DDS::DomainParticipant_ptr participant, DDS::Topic_ptr a_topic, const DDS::PublisherQos &publisher_qos, const DDS::DataWriterQos &datawriter_qos, const ReplayerListener_rch &a_listener)
 
DDS::ReturnCode_t delete_replayer (Replayer_ptr replayer)
 
DDS::Topic_ptr create_typeless_topic (DDS::DomainParticipant_ptr participant, const char *topic_name, const char *type_name, bool type_has_keys, const DDS::TopicQos &qos, DDS::TopicListener_ptr a_listener=0, DDS::StatusMask mask=0)
 
int load_configuration (ACE_Configuration_Heap &cf, const ACE_TCHAR *filename)
 
bool belongs_to_domain_range (DDS::DomainId_t domainId) const
 
bool get_transport_base_config_name (DDS::DomainId_t domainId, ACE_TString &name) const
 
void default_configuration_file (const ACE_TCHAR *path)
 
DDS::Duration_t bit_autopurge_nowriter_samples_delay () const
 
void bit_autopurge_nowriter_samples_delay (const DDS::Duration_t &duration)
 
DDS::Duration_t bit_autopurge_disposed_samples_delay () const
 
void bit_autopurge_disposed_samples_delay (const DDS::Duration_t &duration)
 
XTypes::TypeInformation get_type_information (DDS::DomainParticipant_ptr participant, const DDS::BuiltinTopicKey_t &key) const
 
DDS::ReturnCode_t get_dynamic_type (DDS::DynamicType_var &type, DDS::DomainParticipant_ptr participant, const DDS::BuiltinTopicKey_t &key) const
 
XTypes::TypeObject get_type_object (DDS::DomainParticipant_ptr participant, const XTypes::TypeIdentifier &ti) const
 
TypeObjectEncoding type_object_encoding () const
 
void type_object_encoding (TypeObjectEncoding encoding)
 
void type_object_encoding (const char *encoding)
 
RcHandle< InternalTopic< NetworkInterfaceAddress > > network_interface_address_topic () const
 
unsigned int printer_value_writer_indent () const
 
void printer_value_writer_indent (unsigned int value)
 
ACE_Thread_Mutexget_static_xtypes_lock ()
 getter for lock that protects the static initialization of XTypes related data structures More...
 
ThreadStatusManagerget_thread_status_manager ()
 Get the service participant's thread status manager. More...
 
int & federation_recovery_duration ()
 Accessors for FederationRecoveryDuration in seconds. More...
 
int federation_recovery_duration () const
 Accessors for FederationRecoveryDuration in seconds. More...
 
int & federation_initial_backoff_seconds ()
 Accessors for FederationInitialBackoffSeconds. More...
 
int federation_initial_backoff_seconds () const
 Accessors for FederationInitialBackoffSeconds. More...
 
int & federation_backoff_multiplier ()
 Accessors for FederationBackoffMultiplier. More...
 
int federation_backoff_multiplier () const
 Accessors for FederationBackoffMultiplier. More...
 
int & federation_liveliness ()
 Accessors for FederationLivelinessDuration. More...
 
int federation_liveliness () const
 Accessors for FederationLivelinessDuration. More...
 
long & scheduler ()
 Accessors for scheduling policy value. More...
 
long scheduler () const
 Accessors for scheduling policy value. More...
 
bool & publisher_content_filter ()
 Accessors for PublisherContentFilter. More...
 
bool publisher_content_filter () const
 Accessors for PublisherContentFilter. More...
 
TimeDuration pending_timeout () const
 Accessors for pending data timeout. More...
 
void pending_timeout (const TimeDuration &value)
 Accessors for pending data timeout. More...
 
int priority_min () const
 Accessors for priority extremums for the current scheduler. More...
 
int priority_max () const
 Accessors for priority extremums for the current scheduler. More...
 
int bit_transport_port () const
 
void bit_transport_port (int port)
 
int bit_lookup_duration_msec () const
 
void bit_lookup_duration_msec (int msec)
 

Static Public Member Functions

static Service_Participantinstance ()
 Return a singleton instance of this class. More...
 

Public Attributes

MonitorFactorymonitor_factory_
 
unique_ptr< Monitormonitor_
 Pointer to the monitor object for this object. More...
 

Private Member Functions

void initialize ()
 Initialize default qos. More...
 
void initializeScheduling ()
 Initialize the thread scheduling and initial priority. More...
 
int parse_args (int &argc, ACE_TCHAR *argv[])
 
int load_configuration ()
 
int load_common_configuration (ACE_Configuration_Heap &cf, const ACE_TCHAR *filename)
 
int load_domain_configuration (ACE_Configuration_Heap &cf, const ACE_TCHAR *filename)
 
int load_domain_ranges (ACE_Configuration_Heap &cf)
 
int load_discovery_templates (ACE_Configuration_Heap &cf)
 
int configure_domain_range_instance (DDS::DomainId_t domainId)
 
int load_discovery_configuration (ACE_Configuration_Heap &cf, const ACE_TCHAR *section_name)
 
int configure_discovery_template (DDS::DomainId_t domainId, const OPENDDS_STRING &discovery_name)
 
typedef OPENDDS_MAP (OPENDDS_STRING, container_supported_unique_ptr< Discovery::Config >) DiscoveryTypes
 
 OPENDDS_MAP (DDS::DomainId_t, OPENDDS_STRING) domain_to_transport_name_map_
 
 OPENDDS_VECTOR (DomainRange) domain_ranges_
 
 OPENDDS_VECTOR (DiscoveryInfo) discovery_infos_
 
int parse_domain_range (const OPENDDS_STRING &range, int &start, int &end)
 
bool has_domain_range () const
 
bool get_domain_range_info (DDS::DomainId_t id, DomainRange &inst)
 
bool process_customizations (DDS::DomainId_t id, const OPENDDS_STRING &discovery_name, ValueMap &customs)
 
OpenDDS::DCPS::Discovery::RepoKey get_discovery_template_instance_name (DDS::DomainId_t id)
 
bool is_discovery_template (const OPENDDS_STRING &name)
 

Private Attributes

DiscoveryTypes discovery_types_
 
ACE_ARGV ORB_argv_
 
const TimeSource time_source_
 
ReactorTask reactor_task_
 
JobQueue_rch job_queue_
 
RcHandle< DomainParticipantFactoryImpldp_factory_servant_
 
RepoKeyDiscoveryMap discoveryMap_
 The RepoKey to Discovery object mapping. More...
 
DomainRepoMap domainRepoMap_
 The DomainId to RepoKey mapping. More...
 
Discovery::RepoKey defaultDiscovery_
 
ACE_Thread_Mutex factory_lock_
 
DDS::UserDataQosPolicy initial_UserDataQosPolicy_
 The initial values of qos policies. More...
 
DDS::TopicDataQosPolicy initial_TopicDataQosPolicy_
 
DDS::GroupDataQosPolicy initial_GroupDataQosPolicy_
 
DDS::TransportPriorityQosPolicy initial_TransportPriorityQosPolicy_
 
DDS::LifespanQosPolicy initial_LifespanQosPolicy_
 
DDS::DurabilityQosPolicy initial_DurabilityQosPolicy_
 
DDS::DurabilityServiceQosPolicy initial_DurabilityServiceQosPolicy_
 
DDS::PresentationQosPolicy initial_PresentationQosPolicy_
 
DDS::DeadlineQosPolicy initial_DeadlineQosPolicy_
 
DDS::LatencyBudgetQosPolicy initial_LatencyBudgetQosPolicy_
 
DDS::OwnershipQosPolicy initial_OwnershipQosPolicy_
 
DDS::OwnershipStrengthQosPolicy initial_OwnershipStrengthQosPolicy_
 
DDS::LivelinessQosPolicy initial_LivelinessQosPolicy_
 
DDS::TimeBasedFilterQosPolicy initial_TimeBasedFilterQosPolicy_
 
DDS::PartitionQosPolicy initial_PartitionQosPolicy_
 
DDS::ReliabilityQosPolicy initial_ReliabilityQosPolicy_
 
DDS::DestinationOrderQosPolicy initial_DestinationOrderQosPolicy_
 
DDS::HistoryQosPolicy initial_HistoryQosPolicy_
 
DDS::ResourceLimitsQosPolicy initial_ResourceLimitsQosPolicy_
 
DDS::EntityFactoryQosPolicy initial_EntityFactoryQosPolicy_
 
DDS::WriterDataLifecycleQosPolicy initial_WriterDataLifecycleQosPolicy_
 
DDS::ReaderDataLifecycleQosPolicy initial_ReaderDataLifecycleQosPolicy_
 
DDS::PropertyQosPolicy initial_PropertyQosPolicy_
 
DDS::DataRepresentationQosPolicy initial_DataRepresentationQosPolicy_
 
DDS::DomainParticipantQos initial_DomainParticipantQos_
 
DDS::TopicQos initial_TopicQos_
 
DDS::DataWriterQos initial_DataWriterQos_
 
DDS::PublisherQos initial_PublisherQos_
 
DDS::DataReaderQos initial_DataReaderQos_
 
DDS::SubscriberQos initial_SubscriberQos_
 
DDS::DomainParticipantFactoryQos initial_DomainParticipantFactoryQos_
 
DDS::TypeConsistencyEnforcementQosPolicy initial_TypeConsistencyEnforcementQosPolicy_
 
size_t n_chunks_
 
size_t association_chunk_multiplier_
 
int liveliness_factor_
 The propagation delay factor. More...
 
ACE_TString bit_transport_ip_
 The builtin topic transport address. More...
 
int bit_transport_port_
 The builtin topic transport port number. More...
 
bool bit_enabled_
 
bool security_enabled_
 
int bit_lookup_duration_msec_
 
NetworkAddress default_address_
 The default network address to use. More...
 
ACE_TString global_transport_config_
 
int federation_recovery_duration_
 The FederationRecoveryDuration value in seconds. More...
 
int federation_initial_backoff_seconds_
 The FederationInitialBackoffSeconds value. More...
 
int federation_backoff_multiplier_
 This FederationBackoffMultiplier. More...
 
int federation_liveliness_
 This FederationLivelinessDuration. More...
 
ACE_TString schedulerString_
 Scheduling policy value from configuration file. More...
 
TimeDuration schedulerQuantum_
 Scheduler time slice from configuration file. More...
 
long scheduler_
 Scheduling policy value used for setting thread priorities. More...
 
int priority_min_
 Minimum priority value for the current scheduling policy. More...
 
int priority_max_
 Maximum priority value for the current scheduling policy. More...
 
bool publisher_content_filter_
 Allow the publishing side to do content filtering? More...
 
unique_ptr< DataDurabilityCachetransient_data_cache_
 The TRANSIENT data durability cache. More...
 
unique_ptr< DataDurabilityCachepersistent_data_cache_
 The PERSISTENT data durability cache. More...
 
ACE_CString persistent_data_dir_
 The PERSISTENT data durability directory. More...
 
TimeDuration pending_timeout_
 
bool bidir_giop_
 Enable TAO's Bidirectional GIOP? More...
 
ThreadStatusManager thread_status_manager_
 
ACE_Thread_Mutex xtypes_lock_
 Thread mutex used to protect the static initialization of XTypes data structures. More...
 
bool monitor_enabled_
 Enable Monitor functionality. More...
 
AtomicBool shut_down_
 Used to track state of service participant. More...
 
RcHandle< ShutdownListenershutdown_listener_
 
ACE_Recursive_Thread_Mutex maps_lock_
 Guard access to the internal maps. More...
 
ACE_TString default_configuration_file_
 
NetworkConfigMonitor_rch network_config_monitor_
 
ACE_Thread_Mutex network_config_monitor_lock_
 
DDS::Duration_t bit_autopurge_nowriter_samples_delay_
 
DDS::Duration_t bit_autopurge_disposed_samples_delay_
 
TypeObjectEncoding type_object_encoding_
 
RcHandle< InternalTopic< NetworkInterfaceAddress > > network_interface_address_topic_
 
unsigned int printer_value_writer_indent_
 

Static Private Attributes

static int zero_argc = 0
 

Detailed Description

Service entrypoint.

This class is a singleton that allows DDS client applications to configure OpenDDS.

Note
This class may read a configuration file that will configure Transports as well as DCPS (e.g. number of ORB threads).

Definition at line 70 of file Service_Participant.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Domain value for the default repository IOR.

Enumerator
ANY_DOMAIN 

Definition at line 73 of file Service_Participant.h.

◆ TypeObjectEncoding

Constructor & Destructor Documentation

◆ Service_Participant()

OpenDDS::DCPS::Service_Participant::Service_Participant ( )

Definition at line 176 of file Service_Participant.cpp.

References ACE_TEXT(), if(), and initialize().

177  :
178 #ifndef OPENDDS_SAFETY_PROFILE
179  ORB_argv_(false /*substitute_env_args*/),
180 #endif
181  time_source_()
182  , reactor_task_(false)
186  , liveliness_factor_(80)
188  , bit_enabled_(
189 #ifdef DDS_HAS_MINIMUM_BIT
190  false
191 #else
192  true
193 #endif
194  )
195 #ifdef OPENDDS_SECURITY
196  , security_enabled_(false)
197 #endif
200  , monitor_factory_(0)
205 #if OPENDDS_POOL_ALLOCATOR
206  , pool_size_(1024 * 1024 * 16)
207  , pool_granularity_(8)
208 #endif
209  , scheduler_(-1)
210  , priority_min_(0)
211  , priority_max_(0)
213 #ifndef OPENDDS_NO_PERSISTENCE_PROFILE
215 #endif
216  , bidir_giop_(true)
217  , monitor_enabled_(false)
218  , shut_down_(false)
221  , network_interface_address_topic_(make_rch<InternalTopic<NetworkInterfaceAddress> >())
223 {
224  initialize();
225 }
bool bidir_giop_
Enable TAO&#39;s Bidirectional GIOP?
int bit_transport_port_
The builtin topic transport port number.
ACE_CString persistent_data_dir_
The PERSISTENT data durability directory.
const int DEFAULT_FEDERATION_RECOVERY_DURATION
AtomicBool shut_down_
Used to track state of service participant.
const size_t DEFAULT_NUM_CHUNKS
int federation_initial_backoff_seconds_
The FederationInitialBackoffSeconds value.
#define DDS_DEFAULT_DISCOVERY_METHOD
const int DEFAULT_FEDERATION_INITIAL_BACKOFF_SECONDS
const int BIT_LOOKUP_DURATION_MSEC
bool publisher_content_filter_
Allow the publishing side to do content filtering?
bool monitor_enabled_
Enable Monitor functionality.
const int DEFAULT_FEDERATION_BACKOFF_MULTIPLIER
static const char DEFAULT_PERSISTENT_DATA_DIR[]
int federation_backoff_multiplier_
This FederationBackoffMultiplier.
const size_t DEFAULT_CHUNK_MULTIPLIER
void initialize()
Initialize default qos.
RcHandle< InternalTopic< NetworkInterfaceAddress > > network_interface_address_topic_
const int DEFAULT_FEDERATION_LIVELINESS
ACE_TEXT("TCP_Factory")
int priority_max_
Maximum priority value for the current scheduling policy.
int priority_min_
Minimum priority value for the current scheduling policy.
int federation_liveliness_
This FederationLivelinessDuration.
long scheduler_
Scheduling policy value used for setting thread priorities.
RcHandle< T > make_rch()
Definition: RcHandle_T.h:256
int liveliness_factor_
The propagation delay factor.
int federation_recovery_duration_
The FederationRecoveryDuration value in seconds.

◆ ~Service_Participant()

OpenDDS::DCPS::Service_Participant::~Service_Participant ( )

Definition at line 227 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_GUARD, OpenDDS::DCPS::DCPS_debug_level, dp_factory_servant_, factory_lock_, LM_DEBUG, LM_WARNING, OpenDDS::DCPS::log_level, DDS::RETCODE_ALREADY_DELETED, DDS::RETCODE_OK, OpenDDS::DCPS::retcode_to_string(), shutdown(), and OpenDDS::DCPS::LogLevel::Warning.

228 {
229  if (DCPS_debug_level >= 1) {
230  ACE_DEBUG((LM_DEBUG, "(%P|%t) Service_Participant::~Service_Participant\n"));
231  }
232 
233  {
235  if (dp_factory_servant_) {
236  const size_t count = dp_factory_servant_->participant_count();
237  if (count > 0 && log_level >= LogLevel::Warning) {
238  ACE_ERROR((LM_WARNING, "(%P|%t) WARNING: Service_Participant::~Service_Participant: "
239  "There are %B remaining domain participant(s). "
240  "It is recommended to delete them before shutdown.\n",
241  count));
242  }
243 
244  const DDS::ReturnCode_t cleanup_status = dp_factory_servant_->delete_all_participants();
245  if (cleanup_status) {
246  if (log_level >= LogLevel::Warning) {
247  ACE_ERROR((LM_WARNING, "(%P|%t) WARNING: Service_Participant::~Service_Participant: "
248  "delete_all_participants returned %C\n",
249  retcode_to_string(cleanup_status)));
250  }
251  }
252  }
253  }
254 
255  const DDS::ReturnCode_t shutdown_status = shutdown();
256  if (shutdown_status != DDS::RETCODE_OK && shutdown_status != DDS::RETCODE_ALREADY_DELETED) {
257  if (log_level >= LogLevel::Warning) {
258  ACE_ERROR((LM_WARNING, "(%P|%t) WARNING: Service_Participant::~Service_Participant: "
259  "shutdown returned %C\n",
260  retcode_to_string(shutdown_status)));
261  }
262  }
263 }
OpenDDS_Dcps_Export LogLevel log_level
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
const char * retcode_to_string(DDS::ReturnCode_t value)
Definition: DCPS_Utils.cpp:29
const ReturnCode_t RETCODE_OK
const ReturnCode_t RETCODE_ALREADY_DELETED
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
RcHandle< DomainParticipantFactoryImpl > dp_factory_servant_

Member Function Documentation

◆ add_discovery()

void OpenDDS::DCPS::Service_Participant::add_discovery ( Discovery_rch  discovery)

Definition at line 2801 of file Service_Participant.cpp.

References ACE_GUARD, discoveryMap_, and maps_lock_.

Referenced by load_configuration().

2802 {
2803  if (discovery) {
2805  this->discoveryMap_[discovery->key()] = discovery;
2806  }
2807 }
#define ACE_GUARD(MUTEX, OBJ, LOCK)
RepoKeyDiscoveryMap discoveryMap_
The RepoKey to Discovery object mapping.
ACE_Recursive_Thread_Mutex maps_lock_
Guard access to the internal maps.

◆ association_chunk_multiplier() [1/2]

size_t OpenDDS::DCPS::Service_Participant::association_chunk_multiplier ( ) const

This accessor is to provide the multiplier for allocators that have resources used on a per association basis. Has a default, can be set by the -DCPSChunkAssociationMultiplier option, or by n_association_chunk_multiplier() setter.

Definition at line 1500 of file Service_Participant.cpp.

References association_chunk_multiplier_.

1501 {
1503 }

◆ association_chunk_multiplier() [2/2]

void OpenDDS::DCPS::Service_Participant::association_chunk_multiplier ( size_t  multiplier)

Set the value returned by n_association_chunk_multiplier() accessor. See accessor description.

Definition at line 1506 of file Service_Participant.cpp.

References association_chunk_multiplier_.

1507 {
1508  association_chunk_multiplier_ = multiplier;
1510 }
static bool got_chunk_association_multiplier

◆ belongs_to_domain_range()

bool OpenDDS::DCPS::Service_Participant::belongs_to_domain_range ( DDS::DomainId_t  domainId) const

Used by TransportRegistry to determine if a domain ID is part of a [DomainRange]

Definition at line 2360 of file Service_Participant.cpp.

References OPENDDS_VECTOR().

2361 {
2362  for (OPENDDS_VECTOR(DomainRange)::const_iterator i = domain_ranges_.begin(); i != domain_ranges_.end(); ++i) {
2363  if (domainId >= i->range_start && domainId <= i->range_end) {
2364  return true;
2365  }
2366  }
2367 
2368  return false;
2369 }
OPENDDS_VECTOR(DomainRange) domain_ranges_

◆ bit_autopurge_disposed_samples_delay() [1/2]

DDS::Duration_t OpenDDS::DCPS::Service_Participant::bit_autopurge_disposed_samples_delay ( ) const

Definition at line 2928 of file Service_Participant.cpp.

References bit_autopurge_disposed_samples_delay_.

2929 {
2931 }

◆ bit_autopurge_disposed_samples_delay() [2/2]

void OpenDDS::DCPS::Service_Participant::bit_autopurge_disposed_samples_delay ( const DDS::Duration_t duration)

Definition at line 2934 of file Service_Participant.cpp.

References bit_autopurge_disposed_samples_delay_.

2935 {
2937 }

◆ bit_autopurge_nowriter_samples_delay() [1/2]

DDS::Duration_t OpenDDS::DCPS::Service_Participant::bit_autopurge_nowriter_samples_delay ( ) const

Definition at line 2916 of file Service_Participant.cpp.

References bit_autopurge_nowriter_samples_delay_.

2917 {
2919 }

◆ bit_autopurge_nowriter_samples_delay() [2/2]

void OpenDDS::DCPS::Service_Participant::bit_autopurge_nowriter_samples_delay ( const DDS::Duration_t duration)

Definition at line 2922 of file Service_Participant.cpp.

References bit_autopurge_nowriter_samples_delay_.

2923 {
2925 }

◆ bit_lookup_duration_msec() [1/2]

int OpenDDS::DCPS::Service_Participant::bit_lookup_duration_msec ( ) const

Accessor for bit_lookup_duration_msec_. The accessor is used for client application to configure the timeout for lookup data from the builtin topic datareader. Value is in milliseconds.

Definition at line 1474 of file Service_Participant.cpp.

References bit_lookup_duration_msec_.

1475 {
1477 }

◆ bit_lookup_duration_msec() [2/2]

void OpenDDS::DCPS::Service_Participant::bit_lookup_duration_msec ( int  msec)

Accessor for bit_lookup_duration_msec_. The accessor is used for client application to configure the timeout for lookup data from the builtin topic datareader. Value is in milliseconds.

Definition at line 1480 of file Service_Participant.cpp.

References bit_lookup_duration_msec_.

1481 {
1484 }
static bool got_bit_lookup_duration_msec

◆ bit_transport_ip()

OPENDDS_STRING OpenDDS::DCPS::Service_Participant::bit_transport_ip ( ) const

Definition at line 1454 of file Service_Participant.cpp.

References ACE_TEXT_ALWAYS_CHAR, bit_transport_ip_, and ACE_String_Base< char >::c_str().

1455 {
1457 }
const char * c_str(void) const
#define ACE_TEXT_ALWAYS_CHAR(STRING)
ACE_TString bit_transport_ip_
The builtin topic transport address.

◆ bit_transport_port() [1/2]

int OpenDDS::DCPS::Service_Participant::bit_transport_port ( ) const

Accessors for bit_transport_port_.

The accessor is used for client application to configure the local transport listening port number.

Note
The default port is INVALID. The user needs call this function to setup the desired port number.

Definition at line 1460 of file Service_Participant.cpp.

References bit_transport_port_.

1461 {
1462  return this->bit_transport_port_;
1463 }
int bit_transport_port_
The builtin topic transport port number.

◆ bit_transport_port() [2/2]

void OpenDDS::DCPS::Service_Participant::bit_transport_port ( int  port)

Accessors for bit_transport_port_.

The accessor is used for client application to configure the local transport listening port number.

Note
The default port is INVALID. The user needs call this function to setup the desired port number.

Definition at line 1466 of file Service_Participant.cpp.

References ACE_GUARD, bit_transport_port_, and maps_lock_.

1467 {
1469  this->bit_transport_port_ = port;
1470  got_bit_transport_port = true;
1471 }
#define ACE_GUARD(MUTEX, OBJ, LOCK)
int bit_transport_port_
The builtin topic transport port number.
ACE_Recursive_Thread_Mutex maps_lock_
Guard access to the internal maps.
static bool got_bit_transport_port

◆ configure_discovery_template()

int OpenDDS::DCPS::Service_Participant::configure_discovery_template ( DDS::DomainId_t  domainId,
const OPENDDS_STRING discovery_name 
)
private

Create and load a discovery config from a discovery template

Definition at line 2421 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR_RETURN, ACE_TEXT(), ACE_TEXT_CHAR_TO_TCHAR, OpenDDS::DCPS::DCPS_debug_level, discoveryMap_, get_discovery_template_instance_name(), LM_DEBUG, LM_ERROR, load_discovery_configuration(), name, ACE_Configuration_Heap::open(), ACE_Configuration_Heap::open_section(), process_customizations(), ACE_Configuration::root_section(), and ACE_Configuration_Heap::set_string_value().

Referenced by get_discovery().

2422 {
2423  ValueMap discovery_settings;
2424  if (process_customizations(domainId, discovery_name, discovery_settings)) {
2426 
2427  if (discoveryMap_.find(name) == discoveryMap_.end()) {
2429  dcf.open();
2430  const ACE_Configuration_Section_Key& root = dcf.root_section();
2431 
2432  //create discovery instance
2434  dcf.open_section(root, RTPS_SECTION_NAME, true /* create */, sect);
2436  dcf.open_section(sect, ACE_TEXT_CHAR_TO_TCHAR(name.c_str()), true, sub_sect);
2437 
2438  for (ValueMap::const_iterator ds_it = discovery_settings.begin(); ds_it != discovery_settings.end(); ++ds_it) {
2439  dcf.set_string_value(sub_sect, ACE_TEXT_CHAR_TO_TCHAR(ds_it->first.c_str()), ACE_TEXT_CHAR_TO_TCHAR(ds_it->second.c_str()));
2440  if (DCPS_debug_level > 0) {
2441  ACE_DEBUG((LM_DEBUG,
2442  ACE_TEXT("(%P|%t) Service_Participant::configure_discovery_template(): ")
2443  ACE_TEXT("setting %C = %C\n"),
2444  ds_it->first.c_str(), ds_it->second.c_str()));
2445  }
2446  }
2447 
2448  // load discovery
2449  int status = this->load_discovery_configuration(dcf, RTPS_SECTION_NAME);
2450 
2451  if (status != 0) {
2452  ACE_ERROR_RETURN((LM_ERROR,
2453  ACE_TEXT("(%P|%t) ERROR: Service_Participant::configure_discovery_template(): ")
2454  ACE_TEXT("load_discovery_configuration() returned %d\n"),
2455  status),
2456  -1);
2457  }
2458  } else {
2459  // already configured. not necessarily an error
2460  if (DCPS_debug_level > 0) {
2461  ACE_DEBUG((LM_DEBUG,
2462  ACE_TEXT("(%P|%t) Discovery config %C already exists\n"),
2463  name.c_str()));
2464  }
2465 
2466  }
2467  } else {
2468  ACE_ERROR_RETURN((LM_ERROR,
2469  ACE_TEXT("(%P|%t) ERROR: Service_Participant::configure_discovery_template(): ")
2470  ACE_TEXT("process_customizations() returned false\n")),
2471  -1);
2472  }
2473 
2474  return 0;
2475 }
#define ACE_DEBUG(X)
virtual int set_string_value(const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, const ACE_TString &value)
virtual const ACE_Configuration_Section_Key & root_section(void) const
RepoKeyDiscoveryMap discoveryMap_
The RepoKey to Discovery object mapping.
static const ACE_TCHAR RTPS_SECTION_NAME[]
OpenDDS::DCPS::Discovery::RepoKey get_discovery_template_instance_name(DDS::DomainId_t id)
OPENDDS_STRING RepoKey
Definition: Discovery.h:80
#define ACE_TEXT_CHAR_TO_TCHAR(STRING)
int load_discovery_configuration(ACE_Configuration_Heap &cf, const ACE_TCHAR *section_name)
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const char *const name
Definition: debug.cpp:60
ACE_TEXT("TCP_Factory")
bool process_customizations(DDS::DomainId_t id, const OPENDDS_STRING &discovery_name, ValueMap &customs)
virtual int open_section(const ACE_Configuration_Section_Key &base, const ACE_TCHAR *sub_section, bool create, ACE_Configuration_Section_Key &result)
int open(const ACE_TCHAR *file_name, void *base_address=ACE_DEFAULT_BASE_ADDR, size_t default_map_size=ACE_DEFAULT_CONFIG_SECTION_SIZE)
#define ACE_ERROR_RETURN(X, Y)

◆ configure_domain_range_instance()

int OpenDDS::DCPS::Service_Participant::configure_domain_range_instance ( DDS::DomainId_t  domainId)
private

Process the domain range template and activate the domain for the given domain ID

Definition at line 2244 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR_RETURN, ACE_TEXT(), ACE_TEXT_CHAR_TO_TCHAR, OpenDDS::DCPS::TransportRegistry::create_transport_template_instance(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::Service_Participant::DomainRange::discovery_template_name, discoveryMap_, OpenDDS::DCPS::Service_Participant::DomainRange::domain_info, OpenDDS::DCPS::TransportRegistry::get_config_instance_name(), get_discovery_template_instance_name(), get_domain_range_info(), get_transport_base_config_name(), OpenDDS::DCPS::TransportRegistry::instance(), LM_DEBUG, LM_ERROR, load_discovery_configuration(), load_domain_configuration(), name, ACE_Configuration_Heap::open(), ACE_Configuration_Heap::open_section(), OPENDDS_STRING, process_customizations(), ACE_Configuration::root_section(), ACE_Configuration_Heap::set_string_value(), OpenDDS::DCPS::to_dds_string(), and OpenDDS::DCPS::Service_Participant::DomainRange::transport_config_name.

Referenced by get_discovery().

2245 {
2247 
2248  if (discoveryMap_.find(name) == discoveryMap_.end()) {
2249  // create a cf that has [rtps_discovery/name+domainId]
2250  // copy sections adding customization
2251  DomainRange dr_inst;
2252 
2253  if (get_domain_range_info(domainId, dr_inst)) {
2255  dcf.open();
2256  const ACE_Configuration_Section_Key& root = dcf.root_section();
2257 
2258  // set the transport_config_name
2259  domain_to_transport_name_map_[domainId] = dr_inst.transport_config_name;
2260 
2261  // create domain instance
2263  dcf.open_section(root, DOMAIN_SECTION_NAME, true /* create */, dsect);
2265  dcf.open_section(dsect, ACE_TEXT_CHAR_TO_TCHAR(to_dds_string(domainId).c_str()), true /* create */, dsub_sect);
2266  dcf.set_string_value(dsub_sect, ACE_TEXT("DiscoveryConfig"), ACE_TEXT_CHAR_TO_TCHAR(name.c_str()));
2267  for (ValueMap::const_iterator it = dr_inst.domain_info.begin();
2268  it != dr_inst.domain_info.end();
2269  ++it) {
2270  dcf.set_string_value(dsub_sect, ACE_TEXT_CHAR_TO_TCHAR(it->first.c_str()), ACE_TEXT_CHAR_TO_TCHAR(it->second.c_str()));
2271  if (DCPS_debug_level > 0) {
2272  ACE_DEBUG((LM_DEBUG,
2273  ACE_TEXT("(%P|%t) Service_Participant::")
2274  ACE_TEXT("configure_domain_range_instance(): adding %C=%C\n"),
2275  it->first.c_str(), it->second.c_str()));
2276  }
2277  }
2278 
2279  ACE_TString cfg_name;
2280  if (get_transport_base_config_name(domainId, cfg_name)) {
2281  if (TransportRegistry::instance()->config_has_transport_template(cfg_name)) {
2282  // create transport instance add default transport config
2284  const OPENDDS_STRING config_instance_name = TransportRegistry::instance()->get_config_instance_name(domainId);
2285  dcf.set_string_value(dsub_sect, ACE_TEXT("DefaultTransportConfig"),
2286  ACE_TEXT_CHAR_TO_TCHAR(config_instance_name.c_str()));
2287  if (DCPS_debug_level > 0) {
2288  ACE_DEBUG((LM_DEBUG,
2289  ACE_TEXT("(%P|%t) Service_Participant::")
2290  ACE_TEXT("configure_domain_range_instance(): setting DefaultTransportConfig=%C\n"),
2291  config_instance_name.c_str()));
2292  }
2293  }
2294  } else {
2295  ACE_ERROR_RETURN((LM_ERROR,
2296  ACE_TEXT("(%P|%t) ERROR: Service_Participant::")
2297  ACE_TEXT("configure_domain_range_instance(): ")
2298  ACE_TEXT("transport config not found for domain %d\n"),
2299  domainId),
2300  -1);
2301  }
2302 
2303  //create matching discovery instance
2305  dcf.open_section(root, RTPS_SECTION_NAME, true /* create */, sect);
2307  dcf.open_section(sect, ACE_TEXT_CHAR_TO_TCHAR(name.c_str()), true, sub_sect);
2308 
2309  ValueMap discovery_settings;
2310  if (process_customizations(domainId, dr_inst.discovery_template_name, discovery_settings)) {
2311  for (ValueMap::const_iterator ds_it = discovery_settings.begin(); ds_it != discovery_settings.end(); ++ds_it) {
2312  dcf.set_string_value(sub_sect, ACE_TEXT_CHAR_TO_TCHAR(ds_it->first.c_str()), ACE_TEXT_CHAR_TO_TCHAR(ds_it->second.c_str()));
2313  }
2314  }
2315 
2316  // load discovery
2317  int status = this->load_discovery_configuration(dcf, RTPS_SECTION_NAME);
2318 
2319  if (status != 0) {
2320  ACE_ERROR_RETURN((LM_ERROR,
2321  ACE_TEXT("(%P|%t) ERROR: Service_Participant::configure_domain_range_instance(): ")
2322  ACE_TEXT("load_discovery_configuration() returned %d\n"),
2323  status),
2324  -1);
2325  }
2326 
2327  // load domain config
2328  status = this->load_domain_configuration(dcf, 0);
2329 
2330  if (status != 0) {
2331  ACE_ERROR_RETURN((LM_ERROR,
2332  ACE_TEXT("(%P|%t) ERROR: Service_Participant::configure_domain_range_instance(): ")
2333  ACE_TEXT("load_domain_configuration() returned %d\n"),
2334  status),
2335  -1);
2336  }
2337 
2338  if (DCPS_debug_level > 4) {
2339  ACE_DEBUG((LM_DEBUG,
2340  ACE_TEXT("(%P|%t) Service_Participant::configure_domain_range_instance(): ")
2341  ACE_TEXT("configure domain %d.\n"),
2342  domainId));
2343  }
2344  }
2345 
2346  } else {
2347  // > 9 to limit number of messages.
2348  if (DCPS_debug_level > 9) {
2349  ACE_DEBUG((LM_DEBUG,
2350  ACE_TEXT("(%P|%t) Service_Participant::configure_domain_range_instance(): ")
2351  ACE_TEXT("domain %d already configured.\n"),
2352  domainId));
2353  }
2354  }
2355  return 0;
2356 }
#define ACE_DEBUG(X)
virtual int set_string_value(const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, const ACE_TString &value)
int load_domain_configuration(ACE_Configuration_Heap &cf, const ACE_TCHAR *filename)
virtual const ACE_Configuration_Section_Key & root_section(void) const
RepoKeyDiscoveryMap discoveryMap_
The RepoKey to Discovery object mapping.
static const ACE_TCHAR RTPS_SECTION_NAME[]
static TransportRegistry * instance()
Return a singleton instance of this class.
#define OPENDDS_STRING
static const ACE_TCHAR DOMAIN_SECTION_NAME[]
OpenDDS::DCPS::Discovery::RepoKey get_discovery_template_instance_name(DDS::DomainId_t id)
bool get_transport_base_config_name(DDS::DomainId_t domainId, ACE_TString &name) const
bool get_domain_range_info(DDS::DomainId_t id, DomainRange &inst)
OPENDDS_STRING RepoKey
Definition: Discovery.h:80
#define ACE_TEXT_CHAR_TO_TCHAR(STRING)
int load_discovery_configuration(ACE_Configuration_Heap &cf, const ACE_TCHAR *section_name)
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const char *const name
Definition: debug.cpp:60
ACE_TEXT("TCP_Factory")
bool process_customizations(DDS::DomainId_t id, const OPENDDS_STRING &discovery_name, ValueMap &customs)
virtual int open_section(const ACE_Configuration_Section_Key &base, const ACE_TCHAR *sub_section, bool create, ACE_Configuration_Section_Key &result)
int create_transport_template_instance(DDS::DomainId_t domain, const ACE_TString &config_name)
int open(const ACE_TCHAR *file_name, void *base_address=ACE_DEFAULT_BASE_ADDR, size_t default_map_size=ACE_DEFAULT_CONFIG_SECTION_SIZE)
#define ACE_ERROR_RETURN(X, Y)
String to_dds_string(unsigned short to_convert)
OPENDDS_STRING get_config_instance_name(DDS::DomainId_t id)

◆ create_recorder()

Recorder_ptr OpenDDS::DCPS::Service_Participant::create_recorder ( DDS::DomainParticipant_ptr  participant,
DDS::Topic_ptr  a_topic,
const DDS::SubscriberQos subscriber_qos,
const DDS::DataReaderQos datareader_qos,
const RecorderListener_rch a_listener 
)

Create a Recorder object.

Definition at line 2828 of file Service_Participant.cpp.

References OpenDDS::DCPS::DomainParticipantImpl::create_recorder().

2833 {
2834  DomainParticipantImpl* participant_servant = dynamic_cast<DomainParticipantImpl*>(participant);
2835  if (participant_servant)
2836  return participant_servant->create_recorder(a_topic, subscriber_qos, datareader_qos, a_listener, 0);
2837  return 0;
2838 }

◆ create_replayer()

Replayer_ptr OpenDDS::DCPS::Service_Participant::create_replayer ( DDS::DomainParticipant_ptr  participant,
DDS::Topic_ptr  a_topic,
const DDS::PublisherQos publisher_qos,
const DDS::DataWriterQos datawriter_qos,
const ReplayerListener_rch a_listener 
)

Create a Replayer object

Definition at line 2853 of file Service_Participant.cpp.

References OpenDDS::DCPS::DomainParticipantImpl::create_replayer().

2858 {
2859  DomainParticipantImpl* participant_servant = dynamic_cast<DomainParticipantImpl*>(participant);
2860  if (participant_servant)
2861  return participant_servant->create_replayer(a_topic, publisher_qos, datawriter_qos, a_listener, 0);
2862  return 0;
2863 }

◆ create_typeless_topic()

DDS::Topic_ptr OpenDDS::DCPS::Service_Participant::create_typeless_topic ( DDS::DomainParticipant_ptr  participant,
const char *  topic_name,
const char *  type_name,
bool  type_has_keys,
const DDS::TopicQos qos,
DDS::TopicListener_ptr  a_listener = 0,
DDS::StatusMask  mask = 0 
)

Create a topic that does not have the data type registered.

Definition at line 2877 of file Service_Participant.cpp.

References OpenDDS::DCPS::DomainParticipantImpl::create_typeless_topic().

2885 {
2886  DomainParticipantImpl* participant_servant = dynamic_cast<DomainParticipantImpl*>(participant);
2887  if (!participant_servant) {
2888  return 0;
2889  }
2890  return participant_servant->create_typeless_topic(topic_name, type_name, type_has_keys, qos, a_listener, mask);
2891 }

◆ default_address()

const NetworkAddress& OpenDDS::DCPS::Service_Participant::default_address ( ) const
inline

Definition at line 337 of file Service_Participant.h.

References OpenDDS::DCPS::OPENDDS_MAP().

337 { return default_address_; }
NetworkAddress default_address_
The default network address to use.

◆ default_configuration_file()

void OpenDDS::DCPS::Service_Participant::default_configuration_file ( const ACE_TCHAR path)

Set a configuration file to use if -DCPSConfigFile wasn't passed to TheParticipantFactoryWithArgs. Must be used before TheParticipantFactory*() functions are called.

Definition at line 2893 of file Service_Participant.cpp.

References default_configuration_file_.

2894 {
2896 }

◆ delete_recorder()

DDS::ReturnCode_t OpenDDS::DCPS::Service_Participant::delete_recorder ( Recorder_ptr  recorder)

Delete an existing Recorder from its DomainParticipant.

Definition at line 2841 of file Service_Participant.cpp.

References OpenDDS::DCPS::RecorderImpl::cleanup(), OpenDDS::DCPS::DomainParticipantImpl::delete_recorder(), OpenDDS::DCPS::RecorderImpl::participant(), and DDS::RETCODE_ERROR.

2842 {
2844  RecorderImpl* impl = dynamic_cast<RecorderImpl*>(recorder);
2845  if (impl){
2846  ret = impl->cleanup();
2847  impl->participant()->delete_recorder(recorder);
2848  }
2849  return ret;
2850 }
const ReturnCode_t RETCODE_ERROR

◆ delete_replayer()

DDS::ReturnCode_t OpenDDS::DCPS::Service_Participant::delete_replayer ( Replayer_ptr  replayer)

Delete an existing Replayer from its DomainParticipant.

Definition at line 2866 of file Service_Participant.cpp.

References OpenDDS::DCPS::ReplayerImpl::cleanup(), OpenDDS::DCPS::DomainParticipantImpl::delete_replayer(), OpenDDS::DCPS::ReplayerImpl::participant(), and DDS::RETCODE_ERROR.

2867 {
2869  ReplayerImpl* impl = static_cast<ReplayerImpl*>(replayer);
2870  if (impl) {
2871  ret = impl->cleanup();
2872  impl->participant()->delete_replayer(replayer);
2873  }
2874  return ret;
2875 }
const ReturnCode_t RETCODE_ERROR

◆ discoveryMap()

const Service_Participant::RepoKeyDiscoveryMap & OpenDDS::DCPS::Service_Participant::discoveryMap ( ) const

Definition at line 2816 of file Service_Participant.cpp.

References discoveryMap_.

2817 {
2818  return this->discoveryMap_;
2819 }
RepoKeyDiscoveryMap discoveryMap_
The RepoKey to Discovery object mapping.

◆ domain_to_repo()

ACE_INLINE Discovery::RepoKey OpenDDS::DCPS::Service_Participant::domain_to_repo ( const DDS::DomainId_t  domain) const

Convert domainId to repository key.

Definition at line 15 of file Service_Participant.inl.

References ACE_INLINE, OpenDDS::DCPS::Discovery::DEFAULT_REPO, and domainRepoMap_.

16 {
17  DomainRepoMap::const_iterator where = domainRepoMap_.find(domain);
18 
19  if (where == domainRepoMap_.end()) {
21 
22  } else {
23  return where->second;
24  }
25 }
static const char * DEFAULT_REPO
Key value for the default repository IOR.
Definition: Discovery.h:85
DomainRepoMap domainRepoMap_
The DomainId to RepoKey mapping.

◆ domainRepoMap()

const Service_Participant::DomainRepoMap & OpenDDS::DCPS::Service_Participant::domainRepoMap ( ) const

Definition at line 2822 of file Service_Participant.cpp.

References domainRepoMap_.

2823 {
2824  return this->domainRepoMap_;
2825 }
DomainRepoMap domainRepoMap_
The DomainId to RepoKey mapping.

◆ federation_backoff_multiplier() [1/2]

ACE_INLINE int & OpenDDS::DCPS::Service_Participant::federation_backoff_multiplier ( )

Accessors for FederationBackoffMultiplier.

Definition at line 283 of file Service_Participant.inl.

References ACE_INLINE, and federation_backoff_multiplier_.

Referenced by repository_lost().

284 {
286 }
int federation_backoff_multiplier_
This FederationBackoffMultiplier.

◆ federation_backoff_multiplier() [2/2]

ACE_INLINE int OpenDDS::DCPS::Service_Participant::federation_backoff_multiplier ( ) const

Accessors for FederationBackoffMultiplier.

Definition at line 290 of file Service_Participant.inl.

References ACE_INLINE, and federation_backoff_multiplier_.

291 {
293 }
int federation_backoff_multiplier_
This FederationBackoffMultiplier.

◆ federation_initial_backoff_seconds() [1/2]

ACE_INLINE int & OpenDDS::DCPS::Service_Participant::federation_initial_backoff_seconds ( )

Accessors for FederationInitialBackoffSeconds.

Definition at line 269 of file Service_Participant.inl.

References ACE_INLINE, and federation_initial_backoff_seconds_.

Referenced by repository_lost().

270 {
272 }
int federation_initial_backoff_seconds_
The FederationInitialBackoffSeconds value.

◆ federation_initial_backoff_seconds() [2/2]

ACE_INLINE int OpenDDS::DCPS::Service_Participant::federation_initial_backoff_seconds ( ) const

Accessors for FederationInitialBackoffSeconds.

Definition at line 276 of file Service_Participant.inl.

References ACE_INLINE, and federation_initial_backoff_seconds_.

277 {
279 }
int federation_initial_backoff_seconds_
The FederationInitialBackoffSeconds value.

◆ federation_liveliness() [1/2]

ACE_INLINE int & OpenDDS::DCPS::Service_Participant::federation_liveliness ( )

Accessors for FederationLivelinessDuration.

Definition at line 297 of file Service_Participant.inl.

References ACE_INLINE, and federation_liveliness_.

298 {
299  return federation_liveliness_;
300 }
int federation_liveliness_
This FederationLivelinessDuration.

◆ federation_liveliness() [2/2]

ACE_INLINE int OpenDDS::DCPS::Service_Participant::federation_liveliness ( ) const

Accessors for FederationLivelinessDuration.

Definition at line 304 of file Service_Participant.inl.

References ACE_INLINE, and federation_liveliness_.

305 {
306  return federation_liveliness_;
307 }
int federation_liveliness_
This FederationLivelinessDuration.

◆ federation_recovery_duration() [1/2]

ACE_INLINE int & OpenDDS::DCPS::Service_Participant::federation_recovery_duration ( )

Accessors for FederationRecoveryDuration in seconds.

Definition at line 255 of file Service_Participant.inl.

References ACE_INLINE, and federation_recovery_duration_.

Referenced by repository_lost().

256 {
258 }
int federation_recovery_duration_
The FederationRecoveryDuration value in seconds.

◆ federation_recovery_duration() [2/2]

ACE_INLINE int OpenDDS::DCPS::Service_Participant::federation_recovery_duration ( ) const

Accessors for FederationRecoveryDuration in seconds.

Definition at line 262 of file Service_Participant.inl.

References ACE_INLINE, and federation_recovery_duration_.

263 {
265 }
int federation_recovery_duration_
The FederationRecoveryDuration value in seconds.

◆ get_BIT()

bool OpenDDS::DCPS::Service_Participant::get_BIT ( )
inline

Definition at line 329 of file Service_Participant.h.

329  {
330  return bit_enabled_;
331  }

◆ get_data_durability_cache()

DataDurabilityCache * OpenDDS::DCPS::Service_Participant::get_data_durability_cache ( DDS::DurabilityQosPolicy const &  durability)

Get the data durability cache corresponding to the given DurabilityQosPolicy and sample list depth.

Definition at line 2752 of file Service_Participant.cpp.

References ACE_ERROR, ACE_GUARD_RETURN, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, factory_lock_, DDS::DurabilityQosPolicy::kind, LM_WARNING, persistent_data_cache_, persistent_data_dir_, DDS::PERSISTENT_DURABILITY_QOS, transient_data_cache_, and DDS::TRANSIENT_DURABILITY_QOS.

2754 {
2755  DDS::DurabilityQosPolicyKind const kind =
2756  durability.kind;
2757 
2758  DataDurabilityCache * cache = 0;
2759 
2760  if (kind == DDS::TRANSIENT_DURABILITY_QOS) {
2761  {
2763 
2764  if (!this->transient_data_cache_) {
2765  this->transient_data_cache_.reset(new DataDurabilityCache(kind));
2766  }
2767  }
2768 
2769  cache = this->transient_data_cache_.get();
2770 
2771  } else if (kind == DDS::PERSISTENT_DURABILITY_QOS) {
2772  {
2774 
2775  try {
2776  if (!this->persistent_data_cache_) {
2777  this->persistent_data_cache_.reset(new DataDurabilityCache(kind,
2778  this->persistent_data_dir_));
2779  }
2780 
2781  } catch (const std::exception& ex) {
2782  if (DCPS_debug_level > 0) {
2783  ACE_ERROR((LM_WARNING,
2784  ACE_TEXT("(%P|%t) WARNING: Service_Participant::get_data_durability_cache ")
2785  ACE_TEXT("failed to create PERSISTENT cache, falling back on ")
2786  ACE_TEXT("TRANSIENT behavior: %C\n"), ex.what()));
2787  }
2788 
2789  this->persistent_data_cache_.reset(new DataDurabilityCache(DDS::TRANSIENT_DURABILITY_QOS));
2790  }
2791  }
2792 
2793  cache = this->persistent_data_cache_.get();
2794  }
2795 
2796  return cache;
2797 }
unique_ptr< DataDurabilityCache > persistent_data_cache_
The PERSISTENT data durability cache.
#define ACE_ERROR(X)
ACE_CString persistent_data_dir_
The PERSISTENT data durability directory.
unique_ptr< DataDurabilityCache > transient_data_cache_
The TRANSIENT data durability cache.
DurabilityQosPolicyKind
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
ACE_TEXT("TCP_Factory")

◆ get_default_discovery()

Discovery::RepoKey OpenDDS::DCPS::Service_Participant::get_default_discovery ( )

Definition at line 1301 of file Service_Participant.cpp.

References defaultDiscovery_.

1302 {
1303  return this->defaultDiscovery_;
1304 }

◆ get_discovery()

Discovery_rch OpenDDS::DCPS::Service_Participant::get_discovery ( const DDS::DomainId_t  domain)

Accessor of the Discovery object for a given domain.

Definition at line 1307 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_GUARD_RETURN, ACE_TEXT(), configure_discovery_template(), configure_domain_range_instance(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::Discovery::DEFAULT_REPO, OpenDDS::DCPS::Discovery::DEFAULT_RTPS, defaultDiscovery_, discoveryMap_, domainRepoMap_, get_discovery_template_instance_name(), get_domain_range_info(), is_discovery_template(), LM_DEBUG, LM_ERROR, load_discovery_configuration(), maps_lock_, ACE_Configuration_Heap::open(), ACE_Configuration_Heap::open_section(), OPENDDS_STRING, ACE_Configuration::root_section(), OpenDDS::DCPS::RTPS_SECTION_NAME, and set_repo_ior().

Referenced by InfoRepo::init().

1308 {
1310 
1311  // Default to the Default InfoRepo-based discovery unless the user has
1312  // changed defaultDiscovery_ using the API or config file
1314  bool in_range = false;
1315  const Discovery::RepoKey instance_name = get_discovery_template_instance_name(domain);
1316  DomainRange dr_inst;
1317 
1318  RepoKeyDiscoveryMap::const_iterator location;
1319 
1320  // Find if this domain has a repo key (really a discovery key)
1321  // mapped to it.
1322  DomainRepoMap::const_iterator where = this->domainRepoMap_.find(domain);
1323  if (where != this->domainRepoMap_.end()) {
1324  repo = where->second;
1325  } else {
1326  // Is domain part of a DomainRange template?
1327  in_range = get_domain_range_info(domain, dr_inst);
1328  }
1329 
1330  // check to see if this domain has a discovery template
1331  // and if the template instance has already been loaded.
1332  if (!in_range && is_discovery_template(repo)) {
1333  location = this->discoveryMap_.find(instance_name);
1334  if (location == this->discoveryMap_.end()) {
1335  if (configure_discovery_template(domain, repo)) {
1336  repo = instance_name;
1337  }
1338  }
1339  }
1340 
1341  location = this->discoveryMap_.find(repo);
1342 
1343  if (location == this->discoveryMap_.end()) {
1344  if (in_range) {
1345  const int ret = configure_domain_range_instance(domain);
1346 
1347  // return the newly configured domain and return it
1348  if (!ret) {
1349  return this->discoveryMap_[instance_name];
1350  } else {
1351  if (DCPS_debug_level > 0) {
1352  ACE_DEBUG((LM_DEBUG,
1353  ACE_TEXT("(%P|%t) Service_Participant::get_discovery: ")
1354  ACE_TEXT("failed attempt to set RTPS discovery for domain range %d.\n"),
1355  domain));
1356  }
1357 
1358  return Discovery_rch();
1359  }
1360  } else if ((repo == Discovery::DEFAULT_REPO) ||
1361  (repo == "-1")) {
1362  // Set the default repository IOR if it hasn't already happened
1363  // by this point. This is why this can't be const.
1365 
1366  if (!ok) {
1367  if (DCPS_debug_level > 0) {
1368  ACE_DEBUG((LM_DEBUG,
1369  ACE_TEXT("(%P|%t) Service_Participant::get_discovery: ")
1370  ACE_TEXT("failed attempt to set default IOR for domain %d.\n"),
1371  domain));
1372  }
1373 
1374  } else {
1375  // Found the default!
1376  if (DCPS_debug_level > 4) {
1377  ACE_DEBUG((LM_DEBUG,
1378  ACE_TEXT("(%P|%t) Service_Participant::get_discovery: ")
1379  ACE_TEXT("returning default repository for domain %d.\n"),
1380  domain));
1381  }
1382 
1383  }
1384  return this->discoveryMap_[Discovery::DEFAULT_REPO];
1385 
1386  } else if (repo == Discovery::DEFAULT_RTPS) {
1387 
1389  cf.open();
1391  cf.open_section(cf.root_section(), RTPS_SECTION_NAME, true /*create*/, k);
1392 
1394 
1395  if (status != 0) {
1396  ACE_ERROR((LM_ERROR,
1397  ACE_TEXT("(%P|%t) ERROR: Service_Participant::get_Discovery ")
1398  ACE_TEXT("failed attempt to load default RTPS discovery for domain %d.\n"),
1399  domain));
1400 
1401  return Discovery_rch();
1402  }
1403 
1404  // Try to find it again
1405  location = this->discoveryMap_.find(Discovery::DEFAULT_RTPS);
1406 
1407  if (location == this->discoveryMap_.end()) {
1408  // Unable to load DEFAULT_RTPS
1409  if (DCPS_debug_level > 0) {
1410  ACE_DEBUG((LM_DEBUG,
1411  ACE_TEXT("(%P|%t) Service_Participant::get_discovery: ")
1412  ACE_TEXT("failed attempt to set default RTPS discovery for domain %d.\n"),
1413  domain));
1414  }
1415 
1416  return Discovery_rch();
1417 
1418  } else {
1419  // Found the default!
1420  if (DCPS_debug_level > 4) {
1421  ACE_DEBUG((LM_DEBUG,
1422  ACE_TEXT("(%P|%t) Service_Participant::get_discovery: ")
1423  ACE_TEXT("returning default RTPS discovery for domain %d.\n"),
1424  domain));
1425  }
1426 
1427  return location->second;
1428  }
1429 
1430  } else {
1431  // Non-default repositories _must_ be loaded by application.
1432  if (DCPS_debug_level > 4) {
1433  ACE_DEBUG((LM_DEBUG,
1434  ACE_TEXT("(%P|%t) Service_Participant::get_discovery: ")
1435  ACE_TEXT("repository for domain %d was not set.\n"),
1436  domain));
1437  }
1438 
1439  return Discovery_rch();
1440  }
1441  }
1442 
1443  if (DCPS_debug_level > 4) {
1444  ACE_DEBUG((LM_DEBUG,
1445  ACE_TEXT("(%P|%t) Service_Participant::get_discovery: ")
1446  ACE_TEXT("returning repository for domain %d, repo %C.\n"),
1447  domain, repo.c_str()));
1448  }
1449 
1450  return location->second;
1451 }
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
RcHandle< Discovery > Discovery_rch
Definition: Discovery.h:296
static const ACE_TCHAR DEFAULT_REPO_IOR[]
bool set_repo_ior(const char *ior, Discovery::RepoKey key=Discovery::DEFAULT_REPO, bool attach_participant=true)
bool is_discovery_template(const OPENDDS_STRING &name)
int configure_discovery_template(DDS::DomainId_t domainId, const OPENDDS_STRING &discovery_name)
virtual const ACE_Configuration_Section_Key & root_section(void) const
RepoKeyDiscoveryMap discoveryMap_
The RepoKey to Discovery object mapping.
int configure_domain_range_instance(DDS::DomainId_t domainId)
static const ACE_TCHAR RTPS_SECTION_NAME[]
OpenDDS::DCPS::Discovery::RepoKey get_discovery_template_instance_name(DDS::DomainId_t id)
static const char * DEFAULT_RTPS
Definition: Discovery.h:86
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
bool get_domain_range_info(DDS::DomainId_t id, DomainRange &inst)
static const char * DEFAULT_REPO
Key value for the default repository IOR.
Definition: Discovery.h:85
OPENDDS_STRING RepoKey
Definition: Discovery.h:80
ACE_Recursive_Thread_Mutex maps_lock_
Guard access to the internal maps.
int load_discovery_configuration(ACE_Configuration_Heap &cf, const ACE_TCHAR *section_name)
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
ACE_TEXT("TCP_Factory")
virtual int open_section(const ACE_Configuration_Section_Key &base, const ACE_TCHAR *sub_section, bool create, ACE_Configuration_Section_Key &result)
int open(const ACE_TCHAR *file_name, void *base_address=ACE_DEFAULT_BASE_ADDR, size_t default_map_size=ACE_DEFAULT_CONFIG_SECTION_SIZE)
DomainRepoMap domainRepoMap_
The DomainId to RepoKey mapping.

◆ get_discovery_template_instance_name()

Discovery::RepoKey OpenDDS::DCPS::Service_Participant::get_discovery_template_instance_name ( DDS::DomainId_t  id)
private

Definition at line 2719 of file Service_Participant.cpp.

References OpenDDS::DCPS::to_dds_string().

Referenced by configure_discovery_template(), configure_domain_range_instance(), and get_discovery().

2720 {
2721  OpenDDS::DCPS::Discovery::RepoKey configured_name = "rtps_template_instance_";
2722  configured_name += to_dds_string(id);
2723  return configured_name;
2724 }
OPENDDS_STRING RepoKey
Definition: Discovery.h:80
String to_dds_string(unsigned short to_convert)

◆ get_domain_participant_factory()

DDS::DomainParticipantFactory_ptr OpenDDS::DCPS::Service_Participant::get_domain_participant_factory ( int &  argc = zero_argc,
ACE_TCHAR argv[] = 0 
)

Initialize the DDS client environment and get the DomainParticipantFactory.

This method consumes -DCPS* and -ORB* options and their arguments.

: Move ORB initialization to after the configuration file is processed and the initial scheduling policy and priority are established.

Definition at line 405 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_GUARD_RETURN, ACE_TEXT(), ACE_VERSION, ACE_ARGV_T< CHAR_TYPE >::add(), ACE_String_Base< char >::c_str(), OpenDDS::DCPS::NetworkConfigMonitor::close(), ACE::compiler_beta_version(), ACE::compiler_major_version(), ACE::compiler_minor_version(), ACE::compiler_name(), OpenDDS::DCPS::config_fname, OpenDDS::DCPS::NetworkConfigMonitor::connect(), ACE_Arg_Shifter_T< class >::consume_arg(), OpenDDS::DCPS::MonitorFactory::create_sp_monitor(), ACE_Arg_Shifter_T< class >::cur_arg_strncasecmp(), OpenDDS::DCPS::DCPS_debug_level, default_configuration_file_, OpenDDS::DCPS::NetworkConfigMonitor::disconnect(), dp_factory_servant_, OpenDDS::DCPS::LogLevel::Error, factory_lock_, ACE_OS::fclose(), ACE_OS::fopen(), OpenDDS::DCPS::LogLevel::get_as_string(), ACE_Arg_Shifter_T< class >::get_current(), OpenDDS::DCPS::ReactorTask::get_reactor(), ACE_Arg_Shifter_T< class >::ignore_arg(), OpenDDS::DCPS::LogLevel::Info, OpenDDS::DCPS::MonitorFactory::initialize(), initializeScheduling(), ACE_Dynamic_Service< class >::instance(), OpenDDS::DCPS::ReactorTask::interceptor(), ACE_Arg_Shifter_T< class >::is_anything_left(), ACE_String_Base< char >::is_empty(), ACE_Arg_Shifter_T< class >::is_parameter_next(), job_queue_, LM_DEBUG, LM_ERROR, LM_INFO, LM_NOTICE, LM_WARNING, load_configuration(), OpenDDS::DCPS::log_level, monitor_, monitor_enabled_, monitor_factory_, network_config_monitor_, network_interface_address_topic_, OpenDDS::DCPS::NetworkConfigMonitor::open(), OpenDDS::DCPS::ReactorTask::open_reactor_task(), OPENDDS_VERSION, ORB_argv_, parse_args(), ACE_Service_Config::process_directive(), reactor_task_, OpenDDS::DCPS::RcHandle< T >::reset(), OpenDDS::DCPS::MonitorFactory::service_initialize(), shut_down_, thread_status_manager_, uname(), and ACE_OS::uname().

Referenced by shutdown().

407 {
408  if (!dp_factory_servant_) {
410 
411  shut_down_ = false;
412 
413  if (!dp_factory_servant_) {
414  // This used to be a call to ORB_init(). Since the ORB is now managed
415  // by InfoRepoDiscovery, just save the -ORB* args for later use.
416  // The exceptions are -ORBLogFile and -ORBVerboseLogging, which
417  // are processed by the service participant. This allows log control
418  // even if an ORB is not being used.
419 #ifndef OPENDDS_SAFETY_PROFILE
420  ORB_argv_.add(ACE_TEXT("unused_arg_0"));
421 #endif
422  /* NOTE ABOUT ADDING NEW OPTIONS HERE ==================================
423  *
424  * The argument parsing here is simple. It will match substrings of
425  * options even if that isn't the whole option. For example; If
426  * "-DCPSSecurity" is checked before "-DCPSSecurityDebug" and
427  * "-DCPSSecurityDebug" is passed, it will match "-DCPSSecurity". Check
428  * to make sure the order is correct.
429  *
430  * TODO/TBD: Create or make use of a stricter command line argument
431  * parsing method/library. Something where we can define the format of
432  * the argument and it will handle it better. Maybe could be integrated
433  * into the config parsing, which has most of these options.
434  */
435  ACE_Arg_Shifter shifter(argc, argv);
436  while (shifter.is_anything_left()) {
437  if (shifter.cur_arg_strncasecmp(ACE_TEXT("-ORBLogFile")) == 0) {
438  shifter.ignore_arg();
439  } else if (shifter.cur_arg_strncasecmp(ACE_TEXT("-ORBVerboseLogging")) == 0) {
440  shifter.ignore_arg();
441  } else if (shifter.cur_arg_strncasecmp(ACE_TEXT("-ORB")) < 0) {
442  shifter.ignore_arg();
443  } else {
444 #ifndef OPENDDS_SAFETY_PROFILE
445  ORB_argv_.add(shifter.get_current());
446 #endif
447  shifter.consume_arg();
448  if (shifter.is_parameter_next()) {
449 #ifndef OPENDDS_SAFETY_PROFILE
450  ORB_argv_.add(shifter.get_current(), true /*quote_arg*/);
451 #endif
452  shifter.consume_arg();
453  }
454  }
455  }
456 
457  if (parse_args(argc, argv) != 0) {
458  return DDS::DomainParticipantFactory::_nil();
459  }
460 
463  }
464 
465  if (config_fname.is_empty()) {
466  if (DCPS_debug_level) {
467  ACE_DEBUG((LM_NOTICE,
468  ACE_TEXT("(%P|%t) NOTICE: not using file configuration - no configuration ")
469  ACE_TEXT("file specified.\n")));
470  }
471 
472  } else {
473  // Load configuration only if the configuration
474  // file exists.
475  FILE* in = ACE_OS::fopen(config_fname.c_str(),
476  ACE_TEXT("r"));
477 
478  if (!in) {
479  ACE_DEBUG((LM_WARNING,
480  ACE_TEXT("(%P|%t) WARNING: not using file configuration - ")
481  ACE_TEXT("can not open \"%s\" for reading. %p\n"),
482  config_fname.c_str(), ACE_TEXT("fopen")));
483 
484  } else {
485  ACE_OS::fclose(in);
486 
487  if (DCPS_debug_level > 1) {
488  ACE_DEBUG((LM_NOTICE,
489  ACE_TEXT("(%P|%t) NOTICE: Service_Participant::get_domain_participant_factory ")
490  ACE_TEXT("Going to load configuration from <%s>\n"),
491  config_fname.c_str()));
492  }
493 
494  if (this->load_configuration() != 0) {
495  ACE_ERROR((LM_ERROR,
496  ACE_TEXT("(%P|%t) ERROR: Service_Participant::get_domain_participant_factory: ")
497  ACE_TEXT("load_configuration() failed.\n")));
498  return DDS::DomainParticipantFactory::_nil();
499  }
500  }
501  }
502 #if OPENDDS_POOL_ALLOCATOR
503  // For non-FACE tests, configure pool
504  configure_pool();
505 #endif
506 
507  if (log_level >= LogLevel::Info) {
508  ACE_DEBUG((LM_INFO, "(%P|%t) Service_Participant::get_domain_participant_factory: "
509  "This is OpenDDS " OPENDDS_VERSION " using ACE " ACE_VERSION "\n"));
510 
511  ACE_DEBUG((LM_INFO, "(%P|%t) Service_Participant::get_domain_participant_factory: "
512  "log_level: %C DCPS_debug_level: %u\n", log_level.get_as_string(), DCPS_debug_level));
513 
515  if (ACE_OS::uname(&uname) != -1) {
516  ACE_DEBUG((LM_INFO, "(%P|%t) Service_Participant::get_domain_participant_factory: "
517  "machine: %C, %C platform: %C, %C, %C\n",
518  uname.nodename, uname.machine, uname.sysname, uname.release, uname.version));
519  }
520 
521  ACE_DEBUG((LM_INFO, "(%P|%t) Service_Participant::get_domain_participant_factory: "
522  "compiler: %C version %d.%d.%d\n",
524  }
525 
526  // Establish the default scheduling mechanism and
527  // priority here. Sadly, the ORB is already
528  // initialized so we have no influence over its
529  // scheduling or thread priority(ies).
530 
531  /// @TODO: Move ORB initialization to after the
532  /// configuration file is processed and the
533  /// initial scheduling policy and priority are
534  /// established.
535  this->initializeScheduling();
536 
537  dp_factory_servant_ = make_rch<DomainParticipantFactoryImpl>();
538 
541  "Service_Participant");
542 
543  job_queue_ = make_rch<JobQueue>(reactor_task_.get_reactor());
544 
545  if (this->monitor_enabled_) {
546 #if !defined(ACE_AS_STATIC_LIBS)
547  ACE_TString directive = ACE_TEXT("dynamic OpenDDS_Monitor Service_Object * OpenDDS_monitor:_make_MonitorFactoryImpl()");
549 #endif
550  this->monitor_factory_ =
552 
553  if (this->monitor_factory_ == 0) {
554  if (this->monitor_enabled_) {
555  ACE_ERROR((LM_ERROR,
556  ACE_TEXT("ERROR: Service_Participant::get_domain_participant_factory, ")
557  ACE_TEXT("Unable to enable monitor factory.\n")));
558  }
559  }
560  }
561 
562  if (this->monitor_factory_ == 0) {
563  // Use the stubbed factory
565  this->monitor_factory_ =
566  ACE_Dynamic_Service<MonitorFactory>::instance ("OpenDDS_Monitor_Default");
567  }
568  if (this->monitor_enabled_) {
569  this->monitor_factory_->initialize();
570  }
571 
572  this->monitor_.reset(this->monitor_factory_->create_sp_monitor(this));
573  }
574 
575 #if defined OPENDDS_LINUX_NETWORK_CONFIG_MONITOR
576  if (DCPS_debug_level >= 1) {
577  ACE_DEBUG((LM_DEBUG,
578  "(%P|%t) Service_Participant::get_domain_participant_factory: Creating LinuxNetworkConfigMonitor\n"));
579  }
580  network_config_monitor_ = make_rch<LinuxNetworkConfigMonitor>(reactor_task_.interceptor());
581 #elif defined(OPENDDS_NETWORK_CONFIG_MODIFIER)
582  if (DCPS_debug_level >= 1) {
583  ACE_DEBUG((LM_DEBUG,
584  "(%P|%t) Service_Participant::get_domain_participant_factory: Creating NetworkConfigModifier\n"));
585  }
586  network_config_monitor_ = make_rch<NetworkConfigModifier>();
587 #else
588  if (DCPS_debug_level >= 1) {
589  ACE_DEBUG((LM_DEBUG,
590  "(%P|%t) Service_Participant::get_domain_participant_factory: Creating DefaultNetworkConfigMonitor\n"));
591  }
592  network_config_monitor_ = make_rch<DefaultNetworkConfigMonitor>();
593 #endif
594 
596  if (!network_config_monitor_->open()) {
597  bool open_failed = false;
598 #ifdef OPENDDS_NETWORK_CONFIG_MODIFIER
599  if (DCPS_debug_level >= 1) {
600  ACE_DEBUG((LM_DEBUG,
601  "(%P|%t) Service_Participant::get_domain_participant_factory: Creating NetworkConfigModifier\n"));
602  }
604  network_config_monitor_ = make_rch<NetworkConfigModifier>();
606  if (!network_config_monitor_->open()) {
607  open_failed = true;
608  }
609 #else
610  open_failed = true;
611 #endif
612  if (open_failed) {
613  if (log_level >= LogLevel::Error) {
614  ACE_ERROR((LM_ERROR,
615  "(%P|%t) ERROR: Service_Participant::get_domain_participant_factory: Could not open network config monitor\n"));
616  }
620  }
621  }
622  }
623 
624  return DDS::DomainParticipantFactory::_duplicate(dp_factory_servant_.in());
625 }
OpenDDS_Dcps_Export LogLevel log_level
#define ACE_DEBUG(X)
int fclose(FILE *fp)
#define ACE_ERROR(X)
unique_ptr< Monitor > monitor_
Pointer to the monitor object for this object.
const char * c_str(void) const
int open_reactor_task(void *, ThreadStatusManager *thread_status_manager=0, const String &name="")
Definition: ReactorTask.cpp:79
AtomicBool shut_down_
Used to track state of service participant.
void initializeScheduling()
Initialize the thread scheduling and initial priority.
static ACE_TString config_fname(ACE_TEXT(""))
static int process_directive(const ACE_TCHAR directive[])
static TYPE * instance(const ACE_TCHAR *name)
FILE * fopen(const char *filename, const char *mode)
bool monitor_enabled_
Enable Monitor functionality.
NetworkConfigMonitor_rch network_config_monitor_
struct utsname ACE_utsname
int parse_args(int &argc, ACE_TCHAR *argv[])
bool is_empty(void) const
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
RcHandle< InternalTopic< NetworkInterfaceAddress > > network_interface_address_topic_
const ACE_TCHAR * compiler_name(void)
#define OPENDDS_VERSION
Definition: Version.h:16
void disconnect(RcHandle< InternalTopic< NetworkInterfaceAddress > > topic)
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
void connect(RcHandle< InternalTopic< NetworkInterfaceAddress > > topic)
u_int compiler_minor_version(void)
RcHandle< DomainParticipantFactoryImpl > dp_factory_servant_
ACE_TEXT("TCP_Factory")
u_int compiler_major_version(void)
ReactorInterceptor_rch interceptor() const
Definition: ReactorTask.inl:65
const char * get_as_string() const
Definition: debug.cpp:87
int uname(ACE_utsname *name)
int add(const CHAR_TYPE *next_arg, bool quote_arg=false)
u_int compiler_beta_version(void)
ACE_Reactor * get_reactor()
Definition: ReactorTask.inl:14

◆ get_domain_range_info()

bool OpenDDS::DCPS::Service_Participant::get_domain_range_info ( DDS::DomainId_t  id,
DomainRange inst 
)
private

Definition at line 2633 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::Service_Participant::DomainRange::discovery_template_name, OpenDDS::DCPS::Service_Participant::DomainRange::domain_info, has_domain_range(), LM_DEBUG, OPENDDS_VECTOR(), OpenDDS::DCPS::Service_Participant::DomainRange::range_end, OpenDDS::DCPS::Service_Participant::DomainRange::range_start, and OpenDDS::DCPS::Service_Participant::DomainRange::transport_config_name.

Referenced by configure_domain_range_instance(), and get_discovery().

2634 {
2635  if (has_domain_range()) {
2636  for (OPENDDS_VECTOR(DomainRange)::iterator it = domain_ranges_.begin();
2637  it != domain_ranges_.end(); ++it) {
2638  if (id >= it->range_start && id <= it->range_end) {
2639  inst.range_start = it->range_start;
2640  inst.range_end = it->range_end;
2641  inst.discovery_template_name = it->discovery_template_name;
2642  inst.transport_config_name = it->transport_config_name;
2643  inst.domain_info = it->domain_info;
2644 
2645  if (DCPS_debug_level > 0) {
2646  ACE_DEBUG((LM_DEBUG,
2647  ACE_TEXT("(%P|%t) Service_Participant::get_domain_range_info(): ")
2648  ACE_TEXT("Domain %d is in [%s/%d-%d]\n"),
2649  id, DOMAIN_RANGE_SECTION_NAME, it->range_start, it->range_end));
2650  }
2651 
2652  return true;
2653  }
2654  }
2655  }
2656  return false;
2657 }
#define ACE_DEBUG(X)
static const ACE_TCHAR DOMAIN_RANGE_SECTION_NAME[]
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
ACE_TEXT("TCP_Factory")
OPENDDS_VECTOR(DomainRange) domain_ranges_

◆ get_dynamic_type()

DDS::ReturnCode_t OpenDDS::DCPS::Service_Participant::get_dynamic_type ( DDS::DynamicType_var &  type,
DDS::DomainParticipant_ptr  participant,
const DDS::BuiltinTopicKey_t key 
) const

Definition at line 2955 of file Service_Participant.cpp.

2957 {
2958  return dynamic_cast<DomainParticipantImpl*>(participant)->get_dynamic_type(type, key);
2959 }
DDS::ReturnCode_t get_dynamic_type(DDS::DynamicType_var &type, DDS::DomainParticipant_ptr participant, const DDS::BuiltinTopicKey_t &key) const

◆ get_security()

bool OpenDDS::DCPS::Service_Participant::get_security ( )
inline

Definition at line 320 of file Service_Participant.h.

320  {
321  return security_enabled_;
322  }

◆ get_static_xtypes_lock()

ACE_Thread_Mutex & OpenDDS::DCPS::Service_Participant::get_static_xtypes_lock ( )

getter for lock that protects the static initialization of XTypes related data structures

Definition at line 2903 of file Service_Participant.cpp.

References OpenDDS::DCPS::RcHandle< T >::get(), network_config_monitor_, and xtypes_lock_.

2904 {
2905  return xtypes_lock_;
2906 }
ACE_Thread_Mutex xtypes_lock_
Thread mutex used to protect the static initialization of XTypes data structures. ...

◆ get_thread_status_manager()

ThreadStatusManager & OpenDDS::DCPS::Service_Participant::get_thread_status_manager ( )

Get the service participant's thread status manager.

Definition at line 2898 of file Service_Participant.cpp.

References thread_status_manager_.

2899 {
2900  return thread_status_manager_;
2901 }

◆ get_transport_base_config_name()

bool OpenDDS::DCPS::Service_Participant::get_transport_base_config_name ( DDS::DomainId_t  domainId,
ACE_TString name 
) const

Definition at line 2372 of file Service_Participant.cpp.

References ACE_TEXT(), ACE_TEXT_CHAR_TO_TCHAR, global_transport_config_, OPENDDS_MAP(), and OPENDDS_STRING.

Referenced by configure_domain_range_instance().

2373 {
2374  OPENDDS_MAP(DDS::DomainId_t, OPENDDS_STRING)::const_iterator it = domain_to_transport_name_map_.find(domainId);
2375  if ( it != domain_to_transport_name_map_.end()) {
2376  name = ACE_TEXT_CHAR_TO_TCHAR(it->second.c_str());
2377  return true;
2378  } else if (global_transport_config_ != ACE_TEXT("")) {
2379  name = global_transport_config_;
2380  return true;
2381  } else {
2382  return false;
2383  }
2384 }
DOMAINID_TYPE_NATIVE DomainId_t
#define OPENDDS_STRING
#define ACE_TEXT_CHAR_TO_TCHAR(STRING)
ACE_TEXT("TCP_Factory")
int find(Container &c, const Key &key, typename Container::mapped_type *&value)
Definition: Util.h:71
typedef OPENDDS_MAP(Discovery::RepoKey, Discovery_rch) RepoKeyDiscoveryMap
For internal OpenDDS Use (needed for monitor code)

◆ get_type_information()

XTypes::TypeInformation OpenDDS::DCPS::Service_Participant::get_type_information ( DDS::DomainParticipant_ptr  participant,
const DDS::BuiltinTopicKey_t key 
) const

Get TypeInformation of a remote entity given the corresponding BuiltinTopicKey_t.

Definition at line 2940 of file Service_Participant.cpp.

References OpenDDS::DCPS::DomainParticipantImpl::get_type_lookup_service().

2942 {
2943  DomainParticipantImpl* participant_servant = dynamic_cast<DomainParticipantImpl*>(participant);
2944  if (participant_servant) {
2945  XTypes::TypeLookupService_rch tls = participant_servant->get_type_lookup_service();
2946  if (tls) {
2947  return tls->get_type_info(key);
2948  }
2949  }
2950 
2951  return XTypes::TypeInformation();
2952 }
DCPS::RcHandle< TypeLookupService > TypeLookupService_rch

◆ get_type_object()

XTypes::TypeObject OpenDDS::DCPS::Service_Participant::get_type_object ( DDS::DomainParticipant_ptr  participant,
const XTypes::TypeIdentifier ti 
) const

Get TypeObject for a given TypeIdentifier.

Definition at line 2963 of file Service_Participant.cpp.

References OpenDDS::DCPS::DomainParticipantImpl::get_type_lookup_service().

2965 {
2966  DomainParticipantImpl* participant_servant = dynamic_cast<DomainParticipantImpl*>(participant);
2967  if (participant_servant) {
2968  XTypes::TypeLookupService_rch tls = participant_servant->get_type_lookup_service();
2969  if (tls) {
2970  return tls->get_type_object(ti);
2971  }
2972  }
2973 
2974  return XTypes::TypeObject();
2975 }
DCPS::RcHandle< TypeLookupService > TypeLookupService_rch

◆ has_domain_range()

bool OpenDDS::DCPS::Service_Participant::has_domain_range ( ) const
private

Definition at line 2627 of file Service_Participant.cpp.

Referenced by get_domain_range_info().

2628 {
2629  return !domain_ranges_.empty();
2630 }

◆ initial_DataReaderQos()

ACE_INLINE const DDS::DataReaderQos & OpenDDS::DCPS::Service_Participant::initial_DataReaderQos ( ) const

Definition at line 234 of file Service_Participant.inl.

References ACE_INLINE, and initial_DataReaderQos_.

235 {
236  return initial_DataReaderQos_;
237 }

◆ initial_DataRepresentationQosPolicy()

ACE_INLINE const DDS::DataRepresentationQosPolicy & OpenDDS::DCPS::Service_Participant::initial_DataRepresentationQosPolicy ( ) const

Definition at line 192 of file Service_Participant.inl.

References ACE_INLINE, and initial_DataRepresentationQosPolicy_.

193 {
195 }
DDS::DataRepresentationQosPolicy initial_DataRepresentationQosPolicy_

◆ initial_DataWriterQos()

ACE_INLINE const DDS::DataWriterQos & OpenDDS::DCPS::Service_Participant::initial_DataWriterQos ( ) const

Definition at line 220 of file Service_Participant.inl.

References ACE_INLINE, and initial_DataWriterQos_.

221 {
222  return initial_DataWriterQos_;
223 }

◆ initial_DeadlineQosPolicy()

ACE_INLINE const DDS::DeadlineQosPolicy & OpenDDS::DCPS::Service_Participant::initial_DeadlineQosPolicy ( ) const

Definition at line 85 of file Service_Participant.inl.

References ACE_INLINE, and initial_DeadlineQosPolicy_.

86 {
88 }
DDS::DeadlineQosPolicy initial_DeadlineQosPolicy_

◆ initial_DestinationOrderQosPolicy()

ACE_INLINE const DDS::DestinationOrderQosPolicy & OpenDDS::DCPS::Service_Participant::initial_DestinationOrderQosPolicy ( ) const

Definition at line 143 of file Service_Participant.inl.

References ACE_INLINE, and initial_DestinationOrderQosPolicy_.

144 {
146 }
DDS::DestinationOrderQosPolicy initial_DestinationOrderQosPolicy_

◆ initial_DomainParticipantFactoryQos()

ACE_INLINE const DDS::DomainParticipantFactoryQos & OpenDDS::DCPS::Service_Participant::initial_DomainParticipantFactoryQos ( ) const

Definition at line 199 of file Service_Participant.inl.

References ACE_INLINE, and initial_DomainParticipantFactoryQos_.

200 {
202 }
DDS::DomainParticipantFactoryQos initial_DomainParticipantFactoryQos_

◆ initial_DomainParticipantQos()

ACE_INLINE const DDS::DomainParticipantQos & OpenDDS::DCPS::Service_Participant::initial_DomainParticipantQos ( ) const

Definition at line 206 of file Service_Participant.inl.

References ACE_INLINE, and initial_DomainParticipantQos_.

207 {
209 }
DDS::DomainParticipantQos initial_DomainParticipantQos_

◆ initial_DurabilityQosPolicy()

ACE_INLINE const DDS::DurabilityQosPolicy & OpenDDS::DCPS::Service_Participant::initial_DurabilityQosPolicy ( ) const

Definition at line 64 of file Service_Participant.inl.

References ACE_INLINE, and initial_DurabilityQosPolicy_.

65 {
67 }
DDS::DurabilityQosPolicy initial_DurabilityQosPolicy_

◆ initial_DurabilityServiceQosPolicy()

ACE_INLINE const DDS::DurabilityServiceQosPolicy & OpenDDS::DCPS::Service_Participant::initial_DurabilityServiceQosPolicy ( ) const

Definition at line 71 of file Service_Participant.inl.

References ACE_INLINE, and initial_DurabilityServiceQosPolicy_.

72 {
74 }
DDS::DurabilityServiceQosPolicy initial_DurabilityServiceQosPolicy_

◆ initial_EntityFactoryQosPolicy()

ACE_INLINE const DDS::EntityFactoryQosPolicy & OpenDDS::DCPS::Service_Participant::initial_EntityFactoryQosPolicy ( ) const

Definition at line 164 of file Service_Participant.inl.

References ACE_INLINE, and initial_EntityFactoryQosPolicy_.

165 {
167 }
DDS::EntityFactoryQosPolicy initial_EntityFactoryQosPolicy_

◆ initial_GroupDataQosPolicy()

ACE_INLINE const DDS::GroupDataQosPolicy & OpenDDS::DCPS::Service_Participant::initial_GroupDataQosPolicy ( ) const

Definition at line 43 of file Service_Participant.inl.

References ACE_INLINE, and initial_GroupDataQosPolicy_.

44 {
46 }
DDS::GroupDataQosPolicy initial_GroupDataQosPolicy_

◆ initial_HistoryQosPolicy()

ACE_INLINE const DDS::HistoryQosPolicy & OpenDDS::DCPS::Service_Participant::initial_HistoryQosPolicy ( ) const

Definition at line 150 of file Service_Participant.inl.

References ACE_INLINE, and initial_HistoryQosPolicy_.

151 {
153 }
DDS::HistoryQosPolicy initial_HistoryQosPolicy_

◆ initial_LatencyBudgetQosPolicy()

ACE_INLINE const DDS::LatencyBudgetQosPolicy & OpenDDS::DCPS::Service_Participant::initial_LatencyBudgetQosPolicy ( ) const

Definition at line 92 of file Service_Participant.inl.

References ACE_INLINE, and initial_LatencyBudgetQosPolicy_.

93 {
95 }
DDS::LatencyBudgetQosPolicy initial_LatencyBudgetQosPolicy_

◆ initial_LifespanQosPolicy()

ACE_INLINE const DDS::LifespanQosPolicy & OpenDDS::DCPS::Service_Participant::initial_LifespanQosPolicy ( ) const

Definition at line 57 of file Service_Participant.inl.

References ACE_INLINE, and initial_LifespanQosPolicy_.

58 {
60 }
DDS::LifespanQosPolicy initial_LifespanQosPolicy_

◆ initial_LivelinessQosPolicy()

ACE_INLINE const DDS::LivelinessQosPolicy & OpenDDS::DCPS::Service_Participant::initial_LivelinessQosPolicy ( ) const

Definition at line 115 of file Service_Participant.inl.

References ACE_INLINE, and initial_LivelinessQosPolicy_.

116 {
118 }
DDS::LivelinessQosPolicy initial_LivelinessQosPolicy_

◆ initial_OwnershipQosPolicy()

ACE_INLINE const DDS::OwnershipQosPolicy & OpenDDS::DCPS::Service_Participant::initial_OwnershipQosPolicy ( ) const

Definition at line 99 of file Service_Participant.inl.

References ACE_INLINE, and initial_OwnershipQosPolicy_.

100 {
102 }
DDS::OwnershipQosPolicy initial_OwnershipQosPolicy_

◆ initial_OwnershipStrengthQosPolicy()

ACE_INLINE const DDS::OwnershipStrengthQosPolicy & OpenDDS::DCPS::Service_Participant::initial_OwnershipStrengthQosPolicy ( ) const

Definition at line 107 of file Service_Participant.inl.

References ACE_INLINE, and initial_OwnershipStrengthQosPolicy_.

108 {
110 }
DDS::OwnershipStrengthQosPolicy initial_OwnershipStrengthQosPolicy_

◆ initial_PartitionQosPolicy()

ACE_INLINE const DDS::PartitionQosPolicy & OpenDDS::DCPS::Service_Participant::initial_PartitionQosPolicy ( ) const

Definition at line 129 of file Service_Participant.inl.

References ACE_INLINE, and initial_PartitionQosPolicy_.

130 {
132 }
DDS::PartitionQosPolicy initial_PartitionQosPolicy_

◆ initial_PresentationQosPolicy()

ACE_INLINE const DDS::PresentationQosPolicy & OpenDDS::DCPS::Service_Participant::initial_PresentationQosPolicy ( ) const

Definition at line 78 of file Service_Participant.inl.

References ACE_INLINE, and initial_PresentationQosPolicy_.

79 {
81 }
DDS::PresentationQosPolicy initial_PresentationQosPolicy_

◆ initial_PropertyQosPolicy()

ACE_INLINE const DDS::PropertyQosPolicy & OpenDDS::DCPS::Service_Participant::initial_PropertyQosPolicy ( ) const

Definition at line 185 of file Service_Participant.inl.

References ACE_INLINE, and initial_PropertyQosPolicy_.

186 {
188 }
DDS::PropertyQosPolicy initial_PropertyQosPolicy_

◆ initial_PublisherQos()

ACE_INLINE const DDS::PublisherQos & OpenDDS::DCPS::Service_Participant::initial_PublisherQos ( ) const

Definition at line 227 of file Service_Participant.inl.

References ACE_INLINE, and initial_PublisherQos_.

228 {
229  return initial_PublisherQos_;
230 }

◆ initial_ReaderDataLifecycleQosPolicy()

ACE_INLINE const DDS::ReaderDataLifecycleQosPolicy & OpenDDS::DCPS::Service_Participant::initial_ReaderDataLifecycleQosPolicy ( ) const

Definition at line 178 of file Service_Participant.inl.

References ACE_INLINE, and initial_ReaderDataLifecycleQosPolicy_.

179 {
181 }
DDS::ReaderDataLifecycleQosPolicy initial_ReaderDataLifecycleQosPolicy_

◆ initial_ReliabilityQosPolicy()

ACE_INLINE const DDS::ReliabilityQosPolicy & OpenDDS::DCPS::Service_Participant::initial_ReliabilityQosPolicy ( ) const

Definition at line 136 of file Service_Participant.inl.

References ACE_INLINE, and initial_ReliabilityQosPolicy_.

137 {
139 }
DDS::ReliabilityQosPolicy initial_ReliabilityQosPolicy_

◆ initial_ResourceLimitsQosPolicy()

ACE_INLINE const DDS::ResourceLimitsQosPolicy & OpenDDS::DCPS::Service_Participant::initial_ResourceLimitsQosPolicy ( ) const

Definition at line 157 of file Service_Participant.inl.

References ACE_INLINE, and initial_ResourceLimitsQosPolicy_.

158 {
160 }
DDS::ResourceLimitsQosPolicy initial_ResourceLimitsQosPolicy_

◆ initial_SubscriberQos()

ACE_INLINE const DDS::SubscriberQos & OpenDDS::DCPS::Service_Participant::initial_SubscriberQos ( ) const

Definition at line 241 of file Service_Participant.inl.

References ACE_INLINE, and initial_SubscriberQos_.

242 {
243  return initial_SubscriberQos_;
244 }

◆ initial_TimeBasedFilterQosPolicy()

ACE_INLINE const DDS::TimeBasedFilterQosPolicy & OpenDDS::DCPS::Service_Participant::initial_TimeBasedFilterQosPolicy ( ) const

Definition at line 122 of file Service_Participant.inl.

References ACE_INLINE, and initial_TimeBasedFilterQosPolicy_.

123 {
125 }
DDS::TimeBasedFilterQosPolicy initial_TimeBasedFilterQosPolicy_

◆ initial_TopicDataQosPolicy()

ACE_INLINE const DDS::TopicDataQosPolicy & OpenDDS::DCPS::Service_Participant::initial_TopicDataQosPolicy ( ) const

Definition at line 36 of file Service_Participant.inl.

References ACE_INLINE, and initial_TopicDataQosPolicy_.

37 {
39 }
DDS::TopicDataQosPolicy initial_TopicDataQosPolicy_

◆ initial_TopicQos()

ACE_INLINE const DDS::TopicQos & OpenDDS::DCPS::Service_Participant::initial_TopicQos ( ) const

Definition at line 213 of file Service_Participant.inl.

References ACE_INLINE, and initial_TopicQos_.

214 {
215  return initial_TopicQos_;
216 }

◆ initial_TransportPriorityQosPolicy()

ACE_INLINE const DDS::TransportPriorityQosPolicy & OpenDDS::DCPS::Service_Participant::initial_TransportPriorityQosPolicy ( ) const

Definition at line 50 of file Service_Participant.inl.

References ACE_INLINE, and initial_TransportPriorityQosPolicy_.

51 {
53 }
DDS::TransportPriorityQosPolicy initial_TransportPriorityQosPolicy_

◆ initial_TypeConsistencyEnforcementQosPolicy()

ACE_INLINE const DDS::TypeConsistencyEnforcementQosPolicy & OpenDDS::DCPS::Service_Participant::initial_TypeConsistencyEnforcementQosPolicy ( ) const

Definition at line 248 of file Service_Participant.inl.

References ACE_INLINE, and initial_TypeConsistencyEnforcementQosPolicy_.

249 {
251 }
DDS::TypeConsistencyEnforcementQosPolicy initial_TypeConsistencyEnforcementQosPolicy_

◆ initial_UserDataQosPolicy()

ACE_INLINE const DDS::UserDataQosPolicy & OpenDDS::DCPS::Service_Participant::initial_UserDataQosPolicy ( ) const

Accessors of the qos policy initial values.

Definition at line 29 of file Service_Participant.inl.

References ACE_INLINE, and initial_UserDataQosPolicy_.

30 {
32 }
DDS::UserDataQosPolicy initial_UserDataQosPolicy_
The initial values of qos policies.

◆ initial_WriterDataLifecycleQosPolicy()

ACE_INLINE const DDS::WriterDataLifecycleQosPolicy & OpenDDS::DCPS::Service_Participant::initial_WriterDataLifecycleQosPolicy ( ) const

Definition at line 171 of file Service_Participant.inl.

References ACE_INLINE, and initial_WriterDataLifecycleQosPolicy_.

172 {
174 }
DDS::WriterDataLifecycleQosPolicy initial_WriterDataLifecycleQosPolicy_

◆ initialize()

void OpenDDS::DCPS::Service_Participant::initialize ( void  )
private

Initialize default qos.

Definition at line 833 of file Service_Participant.cpp.

References DDS::PresentationQosPolicy::access_scope, DDS::ALLOW_TYPE_COERCION, DDS::EntityFactoryQosPolicy::autoenable_created_entities, DDS::ReaderDataLifecycleQosPolicy::autopurge_disposed_samples_delay, DDS::ReaderDataLifecycleQosPolicy::autopurge_nowriter_samples_delay, bit_autopurge_disposed_samples_delay_, bit_autopurge_nowriter_samples_delay_, DDS::PresentationQosPolicy::coherent_access, DDS::DataReaderQos::deadline, DDS::DataReaderQos::destination_order, DDS::DataReaderQos::durability, DDS::DURATION_INFINITE_NSEC, DDS::DURATION_INFINITE_SEC, DDS::DURATION_ZERO_NSEC, DDS::DURATION_ZERO_SEC, DDS::PublisherQos::entity_factory, DDS::SubscriberQos::entity_factory, DDS::DomainParticipantFactoryQos::entity_factory, DDS::DomainParticipantQos::entity_factory, DDS::TypeConsistencyEnforcementQosPolicy::force_type_validation, DDS::PublisherQos::group_data, DDS::SubscriberQos::group_data, DDS::DataReaderQos::history, DDS::TypeConsistencyEnforcementQosPolicy::ignore_member_names, DDS::TypeConsistencyEnforcementQosPolicy::ignore_sequence_bounds, DDS::TypeConsistencyEnforcementQosPolicy::ignore_string_bounds, initial_DataReaderQos_, initial_DataRepresentationQosPolicy_, initial_DataWriterQos_, initial_DeadlineQosPolicy_, initial_DestinationOrderQosPolicy_, initial_DomainParticipantFactoryQos_, initial_DomainParticipantQos_, initial_DurabilityQosPolicy_, initial_DurabilityServiceQosPolicy_, initial_EntityFactoryQosPolicy_, initial_GroupDataQosPolicy_, initial_HistoryQosPolicy_, initial_LatencyBudgetQosPolicy_, initial_LifespanQosPolicy_, initial_LivelinessQosPolicy_, initial_OwnershipQosPolicy_, initial_OwnershipStrengthQosPolicy_, initial_PartitionQosPolicy_, initial_PresentationQosPolicy_, initial_PublisherQos_, initial_ReaderDataLifecycleQosPolicy_, initial_ReliabilityQosPolicy_, initial_ResourceLimitsQosPolicy_, initial_SubscriberQos_, initial_TimeBasedFilterQosPolicy_, initial_TopicQos_, initial_TransportPriorityQosPolicy_, initial_TypeConsistencyEnforcementQosPolicy_, initial_UserDataQosPolicy_, initial_WriterDataLifecycleQosPolicy_, DDS::INSTANCE_PRESENTATION_QOS, DDS::TypeConsistencyEnforcementQosPolicy::kind, DDS::DataReaderQos::latency_budget, DDS::LENGTH_UNLIMITED, DDS::DataReaderQos::liveliness, DDS::ResourceLimitsQosPolicy::max_instances, DDS::ResourceLimitsQosPolicy::max_samples, DDS::ResourceLimitsQosPolicy::max_samples_per_instance, DDS::TimeBasedFilterQosPolicy::minimum_separation, DDS::Duration_t::nanosec, DDS::PresentationQosPolicy::ordered_access, DDS::DataReaderQos::ownership, DDS::PublisherQos::partition, DDS::SubscriberQos::partition, DDS::PublisherQos::presentation, DDS::SubscriberQos::presentation, DDS::TypeConsistencyEnforcementQosPolicy::prevent_type_widening, DDS::DataReaderQos::reader_data_lifecycle, DDS::DataReaderQos::reliability, DDS::DataReaderQos::representation, DDS::DataReaderQos::resource_limits, DDS::Duration_t::sec, DDS::DataReaderQos::time_based_filter, DDS::DataReaderQos::type_consistency, DDS::DataReaderQos::user_data, DDS::DomainParticipantQos::user_data, and DDS::DataRepresentationQosPolicy::value.

Referenced by Service_Participant().

834 {
835  initial_TransportPriorityQosPolicy_ = TransportPriorityQosPolicyBuilder();
836  initial_LifespanQosPolicy_ = LifespanQosPolicyBuilder();
837 
838  initial_DurabilityQosPolicy_ = DurabilityQosPolicyBuilder();
839 
840  initial_DurabilityServiceQosPolicy_ = DurabilityServiceQosPolicyBuilder();
841 
845 
846  initial_DeadlineQosPolicy_ = DeadlineQosPolicyBuilder();
847 
848  initial_LatencyBudgetQosPolicy_ = LatencyBudgetQosPolicyBuilder();
849 
850  initial_OwnershipQosPolicy_ = OwnershipQosPolicyBuilder();
851  initial_OwnershipStrengthQosPolicy_ = OwnershipStrengthQosPolicyBuilder();
852 
853  initial_LivelinessQosPolicy_ = LivelinessQosPolicyBuilder();
854 
857 
858  initial_ReliabilityQosPolicy_ = ReliabilityQosPolicyBuilder();
859 
860  initial_DestinationOrderQosPolicy_ = DestinationOrderQosPolicyBuilder();
861 
862  initial_HistoryQosPolicy_ = HistoryQosPolicyBuilder();
863 
867 
869 
870  initial_WriterDataLifecycleQosPolicy_ = WriterDataLifecycleQosPolicyBuilder();
871 
872  // Will get interpreted based on how the type was annotated.
874 
879 
886 
890 
891  initial_TopicQos_ = TopicQosBuilder();
892 
893  initial_DataWriterQos_ = DataWriterQosBuilder();
894 
899 
914 
919 
924 }
DDS::PresentationQosPolicy initial_PresentationQosPolicy_
DDS::OwnershipStrengthQosPolicy initial_OwnershipStrengthQosPolicy_
UserDataQosPolicy user_data
GroupDataQosPolicy group_data
const long DURATION_INFINITE_SEC
Definition: DdsDcpsCore.idl:72
const TypeConsistencyEnforcementQosPolicyKind_t ALLOW_TYPE_COERCION
DDS::DestinationOrderQosPolicy initial_DestinationOrderQosPolicy_
DDS::OwnershipQosPolicy initial_OwnershipQosPolicy_
DDS::DeadlineQosPolicy initial_DeadlineQosPolicy_
DDS::UserDataQosPolicy initial_UserDataQosPolicy_
The initial values of qos policies.
DestinationOrderQosPolicy destination_order
DDS::ResourceLimitsQosPolicy initial_ResourceLimitsQosPolicy_
DDS::PartitionQosPolicy initial_PartitionQosPolicy_
LivelinessQosPolicy liveliness
DDS::DurabilityQosPolicy initial_DurabilityQosPolicy_
DDS::ReliabilityQosPolicy initial_ReliabilityQosPolicy_
DDS::DomainParticipantFactoryQos initial_DomainParticipantFactoryQos_
PartitionQosPolicy partition
GroupDataQosPolicy group_data
ResourceLimitsQosPolicy resource_limits
DDS::ReaderDataLifecycleQosPolicy initial_ReaderDataLifecycleQosPolicy_
DDS::DomainParticipantQos initial_DomainParticipantQos_
TimeBasedFilterQosPolicy time_based_filter
DDS::TransportPriorityQosPolicy initial_TransportPriorityQosPolicy_
DDS::DurabilityServiceQosPolicy initial_DurabilityServiceQosPolicy_
EntityFactoryQosPolicy entity_factory
EntityFactoryQosPolicy entity_factory
DDS::DataRepresentationQosPolicy initial_DataRepresentationQosPolicy_
ReaderDataLifecycleQosPolicy reader_data_lifecycle
const long LENGTH_UNLIMITED
LatencyBudgetQosPolicy latency_budget
DDS::HistoryQosPolicy initial_HistoryQosPolicy_
DataRepresentationQosPolicy representation
ReliabilityQosPolicy reliability
const unsigned long DURATION_INFINITE_NSEC
Definition: DdsDcpsCore.idl:73
const long DURATION_ZERO_SEC
Definition: DdsDcpsCore.idl:75
DurabilityQosPolicy durability
TypeConsistencyEnforcementQosPolicy type_consistency
DDS::TimeBasedFilterQosPolicy initial_TimeBasedFilterQosPolicy_
UserDataQosPolicy user_data
OwnershipQosPolicy ownership
const unsigned long DURATION_ZERO_NSEC
Definition: DdsDcpsCore.idl:76
DDS::LifespanQosPolicy initial_LifespanQosPolicy_
DataRepresentationIdSeq value
DDS::WriterDataLifecycleQosPolicy initial_WriterDataLifecycleQosPolicy_
DDS::GroupDataQosPolicy initial_GroupDataQosPolicy_
HistoryQosPolicy history
DDS::EntityFactoryQosPolicy initial_EntityFactoryQosPolicy_
EntityFactoryQosPolicy entity_factory
unsigned long nanosec
Definition: DdsDcpsCore.idl:69
PresentationQosPolicy presentation
PresentationQosPolicy presentation
TypeConsistencyEnforcementQosPolicyKind_t kind
DDS::LivelinessQosPolicy initial_LivelinessQosPolicy_
DDS::LatencyBudgetQosPolicy initial_LatencyBudgetQosPolicy_
EntityFactoryQosPolicy entity_factory
PartitionQosPolicy partition
DeadlineQosPolicy deadline
DDS::TypeConsistencyEnforcementQosPolicy initial_TypeConsistencyEnforcementQosPolicy_
PresentationQosPolicyAccessScopeKind access_scope

◆ initializeScheduling()

void OpenDDS::DCPS::Service_Participant::initializeScheduling ( )
private

Initialize the thread scheduling and initial priority.

Definition at line 927 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_SCHED_FIFO, ACE_SCHED_OTHER, ACE_SCHED_RR, ACE_SCOPE_THREAD, ACE_TEXT(), ACE_String_Base< char >::c_str(), OpenDDS::DCPS::DCPS_debug_level, EPERM, ACE_OS::last_error(), ACE_String_Base< char >::length(), LM_DEBUG, LM_ERROR, LM_NOTICE, LM_WARNING, ACE_Sched_Params::priority_max(), priority_max_, ACE_Sched_Params::priority_min(), priority_min_, ACE_OS::sched_params(), scheduler_, schedulerQuantum_, schedulerString_, set_repo_ior(), and OpenDDS::DCPS::TimeDuration::value().

Referenced by get_domain_participant_factory().

928 {
929  //
930  // Establish the scheduler if specified.
931  //
932  if (this->schedulerString_.length() == 0) {
933  if (DCPS_debug_level > 0) {
934  ACE_DEBUG((LM_NOTICE,
935  ACE_TEXT("(%P|%t) NOTICE: Service_Participant::intializeScheduling() - ")
936  ACE_TEXT("no scheduling policy specified, not setting policy.\n")));
937  }
938 
939  } else {
940  //
941  // Translate the scheduling policy to a usable value.
942  //
943  int ace_scheduler = ACE_SCHED_OTHER;
944  this->scheduler_ = THR_SCHED_DEFAULT;
945 
946  if (this->schedulerString_ == ACE_TEXT("SCHED_RR")) {
947  this->scheduler_ = THR_SCHED_RR;
948  ace_scheduler = ACE_SCHED_RR;
949 
950  } else if (this->schedulerString_ == ACE_TEXT("SCHED_FIFO")) {
951  this->scheduler_ = THR_SCHED_FIFO;
952  ace_scheduler = ACE_SCHED_FIFO;
953 
954  } else if (this->schedulerString_ == ACE_TEXT("SCHED_OTHER")) {
955  this->scheduler_ = THR_SCHED_DEFAULT;
956  ace_scheduler = ACE_SCHED_OTHER;
957 
958  } else {
959  ACE_DEBUG((LM_WARNING,
960  ACE_TEXT("(%P|%t) WARNING: Service_Participant::initializeScheduling() - ")
961  ACE_TEXT("unrecognized scheduling policy: %s, set to SCHED_OTHER.\n"),
962  this->schedulerString_.c_str()));
963  }
964 
965  //
966  // Attempt to set the scheduling policy.
967  //
968 #ifdef ACE_WIN32
969  ACE_DEBUG((LM_NOTICE,
970  ACE_TEXT("(%P|%t) NOTICE: Service_Participant::initializeScheduling() - ")
971  ACE_TEXT("scheduling is not implemented on Win32.\n")));
972  ACE_UNUSED_ARG(ace_scheduler);
973 #else
974  ACE_Sched_Params params(
975  ace_scheduler,
976  ACE_Sched_Params::priority_min(ace_scheduler),
977  ACE_SCOPE_THREAD,
979 
980  if (ACE_OS::sched_params(params) != 0) {
981  if (ACE_OS::last_error() == EPERM) {
982  ACE_DEBUG((LM_WARNING,
983  ACE_TEXT("(%P|%t) WARNING: Service_Participant::initializeScheduling() - ")
984  ACE_TEXT("user is not superuser, requested scheduler not set.\n")));
985 
986  } else {
987  ACE_ERROR((LM_ERROR,
988  ACE_TEXT("(%P|%t) ERROR: Service_Participant::initializeScheduling() - ")
989  ACE_TEXT("sched_params failed: %m.\n")));
990  }
991 
992  // Reset the scheduler value(s) if we did not succeed.
993  this->scheduler_ = -1;
994  ace_scheduler = ACE_SCHED_OTHER;
995 
996  } else if (DCPS_debug_level > 0) {
997  ACE_DEBUG((LM_DEBUG,
998  ACE_TEXT("(%P|%t) Service_Participant::initializeScheduling() - ")
999  ACE_TEXT("scheduling policy set to %s(%d).\n"),
1000  this->schedulerString_.c_str()));
1001  }
1002 
1003  //
1004  // Setup some scheduler specific information for later use.
1005  //
1006  this->priority_min_ = ACE_Sched_Params::priority_min(ace_scheduler, ACE_SCOPE_THREAD);
1007  this->priority_max_ = ACE_Sched_Params::priority_max(ace_scheduler, ACE_SCOPE_THREAD);
1008 #endif // ACE_WIN32
1009  }
1010 }
#define ACE_DEBUG(X)
static int priority_min(const Policy, const int scope=ACE_SCOPE_THREAD)
#define ACE_ERROR(X)
const char * c_str(void) const
static int priority_max(const Policy, const int scope=ACE_SCOPE_THREAD)
#define EPERM
const ACE_Time_Value & value() const
#define ACE_SCHED_FIFO
ACE_TString schedulerString_
Scheduling policy value from configuration file.
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
ACE_TEXT("TCP_Factory")
int last_error(void)
int priority_max_
Maximum priority value for the current scheduling policy.
int priority_min_
Minimum priority value for the current scheduling policy.
#define ACE_SCHED_OTHER
size_type length(void) const
TimeDuration schedulerQuantum_
Scheduler time slice from configuration file.
long scheduler_
Scheduling policy value used for setting thread priorities.
#define ACE_SCHED_RR
int sched_params(const ACE_Sched_Params &, ACE_id_t id=ACE_SELF)

◆ instance()

Service_Participant * OpenDDS::DCPS::Service_Participant::instance ( void  )
static

Return a singleton instance of this class.

Definition at line 266 of file Service_Participant.cpp.

References ACE_Singleton< TYPE, ACE_LOCK >::instance().

267 {
268  // Hide the template instantiation to prevent multiple instances
269  // from being created.
270 
272 }
static TYPE * instance(void)

◆ interceptor()

ReactorInterceptor_rch OpenDDS::DCPS::Service_Participant::interceptor ( ) const

Definition at line 299 of file Service_Participant.cpp.

References OpenDDS::DCPS::ReactorTask::interceptor(), and reactor_task_.

300 {
301  return reactor_task_.interceptor();
302 }
ReactorInterceptor_rch interceptor() const
Definition: ReactorTask.inl:65

◆ is_discovery_template()

bool OpenDDS::DCPS::Service_Participant::is_discovery_template ( const OPENDDS_STRING name)
private

Definition at line 2727 of file Service_Participant.cpp.

References ACE_Allocator::instance(), and OPENDDS_VECTOR().

Referenced by get_discovery().

2728 {
2729  OPENDDS_VECTOR(DiscoveryInfo)::const_iterator i;
2730  for (i = discovery_infos_.begin(); i != discovery_infos_.end(); ++i) {
2731  if (i->discovery_name == name && !i->customizations.empty()) {
2732  return true;
2733  }
2734  }
2735 
2736  return false;
2737 }
const char *const name
Definition: debug.cpp:60
OPENDDS_VECTOR(DomainRange) domain_ranges_

◆ is_shut_down()

ACE_INLINE bool OpenDDS::DCPS::Service_Participant::is_shut_down ( ) const

Accessor for if the participant has been shutdown.

Definition at line 373 of file Service_Participant.inl.

References ACE_INLINE, and shut_down_.

374 {
375  return shut_down_;
376 }
AtomicBool shut_down_
Used to track state of service participant.

◆ job_queue()

JobQueue_rch OpenDDS::DCPS::Service_Participant::job_queue ( ) const

Definition at line 305 of file Service_Participant.cpp.

References job_queue_.

306 {
307  return job_queue_;
308 }

◆ liveliness_factor() [1/2]

void OpenDDS::DCPS::Service_Participant::liveliness_factor ( int  factor)

Set the Liveliness propagation delay factor.

Parameters
factor% of lease period before sending a liveliness message.

Definition at line 1513 of file Service_Participant.cpp.

References liveliness_factor_.

1514 {
1515  liveliness_factor_ = factor;
1516  got_liveliness_factor = true;
1517 }
static bool got_liveliness_factor
int liveliness_factor_
The propagation delay factor.

◆ liveliness_factor() [2/2]

int OpenDDS::DCPS::Service_Participant::liveliness_factor ( ) const

Accessor of the Liveliness propagation delay factor.

Returns
% of lease period before sending a liveliness message.

Definition at line 1520 of file Service_Participant.cpp.

References liveliness_factor_.

1521 {
1522  return liveliness_factor_;
1523 }
int liveliness_factor_
The propagation delay factor.

◆ load_common_configuration()

int OpenDDS::DCPS::Service_Participant::load_common_configuration ( ACE_Configuration_Heap cf,
const ACE_TCHAR filename 
)
private

Load the common configuration to the Service_Participant singleton.

Note
The values from command line can overwrite the values in configuration file.

Definition at line 1705 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR, ACE_ERROR_RETURN, ACE_TEXT(), ACE_TEXT_ALWAYS_CHAR, association_chunk_multiplier_, ACE_OS::atoi(), bidir_giop_, bit_enabled_, bit_lookup_duration_msec_, bit_transport_ip_, bit_transport_port_, ACE_String_Base< char >::c_str(), OpenDDS::DCPS::DCPS_debug_level, default_address_, OpenDDS::DCPS::Discovery::DEFAULT_REPO, defaultDiscovery_, ACE_String_Base< char >::empty(), OpenDDS::DCPS::SecurityDebug::fake_encryption, federation_backoff_multiplier_, federation_initial_backoff_seconds_, federation_liveliness_, federation_recovery_duration_, ACE_Configuration_Heap::find_value(), GET_CONFIG_STRING_VALUE, GET_CONFIG_TSTRING_VALUE, GET_CONFIG_VALUE, ACE_Configuration_Heap::get_string_value(), global_transport_config_, liveliness_factor_, LM_ERROR, LM_NOTICE, LM_WARNING, OpenDDS::DCPS::log_bits, OpenDDS::DCPS::log_level, monitor_enabled_, n_chunks_, ACE_Configuration_Heap::open_section(), OPENDDS_STRING, OpenDDS::DCPS::SecurityDebug::parse_flags(), pending_timeout_, persistent_data_dir_, publisher_content_filter_, ACE_Configuration::root_section(), schedulerQuantum_, schedulerString_, OpenDDS::DCPS::security_debug, security_enabled_, ACE_INET_Addr::set(), OpenDDS::DCPS::SecurityDebug::set_debug_level(), OpenDDS::DCPS::LogLevel::set_from_string(), set_repo_ior(), OpenDDS::DCPS::ThreadStatusManager::thread_status_interval(), thread_status_manager_, OpenDDS::DCPS::Transport_debug_level, type_object_encoding(), and value.

Referenced by load_configuration().

1707 {
1708  const ACE_Configuration_Section_Key &root = cf.root_section();
1710 
1711  if (cf.open_section(root, COMMON_SECTION_NAME, false, sect) != 0) {
1712  if (DCPS_debug_level > 0) {
1713  // This is not an error if the configuration file does not have
1714  // a common section. The code default configuration will be used.
1715  ACE_DEBUG((LM_NOTICE,
1716  ACE_TEXT("(%P|%t) NOTICE: Service_Participant::load_common_configuration ")
1717  ACE_TEXT("failed to open section %s\n"),
1719  }
1720 
1721  return 0;
1722 
1723  } else {
1724  const ACE_TCHAR* message =
1725  ACE_TEXT("(%P|%t) NOTICE: using %s value from command option (overrides value if it's in config file)\n");
1726 
1727  if (got_debug_level) {
1728  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSDebugLevel")));
1729  } else {
1730  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSDebugLevel"), DCPS_debug_level, int)
1731  }
1732 
1733  if (got_info) {
1734  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSInfoRepo")));
1735  } else {
1737  GET_CONFIG_TSTRING_VALUE(cf, sect, ACE_TEXT("DCPSInfoRepo"), value)
1738  if (!value.empty()) {
1739  this->set_repo_ior(value.c_str(), Discovery::DEFAULT_REPO);
1740  }
1741  }
1742 
1744  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSRTISerialization")));
1745  } else {
1746  bool should_use = true;
1747  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSRTISerialization"), should_use, bool)
1748  if (!should_use) {
1749  ACE_ERROR((LM_WARNING,
1750  ACE_TEXT("(%P|%t) WARNING: Service_Participant::load_common_configuration ")
1751  ACE_TEXT("Argument ignored: DCPSRTISerialization is required to be enabled\n")));
1752  }
1753  }
1754 
1755  if (got_chunks) {
1756  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSChunks")));
1757  } else {
1758  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSChunks"), this->n_chunks_, size_t)
1759  }
1760 
1762  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSChunkAssociationMultiplier")));
1763  } else {
1764  // This is legacy support for a misspelling of the config option.
1765  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSChunkAssociationMutltiplier"), this->association_chunk_multiplier_, size_t)
1766  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSChunkAssociationMultiplier"), this->association_chunk_multiplier_, size_t)
1767  }
1768 
1769  if (got_bit_transport_port) {
1770  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSBitTransportPort")));
1771  } else {
1772  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSBitTransportPort"), this->bit_transport_port_, int)
1773  }
1774 
1775  if (got_bit_transport_ip) {
1776  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSBitTransportIPAddress")));
1777  } else {
1778  GET_CONFIG_TSTRING_VALUE(cf, sect, ACE_TEXT("DCPSBitTransportIPAddress"), this->bit_transport_ip_)
1779  }
1780 
1781  if (got_liveliness_factor) {
1782  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSLivelinessFactor")));
1783  } else {
1784  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSLivelinessFactor"), this->liveliness_factor_, int)
1785  }
1786 
1788  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSBitLookupDurationMsec")));
1789  } else {
1790  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSBitLookupDurationMsec"), this->bit_lookup_duration_msec_, int)
1791  }
1792 
1794  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSGlobalTransportConfig")));
1795  } else {
1796  GET_CONFIG_TSTRING_VALUE(cf, sect, ACE_TEXT("DCPSGlobalTransportConfig"), this->global_transport_config_);
1797  if (this->global_transport_config_ == ACE_TEXT("$file")) {
1798  // When the special string of "$file" is used, substitute the file name
1799  this->global_transport_config_ = filename;
1800  }
1801  }
1802 
1803  if (got_bit_flag) {
1804  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSBit")));
1805  } else {
1806  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSBit"), this->bit_enabled_, int)
1807  }
1808 
1809  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSLogBits"), log_bits, bool);
1810 
1811 #if defined(OPENDDS_SECURITY)
1812  if (got_security_flag) {
1813  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSSecurity")));
1814  } else {
1815  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSSecurity"), this->security_enabled_, int)
1816  }
1817 
1818  if (got_security_debug) {
1819  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSSecurityDebug or DCPSSecurityDebugLevel")));
1820  } else {
1821  const ACE_TCHAR* debug_name = ACE_TEXT("DCPSSecurityDebug");
1822  const ACE_TCHAR* debug_level_name = ACE_TEXT("DCPSSecurityDebugLevel");
1823  bool got_value = false;
1824  ACE_TString debug_level_value;
1825  if (cf.get_string_value(sect, debug_level_name, debug_level_value) == -1) {
1826  ACE_TString debug_value;
1827  if (cf.get_string_value(sect, debug_name, debug_value) != -1) {
1828  if (debug_value != ACE_TEXT("")) {
1829  got_value = true;
1830  security_debug.parse_flags(debug_value.c_str());
1831  }
1832  }
1833  } else if (debug_level_value != ACE_TEXT("")) {
1834  got_value = true;
1835  security_debug.set_debug_level(ACE_OS::atoi(debug_level_value.c_str()));
1836  }
1837  if (!got_value && OpenDDS::DCPS::Transport_debug_level > 0) {
1838  ACE_DEBUG((LM_NOTICE,
1839  ACE_TEXT("(%P|%t) NOTICE: DCPSSecurityDebug and DCPSSecurityDebugLevel ")
1840  ACE_TEXT("are not defined in config file or are blank - using code default.\n")));
1841  }
1842  }
1843 
1845  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSSecurityFakeEncryption")));
1846  } else {
1847  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSSecurityFakeEncryption"), security_debug.fake_encryption, int)
1848  }
1849 #endif
1850 
1852  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSTransportDebugLevel")));
1853  } else {
1854  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSTransportDebugLevel"), OpenDDS::DCPS::Transport_debug_level, int)
1855  }
1856 
1857 #ifndef OPENDDS_NO_PERSISTENCE_PROFILE
1859  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSPersistentDataDir")));
1860  } else {
1862  GET_CONFIG_TSTRING_VALUE(cf, sect, ACE_TEXT("DCPSPersistentDataDir"), value)
1864  }
1865 #endif
1866 
1867  if (got_pending_timeout) {
1868  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSPendingTimeout")));
1869  } else {
1870  int timeout = 0;
1871  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSPendingTimeout"), timeout, int)
1872  pending_timeout_ = TimeDuration(timeout);
1873  }
1874 
1876  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSPublisherContentFilter")));
1877  } else {
1878  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSPublisherContentFilter"),
1879  this->publisher_content_filter_, bool)
1880  }
1881 
1882  if (got_default_discovery) {
1884  if (cf.find_value(sect, ACE_TEXT("DCPSDefaultDiscovery"), type) != -1) {
1885  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSDefaultDiscovery")));
1886  }
1887  } else {
1888  GET_CONFIG_STRING_VALUE(cf, sect, ACE_TEXT("DCPSDefaultDiscovery"),
1889  this->defaultDiscovery_);
1890  }
1891 
1892  if (got_bidir_giop) {
1894  if (cf.find_value(sect, ACE_TEXT("DCPSBidirGIOP"), type) != -1) {
1895  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSBidirGIOP")));
1896  }
1897  } else {
1898  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSBidirGIOP"), bidir_giop_, bool)
1899  }
1900 
1902  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSThreadStatusInterval")));
1903  } else {
1904  int interval = 0;
1905  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSThreadStatusInterval"), interval, int);
1906  thread_status_manager_.thread_status_interval(TimeDuration(interval));
1907  }
1908 
1910  if (got_log_fname) {
1911  if (cf.find_value(sect, ACE_TEXT("ORBLogFile"), type) != -1) {
1912  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("ORBLogFile")));
1913  }
1914  } else {
1915  OPENDDS_STRING log_fname;
1916  GET_CONFIG_STRING_VALUE(cf, sect, ACE_TEXT("ORBLogFile"), log_fname);
1917  if (!log_fname.empty()) {
1918  set_log_file_name(log_fname.c_str());
1919  }
1920  }
1921 
1922  if (got_log_verbose) {
1923  if (cf.find_value(sect, ACE_TEXT("ORBVerboseLogging"), type) != -1) {
1924  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("ORBVerboseLogging")));
1925  }
1926  } else {
1927  unsigned long verbose_logging = 0;
1928  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("ORBVerboseLogging"), verbose_logging, unsigned long);
1929  set_log_verbose(verbose_logging);
1930  }
1931 
1932  if (got_default_address) {
1933  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSDefaultAddress")));
1934  } else {
1935  ACE_TString default_address_str;
1936  GET_CONFIG_TSTRING_VALUE(cf, sect, ACE_TEXT("DCPSDefaultAddress"), default_address_str);
1937  ACE_INET_Addr addr;
1938  if (!default_address_str.empty() &&
1939  addr.set(u_short(0), default_address_str.c_str())) {
1940  ACE_ERROR_RETURN((LM_ERROR,
1941  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_common_configuration: ")
1942  ACE_TEXT("failed to parse default address %C\n"),
1943  default_address_str.c_str()),
1944  -1);
1945  }
1946  default_address_ = NetworkAddress(addr);
1947  }
1948 
1949  if (got_monitor) {
1950  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSMonitor")));
1951  } else {
1952  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("DCPSMonitor"), monitor_enabled_, bool)
1953  }
1954 
1956  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSTypeObjectEncoding")));
1957  } else {
1958  String str;
1959  GET_CONFIG_STRING_VALUE(cf, sect, ACE_TEXT("DCPSTypeObjectEncoding"), str);
1960  if (!str.empty()) {
1961  type_object_encoding(str.c_str());
1962  }
1963  }
1964 
1965  if (got_log_level) {
1966  ACE_DEBUG((LM_NOTICE, message, ACE_TEXT("DCPSLogLevel")));
1967  } else {
1968  String str;
1969  GET_CONFIG_STRING_VALUE(cf, sect, ACE_TEXT("DCPSLogLevel"), str);
1970  if (!str.empty()) {
1971  log_level.set_from_string(str.c_str());
1972  }
1973  }
1974 
1975  // These are not handled on the command line.
1976  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("FederationRecoveryDuration"), this->federation_recovery_duration_, int)
1977  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("FederationInitialBackoffSeconds"), this->federation_initial_backoff_seconds_, int)
1978  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("FederationBackoffMultiplier"), this->federation_backoff_multiplier_, int)
1979  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("FederationLivelinessDuration"), this->federation_liveliness_, int)
1980 
1981 #if OPENDDS_POOL_ALLOCATOR
1982  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("pool_size"), pool_size_, size_t)
1983  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("pool_granularity"), pool_granularity_, size_t)
1984 #endif
1985 
1986  //
1987  // Establish the scheduler if specified.
1988  //
1989  GET_CONFIG_TSTRING_VALUE(cf, sect, ACE_TEXT("scheduler"), this->schedulerString_)
1990 
1991  suseconds_t usec(0);
1992 
1993  GET_CONFIG_VALUE(cf, sect, ACE_TEXT("scheduler_slice"), usec, suseconds_t)
1994 
1995  if (usec > 0) {
1996  schedulerQuantum_ = TimeDuration(0, usec);
1997  }
1998  }
1999 
2000  return 0;
2001 }
OpenDDS_Dcps_Export LogLevel log_level
#define ACE_DEBUG(X)
bool bidir_giop_
Enable TAO&#39;s Bidirectional GIOP?
#define ACE_ERROR(X)
const char * c_str(void) const
static bool got_use_rti_serialization
const LogLevel::Value value
Definition: debug.cpp:61
int bit_transport_port_
The builtin topic transport port number.
ACE_CString persistent_data_dir_
The PERSISTENT data durability directory.
static bool got_type_object_encoding
OpenDDS_Dcps_Export unsigned int Transport_debug_level
Transport Logging verbosity level.
Definition: debug.cpp:25
static bool got_bidir_giop
virtual int get_string_value(const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, ACE_TString &value)
bool set_repo_ior(const char *ior, Discovery::RepoKey key=Discovery::DEFAULT_REPO, bool attach_participant=true)
static bool got_global_transport_config
#define GET_CONFIG_STRING_VALUE(CF, SECT, KEY, VALUE)
Definition: TransportDefs.h:76
#define ACE_TEXT_ALWAYS_CHAR(STRING)
int federation_initial_backoff_seconds_
The FederationInitialBackoffSeconds value.
static bool got_persistent_data_dir
virtual const ACE_Configuration_Section_Key & root_section(void) const
TypeObjectEncoding type_object_encoding() const
virtual int find_value(const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, VALUETYPE &type)
bool publisher_content_filter_
Allow the publishing side to do content filtering?
bool monitor_enabled_
Enable Monitor functionality.
static bool got_transport_debug_level
static bool got_log_fname
void set_from_string(const char *name)
Definition: debug.cpp:73
bool fake_encryption
Disable all encryption for security, even the required builtin encryption.
Definition: debug.h:146
static bool got_liveliness_factor
void set_debug_level(unsigned level)
Definition: debug.cpp:182
#define OPENDDS_STRING
void thread_status_interval(const TimeDuration &thread_status_interval)
ACE_TString schedulerString_
Scheduling policy value from configuration file.
int federation_backoff_multiplier_
This FederationBackoffMultiplier.
static bool got_publisher_content_filter
char ACE_TCHAR
static bool got_bit_lookup_duration_msec
#define GET_CONFIG_VALUE(CF, SECT, KEY, VALUE, TYPE)
Definition: TransportDefs.h:45
static bool got_log_verbose
#define GET_CONFIG_TSTRING_VALUE(CF, SECT, KEY, VALUE)
static bool got_bit_transport_ip
static bool got_security_flag
static const char * DEFAULT_REPO
Key value for the default repository IOR.
Definition: Discovery.h:85
NetworkAddress default_address_
The default network address to use.
bool empty(void) const
static bool got_thread_status_interval
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
bool log_bits
Definition: Logging.cpp:18
static bool got_chunk_association_multiplier
int set(const ACE_INET_Addr &)
static bool got_debug_level
ACE_TEXT("TCP_Factory")
int atoi(const char *s)
static const ACE_TCHAR COMMON_SECTION_NAME[]
virtual int open_section(const ACE_Configuration_Section_Key &base, const ACE_TCHAR *sub_section, bool create, ACE_Configuration_Section_Key &result)
void parse_flags(const ACE_TCHAR *flags)
Definition: debug.cpp:134
static bool got_security_debug
std::string String
static bool got_default_address
static bool got_pending_timeout
static bool got_bit_flag
#define ACE_ERROR_RETURN(X, Y)
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32
static bool got_security_fake_encryption
int federation_liveliness_
This FederationLivelinessDuration.
static bool got_bit_transport_port
TimeDuration schedulerQuantum_
Scheduler time slice from configuration file.
int liveliness_factor_
The propagation delay factor.
ACE_TString bit_transport_ip_
The builtin topic transport address.
int federation_recovery_duration_
The FederationRecoveryDuration value in seconds.
static bool got_log_level
static bool got_default_discovery

◆ load_configuration() [1/2]

int OpenDDS::DCPS::Service_Participant::load_configuration ( ACE_Configuration_Heap cf,
const ACE_TCHAR filename 
)

Import the configuration file to the ACE_Configuration_Heap object and load common section configuration to the Service_Participant singleton and load the factory and transport section configuration to the TransportRegistry singleton.

Definition at line 1562 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR_RETURN, ACE_TEXT(), ACE_TEXT_ALWAYS_CHAR, add_discovery(), ACE_String_Base< char >::c_str(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::TransportRegistry::get_config(), OpenDDS::DCPS::TransportRegistry::global_config(), global_transport_config_, OpenDDS::DCPS::TransportRegistry::instance(), OpenDDS::DCPS::StaticDiscovery::instance(), LM_ERROR, LM_NOTICE, load_common_configuration(), load_discovery_configuration(), load_discovery_templates(), load_domain_configuration(), load_domain_ranges(), OpenDDS::DCPS::TransportRegistry::load_transport_configuration(), OpenDDS::DCPS::TransportRegistry::load_transport_templates(), and TheTransportRegistry.

1565 {
1566  // Domain config is loaded after Discovery (see below). Since the domain
1567  // could be a domain_range that specifies the DiscoveryTemplate, check
1568  // for config templates before loading any config information.
1569  ACE_TString section_name;
1570 
1571  int status = this->load_common_configuration(config, filename);
1572 
1573  if (status != 0) {
1574  ACE_ERROR_RETURN((LM_ERROR,
1575  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1576  ACE_TEXT("load_common_configuration () returned %d\n"),
1577  status),
1578  -1);
1579  }
1580 
1581  // Register static discovery.
1582  this->add_discovery(static_rchandle_cast<Discovery>(StaticDiscovery::instance()));
1583 
1584  // load any discovery configuration templates before rtps discovery
1585  // this will populate the domain_range_templates_
1586  status = this->load_domain_ranges(config);
1587 
1588  // load any rtps_discovery templates
1589  status = this->load_discovery_templates(config);
1590 
1591  if (status != 0) {
1592  ACE_ERROR_RETURN((LM_ERROR,
1593  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1594  ACE_TEXT("load_domain_range_configuration() returned %d\n"),
1595  status),
1596  -1);
1597  }
1598 
1599  status = this->load_discovery_configuration(config, RTPS_SECTION_NAME);
1600 
1601  if (status != 0) {
1602  ACE_ERROR_RETURN((LM_ERROR,
1603  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1604  ACE_TEXT("load_discovery_configuration() returned %d\n"),
1605  status),
1606  -1);
1607  }
1608 
1609  status = this->load_discovery_configuration(config, REPO_SECTION_NAME);
1610 
1611  if (status != 0) {
1612  ACE_ERROR_RETURN((LM_ERROR,
1613  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1614  ACE_TEXT("load_discovery_configuration() returned %d\n"),
1615  status),
1616  -1);
1617  }
1618 
1619  // load any transport configuration templates before the transport config
1621 
1622  if (status != 0) {
1623  ACE_ERROR_RETURN((LM_ERROR,
1624  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1625  ACE_TEXT("load_transport_templates() returned %d\n"),
1626  status),
1627  -1);
1628  }
1629 
1631  ACE_TEXT_ALWAYS_CHAR(filename), config);
1632  if (this->global_transport_config_ != ACE_TEXT("")) {
1635  if (config) {
1637  } else if (TheTransportRegistry->config_has_transport_template(global_transport_config_)) {
1638  if (DCPS_debug_level > 0) {
1639  // This is not an error.
1640  ACE_DEBUG((LM_NOTICE,
1641  ACE_TEXT("(%P|%t) NOTICE: Service_Participant::load_configuration ")
1642  ACE_TEXT("DCPSGlobalTransportConfig %C is a transport_template\n"),
1643  this->global_transport_config_.c_str()));
1644  }
1645  } else {
1646  ACE_ERROR_RETURN((LM_ERROR,
1647  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1648  ACE_TEXT("Unable to locate specified global transport config: %C\n"),
1650  -1);
1651  }
1652  }
1653 
1654  if (status != 0) {
1655  ACE_ERROR_RETURN((LM_ERROR,
1656  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1657  ACE_TEXT("load_transport_configuration () returned %d\n"),
1658  status),
1659  -1);
1660  }
1661 
1662  // Needs to be loaded after the [rtps_discovery/*] and [repository/*]
1663  // sections to allow error reporting on bad discovery config names.
1664  // Also loaded after the transport configuration so that
1665  // DefaultTransportConfig within [domain/*] can use TransportConfig objects.
1666  status = this->load_domain_configuration(config, filename);
1667 
1668  if (status != 0) {
1669  ACE_ERROR_RETURN((LM_ERROR,
1670  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1671  ACE_TEXT("load_domain_configuration () returned %d\n"),
1672  status),
1673  -1);
1674  }
1675 
1676  if (status != 0) {
1677  ACE_ERROR_RETURN((LM_ERROR,
1678  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1679  ACE_TEXT("load_domain_configuration () returned %d\n"),
1680  status),
1681  -1);
1682  }
1683 
1684  // Needs to be loaded after transport configs and instances and domains.
1685  try {
1686  status = StaticDiscovery::instance()->load_configuration(config);
1687 
1688  if (status != 0) {
1689  ACE_ERROR_RETURN((LM_ERROR,
1690  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1691  ACE_TEXT("load_discovery_configuration() returned %d\n"),
1692  status),
1693  -1);
1694  }
1695  } catch (const CORBA::BAD_PARAM& ex) {
1696  ex._tao_print_exception("Exception caught in Service_Participant::load_configuration: "
1697  "trying to load_discovery_configuration()");
1698  return -1;
1699  }
1700 
1701  return 0;
1702 }
#define TheTransportRegistry
#define ACE_DEBUG(X)
const char * c_str(void) const
#define ACE_TEXT_ALWAYS_CHAR(STRING)
int load_domain_configuration(ACE_Configuration_Heap &cf, const ACE_TCHAR *filename)
void add_discovery(Discovery_rch discovery)
static const ACE_TCHAR RTPS_SECTION_NAME[]
static TransportRegistry * instance()
Return a singleton instance of this class.
TransportConfig_rch global_config() const
static const ACE_TCHAR REPO_SECTION_NAME[]
TransportConfig_rch get_config(const OPENDDS_STRING &name) const
static StaticDiscovery_rch instance()
int load_transport_templates(ACE_Configuration_Heap &cf)
int load_discovery_configuration(ACE_Configuration_Heap &cf, const ACE_TCHAR *section_name)
int load_discovery_templates(ACE_Configuration_Heap &cf)
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
ACE_TEXT("TCP_Factory")
int load_transport_configuration(const OPENDDS_STRING &file_name, ACE_Configuration_Heap &cf)
int load_domain_ranges(ACE_Configuration_Heap &cf)
#define ACE_ERROR_RETURN(X, Y)
int load_common_configuration(ACE_Configuration_Heap &cf, const ACE_TCHAR *filename)
RcHandle< TransportConfig > TransportConfig_rch

◆ load_configuration() [2/2]

int OpenDDS::DCPS::Service_Participant::load_configuration ( )
private

Import the configuration file to the ACE_Configuration_Heap object and load common section configuration to the Service_Participant singleton and load the factory and transport section configuration to the TransportRegistry singleton.

Definition at line 1533 of file Service_Participant.cpp.

References ACE_ERROR_RETURN, ACE_TEXT(), ACE_String_Base< char >::c_str(), OpenDDS::DCPS::config_fname, ACE_Ini_ImpExp::import_config(), LM_ERROR, and ACE_Configuration_Heap::open().

Referenced by get_domain_participant_factory().

1534 {
1536  int status = 0;
1537 
1538  if ((status = cf.open()) != 0)
1539  ACE_ERROR_RETURN((LM_ERROR,
1540  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1541  ACE_TEXT("open() returned %d\n"),
1542  status),
1543  -1);
1544 
1545  ACE_Ini_ImpExp import(cf);
1546  status = import.import_config(config_fname.c_str());
1547 
1548  if (status != 0) {
1549  ACE_ERROR_RETURN((LM_ERROR,
1550  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1551  ACE_TEXT("import_config () returned %d\n"),
1552  status),
1553  -1);
1554  } else {
1555  status = this->load_configuration(cf, config_fname.c_str());
1556  }
1557 
1558  return status;
1559 }
const char * c_str(void) const
static ACE_TString config_fname(ACE_TEXT(""))
virtual int import_config(const ACE_TCHAR *filename)
ACE_TEXT("TCP_Factory")
int open(const ACE_TCHAR *file_name, void *base_address=ACE_DEFAULT_BASE_ADDR, size_t default_map_size=ACE_DEFAULT_CONFIG_SECTION_SIZE)
#define ACE_ERROR_RETURN(X, Y)

◆ load_discovery_configuration()

int OpenDDS::DCPS::Service_Participant::load_discovery_configuration ( ACE_Configuration_Heap cf,
const ACE_TCHAR section_name 
)
private

Load the discovery configuration to the Service_Participant singleton.

Definition at line 2387 of file Service_Participant.cpp.

References ACE_ERROR_RETURN, ACE_TEXT(), ACE_TEXT_ALWAYS_CHAR, discovery_types_, LM_ERROR, ACE_Configuration_Heap::open_section(), OPENDDS_STRING, ACE_Configuration::root_section(), and TheTransportRegistry.

Referenced by configure_discovery_template(), configure_domain_range_instance(), get_discovery(), and load_configuration().

2389 {
2390  const ACE_Configuration_Section_Key &root = cf.root_section();
2392  if (cf.open_section(root, section_name, false, sect) == 0) {
2393 
2394  const OPENDDS_STRING sect_name = ACE_TEXT_ALWAYS_CHAR(section_name);
2395  DiscoveryTypes::iterator iter =
2396  this->discovery_types_.find(sect_name);
2397 
2398  if (iter == this->discovery_types_.end()) {
2399  // See if we can dynamically load the required libraries
2400  TheTransportRegistry->load_transport_lib(sect_name);
2401  iter = this->discovery_types_.find(sect_name);
2402  }
2403 
2404  if (iter != this->discovery_types_.end()) {
2405  // discovery code is loaded, process options
2406  return iter->second->discovery_config(cf);
2407  } else {
2408  // No discovery code can be loaded, report an error
2409  ACE_ERROR_RETURN((LM_ERROR,
2410  ACE_TEXT("(%P|%t) ERROR: Service_Participant::")
2411  ACE_TEXT("load_discovery_configuration(): ")
2412  ACE_TEXT("Unable to load libraries for %s\n"),
2413  section_name),
2414  -1);
2415  }
2416  }
2417  return 0;
2418 }
#define TheTransportRegistry
#define ACE_TEXT_ALWAYS_CHAR(STRING)
virtual const ACE_Configuration_Section_Key & root_section(void) const
#define OPENDDS_STRING
ACE_TEXT("TCP_Factory")
virtual int open_section(const ACE_Configuration_Section_Key &base, const ACE_TCHAR *sub_section, bool create, ACE_Configuration_Section_Key &result)
#define ACE_ERROR_RETURN(X, Y)

◆ load_discovery_templates()

int OpenDDS::DCPS::Service_Participant::load_discovery_templates ( ACE_Configuration_Heap cf)
private

Load the discovery template information

Definition at line 2479 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR_RETURN, ACE_TEXT(), ACE_TEXT_ALWAYS_CHAR, OpenDDS::DCPS::CUSTOMIZATION_SECTION_NAME, OpenDDS::DCPS::Service_Participant::DiscoveryInfo::customizations, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::Service_Participant::DiscoveryInfo::disc_info, OpenDDS::DCPS::Service_Participant::DiscoveryInfo::discovery_name, LM_DEBUG, LM_ERROR, ACE_Configuration_Heap::open(), ACE_Configuration_Heap::open_section(), OPENDDS_STRING, OpenDDS::DCPS::processSections(), OpenDDS::DCPS::pullValues(), and ACE_Configuration::root_section().

Referenced by load_configuration().

2480 {
2481  // open the rtps_discovery config sections
2482  cf.open();
2483  const ACE_Configuration_Section_Key& root = cf.root_section();
2485 
2486  if (cf.open_section(root, RTPS_SECTION_NAME, false, rtps_sect) == 0) {
2487  ValueMap vm;
2488  if (pullValues(cf, rtps_sect, vm) > 0) {
2489  // There are values inside [rtps_discovery]
2490  ACE_ERROR_RETURN((LM_ERROR,
2491  ACE_TEXT("(%P|%t) Service_Participant::load_discovery_templates(): ")
2492  ACE_TEXT("rtps_discovery sections must have a subsection name\n")),
2493  -1);
2494  }
2495 
2496  // Process the subsections of this section (the individual domains)
2497  KeyList keys;
2498  if (processSections(cf, rtps_sect, keys) != 0) {
2499  ACE_ERROR_RETURN((LM_ERROR,
2500  ACE_TEXT("(%P|%t) Service_Participant::load_discovery_templates(): ")
2501  ACE_TEXT("too many nesting layers in the [rtps_discovery] section.\n")),
2502  -1);
2503  }
2504 
2505  // store the discovery information
2506  for (KeyList::const_iterator disc_it = keys.begin(); disc_it != keys.end(); ++disc_it) {
2507  DiscoveryInfo dinfo;
2508  dinfo.discovery_name = disc_it->first;
2509 
2510  ValueMap values;
2511  if (pullValues(cf, disc_it->second, values) > 0) {
2512  for (ValueMap::const_iterator it = values.begin(); it != values.end(); ++it) {
2513  // check for customizations
2515  OPENDDS_STRING customization = it->second;
2516  if (DCPS_debug_level > 0) {
2517  ACE_DEBUG((LM_DEBUG,
2518  ACE_TEXT("(%P|%t) Service_Participant::load_discovery_templates(): ")
2519  ACE_TEXT("loading customizations [%s/%C]\n"),
2521  customization.c_str()));
2522  }
2523 
2524  ACE_Configuration_Section_Key custom_sect;
2525  if (cf.open_section(root, CUSTOMIZATION_SECTION_NAME, false, custom_sect) == 0) {
2526  ValueMap vcm;
2527  if (pullValues(cf, custom_sect, vcm) > 0) {
2528  ACE_ERROR_RETURN((LM_ERROR,
2529  ACE_TEXT("(%P|%t) Service_Participant::load_discovery_templates(): ")
2530  ACE_TEXT("%s sections must have a subsection name\n"),
2532  -1);
2533  }
2534 
2535  // Process the subsections of the custom section
2536  KeyList keys;
2537  if (processSections(cf, custom_sect, keys) != 0) {
2538  ACE_ERROR_RETURN((LM_ERROR,
2539  ACE_TEXT("(%P|%t) Service_Participant::load_discovery_templates(): ")
2540  ACE_TEXT("too many nesting layers in the [%s] section.\n"),
2542  -1);
2543  }
2544 
2545  // add customizations to domain range
2546  for (KeyList::const_iterator iter = keys.begin(); iter != keys.end(); ++iter) {
2547  if (customization == iter->first) {
2548  ValueMap values;
2549  pullValues(cf, iter->second, values);
2550  for (ValueMap::const_iterator it = values.begin(); it != values.end(); ++it) {
2551  dinfo.customizations[it->first] = it->second;
2552  }
2553  }
2554  }
2555  }
2556  } else {
2557  dinfo.disc_info[it->first] = it->second;
2558  }
2559  }
2560  }
2561 
2562  discovery_infos_.push_back(dinfo);
2563  }
2564  }
2565 
2566  // return 0 even if no templates were loaded
2567  return 0;
2568 }
#define ACE_DEBUG(X)
static const ACE_TCHAR CUSTOMIZATION_SECTION_NAME[]
int processSections(ACE_Configuration_Heap &cf, const ACE_Configuration_Section_Key &key, KeyList &subsections)
Definition: ConfigUtils.cpp:41
int pullValues(ACE_Configuration_Heap &cf, const ACE_Configuration_Section_Key &key, ValueMap &values)
Definition: ConfigUtils.cpp:17
#define ACE_TEXT_ALWAYS_CHAR(STRING)
virtual const ACE_Configuration_Section_Key & root_section(void) const
static const ACE_TCHAR RTPS_SECTION_NAME[]
#define OPENDDS_STRING
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
ACE_TEXT("TCP_Factory")
virtual int open_section(const ACE_Configuration_Section_Key &base, const ACE_TCHAR *sub_section, bool create, ACE_Configuration_Section_Key &result)
int open(const ACE_TCHAR *file_name, void *base_address=ACE_DEFAULT_BASE_ADDR, size_t default_map_size=ACE_DEFAULT_CONFIG_SECTION_SIZE)
#define ACE_ERROR_RETURN(X, Y)

◆ load_domain_configuration()

int OpenDDS::DCPS::Service_Participant::load_domain_configuration ( ACE_Configuration_Heap cf,
const ACE_TCHAR filename 
)
private

Load the domain configuration to the Service_Participant singleton.

Definition at line 2004 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR_RETURN, ACE_TEXT(), ACE_TEXT_ALWAYS_CHAR, OpenDDS::DCPS::convertToInteger(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::Discovery::DEFAULT_REPO, OpenDDS::DCPS::Discovery::DEFAULT_RTPS, OpenDDS::DCPS::Discovery::DEFAULT_STATIC, discoveryMap_, OpenDDS::DCPS::TransportRegistry::domain_default_config(), OpenDDS::DCPS::TransportRegistry::get_config(), OpenDDS::DCPS::TransportRegistry::instance(), OpenDDS::DCPS::RcHandle< T >::is_nil(), LM_DEBUG, LM_ERROR, LM_NOTICE, name, ACE_Configuration_Heap::open_section(), OPENDDS_STRING, OpenDDS::DCPS::processSections(), OpenDDS::DCPS::pullValues(), ACE_Configuration::root_section(), and set_repo_domain().

Referenced by configure_domain_range_instance(), and load_configuration().

2006 {
2007  const ACE_Configuration_Section_Key& root = cf.root_section();
2008  ACE_Configuration_Section_Key domain_sect;
2009 
2010  if (cf.open_section(root, DOMAIN_SECTION_NAME, false, domain_sect) != 0) {
2011  if (DCPS_debug_level > 0) {
2012  // This is not an error if the configuration file does not have
2013  // any domain (sub)section. The code default configuration will be used.
2014  ACE_DEBUG((LM_NOTICE,
2015  ACE_TEXT("(%P|%t) NOTICE: Service_Participant::load_domain_configuration(): ")
2016  ACE_TEXT("failed to open [%s] section - using code default.\n"),
2018  }
2019 
2020  return 0;
2021 
2022  } else {
2023  // Ensure there are no properties in this section
2024  ValueMap vm;
2025  if (pullValues(cf, domain_sect, vm) > 0) {
2026  // There are values inside [domain]
2027  ACE_ERROR_RETURN((LM_ERROR,
2028  ACE_TEXT("(%P|%t) Service_Participant::load_domain_configuration(): ")
2029  ACE_TEXT("domain sections must have a subsection name\n")),
2030  -1);
2031  }
2032  // Process the subsections of this section (the individual domains)
2033  KeyList keys;
2034  if (processSections(cf, domain_sect, keys) != 0) {
2035  ACE_ERROR_RETURN((LM_ERROR,
2036  ACE_TEXT("(%P|%t) Service_Participant::load_domain_configuration(): ")
2037  ACE_TEXT("too many nesting layers in the [domain] section.\n")),
2038  -1);
2039  }
2040 
2041  // Loop through the [domain/*] sections
2042  for (KeyList::const_iterator it = keys.begin(); it != keys.end(); ++it) {
2043  OPENDDS_STRING domain_name = it->first;
2044 
2045  ValueMap values;
2046  pullValues(cf, it->second, values);
2047  DDS::DomainId_t domainId = -1;
2048  Discovery::RepoKey repoKey;
2049  OPENDDS_STRING perDomainDefaultTportConfig;
2050  for (ValueMap::const_iterator it = values.begin(); it != values.end(); ++it) {
2051  OPENDDS_STRING name = it->first;
2052  if (name == "DomainId") {
2053  OPENDDS_STRING value = it->second;
2054  if (!convertToInteger(value, domainId)) {
2055  ACE_ERROR_RETURN((LM_ERROR,
2056  ACE_TEXT("(%P|%t) Service_Participant::load_domain_configuration(): ")
2057  ACE_TEXT("Illegal integer value for DomainId (%C) in [domain/%C] section.\n"),
2058  value.c_str(), domain_name.c_str()),
2059  -1);
2060  }
2061  if (DCPS_debug_level > 0) {
2062  ACE_DEBUG((LM_DEBUG,
2063  ACE_TEXT("(%P|%t) [domain/%C]: DomainId == %d\n"),
2064  domain_name.c_str(), domainId));
2065  }
2066  } else if (name == "DomainRepoKey") {
2067  // We will still process this for backward compatibility, but
2068  // it can now be replaced by "DiscoveryConfig=REPO:<key>"
2069  repoKey = it->second;
2070  if (repoKey == "-1") {
2071  repoKey = Discovery::DEFAULT_REPO;
2072  }
2073 
2074  if (DCPS_debug_level > 0) {
2075  ACE_DEBUG((LM_DEBUG,
2076  ACE_TEXT("(%P|%t) [domain/%C]: DomainRepoKey == %C\n"),
2077  domain_name.c_str(), repoKey.c_str()));
2078  }
2079  } else if (name == "DiscoveryConfig") {
2080  repoKey = it->second;
2081  } else if (name == "DefaultTransportConfig") {
2082  if (it->second == "$file") {
2083  // When the special string of "$file" is used, substitute the file name
2084  perDomainDefaultTportConfig = ACE_TEXT_ALWAYS_CHAR(filename);
2085 
2086  } else {
2087  perDomainDefaultTportConfig = it->second;
2088  }
2089 
2090  } else {
2091  ACE_ERROR_RETURN((LM_ERROR,
2092  ACE_TEXT("(%P|%t) Service_Participant::load_domain_configuration(): ")
2093  ACE_TEXT("Unexpected entry (%C) in [domain/%C] section.\n"),
2094  name.c_str(), domain_name.c_str()),
2095  -1);
2096  }
2097  }
2098 
2099  if (domainId == -1) {
2100  // DomainId parameter is not set, try using the domain name as an ID
2101  if (!convertToInteger(domain_name, domainId)) {
2102  ACE_ERROR_RETURN((LM_ERROR,
2103  ACE_TEXT("(%P|%t) Service_Participant::load_domain_configuration(): ")
2104  ACE_TEXT("Missing DomainId value in [domain/%C] section.\n"),
2105  domain_name.c_str()),
2106  -1);
2107  }
2108  }
2109 
2110  if (!perDomainDefaultTportConfig.empty()) {
2111  TransportRegistry* const reg = TransportRegistry::instance();
2112  TransportConfig_rch tc = reg->get_config(perDomainDefaultTportConfig);
2113  if (tc.is_nil()) {
2114  ACE_ERROR_RETURN((LM_ERROR,
2115  ACE_TEXT("(%P|%t) Service_Participant::load_domain_configuration(): ")
2116  ACE_TEXT("Unknown transport config %C in [domain/%C] section.\n"),
2117  perDomainDefaultTportConfig.c_str(), domain_name.c_str()), -1);
2118  } else {
2119  reg->domain_default_config(domainId, tc);
2120  }
2121  }
2122 
2123  // Check to see if the specified discovery configuration has been defined
2124  if (!repoKey.empty()) {
2125  if ((repoKey != Discovery::DEFAULT_REPO) &&
2126  (repoKey != Discovery::DEFAULT_RTPS) &&
2127  (repoKey != Discovery::DEFAULT_STATIC) &&
2128  (this->discoveryMap_.find(repoKey) == this->discoveryMap_.end())) {
2129  ACE_ERROR_RETURN((LM_ERROR,
2130  ACE_TEXT("(%P|%t) Service_Participant::load_domain_configuration(): ")
2131  ACE_TEXT("Specified configuration (%C) not found. Referenced in [domain/%C] section.\n"),
2132  repoKey.c_str(), domain_name.c_str()),
2133  -1);
2134  }
2135  this->set_repo_domain(domainId, repoKey);
2136  }
2137  }
2138  }
2139 
2140  return 0;
2141 }
#define ACE_DEBUG(X)
const LogLevel::Value value
Definition: debug.cpp:61
int processSections(ACE_Configuration_Heap &cf, const ACE_Configuration_Section_Key &key, KeyList &subsections)
Definition: ConfigUtils.cpp:41
int pullValues(ACE_Configuration_Heap &cf, const ACE_Configuration_Section_Key &key, ValueMap &values)
Definition: ConfigUtils.cpp:17
void set_repo_domain(const DDS::DomainId_t domain, Discovery::RepoKey repo, bool attach_participant=true)
Bind DCPSInfoRepo IORs to domains.
#define ACE_TEXT_ALWAYS_CHAR(STRING)
virtual const ACE_Configuration_Section_Key & root_section(void) const
RepoKeyDiscoveryMap discoveryMap_
The RepoKey to Discovery object mapping.
bool convertToInteger(const String &s, T &value)
DOMAINID_TYPE_NATIVE DomainId_t
static TransportRegistry * instance()
Return a singleton instance of this class.
#define OPENDDS_STRING
static const ACE_TCHAR DOMAIN_SECTION_NAME[]
static const char * DEFAULT_RTPS
Definition: Discovery.h:86
static const char * DEFAULT_REPO
Key value for the default repository IOR.
Definition: Discovery.h:85
static const char * DEFAULT_STATIC
Definition: Discovery.h:87
OPENDDS_STRING RepoKey
Definition: Discovery.h:80
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const char *const name
Definition: debug.cpp:60
ACE_TEXT("TCP_Factory")
virtual int open_section(const ACE_Configuration_Section_Key &base, const ACE_TCHAR *sub_section, bool create, ACE_Configuration_Section_Key &result)
#define ACE_ERROR_RETURN(X, Y)
RcHandle< TransportConfig > TransportConfig_rch

◆ load_domain_ranges()

int OpenDDS::DCPS::Service_Participant::load_domain_ranges ( ACE_Configuration_Heap cf)
private

Load the domain range template configuration prior to discovery and domain configuration

Definition at line 2144 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR_RETURN, ACE_TEXT(), ACE_TEXT_ALWAYS_CHAR, ACE_String_Base< char >::c_str(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::Service_Participant::DomainRange::discovery_template_name, OpenDDS::DCPS::Service_Participant::DomainRange::domain_info, global_transport_config_, LM_DEBUG, LM_ERROR, LM_NOTICE, name, ACE_Configuration_Heap::open_section(), OPENDDS_STRING, parse_domain_range(), OpenDDS::DCPS::processSections(), OpenDDS::DCPS::pullValues(), OpenDDS::DCPS::Service_Participant::DomainRange::range_end, OpenDDS::DCPS::Service_Participant::DomainRange::range_start, ACE_Configuration::root_section(), and OpenDDS::DCPS::Service_Participant::DomainRange::transport_config_name.

Referenced by load_configuration().

2145 {
2146  const ACE_Configuration_Section_Key& root = cf.root_section();
2147  ACE_Configuration_Section_Key domain_range_sect;
2148 
2149  if (cf.open_section(root, DOMAIN_RANGE_SECTION_NAME, false, domain_range_sect) != 0) {
2150  if (DCPS_debug_level > 0) {
2151  // This is not an error if the configuration file does not have
2152  // any domain range (sub)section.
2153  ACE_DEBUG((LM_NOTICE,
2154  ACE_TEXT("(%P|%t) NOTICE: Service_Participant::load_domain_ranges(): ")
2155  ACE_TEXT("config does not have a [%s] section.\n"),
2157  }
2158 
2159  return 0;
2160 
2161  } else {
2162  if (DCPS_debug_level > 0) {
2163  ACE_DEBUG((LM_NOTICE,
2164  ACE_TEXT("(%P|%t) NOTICE: Service_Participant::load_domain_ranges(): ")
2165  ACE_TEXT("config has %s sections.\n"),
2167  }
2168 
2169  // Ensure there are no properties in this section
2170  ValueMap vm;
2171  if (pullValues(cf, domain_range_sect, vm) > 0) {
2172  // There are values inside [DomainRange]
2173  ACE_ERROR_RETURN((LM_ERROR,
2174  ACE_TEXT("(%P|%t) Service_Participant::load_domain_ranges(): ")
2175  ACE_TEXT("[%s] sections must have a subsection range\n"),
2177  -1);
2178  }
2179 
2180  // Process the subsections of this section (the ranges, m-n)
2181  KeyList keys;
2182  if (processSections(cf, domain_range_sect, keys) != 0) {
2183  ACE_ERROR_RETURN((LM_ERROR,
2184  ACE_TEXT("(%P|%t) Service_Participant::load_domain_ranges(): ")
2185  ACE_TEXT("too many nesting layers in the [%s] section.\n"),
2187  -1);
2188  }
2189 
2190  // Loop through the [DomainRange/*] sections
2191  for (KeyList::const_iterator it = keys.begin(); it != keys.end(); ++it) {
2192  OPENDDS_STRING domain_range = it->first;
2193 
2194  DomainRange range_element;
2195 
2196  int range_start = -1;
2197  int range_end = -1;
2198 
2199  if (parse_domain_range(domain_range, range_start, range_end) != 0) {
2200  ACE_ERROR_RETURN((LM_ERROR,
2201  ACE_TEXT("(%P|%t) Service_Participant::load_domain_ranges(): ")
2202  ACE_TEXT("Error parsing [%s/%C] section.\n"),
2204  domain_range.c_str()),
2205  -1);
2206  }
2207 
2208  range_element.range_start = range_start;
2209  range_element.range_end = range_end;
2210 
2211  ValueMap values;
2212  if (pullValues(cf, it->second, values) > 0) {
2213  OPENDDS_STRING dt_name;
2214 
2215  for (ValueMap::const_iterator it = values.begin(); it != values.end(); ++it) {
2216  OPENDDS_STRING name = it->first;
2217  if (name == "DiscoveryTemplate") {
2218  dt_name = it->second;
2219  if (DCPS_debug_level > 0) {
2220  ACE_DEBUG((LM_DEBUG,
2221  ACE_TEXT("(%P|%t) [%s/%C]: DiscoveryTemplate name == %C\n"),
2222  DOMAIN_RANGE_SECTION_NAME, domain_range.c_str(), dt_name.c_str()));
2223  }
2224  range_element.discovery_template_name = dt_name;
2225  } else if (name == "DefaultTransportConfig") {
2226  range_element.transport_config_name = dt_name;
2227  range_element.domain_info[it->first] = it->second;
2228  } else {
2229  // key=val domain config option
2230  range_element.domain_info[it->first] = it->second;
2231  }
2232  }
2233  }
2234  if (this->global_transport_config_ != ACE_TEXT("")) {
2235  range_element.transport_config_name = ACE_TEXT_ALWAYS_CHAR(this->global_transport_config_.c_str());
2236  }
2237  domain_ranges_.push_back(range_element);
2238  }
2239  }
2240 
2241  return 0;
2242 }
#define ACE_DEBUG(X)
const char * c_str(void) const
int processSections(ACE_Configuration_Heap &cf, const ACE_Configuration_Section_Key &key, KeyList &subsections)
Definition: ConfigUtils.cpp:41
int pullValues(ACE_Configuration_Heap &cf, const ACE_Configuration_Section_Key &key, ValueMap &values)
Definition: ConfigUtils.cpp:17
#define ACE_TEXT_ALWAYS_CHAR(STRING)
virtual const ACE_Configuration_Section_Key & root_section(void) const
#define OPENDDS_STRING
static const ACE_TCHAR DOMAIN_RANGE_SECTION_NAME[]
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
const char *const name
Definition: debug.cpp:60
int parse_domain_range(const OPENDDS_STRING &range, int &start, int &end)
ACE_TEXT("TCP_Factory")
virtual int open_section(const ACE_Configuration_Section_Key &base, const ACE_TCHAR *sub_section, bool create, ACE_Configuration_Section_Key &result)
#define ACE_ERROR_RETURN(X, Y)

◆ n_chunks() [1/2]

size_t OpenDDS::DCPS::Service_Participant::n_chunks ( ) const

This accessor is to provide the configurable number of chunks that a DataWriter's cached allocator need to allocate when the resource limits are infinite. Has a default, can be set by the -DCPSChunks option, or by n_chunks() setter.

Definition at line 1487 of file Service_Participant.cpp.

References n_chunks_.

1488 {
1489  return n_chunks_;
1490 }

◆ n_chunks() [2/2]

void OpenDDS::DCPS::Service_Participant::n_chunks ( size_t  chunks)

Set the value returned by n_chunks() accessor.

See also
Accessor description.

Definition at line 1493 of file Service_Participant.cpp.

References n_chunks_.

1494 {
1495  n_chunks_ = chunks;
1496  got_chunks = true;
1497 }

◆ network_interface_address_topic()

RcHandle<InternalTopic<NetworkInterfaceAddress> > OpenDDS::DCPS::Service_Participant::network_interface_address_topic ( ) const
inline

Definition at line 464 of file Service_Participant.h.

465  {
467  }
RcHandle< InternalTopic< NetworkInterfaceAddress > > network_interface_address_topic_

◆ new_pending_timeout_deadline()

ACE_INLINE MonotonicTimePoint OpenDDS::DCPS::Service_Participant::new_pending_timeout_deadline ( ) const

Get a new pending timeout deadline.

Definition at line 337 of file Service_Participant.inl.

References ACE_INLINE, OpenDDS::DCPS::TimeDuration::is_zero(), OpenDDS::DCPS::TimePoint_T< MonotonicClock >::now(), and pending_timeout_.

338 {
339  return pending_timeout_.is_zero() ?
341 }
TimePoint_T< MonotonicClock > MonotonicTimePoint
Definition: TimeTypes.h:51

◆ OPENDDS_MAP() [1/4]

typedef OpenDDS::DCPS::Service_Participant::OPENDDS_MAP ( Discovery::RepoKey  ,
Discovery_rch   
)

For internal OpenDDS Use (needed for monitor code)

Referenced by get_transport_base_config_name().

◆ OPENDDS_MAP() [2/4]

typedef OpenDDS::DCPS::Service_Participant::OPENDDS_MAP ( DDS::DomainId_t  ,
Discovery::RepoKey   
)

◆ OPENDDS_MAP() [3/4]

typedef OpenDDS::DCPS::Service_Participant::OPENDDS_MAP ( OPENDDS_STRING  ,
container_supported_unique_ptr< Discovery::Config  
)
private

◆ OPENDDS_MAP() [4/4]

OpenDDS::DCPS::Service_Participant::OPENDDS_MAP ( DDS::DomainId_t  ,
OPENDDS_STRING   
)
private

◆ OPENDDS_VECTOR() [1/2]

OpenDDS::DCPS::Service_Participant::OPENDDS_VECTOR ( DomainRange  )
private

◆ OPENDDS_VECTOR() [2/2]

OpenDDS::DCPS::Service_Participant::OPENDDS_VECTOR ( DiscoveryInfo  )
private

◆ ORB_argv()

ACE_ARGV* OpenDDS::DCPS::Service_Participant::ORB_argv ( )
inline

Definition at line 356 of file Service_Participant.h.

References name.

◆ parse_args()

int OpenDDS::DCPS::Service_Participant::parse_args ( int &  argc,
ACE_TCHAR argv[] 
)
private

Parse the command line for user options. e.g. "-DCPSInfoRepo <iorfile>". It consumes -DCPS* options and their arguments

No need to guard this insertion as we are still single threaded here.

No need to guard this insertion as we are still single threaded here.

Definition at line 627 of file Service_Participant.cpp.

References ACE_ERROR, ACE_ERROR_RETURN, ACE_TEXT(), ACE_TEXT_ALWAYS_CHAR, association_chunk_multiplier_, ACE_OS::atoi(), bidir_giop_, bit_enabled_, bit_lookup_duration_msec_, bit_transport_ip_, bit_transport_port_, OpenDDS::DCPS::config_fname, ACE_Arg_Shifter_T< class >::consume_arg(), default_address_, OpenDDS::DCPS::Discovery::DEFAULT_REPO, defaultDiscovery_, OpenDDS::DCPS::SecurityDebug::fake_encryption, federation_backoff_multiplier_, federation_initial_backoff_seconds_, federation_liveliness_, federation_recovery_duration_, ACE_Arg_Shifter_T< class >::get_the_parameter(), global_transport_config_, ACE_Arg_Shifter_T< class >::ignore_arg(), ACE_Arg_Shifter_T< class >::is_anything_left(), liveliness_factor_, LM_ERROR, LM_WARNING, OpenDDS::DCPS::log_level, monitor_enabled_, n_chunks_, OpenDDS::DCPS::SecurityDebug::parse_flags(), pending_timeout_, persistent_data_dir_, publisher_content_filter_, OpenDDS::DCPS::security_debug, security_enabled_, ACE_INET_Addr::set(), OpenDDS::DCPS::set_DCPS_debug_level(), OpenDDS::DCPS::SecurityDebug::set_debug_level(), OpenDDS::DCPS::LogLevel::set_from_string(), set_repo_ior(), OpenDDS::DCPS::ThreadStatusManager::thread_status_interval(), thread_status_manager_, OpenDDS::DCPS::Transport_debug_level, and type_object_encoding().

Referenced by get_domain_participant_factory().

628 {
629  // Process logging options first, so they are in effect if we need to log
630  // while processing other options.
631  ACE_Arg_Shifter log_arg_shifter(argc, argv);
632  while (log_arg_shifter.is_anything_left()) {
633  const ACE_TCHAR* currentArg = 0;
634 
635  if ((currentArg = log_arg_shifter.get_the_parameter(ACE_TEXT("-ORBLogFile"))) != 0) {
636  set_log_file_name(ACE_TEXT_ALWAYS_CHAR(currentArg));
637  log_arg_shifter.consume_arg();
638  got_log_fname = true;
639 
640  } else if ((currentArg = log_arg_shifter.get_the_parameter(ACE_TEXT("-ORBVerboseLogging"))) != 0) {
641  set_log_verbose(ACE_OS::atoi(currentArg));
642  log_arg_shifter.consume_arg();
643  got_log_verbose = true;
644 
645  } else {
646  log_arg_shifter.ignore_arg();
647  }
648  }
649 
650  ACE_Arg_Shifter arg_shifter(argc, argv);
651  while (arg_shifter.is_anything_left()) {
652  const ACE_TCHAR* currentArg = 0;
653 
654  if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSDebugLevel"))) != 0) {
655  set_DCPS_debug_level(ACE_OS::atoi(currentArg));
656  arg_shifter.consume_arg();
657  got_debug_level = true;
658 
659  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSInfoRepo"))) != 0) {
660  this->set_repo_ior(currentArg, Discovery::DEFAULT_REPO);
661  arg_shifter.consume_arg();
662  got_info = true;
663 
664  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSRTISerialization"))) != 0) {
665  if (ACE_OS::atoi(currentArg) == 0) {
666  ACE_ERROR((LM_WARNING,
667  ACE_TEXT("(%P|%t) WARNING: Service_Participant::parse_args ")
668  ACE_TEXT("Argument ignored: DCPSRTISerialization is required to be enabled\n")));
669  }
670  arg_shifter.consume_arg();
672  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSChunks"))) != 0) {
673  n_chunks_ = ACE_OS::atoi(currentArg);
674  arg_shifter.consume_arg();
675  got_chunks = true;
676 
677  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSChunkAssociationMultiplier"))) != 0) {
679  arg_shifter.consume_arg();
681 
682  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSConfigFile"))) != 0) {
683  config_fname = currentArg;
684  arg_shifter.consume_arg();
685 
686  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSLivelinessFactor"))) != 0) {
687  liveliness_factor_ = ACE_OS::atoi(currentArg);
688  arg_shifter.consume_arg();
689  got_liveliness_factor = true;
690 
691  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSBitTransportPort"))) != 0) {
692  /// No need to guard this insertion as we are still single
693  /// threaded here.
694  this->bit_transport_port_ = ACE_OS::atoi(currentArg);
695  arg_shifter.consume_arg();
696  got_bit_transport_port = true;
697 
698  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSBitTransportIPAddress"))) != 0) {
699  /// No need to guard this insertion as we are still single
700  /// threaded here.
701  this->bit_transport_ip_ = currentArg;
702  arg_shifter.consume_arg();
703  got_bit_transport_ip = true;
704 
705  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSBitLookupDurationMsec"))) != 0) {
707  arg_shifter.consume_arg();
709 
710  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSGlobalTransportConfig"))) != 0) {
711  global_transport_config_ = currentArg;
712  arg_shifter.consume_arg();
714 
715  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSBit"))) != 0) {
716  bit_enabled_ = ACE_OS::atoi(currentArg);
717  arg_shifter.consume_arg();
718  got_bit_flag = true;
719 
720  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSTransportDebugLevel"))) != 0) {
722  arg_shifter.consume_arg();
724 
725 #ifndef OPENDDS_NO_PERSISTENCE_PROFILE
726  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSPersistentDataDir"))) != 0) {
727  this->persistent_data_dir_ = ACE_TEXT_ALWAYS_CHAR(currentArg);
728  arg_shifter.consume_arg();
730 #endif
731 
732  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSPendingTimeout"))) != 0) {
733  pending_timeout_ = TimeDuration(ACE_OS::atoi(currentArg));
734  arg_shifter.consume_arg();
735  got_pending_timeout = true;
736 
737  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSPublisherContentFilter"))) != 0) {
738  this->publisher_content_filter_ = ACE_OS::atoi(currentArg);
739  arg_shifter.consume_arg();
741 
742  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSDefaultDiscovery"))) != 0) {
743  this->defaultDiscovery_ = ACE_TEXT_ALWAYS_CHAR(currentArg);
744  arg_shifter.consume_arg();
745  got_default_discovery = true;
746 
747  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSBidirGIOP"))) != 0) {
748  bidir_giop_ = ACE_OS::atoi(currentArg);
749  arg_shifter.consume_arg();
750  got_bidir_giop = true;
751 
752  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSThreadStatusInterval"))) != 0) {
754  arg_shifter.consume_arg();
756 
757  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-FederationRecoveryDuration"))) != 0) {
758  this->federation_recovery_duration_ = ACE_OS::atoi(currentArg);
759  arg_shifter.consume_arg();
760 
761  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-FederationInitialBackoffSeconds"))) != 0) {
763  arg_shifter.consume_arg();
764 
765  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-FederationBackoffMultiplier"))) != 0) {
766  this->federation_backoff_multiplier_ = ACE_OS::atoi(currentArg);
767  arg_shifter.consume_arg();
768 
769  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-FederationLivelinessDuration"))) != 0) {
770  this->federation_liveliness_ = ACE_OS::atoi(currentArg);
771  arg_shifter.consume_arg();
772 
773  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSDefaultAddress"))) != 0) {
774  ACE_INET_Addr addr;
775  if (addr.set(u_short(0), currentArg)) {
776  ACE_ERROR_RETURN((LM_ERROR,
777  ACE_TEXT("(%P|%t) ERROR: Service_Participant::parse_args: ")
778  ACE_TEXT("failed to parse default address %C\n"),
779  currentArg),
780  -1);
781  }
782  default_address_ = NetworkAddress(addr);
783  arg_shifter.consume_arg();
784  got_default_address = true;
785 
786  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSMonitor"))) != 0) {
787  this->monitor_enabled_ = ACE_OS::atoi(currentArg);
788  arg_shifter.consume_arg();
789  got_monitor = true;
790 
791 #if defined(OPENDDS_SECURITY)
792  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSSecurityDebugLevel"))) != 0) {
794  arg_shifter.consume_arg();
795  got_security_debug = true;
796 
797  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSSecurityDebug"))) != 0) {
798  security_debug.parse_flags(currentArg);
799  arg_shifter.consume_arg();
800  got_security_debug = true;
801 
802  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSSecurityFakeEncryption"))) != 0) {
804  arg_shifter.consume_arg();
806 
807  // Must be last "-DCPSSecurity*" option, see comment above this arg parsing loop
808  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSSecurity"))) != 0) {
809  security_enabled_ = ACE_OS::atoi(currentArg);
810  arg_shifter.consume_arg();
811  got_security_flag = true;
812 
813 #endif
814  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSTypeObjectEncoding"))) != 0) {
816  arg_shifter.consume_arg();
818 
819  } else if ((currentArg = arg_shifter.get_the_parameter(ACE_TEXT("-DCPSLogLevel"))) != 0) {
821  arg_shifter.consume_arg();
822  got_log_level = true;
823 
824  } else {
825  arg_shifter.ignore_arg();
826  }
827  }
828  // Indicates successful parsing of the command line
829  return 0;
830 }
OpenDDS_Dcps_Export LogLevel log_level
bool bidir_giop_
Enable TAO&#39;s Bidirectional GIOP?
#define ACE_ERROR(X)
static bool got_use_rti_serialization
int bit_transport_port_
The builtin topic transport port number.
ACE_CString persistent_data_dir_
The PERSISTENT data durability directory.
static bool got_type_object_encoding
OpenDDS_Dcps_Export unsigned int Transport_debug_level
Transport Logging verbosity level.
Definition: debug.cpp:25
static bool got_bidir_giop
bool set_repo_ior(const char *ior, Discovery::RepoKey key=Discovery::DEFAULT_REPO, bool attach_participant=true)
static ACE_TString config_fname(ACE_TEXT(""))
static bool got_global_transport_config
#define ACE_TEXT_ALWAYS_CHAR(STRING)
int federation_initial_backoff_seconds_
The FederationInitialBackoffSeconds value.
static bool got_persistent_data_dir
TypeObjectEncoding type_object_encoding() const
bool publisher_content_filter_
Allow the publishing side to do content filtering?
bool monitor_enabled_
Enable Monitor functionality.
static bool got_transport_debug_level
static bool got_log_fname
void set_from_string(const char *name)
Definition: debug.cpp:73
bool fake_encryption
Disable all encryption for security, even the required builtin encryption.
Definition: debug.h:146
static bool got_liveliness_factor
void set_debug_level(unsigned level)
Definition: debug.cpp:182
void thread_status_interval(const TimeDuration &thread_status_interval)
int federation_backoff_multiplier_
This FederationBackoffMultiplier.
static bool got_publisher_content_filter
OpenDDS_Dcps_Export void set_DCPS_debug_level(unsigned int lvl)
Definition: debug.cpp:98
char ACE_TCHAR
static bool got_bit_lookup_duration_msec
static bool got_log_verbose
static bool got_bit_transport_ip
static bool got_security_flag
static const char * DEFAULT_REPO
Key value for the default repository IOR.
Definition: Discovery.h:85
NetworkAddress default_address_
The default network address to use.
static bool got_thread_status_interval
static bool got_chunk_association_multiplier
int set(const ACE_INET_Addr &)
static bool got_debug_level
ACE_TEXT("TCP_Factory")
int atoi(const char *s)
void parse_flags(const ACE_TCHAR *flags)
Definition: debug.cpp:134
static bool got_security_debug
static bool got_default_address
static bool got_pending_timeout
static bool got_bit_flag
#define ACE_ERROR_RETURN(X, Y)
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32
static bool got_security_fake_encryption
int federation_liveliness_
This FederationLivelinessDuration.
static bool got_bit_transport_port
int liveliness_factor_
The propagation delay factor.
ACE_TString bit_transport_ip_
The builtin topic transport address.
int federation_recovery_duration_
The FederationRecoveryDuration value in seconds.
static bool got_log_level
static bool got_default_discovery

◆ parse_domain_range()

int OpenDDS::DCPS::Service_Participant::parse_domain_range ( const OPENDDS_STRING range,
int &  start,
int &  end 
)
private

Definition at line 2570 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR_RETURN, ACE_TEXT(), OpenDDS::DCPS::convertToInteger(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::DOMAIN_RANGE_SECTION_NAME, LM_DEBUG, and LM_ERROR.

Referenced by load_domain_ranges().

2570  {
2571  const std::size_t dash_pos = range.find("-", 0);
2572 
2573  if (dash_pos == std::string::npos || dash_pos == range.length() - 1) {
2574  start = end = -1;
2575  ACE_ERROR_RETURN((LM_ERROR,
2576  ACE_TEXT("(%P|%t) Service_Participant::parse_domain_range(): ")
2577  ACE_TEXT("%s missing '-' in [%s/%C] section.\n"),
2579  -1);
2580  }
2581 
2582  if (!convertToInteger(range.substr(0, dash_pos), start)) {
2583  start = end = -1;
2584  ACE_ERROR_RETURN((LM_ERROR,
2585  ACE_TEXT("(%P|%t) Service_Participant::parse_domain_range(): ")
2586  ACE_TEXT("Illegal integer value for start %s (%C) in [%s/%C] section.\n"),
2587  DOMAIN_RANGE_SECTION_NAME, range.substr(0, dash_pos).c_str(),
2588  DOMAIN_RANGE_SECTION_NAME, range.c_str()),
2589  -1);
2590  }
2591  if (DCPS_debug_level > 0) {
2592  ACE_DEBUG((LM_DEBUG,
2593  ACE_TEXT("(%P|%t) Service_Participant::parse_domain_range(): ")
2594  ACE_TEXT("(%P|%t) [%s/%C]: range_start == %d\n"),
2596  range.c_str(), start));
2597  }
2598 
2599  if (!convertToInteger(range.substr(dash_pos + 1), end)) {
2600  ACE_ERROR_RETURN((LM_ERROR,
2601  ACE_TEXT("(%P|%t) Service_Participant::parse_domain_range(): ")
2602  ACE_TEXT("Illegal integer value for end %s (%C) in [%s/%C] section.\n"),
2603  DOMAIN_RANGE_SECTION_NAME, range.substr(0, dash_pos).c_str(),
2604  DOMAIN_RANGE_SECTION_NAME, range.c_str()),
2605  -1);
2606  }
2607 
2608  if (DCPS_debug_level > 0) {
2609  ACE_DEBUG((LM_DEBUG,
2610  ACE_TEXT("(%P|%t) Service_Participant::parse_domain_range(): ")
2611  ACE_TEXT("(%P|%t) [%s/%C]: range_end == %d\n"),
2612  DOMAIN_RANGE_SECTION_NAME, range.c_str(), end));
2613  }
2614 
2615  if (end < start) {
2616  ACE_ERROR_RETURN((LM_ERROR,
2617  ACE_TEXT("(%P|%t) Service_Participant::parse_domain_range(): ")
2618  ACE_TEXT("Range End %d is less than range start %d in [%s/%C] section.\n"),
2619  end, start, DOMAIN_RANGE_SECTION_NAME, range.c_str()),
2620  -1);
2621  }
2622 
2623  return 0;
2624 }
#define ACE_DEBUG(X)
bool convertToInteger(const String &s, T &value)
static const ACE_TCHAR DOMAIN_RANGE_SECTION_NAME[]
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
ACE_TEXT("TCP_Factory")
#define ACE_ERROR_RETURN(X, Y)

◆ pending_timeout() [1/2]

ACE_INLINE TimeDuration OpenDDS::DCPS::Service_Participant::pending_timeout ( ) const

Accessors for pending data timeout.

Definition at line 325 of file Service_Participant.inl.

References ACE_INLINE, and pending_timeout_.

326 {
327  return pending_timeout_;
328 }

◆ pending_timeout() [2/2]

ACE_INLINE void OpenDDS::DCPS::Service_Participant::pending_timeout ( const TimeDuration value)

Accessors for pending data timeout.

Definition at line 331 of file Service_Participant.inl.

References ACE_INLINE, pending_timeout_, and value.

332 {
334 }
const LogLevel::Value value
Definition: debug.cpp:61

◆ printer_value_writer_indent() [1/2]

unsigned int OpenDDS::DCPS::Service_Participant::printer_value_writer_indent ( ) const
inline

Definition at line 469 of file Service_Participant.h.

470  {
472  }

◆ printer_value_writer_indent() [2/2]

void OpenDDS::DCPS::Service_Participant::printer_value_writer_indent ( unsigned int  value)
inline

Definition at line 474 of file Service_Participant.h.

References OpenDDS::DCPS::OPENDDS_MAP(), OPENDDS_STRING, and value.

475  {
477  }
const LogLevel::Value value
Definition: debug.cpp:61

◆ priority_max()

ACE_INLINE int OpenDDS::DCPS::Service_Participant::priority_max ( ) const

Accessors for priority extremums for the current scheduler.

Definition at line 352 of file Service_Participant.inl.

References ACE_INLINE, and priority_max_.

353 {
354  return priority_max_;
355 }
int priority_max_
Maximum priority value for the current scheduling policy.

◆ priority_min()

ACE_INLINE int OpenDDS::DCPS::Service_Participant::priority_min ( ) const

Accessors for priority extremums for the current scheduler.

Definition at line 345 of file Service_Participant.inl.

References ACE_INLINE, and priority_min_.

346 {
347  return priority_min_;
348 }
int priority_min_
Minimum priority value for the current scheduling policy.

◆ process_customizations()

bool OpenDDS::DCPS::Service_Participant::process_customizations ( DDS::DomainId_t  id,
const OPENDDS_STRING discovery_name,
ValueMap &  customs 
)
private

Definition at line 2660 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR_RETURN, ACE_TEXT(), OpenDDS::DCPS::convertToInteger(), OpenDDS::DCPS::DCPS_debug_level, LM_DEBUG, LM_ERROR, OPENDDS_STRING, OPENDDS_VECTOR(), and OpenDDS::DCPS::to_dds_string().

Referenced by configure_discovery_template(), and configure_domain_range_instance().

2661 {
2662  // get the discovery info
2663  OPENDDS_VECTOR(DiscoveryInfo)::const_iterator dit;
2664  for (dit = discovery_infos_.begin(); dit != discovery_infos_.end(); ++dit) {
2665  if (discovery_name == dit->discovery_name) {
2666  break;
2667  }
2668  }
2669 
2670  if (dit != discovery_infos_.end()) {
2671  // add discovery info to customs
2672  for (ValueMap::const_iterator i = dit->disc_info.begin(); i != dit->disc_info.end(); ++i) {
2673  customs[i->first] = i->second;
2674  if (DCPS_debug_level > 0) {
2675  ACE_DEBUG((LM_DEBUG,
2676  ACE_TEXT("(%P|%t) Service_Participant::")
2677  ACE_TEXT("process_customizations(): adding config %C=%C\n"),
2678  i->first.c_str(), i->second.c_str()));
2679  }
2680  }
2681 
2682  // update customs valuemap with any customizations
2683  for (ValueMap::const_iterator i = dit->customizations.begin(); i != dit->customizations.end(); ++i) {
2684  if (i->first == "InteropMulticastOverride" && i->second == "AddDomainId") {
2685  OPENDDS_STRING addr = customs["InteropMulticastOverride"];
2686  size_t pos = addr.find_last_of(".");
2687  if (pos != OPENDDS_STRING::npos) {
2688  OPENDDS_STRING custom = addr.substr(pos + 1);
2689  int val = 0;
2690  if (!convertToInteger(custom, val)) {
2691  ACE_ERROR_RETURN((LM_ERROR,
2692  ACE_TEXT("(%P|%t) ERROR: Service_Participant::")
2693  ACE_TEXT("process_customizations(): ")
2694  ACE_TEXT("could not convert %C to integer\n"),
2695  custom.c_str()),
2696  false);
2697  }
2698  val += id;
2699  addr = addr.substr(0, pos);
2700  addr += "." + to_dds_string(val);
2701  } else {
2702  ACE_ERROR_RETURN((LM_ERROR,
2703  ACE_TEXT("(%P|%t) ERROR: Service_Participant::")
2704  ACE_TEXT("process_customizations(): ")
2705  ACE_TEXT("could not AddDomainId for %s\n"),
2706  customs["InteropMulticastOverride"].c_str()),
2707  false);
2708  }
2709 
2710  customs["InteropMulticastOverride"] = addr;
2711  }
2712  }
2713  }
2714 
2715  return true;
2716 }
#define ACE_DEBUG(X)
bool convertToInteger(const String &s, T &value)
#define OPENDDS_STRING
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
ACE_TEXT("TCP_Factory")
#define ACE_ERROR_RETURN(X, Y)
OPENDDS_VECTOR(DomainRange) domain_ranges_
String to_dds_string(unsigned short to_convert)

◆ publisher_content_filter() [1/2]

ACE_INLINE bool & OpenDDS::DCPS::Service_Participant::publisher_content_filter ( )

Accessors for PublisherContentFilter.

Definition at line 359 of file Service_Participant.inl.

References ACE_INLINE, and publisher_content_filter_.

360 {
362 }
bool publisher_content_filter_
Allow the publishing side to do content filtering?

◆ publisher_content_filter() [2/2]

ACE_INLINE bool OpenDDS::DCPS::Service_Participant::publisher_content_filter ( ) const

Accessors for PublisherContentFilter.

Definition at line 366 of file Service_Participant.inl.

References ACE_INLINE, and publisher_content_filter_.

367 {
369 }
bool publisher_content_filter_
Allow the publishing side to do content filtering?

◆ reactor()

ACE_Reactor * OpenDDS::DCPS::Service_Participant::reactor ( void  )

Definition at line 287 of file Service_Participant.cpp.

References OpenDDS::DCPS::ReactorTask::get_reactor(), and reactor_task_.

288 {
289  return reactor_task_.get_reactor();
290 }
ACE_Reactor * get_reactor()
Definition: ReactorTask.inl:14

◆ reactor_owner()

ACE_thread_t OpenDDS::DCPS::Service_Participant::reactor_owner ( ) const

Definition at line 293 of file Service_Participant.cpp.

References OpenDDS::DCPS::ReactorTask::get_reactor_owner(), and reactor_task_.

294 {
296 }
ACE_thread_t get_reactor_owner() const
Definition: ReactorTask.inl:29

◆ register_discovery_type()

void OpenDDS::DCPS::Service_Participant::register_discovery_type ( const char *  section_name,
Discovery::Config cfg 
)

Definition at line 1526 of file Service_Participant.cpp.

References discovery_types_.

1528 {
1529  discovery_types_[section_name].reset(cfg);
1530 }

◆ remap_domains()

void OpenDDS::DCPS::Service_Participant::remap_domains ( Discovery::RepoKey  oldKey,
Discovery::RepoKey  newKey,
bool  attach_participant = true 
)

Rebind a domain from one repository to another.

Definition at line 1073 of file Service_Participant.cpp.

References ACE_GUARD, domainRepoMap_, maps_lock_, OPENDDS_VECTOR(), and set_repo_domain().

Referenced by repository_lost(), and set_repo_ior().

1076 {
1077  // Search the mappings for any domains mapped to this repository.
1078  OPENDDS_VECTOR(DDS::DomainId_t) domainList;
1079  {
1081 
1082  for (DomainRepoMap::const_iterator current = this->domainRepoMap_.begin();
1083  current != this->domainRepoMap_.end();
1084  ++current) {
1085  if (current->second == oldKey) {
1086  domainList.push_back(current->first);
1087  }
1088  }
1089  }
1090 
1091  // Remap the domains that were attached to this repository.
1092  for (unsigned int index = 0; index < domainList.size(); ++index) {
1093  // For mapped domains, attach their participants by setting the
1094  // mapping again.
1095  this->set_repo_domain(domainList[ index], newKey, attach_participant);
1096  }
1097 }
#define ACE_GUARD(MUTEX, OBJ, LOCK)
void set_repo_domain(const DDS::DomainId_t domain, Discovery::RepoKey repo, bool attach_participant=true)
Bind DCPSInfoRepo IORs to domains.
DOMAINID_TYPE_NATIVE DomainId_t
ACE_Recursive_Thread_Mutex maps_lock_
Guard access to the internal maps.
OPENDDS_VECTOR(DomainRange) domain_ranges_
DomainRepoMap domainRepoMap_
The DomainId to RepoKey mapping.

◆ repository_lost()

void OpenDDS::DCPS::Service_Participant::repository_lost ( Discovery::RepoKey  key)

Failover to a new repository.

Definition at line 1200 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, discoveryMap_, federation_backoff_multiplier(), federation_initial_backoff_seconds(), federation_recovery_duration(), OpenDDS::DCPS::TimePoint_T< AceClock >::is_zero(), LM_DEBUG, LM_WARNING, OpenDDS::DCPS::TimePoint_T< MonotonicClock >::now(), OPENDDS_ASSERT, remap_domains(), and ACE_OS::sleep().

1201 {
1202  // Find the lost repository.
1203  RepoKeyDiscoveryMap::iterator initialLocation = this->discoveryMap_.find(key);
1204  RepoKeyDiscoveryMap::iterator current = initialLocation;
1205 
1206  if (current == this->discoveryMap_.end()) {
1207  ACE_DEBUG((LM_WARNING,
1208  ACE_TEXT("(%P|%t) WARNING: Service_Participant::repository_lost: ")
1209  ACE_TEXT("lost repository %C was not present, ")
1210  ACE_TEXT("finding another anyway.\n"),
1211  key.c_str()));
1212 
1213  } else {
1214  // Start with the repository *after* the lost one.
1215  ++current;
1216  }
1217 
1218  // Calculate the bounding end time for attempts.
1219  const TimeDuration td(federation_recovery_duration());
1220  const MonotonicTimePoint recoveryFailedTime(MonotonicTimePoint::now() + td);
1221 
1222  // Backoff delay.
1223  int backoff = this->federation_initial_backoff_seconds();
1224 
1225  // Keep trying until the total recovery time specified is exceeded.
1226  while (recoveryFailedTime > MonotonicTimePoint::now()) {
1227 
1228  // Wrap to the beginning at the end of the list.
1229  if (current == this->discoveryMap_.end()) {
1230  // Continue to traverse the list.
1231  current = this->discoveryMap_.begin();
1232  }
1233 
1234  // Handle reaching the lost repository by waiting before trying
1235  // again.
1236  if (current == initialLocation) {
1237  if (DCPS_debug_level > 0) {
1238  ACE_DEBUG((LM_DEBUG,
1239  ACE_TEXT("(%P|%t) Service_Participant::repository_lost: ")
1240  ACE_TEXT("waiting %d seconds to traverse the ")
1241  ACE_TEXT("repository list another time ")
1242  ACE_TEXT("for lost key %C.\n"),
1243  backoff,
1244  key.c_str()));
1245  }
1246 
1247  // Wait to traverse the list and try again.
1248  ACE_OS::sleep(backoff);
1249 
1250  // Exponentially backoff delay.
1251  backoff *= this->federation_backoff_multiplier();
1252 
1253  // Don't increment current to allow us to reattach to the
1254  // original repository if it is restarted.
1255  }
1256 
1257  // Check the availability of the current repository.
1258  if (current->second->active()) {
1259 
1260  if (DCPS_debug_level > 0) {
1261  ACE_DEBUG((LM_DEBUG,
1262  ACE_TEXT("(%P|%t) Service_Participant::repository_lost: ")
1263  ACE_TEXT("replacing repository %C with %C.\n"),
1264  key.c_str(),
1265  current->first.c_str()));
1266  }
1267 
1268  // If we reach here, the validate_connection() call succeeded
1269  // and the repository is reachable.
1270  this->remap_domains(key, current->first);
1271 
1272  // Now we are done. This is the only non-failure exit from
1273  // this method.
1274  return;
1275 
1276  } else {
1277  ACE_DEBUG((LM_WARNING,
1278  ACE_TEXT("(%P|%t) WARNING: Service_Participant::repository_lost: ")
1279  ACE_TEXT("repository %C was not available to replace %C, ")
1280  ACE_TEXT("looking for another.\n"),
1281  current->first.c_str(),
1282  key.c_str()));
1283  }
1284 
1285  // Move to the next candidate repository.
1286  ++current;
1287  }
1288 
1289  // If we reach here, we have exceeded the total recovery time
1290  // specified.
1291  OPENDDS_ASSERT(recoveryFailedTime.is_zero());
1292 }
#define ACE_DEBUG(X)
void remap_domains(Discovery::RepoKey oldKey, Discovery::RepoKey newKey, bool attach_participant=true)
Rebind a domain from one repository to another.
sequence< octet > key
static TimePoint_T< MonotonicClock > now()
Definition: TimePoint_T.inl:41
#define OPENDDS_ASSERT(C)
Definition: Definitions.h:66
RepoKeyDiscoveryMap discoveryMap_
The RepoKey to Discovery object mapping.
int sleep(u_int seconds)
int & federation_initial_backoff_seconds()
Accessors for FederationInitialBackoffSeconds.
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
TimePoint_T< MonotonicClock > MonotonicTimePoint
Definition: TimeTypes.h:51
ACE_TEXT("TCP_Factory")
int & federation_backoff_multiplier()
Accessors for FederationBackoffMultiplier.
int & federation_recovery_duration()
Accessors for FederationRecoveryDuration in seconds.

◆ scheduler() [1/2]

ACE_INLINE long & OpenDDS::DCPS::Service_Participant::scheduler ( void  )

Accessors for scheduling policy value.

Definition at line 311 of file Service_Participant.inl.

References ACE_INLINE, and scheduler_.

312 {
313  return scheduler_;
314 }
long scheduler_
Scheduling policy value used for setting thread priorities.

◆ scheduler() [2/2]

ACE_INLINE long OpenDDS::DCPS::Service_Participant::scheduler ( void  ) const

Accessors for scheduling policy value.

Definition at line 318 of file Service_Participant.inl.

References ACE_INLINE, and scheduler_.

319 {
320  return scheduler_;
321 }
long scheduler_
Scheduling policy value used for setting thread priorities.

◆ set_BIT()

void OpenDDS::DCPS::Service_Participant::set_BIT ( bool  b)
inline

Definition at line 333 of file Service_Participant.h.

333  {
334  bit_enabled_ = b;
335  }

◆ set_default_discovery()

void OpenDDS::DCPS::Service_Participant::set_default_discovery ( const Discovery::RepoKey defaultDiscovery)

Definition at line 1295 of file Service_Participant.cpp.

References defaultDiscovery_.

1296 {
1297  this->defaultDiscovery_ = key;
1298 }
sequence< octet > key

◆ set_repo_domain()

void OpenDDS::DCPS::Service_Participant::set_repo_domain ( const DDS::DomainId_t  domain,
Discovery::RepoKey  repo,
bool  attach_participant = true 
)

Bind DCPSInfoRepo IORs to domains.

Definition at line 1100 of file Service_Participant.cpp.

References CORBA::Exception::_tao_print_exception(), ACE_DEBUG, ACE_GUARD, ACE_TEXT(), OpenDDS::DCPS::LogGuid::c_str(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::Discovery::DEFAULT_REPO, discoveryMap_, domainRepoMap_, dp_factory_servant_, LM_DEBUG, maps_lock_, and OPENDDS_VECTOR().

Referenced by load_domain_configuration(), and remap_domains().

1103 {
1104  typedef std::pair<Discovery_rch, GUID_t> DiscRepoPair;
1105  OPENDDS_VECTOR(DiscRepoPair) repoList;
1106  {
1108  DomainRepoMap::const_iterator where = this->domainRepoMap_.find(domain);
1109 
1110  if (key == "-1") {
1112  }
1113 
1114  if ((where == this->domainRepoMap_.end()) || (where->second != key)) {
1115  // Only assign entries into the map when they change the
1116  // contents.
1117  this->domainRepoMap_[ domain] = key;
1118 
1119  if (DCPS_debug_level > 0) {
1120  ACE_DEBUG((LM_DEBUG,
1121  ACE_TEXT("(%P|%t) Service_Participant::set_repo_domain: ")
1122  ACE_TEXT("Domain[ %d] = Repo[ %C].\n"),
1123  domain, key.c_str()));
1124  }
1125  }
1126 
1127  //
1128  // Make sure that we mark each DomainParticipant for this domain
1129  // using this repository as attached to this repository.
1130  //
1131  // @TODO: Move this note into user documentation.
1132  // N.B. Calling set_repo() or set_repo_ior() will result in this
1133  // code executing again with the new repository. It is best
1134  // to call those routines first when making changes.
1135  //
1136 
1137  // No servant means no participant. No worries.
1138  if (this->dp_factory_servant_) {
1139  // Map of domains to sets of participants.
1140  const DomainParticipantFactoryImpl::DPMap& participants
1141  = this->dp_factory_servant_->participants();
1142 
1143  // Extract the set of participants for the current domain.
1144  DomainParticipantFactoryImpl::DPMap::const_iterator
1145  which = participants.find(domain);
1146 
1147  if (which != participants.end()) {
1148  // Extract the repository to attach this domain to.
1149  RepoKeyDiscoveryMap::const_iterator disc_iter = this->discoveryMap_.find(key);
1150 
1151  if (disc_iter != this->discoveryMap_.end()) {
1152  for (DomainParticipantFactoryImpl::DPSet::const_iterator
1153  current = which->second.begin();
1154  current != which->second.end();
1155  ++current) {
1156  try {
1157  // Attach each DomainParticipant in this domain to this
1158  // repository.
1159  GUID_t id = (*current)->get_id();
1160  repoList.push_back(std::make_pair(disc_iter->second, id));
1161 
1162  if (DCPS_debug_level > 0) {
1163  ACE_DEBUG((LM_DEBUG,
1164  ACE_TEXT("(%P|%t) Service_Participant::set_repo_domain: ")
1165  ACE_TEXT("participant %C attached to Repo[ %C].\n"),
1166  LogGuid(id).c_str(),
1167  key.c_str()));
1168  }
1169 
1170  } catch (const CORBA::Exception& ex) {
1172  "ERROR: Service_Participant::set_repo_domain: failed to attach repository - ");
1173  return;
1174  }
1175  }
1176  }
1177  }
1178  }
1179  } // End of GUARD scope.
1180 
1181  // Make all of the remote calls after releasing the lock.
1182  for (unsigned int index = 0; index < repoList.size(); ++index) {
1183  if (DCPS_debug_level > 0) {
1184  ACE_DEBUG((LM_DEBUG,
1185  ACE_TEXT("(%P|%t) Service_Participant::set_repo_domain: ")
1186  ACE_TEXT("(%d of %d) attaching domain %d participant %C to Repo[ %C].\n"),
1187  (1+index), repoList.size(), domain,
1188  LogGuid(repoList[ index].second).c_str(),
1189  key.c_str()));
1190  }
1191 
1192  if (attach_participant)
1193  {
1194  repoList[ index].first->attach_participant(domain, repoList[ index].second);
1195  }
1196  }
1197 }
#define ACE_DEBUG(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
sequence< octet > key
RepoKeyDiscoveryMap discoveryMap_
The RepoKey to Discovery object mapping.
static const char * DEFAULT_REPO
Key value for the default repository IOR.
Definition: Discovery.h:85
ACE_Recursive_Thread_Mutex maps_lock_
Guard access to the internal maps.
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
RcHandle< DomainParticipantFactoryImpl > dp_factory_servant_
ACE_TEXT("TCP_Factory")
OPENDDS_VECTOR(DomainRange) domain_ranges_
void _tao_print_exception(const char *info, FILE *f=stdout) const
Definition: Exception.cpp:82
DomainRepoMap domainRepoMap_
The DomainId to RepoKey mapping.

◆ set_repo_ior()

bool OpenDDS::DCPS::Service_Participant::set_repo_ior ( const char *  ior,
Discovery::RepoKey  key = Discovery::DEFAULT_REPO,
bool  attach_participant = true 
)

Definition at line 1023 of file Service_Participant.cpp.

References ACE_DEBUG, ACE_ERROR_RETURN, ACE_TEXT(), ACE_TEXT_ALWAYS_CHAR, ACE_TEXT_CHAR_TO_TCHAR, ACE_String_Base< char >::c_str(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::Discovery::DEFAULT_REPO, discovery_types_, LM_DEBUG, LM_ERROR, ACE_Configuration_Heap::open(), ACE_Configuration_Heap::open_section(), OPENDDS_STRING, remap_domains(), OpenDDS::DCPS::REPO_SECTION_NAME, ACE_Configuration::root_section(), ACE_Configuration_Heap::set_string_value(), and TheTransportRegistry.

Referenced by get_discovery(), InfoRepo::init(), initializeScheduling(), load_common_configuration(), and parse_args().

1026 {
1027  if (DCPS_debug_level > 0) {
1028  ACE_DEBUG((LM_DEBUG,
1029  ACE_TEXT("(%P|%t) Service_Participant::set_repo_ior: Repo[%C] == %C\n"),
1030  key.c_str(), ior));
1031  }
1032 
1033  // This is a global used for the bizarre commandline/configfile
1034  // processing done for this class.
1035  got_info = true;
1036 
1037  if (key == "-1") {
1039  }
1040 
1042  if (!discovery_types_.count(repo_type)) {
1043  // Re-use a transport registry function to attempt a dynamic load of the
1044  // library that implements the 'repo_type' (InfoRepoDiscovery)
1045  TheTransportRegistry->load_transport_lib(repo_type);
1046  }
1047 
1048  if (discovery_types_.count(repo_type)) {
1050  cf.open();
1052  ACE_TString section = REPO_SECTION_NAME;
1053  section += ACE_TEXT('\\');
1054  section += ACE_TEXT_CHAR_TO_TCHAR(key.c_str());
1055  cf.open_section(cf.root_section(), section.c_str(), true /*create*/, sect_key);
1056  cf.set_string_value(sect_key, ACE_TEXT("RepositoryIor"),
1057  ACE_TEXT_CHAR_TO_TCHAR(ior));
1058 
1059  discovery_types_[repo_type]->discovery_config(cf);
1060 
1061  this->remap_domains(key, key, attach_participant);
1062  return true;
1063  }
1064 
1065  ACE_ERROR_RETURN((LM_ERROR,
1066  ACE_TEXT("(%P|%t) Service_Participant::set_repo_ior ")
1067  ACE_TEXT("ERROR - no discovery type registered for ")
1068  ACE_TEXT("InfoRepoDiscovery\n")),
1069  false);
1070 }
#define TheTransportRegistry
#define ACE_DEBUG(X)
virtual int set_string_value(const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, const ACE_TString &value)
const char * c_str(void) const
void remap_domains(Discovery::RepoKey oldKey, Discovery::RepoKey newKey, bool attach_participant=true)
Rebind a domain from one repository to another.
sequence< octet > key
#define ACE_TEXT_ALWAYS_CHAR(STRING)
virtual const ACE_Configuration_Section_Key & root_section(void) const
#define OPENDDS_STRING
static const ACE_TCHAR REPO_SECTION_NAME[]
static const char * DEFAULT_REPO
Key value for the default repository IOR.
Definition: Discovery.h:85
#define ACE_TEXT_CHAR_TO_TCHAR(STRING)
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
ACE_TEXT("TCP_Factory")
virtual int open_section(const ACE_Configuration_Section_Key &base, const ACE_TCHAR *sub_section, bool create, ACE_Configuration_Section_Key &result)
int open(const ACE_TCHAR *file_name, void *base_address=ACE_DEFAULT_BASE_ADDR, size_t default_map_size=ACE_DEFAULT_CONFIG_SECTION_SIZE)
#define ACE_ERROR_RETURN(X, Y)

◆ set_security()

void OpenDDS::DCPS::Service_Participant::set_security ( bool  b)
inline

Definition at line 324 of file Service_Participant.h.

◆ set_shutdown_listener()

void OpenDDS::DCPS::Service_Participant::set_shutdown_listener ( RcHandle< ShutdownListener listener)

Definition at line 2810 of file Service_Participant.cpp.

References shutdown_listener_.

2811 {
2812  shutdown_listener_ = listener;
2813 }
RcHandle< ShutdownListener > shutdown_listener_

◆ shutdown()

DDS::ReturnCode_t OpenDDS::DCPS::Service_Participant::shutdown ( void  )

Stop being a participant in the service.

Note
All Domain Participants have to be deleted before calling or DDS::RETCODE_PRECONDITION_NOT_MET is returned.

If the Service Participant has already been shutdown then DDS::RETCODE_ALREADY_DELETED will be returned.

Definition at line 310 of file Service_Participant.cpp.

References CORBA::Exception::_tao_print_exception(), ACE_DEBUG, ACE_ERROR, ACE_GUARD_RETURN, OpenDDS::Security::SecurityRegistry::close(), OpenDDS::DCPS::TransportRegistry::close(), OpenDDS::DCPS::NetworkConfigMonitor::close(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::MonitorFactory::deinitialize(), OpenDDS::DCPS::NetworkConfigMonitor::disconnect(), discovery_types_, discoveryMap_, domainRepoMap_, dp_factory_servant_, OpenDDS::DCPS::LogLevel::Error, factory_lock_, ACE_Argv_Type_Converter::get_argc(), get_domain_participant_factory(), ACE_Argv_Type_Converter::get_TCHAR_argv(), OpenDDS::DCPS::TransportRegistry::instance(), LM_DEBUG, LM_NOTICE, OpenDDS::DCPS::log_level, monitor_factory_, network_config_monitor_, network_config_monitor_lock_, network_interface_address_topic_, OpenDDS::DCPS::LogLevel::Notice, persistent_data_cache_, reactor_task_, OpenDDS::DCPS::TransportRegistry::release(), OpenDDS::DCPS::RcHandle< T >::reset(), DDS::RETCODE_ALREADY_DELETED, DDS::RETCODE_ERROR, DDS::RETCODE_OK, DDS::RETCODE_OUT_OF_RESOURCES, DDS::RETCODE_PRECONDITION_NOT_MET, shut_down_, shutdown_listener_, OpenDDS::DCPS::ReactorTask::stop(), and transient_data_cache_.

Referenced by ~Service_Participant().

311 {
312  if (DCPS_debug_level >= 1) {
313  ACE_DEBUG((LM_DEBUG, "(%P|%t) Service_Participant::shutdown\n"));
314  }
315 
316  if (shut_down_) {
318  }
319 
320  if (monitor_factory_) {
322  monitor_factory_ = 0;
323  }
324 
325  {
327  if (dp_factory_servant_) {
328  const size_t count = dp_factory_servant_->participant_count();
329  if (count > 0) {
330  if (log_level >= LogLevel::Notice) {
331  ACE_ERROR((LM_NOTICE, "(%P|%t) NOTICE: Service_Participant::shutdown: "
332  "there are %B domain participant(s) that must be deleted before shutdown can occur\n",
333  count));
334  }
336  }
337  }
338  }
339 
340  if (shutdown_listener_) {
341  shutdown_listener_->notify_shutdown();
342  }
343 
345  try {
347  {
349 
350  shut_down_ = true;
351 
352  dp_factory_servant_.reset();
353 
354  domainRepoMap_.clear();
355 
356  {
363  }
364  }
365 
366  domain_ranges_.clear();
367 
369 
370  discoveryMap_.clear();
371 
372 #ifndef OPENDDS_NO_PERSISTENCE_PROFILE
373  transient_data_cache_.reset();
374  persistent_data_cache_.reset();
375 #endif
376 
377  discovery_types_.clear();
378  }
380 #ifdef OPENDDS_SECURITY
382 #endif
383  } catch (const CORBA::Exception& ex) {
384  if (log_level >= LogLevel::Error) {
385  ex._tao_print_exception("ERROR: Service_Participant::shutdown");
386  }
387  rc = DDS::RETCODE_ERROR;
388  }
389 
390  return rc;
391 }
OpenDDS_Dcps_Export LogLevel log_level
unique_ptr< DataDurabilityCache > persistent_data_cache_
The PERSISTENT data durability cache.
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
AtomicBool shut_down_
Used to track state of service participant.
const ReturnCode_t RETCODE_OK
const ReturnCode_t RETCODE_ALREADY_DELETED
RepoKeyDiscoveryMap discoveryMap_
The RepoKey to Discovery object mapping.
unique_ptr< DataDurabilityCache > transient_data_cache_
The TRANSIENT data durability cache.
static void close()
Close the singleton instance of this class.
NetworkConfigMonitor_rch network_config_monitor_
static TransportRegistry * instance()
Return a singleton instance of this class.
const ReturnCode_t RETCODE_PRECONDITION_NOT_MET
RcHandle< ShutdownListener > shutdown_listener_
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
const ReturnCode_t RETCODE_ERROR
RcHandle< InternalTopic< NetworkInterfaceAddress > > network_interface_address_topic_
void disconnect(RcHandle< InternalTopic< NetworkInterfaceAddress > > topic)
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
RcHandle< DomainParticipantFactoryImpl > dp_factory_servant_
const ReturnCode_t RETCODE_OUT_OF_RESOURCES
static void close()
Close the singleton instance of this class.
void _tao_print_exception(const char *info, FILE *f=stdout) const
Definition: Exception.cpp:82
DomainRepoMap domainRepoMap_
The DomainId to RepoKey mapping.

◆ time_source()

const TimeSource & OpenDDS::DCPS::Service_Participant::time_source ( ) const

Definition at line 275 of file Service_Participant.cpp.

References time_source_.

276 {
277  return time_source_;
278 }

◆ timer()

ACE_Reactor_Timer_Interface * OpenDDS::DCPS::Service_Participant::timer ( void  )

Get the common timer interface. Intended for use by OpenDDS internals only.

Definition at line 281 of file Service_Participant.cpp.

References OpenDDS::DCPS::ReactorTask::get_reactor(), and reactor_task_.

282 {
283  return reactor_task_.get_reactor();
284 }
ACE_Reactor * get_reactor()
Definition: ReactorTask.inl:14

◆ type_object_encoding() [1/3]

ACE_INLINE Service_Participant::TypeObjectEncoding OpenDDS::DCPS::Service_Participant::type_object_encoding ( ) const

Definition at line 387 of file Service_Participant.inl.

References ACE_INLINE, and type_object_encoding_.

Referenced by load_common_configuration(), parse_args(), and type_object_encoding().

388 {
389  return type_object_encoding_;
390 }

◆ type_object_encoding() [2/3]

ACE_INLINE void OpenDDS::DCPS::Service_Participant::type_object_encoding ( TypeObjectEncoding  encoding)

Definition at line 393 of file Service_Participant.inl.

References OpenDDS::STUN::encoding(), OPENDDS_END_VERSIONED_NAMESPACE_DECL, and type_object_encoding_.

394 {
396 }
const DCPS::Encoding encoding(DCPS::Encoding::KIND_UNALIGNED_CDR, DCPS::ENDIAN_BIG)

◆ type_object_encoding() [3/3]

void OpenDDS::DCPS::Service_Participant::type_object_encoding ( const char *  encoding)

Definition at line 2978 of file Service_Participant.cpp.

References ACE_ERROR, Encoding_Normal, Encoding_ReadOldFormat, Encoding_WriteOldFormat, LM_ERROR, name, OPENDDS_END_VERSIONED_NAMESPACE_DECL, type_object_encoding(), and value.

2979 {
2980  struct NameValue {
2981  const char* name;
2983  };
2984  static const NameValue entries[] = {
2985  {"Normal", Encoding_Normal},
2986  {"WriteOldFormat", Encoding_WriteOldFormat},
2987  {"ReadOldFormat", Encoding_ReadOldFormat},
2988  };
2989  for (size_t i = 0; i < sizeof entries / sizeof entries[0]; ++i) {
2990  if (0 == std::strcmp(entries[i].name, encoding)) {
2991  type_object_encoding(entries[i].value);
2992  return;
2993  }
2994  }
2995  ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: Service_Participant::type_object_encoding: "
2996  "invalid encoding %C\n", encoding));
2997 }
#define ACE_ERROR(X)
const LogLevel::Value value
Definition: debug.cpp:61
TypeObjectEncoding type_object_encoding() const
const DCPS::Encoding encoding(DCPS::Encoding::KIND_UNALIGNED_CDR, DCPS::ENDIAN_BIG)
const char *const name
Definition: debug.cpp:60

◆ use_bidir_giop()

ACE_INLINE bool OpenDDS::DCPS::Service_Participant::use_bidir_giop ( ) const

Definition at line 380 of file Service_Participant.inl.

References ACE_INLINE, and bidir_giop_.

381 {
382  return bidir_giop_;
383 }
bool bidir_giop_
Enable TAO&#39;s Bidirectional GIOP?

Member Data Documentation

◆ association_chunk_multiplier_

size_t OpenDDS::DCPS::Service_Participant::association_chunk_multiplier_
private

The configurable value of maximum number of expected associations for publishers and subscribers. This is used to pre allocate enough memory and reduce heap allocations.

Definition at line 616 of file Service_Participant.h.

Referenced by association_chunk_multiplier(), load_common_configuration(), and parse_args().

◆ bidir_giop_

bool OpenDDS::DCPS::Service_Participant::bidir_giop_
private

Enable TAO's Bidirectional GIOP?

Definition at line 753 of file Service_Participant.h.

Referenced by load_common_configuration(), parse_args(), and use_bidir_giop().

◆ bit_autopurge_disposed_samples_delay_

DDS::Duration_t OpenDDS::DCPS::Service_Participant::bit_autopurge_disposed_samples_delay_
private

Definition at line 783 of file Service_Participant.h.

Referenced by bit_autopurge_disposed_samples_delay(), and initialize().

◆ bit_autopurge_nowriter_samples_delay_

DDS::Duration_t OpenDDS::DCPS::Service_Participant::bit_autopurge_nowriter_samples_delay_
private

Definition at line 782 of file Service_Participant.h.

Referenced by bit_autopurge_nowriter_samples_delay(), and initialize().

◆ bit_enabled_

bool OpenDDS::DCPS::Service_Participant::bit_enabled_
private

Definition at line 627 of file Service_Participant.h.

Referenced by load_common_configuration(), and parse_args().

◆ bit_lookup_duration_msec_

int OpenDDS::DCPS::Service_Participant::bit_lookup_duration_msec_
private

The timeout for lookup data from the builtin topic DataReader.

Definition at line 635 of file Service_Participant.h.

Referenced by bit_lookup_duration_msec(), load_common_configuration(), and parse_args().

◆ bit_transport_ip_

ACE_TString OpenDDS::DCPS::Service_Participant::bit_transport_ip_
private

The builtin topic transport address.

Definition at line 622 of file Service_Participant.h.

Referenced by bit_transport_ip(), load_common_configuration(), and parse_args().

◆ bit_transport_port_

int OpenDDS::DCPS::Service_Participant::bit_transport_port_
private

The builtin topic transport port number.

Definition at line 625 of file Service_Participant.h.

Referenced by bit_transport_port(), load_common_configuration(), and parse_args().

◆ default_address_

NetworkAddress OpenDDS::DCPS::Service_Participant::default_address_
private

The default network address to use.

Definition at line 638 of file Service_Participant.h.

Referenced by load_common_configuration(), and parse_args().

◆ default_configuration_file_

ACE_TString OpenDDS::DCPS::Service_Participant::default_configuration_file_
private

If set before TheParticipantFactoryWithArgs and -DCPSConfigFile is not passed, use this as the configuration file.

Definition at line 777 of file Service_Participant.h.

Referenced by default_configuration_file(), and get_domain_participant_factory().

◆ defaultDiscovery_

Discovery::RepoKey OpenDDS::DCPS::Service_Participant::defaultDiscovery_
private

◆ discovery_types_

DiscoveryTypes OpenDDS::DCPS::Service_Participant::discovery_types_
private

◆ discoveryMap_

RepoKeyDiscoveryMap OpenDDS::DCPS::Service_Participant::discoveryMap_
private

◆ domainRepoMap_

DomainRepoMap OpenDDS::DCPS::Service_Participant::domainRepoMap_
private

The DomainId to RepoKey mapping.

Definition at line 566 of file Service_Participant.h.

Referenced by domain_to_repo(), domainRepoMap(), get_discovery(), remap_domains(), set_repo_domain(), and shutdown().

◆ dp_factory_servant_

RcHandle<DomainParticipantFactoryImpl> OpenDDS::DCPS::Service_Participant::dp_factory_servant_
private

◆ factory_lock_

ACE_Thread_Mutex OpenDDS::DCPS::Service_Participant::factory_lock_
mutableprivate

The lock to serialize DomainParticipantFactory singleton creation and shutdown.

Definition at line 572 of file Service_Participant.h.

Referenced by get_data_durability_cache(), get_domain_participant_factory(), shutdown(), and ~Service_Participant().

◆ federation_backoff_multiplier_

int OpenDDS::DCPS::Service_Participant::federation_backoff_multiplier_
private

This FederationBackoffMultiplier.

Definition at line 704 of file Service_Participant.h.

Referenced by federation_backoff_multiplier(), load_common_configuration(), and parse_args().

◆ federation_initial_backoff_seconds_

int OpenDDS::DCPS::Service_Participant::federation_initial_backoff_seconds_
private

The FederationInitialBackoffSeconds value.

Definition at line 701 of file Service_Participant.h.

Referenced by federation_initial_backoff_seconds(), load_common_configuration(), and parse_args().

◆ federation_liveliness_

int OpenDDS::DCPS::Service_Participant::federation_liveliness_
private

This FederationLivelinessDuration.

Definition at line 707 of file Service_Participant.h.

Referenced by federation_liveliness(), load_common_configuration(), and parse_args().

◆ federation_recovery_duration_

int OpenDDS::DCPS::Service_Participant::federation_recovery_duration_
private

The FederationRecoveryDuration value in seconds.

Definition at line 698 of file Service_Participant.h.

Referenced by federation_recovery_duration(), load_common_configuration(), and parse_args().

◆ global_transport_config_

ACE_TString OpenDDS::DCPS::Service_Participant::global_transport_config_
private

Specifies the name of the transport configuration that is used when the entity tree does not specify one. If not set, the default transport configuration is used.

Definition at line 643 of file Service_Participant.h.

Referenced by get_transport_base_config_name(), load_common_configuration(), load_configuration(), load_domain_ranges(), and parse_args().

◆ initial_DataReaderQos_

DDS::DataReaderQos OpenDDS::DCPS::Service_Participant::initial_DataReaderQos_
private

Definition at line 604 of file Service_Participant.h.

Referenced by initial_DataReaderQos(), and initialize().

◆ initial_DataRepresentationQosPolicy_

DDS::DataRepresentationQosPolicy OpenDDS::DCPS::Service_Participant::initial_DataRepresentationQosPolicy_
private

Definition at line 598 of file Service_Participant.h.

Referenced by initial_DataRepresentationQosPolicy(), and initialize().

◆ initial_DataWriterQos_

DDS::DataWriterQos OpenDDS::DCPS::Service_Participant::initial_DataWriterQos_
private

Definition at line 602 of file Service_Participant.h.

Referenced by initial_DataWriterQos(), and initialize().

◆ initial_DeadlineQosPolicy_

DDS::DeadlineQosPolicy OpenDDS::DCPS::Service_Participant::initial_DeadlineQosPolicy_
private

Definition at line 583 of file Service_Participant.h.

Referenced by initial_DeadlineQosPolicy(), and initialize().

◆ initial_DestinationOrderQosPolicy_

DDS::DestinationOrderQosPolicy OpenDDS::DCPS::Service_Participant::initial_DestinationOrderQosPolicy_
private

Definition at line 591 of file Service_Participant.h.

Referenced by initial_DestinationOrderQosPolicy(), and initialize().

◆ initial_DomainParticipantFactoryQos_

DDS::DomainParticipantFactoryQos OpenDDS::DCPS::Service_Participant::initial_DomainParticipantFactoryQos_
private

Definition at line 606 of file Service_Participant.h.

Referenced by initial_DomainParticipantFactoryQos(), and initialize().

◆ initial_DomainParticipantQos_

DDS::DomainParticipantQos OpenDDS::DCPS::Service_Participant::initial_DomainParticipantQos_
private

Definition at line 600 of file Service_Participant.h.

Referenced by initial_DomainParticipantQos(), and initialize().

◆ initial_DurabilityQosPolicy_

DDS::DurabilityQosPolicy OpenDDS::DCPS::Service_Participant::initial_DurabilityQosPolicy_
private

Definition at line 580 of file Service_Participant.h.

Referenced by initial_DurabilityQosPolicy(), and initialize().

◆ initial_DurabilityServiceQosPolicy_

DDS::DurabilityServiceQosPolicy OpenDDS::DCPS::Service_Participant::initial_DurabilityServiceQosPolicy_
private

Definition at line 581 of file Service_Participant.h.

Referenced by initial_DurabilityServiceQosPolicy(), and initialize().

◆ initial_EntityFactoryQosPolicy_

DDS::EntityFactoryQosPolicy OpenDDS::DCPS::Service_Participant::initial_EntityFactoryQosPolicy_
private

Definition at line 594 of file Service_Participant.h.

Referenced by initial_EntityFactoryQosPolicy(), and initialize().

◆ initial_GroupDataQosPolicy_

DDS::GroupDataQosPolicy OpenDDS::DCPS::Service_Participant::initial_GroupDataQosPolicy_
private

Definition at line 577 of file Service_Participant.h.

Referenced by initial_GroupDataQosPolicy(), and initialize().

◆ initial_HistoryQosPolicy_

DDS::HistoryQosPolicy OpenDDS::DCPS::Service_Participant::initial_HistoryQosPolicy_
private

Definition at line 592 of file Service_Participant.h.

Referenced by initial_HistoryQosPolicy(), and initialize().

◆ initial_LatencyBudgetQosPolicy_

DDS::LatencyBudgetQosPolicy OpenDDS::DCPS::Service_Participant::initial_LatencyBudgetQosPolicy_
private

Definition at line 584 of file Service_Participant.h.

Referenced by initial_LatencyBudgetQosPolicy(), and initialize().

◆ initial_LifespanQosPolicy_

DDS::LifespanQosPolicy OpenDDS::DCPS::Service_Participant::initial_LifespanQosPolicy_
private

Definition at line 579 of file Service_Participant.h.

Referenced by initial_LifespanQosPolicy(), and initialize().

◆ initial_LivelinessQosPolicy_

DDS::LivelinessQosPolicy OpenDDS::DCPS::Service_Participant::initial_LivelinessQosPolicy_
private

Definition at line 587 of file Service_Participant.h.

Referenced by initial_LivelinessQosPolicy(), and initialize().

◆ initial_OwnershipQosPolicy_

DDS::OwnershipQosPolicy OpenDDS::DCPS::Service_Participant::initial_OwnershipQosPolicy_
private

Definition at line 585 of file Service_Participant.h.

Referenced by initial_OwnershipQosPolicy(), and initialize().

◆ initial_OwnershipStrengthQosPolicy_

DDS::OwnershipStrengthQosPolicy OpenDDS::DCPS::Service_Participant::initial_OwnershipStrengthQosPolicy_
private

Definition at line 586 of file Service_Participant.h.

Referenced by initial_OwnershipStrengthQosPolicy(), and initialize().

◆ initial_PartitionQosPolicy_

DDS::PartitionQosPolicy OpenDDS::DCPS::Service_Participant::initial_PartitionQosPolicy_
private

Definition at line 589 of file Service_Participant.h.

Referenced by initial_PartitionQosPolicy(), and initialize().

◆ initial_PresentationQosPolicy_

DDS::PresentationQosPolicy OpenDDS::DCPS::Service_Participant::initial_PresentationQosPolicy_
private

Definition at line 582 of file Service_Participant.h.

Referenced by initial_PresentationQosPolicy(), and initialize().

◆ initial_PropertyQosPolicy_

DDS::PropertyQosPolicy OpenDDS::DCPS::Service_Participant::initial_PropertyQosPolicy_
private

Definition at line 597 of file Service_Participant.h.

Referenced by initial_PropertyQosPolicy().

◆ initial_PublisherQos_

DDS::PublisherQos OpenDDS::DCPS::Service_Participant::initial_PublisherQos_
private

Definition at line 603 of file Service_Participant.h.

Referenced by initial_PublisherQos(), and initialize().

◆ initial_ReaderDataLifecycleQosPolicy_

DDS::ReaderDataLifecycleQosPolicy OpenDDS::DCPS::Service_Participant::initial_ReaderDataLifecycleQosPolicy_
private

Definition at line 596 of file Service_Participant.h.

Referenced by initial_ReaderDataLifecycleQosPolicy(), and initialize().

◆ initial_ReliabilityQosPolicy_

DDS::ReliabilityQosPolicy OpenDDS::DCPS::Service_Participant::initial_ReliabilityQosPolicy_
private

Definition at line 590 of file Service_Participant.h.

Referenced by initial_ReliabilityQosPolicy(), and initialize().

◆ initial_ResourceLimitsQosPolicy_

DDS::ResourceLimitsQosPolicy OpenDDS::DCPS::Service_Participant::initial_ResourceLimitsQosPolicy_
private

Definition at line 593 of file Service_Participant.h.

Referenced by initial_ResourceLimitsQosPolicy(), and initialize().

◆ initial_SubscriberQos_

DDS::SubscriberQos OpenDDS::DCPS::Service_Participant::initial_SubscriberQos_
private

Definition at line 605 of file Service_Participant.h.

Referenced by initial_SubscriberQos(), and initialize().

◆ initial_TimeBasedFilterQosPolicy_

DDS::TimeBasedFilterQosPolicy OpenDDS::DCPS::Service_Participant::initial_TimeBasedFilterQosPolicy_
private

Definition at line 588 of file Service_Participant.h.

Referenced by initial_TimeBasedFilterQosPolicy(), and initialize().

◆ initial_TopicDataQosPolicy_

DDS::TopicDataQosPolicy OpenDDS::DCPS::Service_Participant::initial_TopicDataQosPolicy_
private

Definition at line 576 of file Service_Participant.h.

Referenced by initial_TopicDataQosPolicy().

◆ initial_TopicQos_

DDS::TopicQos OpenDDS::DCPS::Service_Participant::initial_TopicQos_
private

Definition at line 601 of file Service_Participant.h.

Referenced by initial_TopicQos(), and initialize().

◆ initial_TransportPriorityQosPolicy_

DDS::TransportPriorityQosPolicy OpenDDS::DCPS::Service_Participant::initial_TransportPriorityQosPolicy_
private

Definition at line 578 of file Service_Participant.h.

Referenced by initial_TransportPriorityQosPolicy(), and initialize().

◆ initial_TypeConsistencyEnforcementQosPolicy_

DDS::TypeConsistencyEnforcementQosPolicy OpenDDS::DCPS::Service_Participant::initial_TypeConsistencyEnforcementQosPolicy_
private

◆ initial_UserDataQosPolicy_

DDS::UserDataQosPolicy OpenDDS::DCPS::Service_Participant::initial_UserDataQosPolicy_
private

The initial values of qos policies.

Definition at line 575 of file Service_Participant.h.

Referenced by initial_UserDataQosPolicy(), and initialize().

◆ initial_WriterDataLifecycleQosPolicy_

DDS::WriterDataLifecycleQosPolicy OpenDDS::DCPS::Service_Participant::initial_WriterDataLifecycleQosPolicy_
private

Definition at line 595 of file Service_Participant.h.

Referenced by initial_WriterDataLifecycleQosPolicy(), and initialize().

◆ job_queue_

JobQueue_rch OpenDDS::DCPS::Service_Participant::job_queue_
private

Definition at line 558 of file Service_Participant.h.

Referenced by get_domain_participant_factory(), and job_queue().

◆ liveliness_factor_

int OpenDDS::DCPS::Service_Participant::liveliness_factor_
private

The propagation delay factor.

Definition at line 619 of file Service_Participant.h.

Referenced by liveliness_factor(), load_common_configuration(), and parse_args().

◆ maps_lock_

ACE_Recursive_Thread_Mutex OpenDDS::DCPS::Service_Participant::maps_lock_
private

Guard access to the internal maps.

Definition at line 769 of file Service_Participant.h.

Referenced by add_discovery(), bit_transport_port(), get_discovery(), remap_domains(), and set_repo_domain().

◆ monitor_

unique_ptr<Monitor> OpenDDS::DCPS::Service_Participant::monitor_

Pointer to the monitor object for this object.

Definition at line 694 of file Service_Participant.h.

Referenced by get_domain_participant_factory().

◆ monitor_enabled_

bool OpenDDS::DCPS::Service_Participant::monitor_enabled_
private

Enable Monitor functionality.

Definition at line 761 of file Service_Participant.h.

Referenced by get_domain_participant_factory(), load_common_configuration(), and parse_args().

◆ monitor_factory_

MonitorFactory* OpenDDS::DCPS::Service_Participant::monitor_factory_

Pointer to the monitor factory that is used to create monitor objects.

Definition at line 691 of file Service_Participant.h.

Referenced by get_domain_participant_factory(), and shutdown().

◆ n_chunks_

size_t OpenDDS::DCPS::Service_Participant::n_chunks_
private

The configurable value of the number chunks that the DataWriter's cached allocator can allocate.

Definition at line 611 of file Service_Participant.h.

Referenced by load_common_configuration(), n_chunks(), and parse_args().

◆ network_config_monitor_

NetworkConfigMonitor_rch OpenDDS::DCPS::Service_Participant::network_config_monitor_
private

◆ network_config_monitor_lock_

ACE_Thread_Mutex OpenDDS::DCPS::Service_Participant::network_config_monitor_lock_
mutableprivate

Definition at line 780 of file Service_Participant.h.

Referenced by shutdown().

◆ network_interface_address_topic_

RcHandle<InternalTopic<NetworkInterfaceAddress> > OpenDDS::DCPS::Service_Participant::network_interface_address_topic_
private

Definition at line 787 of file Service_Participant.h.

Referenced by get_domain_participant_factory(), and shutdown().

◆ ORB_argv_

ACE_ARGV OpenDDS::DCPS::Service_Participant::ORB_argv_
private

Definition at line 553 of file Service_Participant.h.

Referenced by get_domain_participant_factory().

◆ pending_timeout_

TimeDuration OpenDDS::DCPS::Service_Participant::pending_timeout_
private

Number of seconds to wait on pending samples to be sent or dropped.

Definition at line 750 of file Service_Participant.h.

Referenced by load_common_configuration(), new_pending_timeout_deadline(), parse_args(), and pending_timeout().

◆ persistent_data_cache_

unique_ptr<DataDurabilityCache> OpenDDS::DCPS::Service_Participant::persistent_data_cache_
private

The PERSISTENT data durability cache.

Definition at line 741 of file Service_Participant.h.

Referenced by get_data_durability_cache(), and shutdown().

◆ persistent_data_dir_

ACE_CString OpenDDS::DCPS::Service_Participant::persistent_data_dir_
private

The PERSISTENT data durability directory.

Definition at line 744 of file Service_Participant.h.

Referenced by get_data_durability_cache(), load_common_configuration(), and parse_args().

◆ printer_value_writer_indent_

unsigned int OpenDDS::DCPS::Service_Participant::printer_value_writer_indent_
private

Definition at line 789 of file Service_Participant.h.

◆ priority_max_

int OpenDDS::DCPS::Service_Participant::priority_max_
private

Maximum priority value for the current scheduling policy.

Definition at line 730 of file Service_Participant.h.

Referenced by initializeScheduling(), and priority_max().

◆ priority_min_

int OpenDDS::DCPS::Service_Participant::priority_min_
private

Minimum priority value for the current scheduling policy.

Definition at line 727 of file Service_Participant.h.

Referenced by initializeScheduling(), and priority_min().

◆ publisher_content_filter_

bool OpenDDS::DCPS::Service_Participant::publisher_content_filter_
private

Allow the publishing side to do content filtering?

Definition at line 733 of file Service_Participant.h.

Referenced by load_common_configuration(), parse_args(), and publisher_content_filter().

◆ reactor_task_

ReactorTask OpenDDS::DCPS::Service_Participant::reactor_task_
private

◆ scheduler_

long OpenDDS::DCPS::Service_Participant::scheduler_
private

Scheduling policy value used for setting thread priorities.

Definition at line 724 of file Service_Participant.h.

Referenced by initializeScheduling(), and scheduler().

◆ schedulerQuantum_

TimeDuration OpenDDS::DCPS::Service_Participant::schedulerQuantum_
private

Scheduler time slice from configuration file.

Definition at line 713 of file Service_Participant.h.

Referenced by initializeScheduling(), and load_common_configuration().

◆ schedulerString_

ACE_TString OpenDDS::DCPS::Service_Participant::schedulerString_
private

Scheduling policy value from configuration file.

Definition at line 710 of file Service_Participant.h.

Referenced by initializeScheduling(), and load_common_configuration().

◆ security_enabled_

bool OpenDDS::DCPS::Service_Participant::security_enabled_
private

Definition at line 630 of file Service_Participant.h.

Referenced by load_common_configuration(), and parse_args().

◆ shut_down_

AtomicBool OpenDDS::DCPS::Service_Participant::shut_down_
private

Used to track state of service participant.

Definition at line 764 of file Service_Participant.h.

Referenced by get_domain_participant_factory(), is_shut_down(), and shutdown().

◆ shutdown_listener_

RcHandle<ShutdownListener> OpenDDS::DCPS::Service_Participant::shutdown_listener_
private

Definition at line 766 of file Service_Participant.h.

Referenced by set_shutdown_listener(), and shutdown().

◆ thread_status_manager_

ThreadStatusManager OpenDDS::DCPS::Service_Participant::thread_status_manager_
private

◆ time_source_

const TimeSource OpenDDS::DCPS::Service_Participant::time_source_
private

Definition at line 556 of file Service_Participant.h.

Referenced by time_source().

◆ transient_data_cache_

unique_ptr<DataDurabilityCache> OpenDDS::DCPS::Service_Participant::transient_data_cache_
private

The TRANSIENT data durability cache.

Definition at line 738 of file Service_Participant.h.

Referenced by get_data_durability_cache(), and shutdown().

◆ type_object_encoding_

TypeObjectEncoding OpenDDS::DCPS::Service_Participant::type_object_encoding_
private

Definition at line 785 of file Service_Participant.h.

Referenced by type_object_encoding().

◆ xtypes_lock_

ACE_Thread_Mutex OpenDDS::DCPS::Service_Participant::xtypes_lock_
private

Thread mutex used to protect the static initialization of XTypes data structures.

Definition at line 758 of file Service_Participant.h.

Referenced by get_static_xtypes_lock().

◆ zero_argc

int OpenDDS::DCPS::Service_Participant::zero_argc = 0
staticprivate

Definition at line 771 of file Service_Participant.h.


The documentation for this class was generated from the following files: