OpenDDS  Snapshot(2023/04/28-20:55)
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 }
int bit_transport_port_
The builtin topic transport port number.
RcHandle< InternalTopic< NetworkInterfaceAddress > > network_interface_address_topic_
long scheduler_
Scheduling policy value used for setting thread priorities.
int priority_min_
Minimum priority value for the current scheduling policy.
const int DEFAULT_FEDERATION_INITIAL_BACKOFF_SECONDS
bool monitor_enabled_
Enable Monitor functionality.
RcHandle< T > make_rch()
Definition: RcHandle_T.h:256
#define DDS_DEFAULT_DISCOVERY_METHOD
const size_t DEFAULT_CHUNK_MULTIPLIER
int liveliness_factor_
The propagation delay factor.
int priority_max_
Maximum priority value for the current scheduling policy.
const int BIT_LOOKUP_DURATION_MSEC
static const char DEFAULT_PERSISTENT_DATA_DIR[]
const int DEFAULT_FEDERATION_LIVELINESS
bool bidir_giop_
Enable TAO&#39;s Bidirectional GIOP?
int federation_recovery_duration_
The FederationRecoveryDuration value in seconds.
const size_t DEFAULT_NUM_CHUNKS
int federation_liveliness_
This FederationLivelinessDuration.
ACE_CString persistent_data_dir_
The PERSISTENT data durability directory.
const int DEFAULT_FEDERATION_BACKOFF_MULTIPLIER
ACE_TEXT("TCP_Factory")
int federation_initial_backoff_seconds_
The FederationInitialBackoffSeconds value.
AtomicBool shut_down_
Used to track state of service participant.
int federation_backoff_multiplier_
This FederationBackoffMultiplier.
const int DEFAULT_FEDERATION_RECOVERY_DURATION
void initialize()
Initialize default qos.
bool publisher_content_filter_
Allow the publishing side to do content filtering?

◆ ~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 }
#define ACE_DEBUG(X)
#define ACE_ERROR(X)
#define ACE_GUARD(MUTEX, OBJ, LOCK)
RcHandle< DomainParticipantFactoryImpl > dp_factory_servant_
const ReturnCode_t RETCODE_ALREADY_DELETED
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
OpenDDS_Dcps_Export LogLevel log_level
const char * retcode_to_string(DDS::ReturnCode_t value)
Definition: DCPS_Utils.cpp:29
const ReturnCode_t RETCODE_OK

Member Function Documentation

◆ add_discovery()

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

Definition at line 2777 of file Service_Participant.cpp.

References ACE_GUARD, discoveryMap_, and maps_lock_.

Referenced by load_configuration().

2778 {
2779  if (discovery) {
2781  this->discoveryMap_[discovery->key()] = discovery;
2782  }
2783 }
#define ACE_GUARD(MUTEX, OBJ, LOCK)
ACE_Recursive_Thread_Mutex maps_lock_
Guard access to the internal maps.
RepoKeyDiscoveryMap discoveryMap_
The RepoKey to Discovery object mapping.

◆ 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 1476 of file Service_Participant.cpp.

References association_chunk_multiplier_.

1477 {
1479 }

◆ 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 1482 of file Service_Participant.cpp.

References association_chunk_multiplier_.

1483 {
1484  association_chunk_multiplier_ = multiplier;
1486 }
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 2336 of file Service_Participant.cpp.

References OPENDDS_VECTOR().

2337 {
2338  for (OPENDDS_VECTOR(DomainRange)::const_iterator i = domain_ranges_.begin(); i != domain_ranges_.end(); ++i) {
2339  if (domainId >= i->range_start && domainId <= i->range_end) {
2340  return true;
2341  }
2342  }
2343 
2344  return false;
2345 }
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 2904 of file Service_Participant.cpp.

References bit_autopurge_disposed_samples_delay_.

2905 {
2907 }

◆ 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 2910 of file Service_Participant.cpp.

References bit_autopurge_disposed_samples_delay_.

2911 {
2913 }

◆ bit_autopurge_nowriter_samples_delay() [1/2]

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

Definition at line 2892 of file Service_Participant.cpp.

References bit_autopurge_nowriter_samples_delay_.

2893 {
2895 }

◆ 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 2898 of file Service_Participant.cpp.

References bit_autopurge_nowriter_samples_delay_.

2899 {
2901 }

◆ 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 1450 of file Service_Participant.cpp.

References bit_lookup_duration_msec_.

1451 {
1453 }

◆ 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 1456 of file Service_Participant.cpp.

References bit_lookup_duration_msec_.

1457 {
1460 }
static bool got_bit_lookup_duration_msec

◆ bit_transport_ip()

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

Definition at line 1430 of file Service_Participant.cpp.

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

1431 {
1433 }
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 1436 of file Service_Participant.cpp.

References bit_transport_port_.

1437 {
1438  return this->bit_transport_port_;
1439 }
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 1442 of file Service_Participant.cpp.

References ACE_GUARD, bit_transport_port_, and maps_lock_.

1443 {
1445  this->bit_transport_port_ = port;
1446  got_bit_transport_port = true;
1447 }
int bit_transport_port_
The builtin topic transport port number.
#define ACE_GUARD(MUTEX, OBJ, LOCK)
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 2397 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().

2398 {
2399  ValueMap discovery_settings;
2400  if (process_customizations(domainId, discovery_name, discovery_settings)) {
2402 
2403  if (discoveryMap_.find(name) == discoveryMap_.end()) {
2405  dcf.open();
2406  const ACE_Configuration_Section_Key& root = dcf.root_section();
2407 
2408  //create discovery instance
2410  dcf.open_section(root, RTPS_SECTION_NAME, true /* create */, sect);
2412  dcf.open_section(sect, ACE_TEXT_CHAR_TO_TCHAR(name.c_str()), true, sub_sect);
2413 
2414  for (ValueMap::const_iterator ds_it = discovery_settings.begin(); ds_it != discovery_settings.end(); ++ds_it) {
2415  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()));
2416  if (DCPS_debug_level > 0) {
2417  ACE_DEBUG((LM_DEBUG,
2418  ACE_TEXT("(%P|%t) Service_Participant::configure_discovery_template(): ")
2419  ACE_TEXT("setting %C = %C\n"),
2420  ds_it->first.c_str(), ds_it->second.c_str()));
2421  }
2422  }
2423 
2424  // load discovery
2425  int status = this->load_discovery_configuration(dcf, RTPS_SECTION_NAME);
2426 
2427  if (status != 0) {
2428  ACE_ERROR_RETURN((LM_ERROR,
2429  ACE_TEXT("(%P|%t) ERROR: Service_Participant::configure_discovery_template(): ")
2430  ACE_TEXT("load_discovery_configuration() returned %d\n"),
2431  status),
2432  -1);
2433  }
2434  } else {
2435  // already configured. not necessarily an error
2436  if (DCPS_debug_level > 0) {
2437  ACE_DEBUG((LM_DEBUG,
2438  ACE_TEXT("(%P|%t) Discovery config %C already exists\n"),
2439  name.c_str()));
2440  }
2441 
2442  }
2443  } else {
2444  ACE_ERROR_RETURN((LM_ERROR,
2445  ACE_TEXT("(%P|%t) ERROR: Service_Participant::configure_discovery_template(): ")
2446  ACE_TEXT("process_customizations() returned false\n")),
2447  -1);
2448  }
2449 
2450  return 0;
2451 }
#define ACE_DEBUG(X)
virtual int set_string_value(const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, const ACE_TString &value)
OpenDDS::DCPS::Discovery::RepoKey get_discovery_template_instance_name(DDS::DomainId_t id)
virtual const ACE_Configuration_Section_Key & root_section(void) const
bool process_customizations(DDS::DomainId_t id, const OPENDDS_STRING &discovery_name, ValueMap &customs)
#define ACE_TEXT_CHAR_TO_TCHAR(STRING)
static const ACE_TCHAR RTPS_SECTION_NAME[]
const char *const name
Definition: debug.cpp:60
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
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)
int load_discovery_configuration(ACE_Configuration_Heap &cf, const ACE_TCHAR *section_name)
OPENDDS_STRING RepoKey
Definition: Discovery.h:80
RepoKeyDiscoveryMap discoveryMap_
The RepoKey to Discovery object mapping.

◆ 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 2220 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().

2221 {
2223 
2224  if (discoveryMap_.find(name) == discoveryMap_.end()) {
2225  // create a cf that has [rtps_discovery/name+domainId]
2226  // copy sections adding customization
2227  DomainRange dr_inst;
2228 
2229  if (get_domain_range_info(domainId, dr_inst)) {
2231  dcf.open();
2232  const ACE_Configuration_Section_Key& root = dcf.root_section();
2233 
2234  // set the transport_config_name
2235  domain_to_transport_name_map_[domainId] = dr_inst.transport_config_name;
2236 
2237  // create domain instance
2239  dcf.open_section(root, DOMAIN_SECTION_NAME, true /* create */, dsect);
2241  dcf.open_section(dsect, ACE_TEXT_CHAR_TO_TCHAR(to_dds_string(domainId).c_str()), true /* create */, dsub_sect);
2242  dcf.set_string_value(dsub_sect, ACE_TEXT("DiscoveryConfig"), ACE_TEXT_CHAR_TO_TCHAR(name.c_str()));
2243  for (ValueMap::const_iterator it = dr_inst.domain_info.begin();
2244  it != dr_inst.domain_info.end();
2245  ++it) {
2246  dcf.set_string_value(dsub_sect, ACE_TEXT_CHAR_TO_TCHAR(it->first.c_str()), ACE_TEXT_CHAR_TO_TCHAR(it->second.c_str()));
2247  if (DCPS_debug_level > 0) {
2248  ACE_DEBUG((LM_DEBUG,
2249  ACE_TEXT("(%P|%t) Service_Participant::")
2250  ACE_TEXT("configure_domain_range_instance(): adding %C=%C\n"),
2251  it->first.c_str(), it->second.c_str()));
2252  }
2253  }
2254 
2255  ACE_TString cfg_name;
2256  if (get_transport_base_config_name(domainId, cfg_name)) {
2257  if (TransportRegistry::instance()->config_has_transport_template(cfg_name)) {
2258  // create transport instance add default transport config
2260  const OPENDDS_STRING config_instance_name = TransportRegistry::instance()->get_config_instance_name(domainId);
2261  dcf.set_string_value(dsub_sect, ACE_TEXT("DefaultTransportConfig"),
2262  ACE_TEXT_CHAR_TO_TCHAR(config_instance_name.c_str()));
2263  if (DCPS_debug_level > 0) {
2264  ACE_DEBUG((LM_DEBUG,
2265  ACE_TEXT("(%P|%t) Service_Participant::")
2266  ACE_TEXT("configure_domain_range_instance(): setting DefaultTransportConfig=%C\n"),
2267  config_instance_name.c_str()));
2268  }
2269  }
2270  } else {
2271  ACE_ERROR_RETURN((LM_ERROR,
2272  ACE_TEXT("(%P|%t) ERROR: Service_Participant::")
2273  ACE_TEXT("configure_domain_range_instance(): ")
2274  ACE_TEXT("transport config not found for domain %d\n"),
2275  domainId),
2276  -1);
2277  }
2278 
2279  //create matching discovery instance
2281  dcf.open_section(root, RTPS_SECTION_NAME, true /* create */, sect);
2283  dcf.open_section(sect, ACE_TEXT_CHAR_TO_TCHAR(name.c_str()), true, sub_sect);
2284 
2285  ValueMap discovery_settings;
2286  if (process_customizations(domainId, dr_inst.discovery_template_name, discovery_settings)) {
2287  for (ValueMap::const_iterator ds_it = discovery_settings.begin(); ds_it != discovery_settings.end(); ++ds_it) {
2288  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()));
2289  }
2290  }
2291 
2292  // load discovery
2293  int status = this->load_discovery_configuration(dcf, RTPS_SECTION_NAME);
2294 
2295  if (status != 0) {
2296  ACE_ERROR_RETURN((LM_ERROR,
2297  ACE_TEXT("(%P|%t) ERROR: Service_Participant::configure_domain_range_instance(): ")
2298  ACE_TEXT("load_discovery_configuration() returned %d\n"),
2299  status),
2300  -1);
2301  }
2302 
2303  // load domain config
2304  status = this->load_domain_configuration(dcf, 0);
2305 
2306  if (status != 0) {
2307  ACE_ERROR_RETURN((LM_ERROR,
2308  ACE_TEXT("(%P|%t) ERROR: Service_Participant::configure_domain_range_instance(): ")
2309  ACE_TEXT("load_domain_configuration() returned %d\n"),
2310  status),
2311  -1);
2312  }
2313 
2314  if (DCPS_debug_level > 4) {
2315  ACE_DEBUG((LM_DEBUG,
2316  ACE_TEXT("(%P|%t) Service_Participant::configure_domain_range_instance(): ")
2317  ACE_TEXT("configure domain %d.\n"),
2318  domainId));
2319  }
2320  }
2321 
2322  } else {
2323  // > 9 to limit number of messages.
2324  if (DCPS_debug_level > 9) {
2325  ACE_DEBUG((LM_DEBUG,
2326  ACE_TEXT("(%P|%t) Service_Participant::configure_domain_range_instance(): ")
2327  ACE_TEXT("domain %d already configured.\n"),
2328  domainId));
2329  }
2330  }
2331  return 0;
2332 }
#define ACE_DEBUG(X)
int create_transport_template_instance(DDS::DomainId_t domain, const ACE_TString &config_name)
virtual int set_string_value(const ACE_Configuration_Section_Key &key, const ACE_TCHAR *name, const ACE_TString &value)
OpenDDS::DCPS::Discovery::RepoKey get_discovery_template_instance_name(DDS::DomainId_t id)
String to_dds_string(unsigned short to_convert)
virtual const ACE_Configuration_Section_Key & root_section(void) const
bool get_domain_range_info(DDS::DomainId_t id, DomainRange &inst)
OPENDDS_STRING get_config_instance_name(DDS::DomainId_t id)
static const ACE_TCHAR DOMAIN_SECTION_NAME[]
bool process_customizations(DDS::DomainId_t id, const OPENDDS_STRING &discovery_name, ValueMap &customs)
#define OPENDDS_STRING
bool get_transport_base_config_name(DDS::DomainId_t domainId, ACE_TString &name) const
#define ACE_TEXT_CHAR_TO_TCHAR(STRING)
static const ACE_TCHAR RTPS_SECTION_NAME[]
const char *const name
Definition: debug.cpp:60
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
virtual int open_section(const ACE_Configuration_Section_Key &base, const ACE_TCHAR *sub_section, bool create, ACE_Configuration_Section_Key &result)
int load_domain_configuration(ACE_Configuration_Heap &cf, const ACE_TCHAR *filename)
static TransportRegistry * instance()
Return a singleton instance of this class.
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)
int load_discovery_configuration(ACE_Configuration_Heap &cf, const ACE_TCHAR *section_name)
OPENDDS_STRING RepoKey
Definition: Discovery.h:80
RepoKeyDiscoveryMap discoveryMap_
The RepoKey to Discovery object mapping.

◆ 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 2804 of file Service_Participant.cpp.

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

2809 {
2810  DomainParticipantImpl* participant_servant = dynamic_cast<DomainParticipantImpl*>(participant);
2811  if (participant_servant)
2812  return participant_servant->create_recorder(a_topic, subscriber_qos, datareader_qos, a_listener, 0);
2813  return 0;
2814 }

◆ 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 2829 of file Service_Participant.cpp.

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

2834 {
2835  DomainParticipantImpl* participant_servant = dynamic_cast<DomainParticipantImpl*>(participant);
2836  if (participant_servant)
2837  return participant_servant->create_replayer(a_topic, publisher_qos, datawriter_qos, a_listener, 0);
2838  return 0;
2839 }

◆ 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 2853 of file Service_Participant.cpp.

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

2861 {
2862  DomainParticipantImpl* participant_servant = dynamic_cast<DomainParticipantImpl*>(participant);
2863  if (!participant_servant) {
2864  return 0;
2865  }
2866  return participant_servant->create_typeless_topic(topic_name, type_name, type_has_keys, qos, a_listener, mask);
2867 }

◆ 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 2869 of file Service_Participant.cpp.

References default_configuration_file_.

2870 {
2872 }

◆ delete_recorder()

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

Delete an existing Recorder from its DomainParticipant.

Definition at line 2817 of file Service_Participant.cpp.

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

2818 {
2820  RecorderImpl* impl = dynamic_cast<RecorderImpl*>(recorder);
2821  if (impl){
2822  ret = impl->cleanup();
2823  impl->participant()->delete_recorder(recorder);
2824  }
2825  return ret;
2826 }
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 2842 of file Service_Participant.cpp.

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

2843 {
2845  ReplayerImpl* impl = static_cast<ReplayerImpl*>(replayer);
2846  if (impl) {
2847  ret = impl->cleanup();
2848  impl->participant()->delete_replayer(replayer);
2849  }
2850  return ret;
2851 }
const ReturnCode_t RETCODE_ERROR

◆ discoveryMap()

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

Definition at line 2792 of file Service_Participant.cpp.

References discoveryMap_.

2793 {
2794  return this->discoveryMap_;
2795 }
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 2798 of file Service_Participant.cpp.

References domainRepoMap_.

2799 {
2800  return this->domainRepoMap_;
2801 }
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 2728 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.

2730 {
2731  DDS::DurabilityQosPolicyKind const kind =
2732  durability.kind;
2733 
2734  DataDurabilityCache * cache = 0;
2735 
2736  if (kind == DDS::TRANSIENT_DURABILITY_QOS) {
2737  {
2739 
2740  if (!this->transient_data_cache_) {
2741  this->transient_data_cache_.reset(new DataDurabilityCache(kind));
2742  }
2743  }
2744 
2745  cache = this->transient_data_cache_.get();
2746 
2747  } else if (kind == DDS::PERSISTENT_DURABILITY_QOS) {
2748  {
2750 
2751  try {
2752  if (!this->persistent_data_cache_) {
2753  this->persistent_data_cache_.reset(new DataDurabilityCache(kind,
2754  this->persistent_data_dir_));
2755  }
2756 
2757  } catch (const std::exception& ex) {
2758  if (DCPS_debug_level > 0) {
2759  ACE_ERROR((LM_WARNING,
2760  ACE_TEXT("(%P|%t) WARNING: Service_Participant::get_data_durability_cache ")
2761  ACE_TEXT("failed to create PERSISTENT cache, falling back on ")
2762  ACE_TEXT("TRANSIENT behavior: %C\n"), ex.what()));
2763  }
2764 
2765  this->persistent_data_cache_.reset(new DataDurabilityCache(DDS::TRANSIENT_DURABILITY_QOS));
2766  }
2767  }
2768 
2769  cache = this->persistent_data_cache_.get();
2770  }
2771 
2772  return cache;
2773 }
#define ACE_ERROR(X)
unique_ptr< DataDurabilityCache > transient_data_cache_
The TRANSIENT data durability cache.
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
ACE_CString persistent_data_dir_
The PERSISTENT data durability directory.
DurabilityQosPolicyKind
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
unique_ptr< DataDurabilityCache > persistent_data_cache_
The PERSISTENT data durability cache.

◆ get_default_discovery()

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

Definition at line 1277 of file Service_Participant.cpp.

References defaultDiscovery_.

1278 {
1279  return this->defaultDiscovery_;
1280 }

◆ 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 1283 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().

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

References OpenDDS::DCPS::to_dds_string().

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

2696 {
2697  OpenDDS::DCPS::Discovery::RepoKey configured_name = "rtps_template_instance_";
2698  configured_name += to_dds_string(id);
2699  return configured_name;
2700 }
String to_dds_string(unsigned short to_convert)
OPENDDS_STRING RepoKey
Definition: Discovery.h:80

◆ 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 }
#define ACE_DEBUG(X)
int fclose(FILE *fp)
#define OPENDDS_VERSION
Definition: Version.h:16
RcHandle< InternalTopic< NetworkInterfaceAddress > > network_interface_address_topic_
#define ACE_ERROR(X)
const char * c_str(void) const
void initializeScheduling()
Initialize the thread scheduling and initial priority.
RcHandle< DomainParticipantFactoryImpl > dp_factory_servant_
bool monitor_enabled_
Enable Monitor functionality.
static int process_directive(const ACE_TCHAR directive[])
NetworkConfigMonitor_rch network_config_monitor_
static TYPE * instance(const ACE_TCHAR *name)
void connect(RcHandle< InternalTopic< NetworkInterfaceAddress > > topic)
FILE * fopen(const char *filename, const char *mode)
struct utsname ACE_utsname
bool is_empty(void) const
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
const ACE_TCHAR * compiler_name(void)
void disconnect(RcHandle< InternalTopic< NetworkInterfaceAddress > > topic)
u_int compiler_minor_version(void)
ACE_TEXT("TCP_Factory")
unique_ptr< Monitor > monitor_
Pointer to the monitor object for this object.
u_int compiler_major_version(void)
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
OpenDDS_Dcps_Export LogLevel log_level
ReactorInterceptor_rch interceptor() const
Definition: ReactorTask.inl:65
AtomicBool shut_down_
Used to track state of service participant.
ACE_Reactor * get_reactor()
Definition: ReactorTask.inl:14
static ACE_TString config_fname(ACE_TEXT(""))
int open_reactor_task(void *, ThreadStatusManager *thread_status_manager=0, const String &name="")
Definition: ReactorTask.cpp:79
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)
int parse_args(int &argc, ACE_TCHAR *argv[])
u_int compiler_beta_version(void)

◆ get_domain_range_info()

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

Definition at line 2609 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().

2610 {
2611  if (has_domain_range()) {
2612  for (OPENDDS_VECTOR(DomainRange)::iterator it = domain_ranges_.begin();
2613  it != domain_ranges_.end(); ++it) {
2614  if (id >= it->range_start && id <= it->range_end) {
2615  inst.range_start = it->range_start;
2616  inst.range_end = it->range_end;
2617  inst.discovery_template_name = it->discovery_template_name;
2618  inst.transport_config_name = it->transport_config_name;
2619  inst.domain_info = it->domain_info;
2620 
2621  if (DCPS_debug_level > 0) {
2622  ACE_DEBUG((LM_DEBUG,
2623  ACE_TEXT("(%P|%t) Service_Participant::get_domain_range_info(): ")
2624  ACE_TEXT("Domain %d is in [%s/%d-%d]\n"),
2625  id, DOMAIN_RANGE_SECTION_NAME, it->range_start, it->range_end));
2626  }
2627 
2628  return true;
2629  }
2630  }
2631  }
2632  return false;
2633 }
#define ACE_DEBUG(X)
OPENDDS_VECTOR(DomainRange) domain_ranges_
static const ACE_TCHAR DOMAIN_RANGE_SECTION_NAME[]
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30

◆ 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 2931 of file Service_Participant.cpp.

2933 {
2934  return dynamic_cast<DomainParticipantImpl*>(participant)->get_dynamic_type(type, key);
2935 }
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 2879 of file Service_Participant.cpp.

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

2880 {
2881  return xtypes_lock_;
2882 }
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 2874 of file Service_Participant.cpp.

References thread_status_manager_.

2875 {
2876  return thread_status_manager_;
2877 }

◆ 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 2348 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().

2349 {
2350  OPENDDS_MAP(DDS::DomainId_t, OPENDDS_STRING)::const_iterator it = domain_to_transport_name_map_.find(domainId);
2351  if ( it != domain_to_transport_name_map_.end()) {
2352  name = ACE_TEXT_CHAR_TO_TCHAR(it->second.c_str());
2353  return true;
2354  } else if (global_transport_config_ != ACE_TEXT("")) {
2355  name = global_transport_config_;
2356  return true;
2357  } else {
2358  return false;
2359  }
2360 }
#define OPENDDS_STRING
DOMAINID_TYPE_NATIVE DomainId_t
typedef OPENDDS_MAP(Discovery::RepoKey, Discovery_rch) RepoKeyDiscoveryMap
For internal OpenDDS Use (needed for monitor code)
#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

◆ 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 2916 of file Service_Participant.cpp.

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

2918 {
2919  DomainParticipantImpl* participant_servant = dynamic_cast<DomainParticipantImpl*>(participant);
2920  if (participant_servant) {
2921  XTypes::TypeLookupService_rch tls = participant_servant->get_type_lookup_service();
2922  if (tls) {
2923  return tls->get_type_info(key);
2924  }
2925  }
2926 
2927  return XTypes::TypeInformation();
2928 }
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 2939 of file Service_Participant.cpp.

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

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

◆ has_domain_range()

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

Definition at line 2603 of file Service_Participant.cpp.

Referenced by get_domain_range_info().

2604 {
2605  return !domain_ranges_.empty();
2606 }

◆ 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::EntityFactoryQosPolicy::autoenable_created_entities, bit_autopurge_disposed_samples_delay_, bit_autopurge_nowriter_samples_delay_, DDS::PresentationQosPolicy::coherent_access, DDS::DURATION_INFINITE_NSEC, DDS::DURATION_INFINITE_SEC, DDS::PublisherQos::entity_factory, DDS::SubscriberQos::entity_factory, DDS::DomainParticipantFactoryQos::entity_factory, DDS::DomainParticipantQos::entity_factory, DDS::PublisherQos::group_data, DDS::SubscriberQos::group_data, 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::Duration_t::nanosec, DDS::PresentationQosPolicy::ordered_access, DDS::PublisherQos::partition, DDS::SubscriberQos::partition, DDS::PublisherQos::presentation, DDS::SubscriberQos::presentation, DDS::Duration_t::sec, 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 
855  initial_TimeBasedFilterQosPolicy_ = TimeBasedFilterQosPolicyBuilder();
856 
857  initial_ReliabilityQosPolicy_ = ReliabilityQosPolicyBuilder();
858 
859  initial_DestinationOrderQosPolicy_ = DestinationOrderQosPolicyBuilder();
860 
861  initial_HistoryQosPolicy_ = HistoryQosPolicyBuilder();
862 
863  initial_ResourceLimitsQosPolicy_ = ResourceLimitsQosPolicyBuilder();
864 
866 
867  initial_WriterDataLifecycleQosPolicy_ = WriterDataLifecycleQosPolicyBuilder();
868 
869  // Will get interpreted based on how the type was annotated.
871 
872  initial_ReaderDataLifecycleQosPolicy_ = ReaderDataLifecycleQosPolicyBuilder();
873 
874  initial_TypeConsistencyEnforcementQosPolicy_ = TypeConsistencyEnforcementQosPolicyBuilder();
875 
879 
880  initial_TopicQos_ = TopicQosBuilder();
881 
882  initial_DataWriterQos_ = DataWriterQosBuilder();
883 
888 
889  initial_DataReaderQos_ = DataReaderQosBuilder();
890 
895 
900 }
DDS::GroupDataQosPolicy initial_GroupDataQosPolicy_
UserDataQosPolicy user_data
DDS::ResourceLimitsQosPolicy initial_ResourceLimitsQosPolicy_
PartitionQosPolicy partition
DDS::DataRepresentationQosPolicy initial_DataRepresentationQosPolicy_
DDS::LatencyBudgetQosPolicy initial_LatencyBudgetQosPolicy_
EntityFactoryQosPolicy entity_factory
GroupDataQosPolicy group_data
const long DURATION_INFINITE_SEC
Definition: DdsDcpsCore.idl:72
DDS::TypeConsistencyEnforcementQosPolicy initial_TypeConsistencyEnforcementQosPolicy_
DDS::OwnershipQosPolicy initial_OwnershipQosPolicy_
DDS::LifespanQosPolicy initial_LifespanQosPolicy_
DDS::WriterDataLifecycleQosPolicy initial_WriterDataLifecycleQosPolicy_
PresentationQosPolicyAccessScopeKind access_scope
DDS::ReaderDataLifecycleQosPolicy initial_ReaderDataLifecycleQosPolicy_
EntityFactoryQosPolicy entity_factory
EntityFactoryQosPolicy entity_factory
DDS::TransportPriorityQosPolicy initial_TransportPriorityQosPolicy_
EntityFactoryQosPolicy entity_factory
DDS::DurabilityQosPolicy initial_DurabilityQosPolicy_
DDS::LivelinessQosPolicy initial_LivelinessQosPolicy_
DDS::DestinationOrderQosPolicy initial_DestinationOrderQosPolicy_
PresentationQosPolicy presentation
unsigned long nanosec
Definition: DdsDcpsCore.idl:69
DDS::DomainParticipantFactoryQos initial_DomainParticipantFactoryQos_
DDS::ReliabilityQosPolicy initial_ReliabilityQosPolicy_
DDS::PartitionQosPolicy initial_PartitionQosPolicy_
DDS::HistoryQosPolicy initial_HistoryQosPolicy_
DDS::TimeBasedFilterQosPolicy initial_TimeBasedFilterQosPolicy_
const unsigned long DURATION_INFINITE_NSEC
Definition: DdsDcpsCore.idl:73
DDS::DomainParticipantQos initial_DomainParticipantQos_
DDS::DeadlineQosPolicy initial_DeadlineQosPolicy_
DDS::EntityFactoryQosPolicy initial_EntityFactoryQosPolicy_
DDS::DurabilityServiceQosPolicy initial_DurabilityServiceQosPolicy_
DataRepresentationIdSeq value
DDS::UserDataQosPolicy initial_UserDataQosPolicy_
The initial values of qos policies.
DDS::OwnershipStrengthQosPolicy initial_OwnershipStrengthQosPolicy_
GroupDataQosPolicy group_data
DDS::PresentationQosPolicy initial_PresentationQosPolicy_
PartitionQosPolicy partition
PresentationQosPolicy presentation

◆ initializeScheduling()

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

Initialize the thread scheduling and initial priority.

Definition at line 903 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().

904 {
905  //
906  // Establish the scheduler if specified.
907  //
908  if (this->schedulerString_.length() == 0) {
909  if (DCPS_debug_level > 0) {
910  ACE_DEBUG((LM_NOTICE,
911  ACE_TEXT("(%P|%t) NOTICE: Service_Participant::intializeScheduling() - ")
912  ACE_TEXT("no scheduling policy specified, not setting policy.\n")));
913  }
914 
915  } else {
916  //
917  // Translate the scheduling policy to a usable value.
918  //
919  int ace_scheduler = ACE_SCHED_OTHER;
920  this->scheduler_ = THR_SCHED_DEFAULT;
921 
922  if (this->schedulerString_ == ACE_TEXT("SCHED_RR")) {
923  this->scheduler_ = THR_SCHED_RR;
924  ace_scheduler = ACE_SCHED_RR;
925 
926  } else if (this->schedulerString_ == ACE_TEXT("SCHED_FIFO")) {
927  this->scheduler_ = THR_SCHED_FIFO;
928  ace_scheduler = ACE_SCHED_FIFO;
929 
930  } else if (this->schedulerString_ == ACE_TEXT("SCHED_OTHER")) {
931  this->scheduler_ = THR_SCHED_DEFAULT;
932  ace_scheduler = ACE_SCHED_OTHER;
933 
934  } else {
935  ACE_DEBUG((LM_WARNING,
936  ACE_TEXT("(%P|%t) WARNING: Service_Participant::initializeScheduling() - ")
937  ACE_TEXT("unrecognized scheduling policy: %s, set to SCHED_OTHER.\n"),
938  this->schedulerString_.c_str()));
939  }
940 
941  //
942  // Attempt to set the scheduling policy.
943  //
944 #ifdef ACE_WIN32
945  ACE_DEBUG((LM_NOTICE,
946  ACE_TEXT("(%P|%t) NOTICE: Service_Participant::initializeScheduling() - ")
947  ACE_TEXT("scheduling is not implemented on Win32.\n")));
948  ACE_UNUSED_ARG(ace_scheduler);
949 #else
950  ACE_Sched_Params params(
951  ace_scheduler,
952  ACE_Sched_Params::priority_min(ace_scheduler),
953  ACE_SCOPE_THREAD,
955 
956  if (ACE_OS::sched_params(params) != 0) {
957  if (ACE_OS::last_error() == EPERM) {
958  ACE_DEBUG((LM_WARNING,
959  ACE_TEXT("(%P|%t) WARNING: Service_Participant::initializeScheduling() - ")
960  ACE_TEXT("user is not superuser, requested scheduler not set.\n")));
961 
962  } else {
963  ACE_ERROR((LM_ERROR,
964  ACE_TEXT("(%P|%t) ERROR: Service_Participant::initializeScheduling() - ")
965  ACE_TEXT("sched_params failed: %m.\n")));
966  }
967 
968  // Reset the scheduler value(s) if we did not succeed.
969  this->scheduler_ = -1;
970  ace_scheduler = ACE_SCHED_OTHER;
971 
972  } else if (DCPS_debug_level > 0) {
973  ACE_DEBUG((LM_DEBUG,
974  ACE_TEXT("(%P|%t) Service_Participant::initializeScheduling() - ")
975  ACE_TEXT("scheduling policy set to %s(%d).\n"),
976  this->schedulerString_.c_str()));
977  }
978 
979  //
980  // Setup some scheduler specific information for later use.
981  //
982  this->priority_min_ = ACE_Sched_Params::priority_min(ace_scheduler, ACE_SCOPE_THREAD);
983  this->priority_max_ = ACE_Sched_Params::priority_max(ace_scheduler, ACE_SCOPE_THREAD);
984 #endif // ACE_WIN32
985  }
986 }
#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
long scheduler_
Scheduling policy value used for setting thread priorities.
static int priority_max(const Policy, const int scope=ACE_SCOPE_THREAD)
int priority_min_
Minimum priority value for the current scheduling policy.
const ACE_Time_Value & value() const
int priority_max_
Maximum priority value for the current scheduling policy.
#define EPERM
#define ACE_SCHED_FIFO
TimeDuration schedulerQuantum_
Scheduler time slice from configuration file.
ACE_TString schedulerString_
Scheduling policy value from configuration file.
ACE_TEXT("TCP_Factory")
int last_error(void)
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
#define ACE_SCHED_OTHER
size_type length(void) const
#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 2703 of file Service_Participant.cpp.

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

Referenced by get_discovery().

2704 {
2705  OPENDDS_VECTOR(DiscoveryInfo)::const_iterator i;
2706  for (i = discovery_infos_.begin(); i != discovery_infos_.end(); ++i) {
2707  if (i->discovery_name == name && !i->customizations.empty()) {
2708  return true;
2709  }
2710  }
2711 
2712  return false;
2713 }
OPENDDS_VECTOR(DomainRange) domain_ranges_
const char *const name
Definition: debug.cpp:60

◆ 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 1489 of file Service_Participant.cpp.

References liveliness_factor_.

1490 {
1491  liveliness_factor_ = factor;
1492  got_liveliness_factor = true;
1493 }
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 1496 of file Service_Participant.cpp.

References liveliness_factor_.

1497 {
1498  return liveliness_factor_;
1499 }
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 1681 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().

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

◆ 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 1538 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.

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

◆ 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 1509 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().

1510 {
1512  int status = 0;
1513 
1514  if ((status = cf.open()) != 0)
1515  ACE_ERROR_RETURN((LM_ERROR,
1516  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1517  ACE_TEXT("open() returned %d\n"),
1518  status),
1519  -1);
1520 
1521  ACE_Ini_ImpExp import(cf);
1522  status = import.import_config(config_fname.c_str());
1523 
1524  if (status != 0) {
1525  ACE_ERROR_RETURN((LM_ERROR,
1526  ACE_TEXT("(%P|%t) ERROR: Service_Participant::load_configuration ")
1527  ACE_TEXT("import_config () returned %d\n"),
1528  status),
1529  -1);
1530  } else {
1531  status = this->load_configuration(cf, config_fname.c_str());
1532  }
1533 
1534  return status;
1535 }
const char * c_str(void) const
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)
static ACE_TString config_fname(ACE_TEXT(""))

◆ 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 2363 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().

2365 {
2366  const ACE_Configuration_Section_Key &root = cf.root_section();
2368  if (cf.open_section(root, section_name, false, sect) == 0) {
2369 
2370  const OPENDDS_STRING sect_name = ACE_TEXT_ALWAYS_CHAR(section_name);
2371  DiscoveryTypes::iterator iter =
2372  this->discovery_types_.find(sect_name);
2373 
2374  if (iter == this->discovery_types_.end()) {
2375  // See if we can dynamically load the required libraries
2376  TheTransportRegistry->load_transport_lib(sect_name);
2377  iter = this->discovery_types_.find(sect_name);
2378  }
2379 
2380  if (iter != this->discovery_types_.end()) {
2381  // discovery code is loaded, process options
2382  return iter->second->discovery_config(cf);
2383  } else {
2384  // No discovery code can be loaded, report an error
2385  ACE_ERROR_RETURN((LM_ERROR,
2386  ACE_TEXT("(%P|%t) ERROR: Service_Participant::")
2387  ACE_TEXT("load_discovery_configuration(): ")
2388  ACE_TEXT("Unable to load libraries for %s\n"),
2389  section_name),
2390  -1);
2391  }
2392  }
2393  return 0;
2394 }
#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 2455 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().

2456 {
2457  // open the rtps_discovery config sections
2458  cf.open();
2459  const ACE_Configuration_Section_Key& root = cf.root_section();
2461 
2462  if (cf.open_section(root, RTPS_SECTION_NAME, false, rtps_sect) == 0) {
2463  ValueMap vm;
2464  if (pullValues(cf, rtps_sect, vm) > 0) {
2465  // There are values inside [rtps_discovery]
2466  ACE_ERROR_RETURN((LM_ERROR,
2467  ACE_TEXT("(%P|%t) Service_Participant::load_discovery_templates(): ")
2468  ACE_TEXT("rtps_discovery sections must have a subsection name\n")),
2469  -1);
2470  }
2471 
2472  // Process the subsections of this section (the individual domains)
2473  KeyList keys;
2474  if (processSections(cf, rtps_sect, keys) != 0) {
2475  ACE_ERROR_RETURN((LM_ERROR,
2476  ACE_TEXT("(%P|%t) Service_Participant::load_discovery_templates(): ")
2477  ACE_TEXT("too many nesting layers in the [rtps_discovery] section.\n")),
2478  -1);
2479  }
2480 
2481  // store the discovery information
2482  for (KeyList::const_iterator disc_it = keys.begin(); disc_it != keys.end(); ++disc_it) {
2483  DiscoveryInfo dinfo;
2484  dinfo.discovery_name = disc_it->first;
2485 
2486  ValueMap values;
2487  if (pullValues(cf, disc_it->second, values) > 0) {
2488  for (ValueMap::const_iterator it = values.begin(); it != values.end(); ++it) {
2489  // check for customizations
2491  OPENDDS_STRING customization = it->second;
2492  if (DCPS_debug_level > 0) {
2493  ACE_DEBUG((LM_DEBUG,
2494  ACE_TEXT("(%P|%t) Service_Participant::load_discovery_templates(): ")
2495  ACE_TEXT("loading customizations [%s/%C]\n"),
2497  customization.c_str()));
2498  }
2499 
2500  ACE_Configuration_Section_Key custom_sect;
2501  if (cf.open_section(root, CUSTOMIZATION_SECTION_NAME, false, custom_sect) == 0) {
2502  ValueMap vcm;
2503  if (pullValues(cf, custom_sect, vcm) > 0) {
2504  ACE_ERROR_RETURN((LM_ERROR,
2505  ACE_TEXT("(%P|%t) Service_Participant::load_discovery_templates(): ")
2506  ACE_TEXT("%s sections must have a subsection name\n"),
2508  -1);
2509  }
2510 
2511  // Process the subsections of the custom section
2512  KeyList keys;
2513  if (processSections(cf, custom_sect, keys) != 0) {
2514  ACE_ERROR_RETURN((LM_ERROR,
2515  ACE_TEXT("(%P|%t) Service_Participant::load_discovery_templates(): ")
2516  ACE_TEXT("too many nesting layers in the [%s] section.\n"),
2518  -1);
2519  }
2520 
2521  // add customizations to domain range
2522  for (KeyList::const_iterator iter = keys.begin(); iter != keys.end(); ++iter) {
2523  if (customization == iter->first) {
2524  ValueMap values;
2525  pullValues(cf, iter->second, values);
2526  for (ValueMap::const_iterator it = values.begin(); it != values.end(); ++it) {
2527  dinfo.customizations[it->first] = it->second;
2528  }
2529  }
2530  }
2531  }
2532  } else {
2533  dinfo.disc_info[it->first] = it->second;
2534  }
2535  }
2536  }
2537 
2538  discovery_infos_.push_back(dinfo);
2539  }
2540  }
2541 
2542  // return 0 even if no templates were loaded
2543  return 0;
2544 }
#define ACE_DEBUG(X)
static const ACE_TCHAR CUSTOMIZATION_SECTION_NAME[]
#define ACE_TEXT_ALWAYS_CHAR(STRING)
virtual const ACE_Configuration_Section_Key & root_section(void) const
#define OPENDDS_STRING
static const ACE_TCHAR RTPS_SECTION_NAME[]
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
virtual int open_section(const ACE_Configuration_Section_Key &base, const ACE_TCHAR *sub_section, bool create, ACE_Configuration_Section_Key &result)
int processSections(ACE_Configuration_Heap &cf, const ACE_Configuration_Section_Key &key, KeyList &subsections)
Definition: ConfigUtils.cpp:41
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)
int pullValues(ACE_Configuration_Heap &cf, const ACE_Configuration_Section_Key &key, ValueMap &values)
Definition: ConfigUtils.cpp:17

◆ 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 1980 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().

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

◆ 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 2120 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().

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

◆ 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 1463 of file Service_Participant.cpp.

References n_chunks_.

1464 {
1465  return n_chunks_;
1466 }

◆ 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 1469 of file Service_Participant.cpp.

References n_chunks_.

1470 {
1471  n_chunks_ = chunks;
1472  got_chunks = true;
1473 }

◆ 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 }
int bit_transport_port_
The builtin topic transport port number.
void thread_status_interval(const TimeDuration &thread_status_interval)
void set_from_string(const char *name)
Definition: debug.cpp:73
#define ACE_ERROR(X)
static const char * DEFAULT_REPO
Key value for the default repository IOR.
Definition: Discovery.h:85
TypeObjectEncoding type_object_encoding() const
static bool got_global_transport_config
static bool got_liveliness_factor
bool monitor_enabled_
Enable Monitor functionality.
static bool got_publisher_content_filter
#define ACE_TEXT_ALWAYS_CHAR(STRING)
static bool got_log_verbose
static bool got_security_flag
int liveliness_factor_
The propagation delay factor.
static bool got_default_discovery
static bool got_persistent_data_dir
static bool got_chunk_association_multiplier
static bool got_type_object_encoding
bool bidir_giop_
Enable TAO&#39;s Bidirectional GIOP?
static bool got_debug_level
OpenDDS_Dcps_Export unsigned int Transport_debug_level
Transport Logging verbosity level.
Definition: debug.cpp:25
NetworkAddress default_address_
The default network address to use.
OpenDDS_Dcps_Export void set_DCPS_debug_level(unsigned int lvl)
Definition: debug.cpp:98
static bool got_log_fname
int federation_recovery_duration_
The FederationRecoveryDuration value in seconds.
char ACE_TCHAR
int federation_liveliness_
This FederationLivelinessDuration.
static bool got_security_debug
ACE_CString persistent_data_dir_
The PERSISTENT data durability directory.
static bool got_thread_status_interval
void parse_flags(const ACE_TCHAR *flags)
Definition: debug.cpp:134
bool set_repo_ior(const char *ior, Discovery::RepoKey key=Discovery::DEFAULT_REPO, bool attach_participant=true)
static bool got_transport_debug_level
static bool got_bit_transport_ip
int set(const ACE_INET_Addr &)
ACE_TEXT("TCP_Factory")
int atoi(const char *s)
ACE_TString bit_transport_ip_
The builtin topic transport address.
static bool got_log_level
OpenDDS_Dcps_Export LogLevel log_level
static bool got_default_address
static bool got_bit_flag
static bool got_bit_lookup_duration_msec
int federation_initial_backoff_seconds_
The FederationInitialBackoffSeconds value.
void set_debug_level(unsigned level)
Definition: debug.cpp:182
static bool got_use_rti_serialization
static bool got_bit_transport_port
int federation_backoff_multiplier_
This FederationBackoffMultiplier.
static bool got_bidir_giop
#define ACE_ERROR_RETURN(X, Y)
static ACE_TString config_fname(ACE_TEXT(""))
static bool got_pending_timeout
bool publisher_content_filter_
Allow the publishing side to do content filtering?
bool fake_encryption
Disable all encryption for security, even the required builtin encryption.
Definition: debug.h:146
OpenDDS_Dcps_Export SecurityDebug security_debug
Definition: debug.cpp:32
static bool got_security_fake_encryption

◆ parse_domain_range()

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

Definition at line 2546 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().

2546  {
2547  const std::size_t dash_pos = range.find("-", 0);
2548 
2549  if (dash_pos == std::string::npos || dash_pos == range.length() - 1) {
2550  start = end = -1;
2551  ACE_ERROR_RETURN((LM_ERROR,
2552  ACE_TEXT("(%P|%t) Service_Participant::parse_domain_range(): ")
2553  ACE_TEXT("%s missing '-' in [%s/%C] section.\n"),
2555  -1);
2556  }
2557 
2558  if (!convertToInteger(range.substr(0, dash_pos), start)) {
2559  start = end = -1;
2560  ACE_ERROR_RETURN((LM_ERROR,
2561  ACE_TEXT("(%P|%t) Service_Participant::parse_domain_range(): ")
2562  ACE_TEXT("Illegal integer value for start %s (%C) in [%s/%C] section.\n"),
2563  DOMAIN_RANGE_SECTION_NAME, range.substr(0, dash_pos).c_str(),
2564  DOMAIN_RANGE_SECTION_NAME, range.c_str()),
2565  -1);
2566  }
2567  if (DCPS_debug_level > 0) {
2568  ACE_DEBUG((LM_DEBUG,
2569  ACE_TEXT("(%P|%t) Service_Participant::parse_domain_range(): ")
2570  ACE_TEXT("(%P|%t) [%s/%C]: range_start == %d\n"),
2572  range.c_str(), start));
2573  }
2574 
2575  if (!convertToInteger(range.substr(dash_pos + 1), end)) {
2576  ACE_ERROR_RETURN((LM_ERROR,
2577  ACE_TEXT("(%P|%t) Service_Participant::parse_domain_range(): ")
2578  ACE_TEXT("Illegal integer value for end %s (%C) in [%s/%C] section.\n"),
2579  DOMAIN_RANGE_SECTION_NAME, range.substr(0, dash_pos).c_str(),
2580  DOMAIN_RANGE_SECTION_NAME, range.c_str()),
2581  -1);
2582  }
2583 
2584  if (DCPS_debug_level > 0) {
2585  ACE_DEBUG((LM_DEBUG,
2586  ACE_TEXT("(%P|%t) Service_Participant::parse_domain_range(): ")
2587  ACE_TEXT("(%P|%t) [%s/%C]: range_end == %d\n"),
2588  DOMAIN_RANGE_SECTION_NAME, range.c_str(), end));
2589  }
2590 
2591  if (end < start) {
2592  ACE_ERROR_RETURN((LM_ERROR,
2593  ACE_TEXT("(%P|%t) Service_Participant::parse_domain_range(): ")
2594  ACE_TEXT("Range End %d is less than range start %d in [%s/%C] section.\n"),
2595  end, start, DOMAIN_RANGE_SECTION_NAME, range.c_str()),
2596  -1);
2597  }
2598 
2599  return 0;
2600 }
#define ACE_DEBUG(X)
static const ACE_TCHAR DOMAIN_RANGE_SECTION_NAME[]
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
#define ACE_ERROR_RETURN(X, Y)
bool convertToInteger(const String &s, T &value)

◆ 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 2636 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().

2637 {
2638  // get the discovery info
2639  OPENDDS_VECTOR(DiscoveryInfo)::const_iterator dit;
2640  for (dit = discovery_infos_.begin(); dit != discovery_infos_.end(); ++dit) {
2641  if (discovery_name == dit->discovery_name) {
2642  break;
2643  }
2644  }
2645 
2646  if (dit != discovery_infos_.end()) {
2647  // add discovery info to customs
2648  for (ValueMap::const_iterator i = dit->disc_info.begin(); i != dit->disc_info.end(); ++i) {
2649  customs[i->first] = i->second;
2650  if (DCPS_debug_level > 0) {
2651  ACE_DEBUG((LM_DEBUG,
2652  ACE_TEXT("(%P|%t) Service_Participant::")
2653  ACE_TEXT("process_customizations(): adding config %C=%C\n"),
2654  i->first.c_str(), i->second.c_str()));
2655  }
2656  }
2657 
2658  // update customs valuemap with any customizations
2659  for (ValueMap::const_iterator i = dit->customizations.begin(); i != dit->customizations.end(); ++i) {
2660  if (i->first == "InteropMulticastOverride" && i->second == "AddDomainId") {
2661  OPENDDS_STRING addr = customs["InteropMulticastOverride"];
2662  size_t pos = addr.find_last_of(".");
2663  if (pos != OPENDDS_STRING::npos) {
2664  OPENDDS_STRING custom = addr.substr(pos + 1);
2665  int val = 0;
2666  if (!convertToInteger(custom, val)) {
2667  ACE_ERROR_RETURN((LM_ERROR,
2668  ACE_TEXT("(%P|%t) ERROR: Service_Participant::")
2669  ACE_TEXT("process_customizations(): ")
2670  ACE_TEXT("could not convert %C to integer\n"),
2671  custom.c_str()),
2672  false);
2673  }
2674  val += id;
2675  addr = addr.substr(0, pos);
2676  addr += "." + to_dds_string(val);
2677  } else {
2678  ACE_ERROR_RETURN((LM_ERROR,
2679  ACE_TEXT("(%P|%t) ERROR: Service_Participant::")
2680  ACE_TEXT("process_customizations(): ")
2681  ACE_TEXT("could not AddDomainId for %s\n"),
2682  customs["InteropMulticastOverride"].c_str()),
2683  false);
2684  }
2685 
2686  customs["InteropMulticastOverride"] = addr;
2687  }
2688  }
2689  }
2690 
2691  return true;
2692 }
#define ACE_DEBUG(X)
String to_dds_string(unsigned short to_convert)
#define OPENDDS_STRING
OPENDDS_VECTOR(DomainRange) domain_ranges_
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
#define ACE_ERROR_RETURN(X, Y)
bool convertToInteger(const String &s, T &value)

◆ 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 1502 of file Service_Participant.cpp.

References discovery_types_.

1504 {
1505  discovery_types_[section_name].reset(cfg);
1506 }

◆ 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 1049 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().

1052 {
1053  // Search the mappings for any domains mapped to this repository.
1054  OPENDDS_VECTOR(DDS::DomainId_t) domainList;
1055  {
1057 
1058  for (DomainRepoMap::const_iterator current = this->domainRepoMap_.begin();
1059  current != this->domainRepoMap_.end();
1060  ++current) {
1061  if (current->second == oldKey) {
1062  domainList.push_back(current->first);
1063  }
1064  }
1065  }
1066 
1067  // Remap the domains that were attached to this repository.
1068  for (unsigned int index = 0; index < domainList.size(); ++index) {
1069  // For mapped domains, attach their participants by setting the
1070  // mapping again.
1071  this->set_repo_domain(domainList[ index], newKey, attach_participant);
1072  }
1073 }
#define ACE_GUARD(MUTEX, OBJ, LOCK)
DomainRepoMap domainRepoMap_
The DomainId to RepoKey mapping.
void set_repo_domain(const DDS::DomainId_t domain, Discovery::RepoKey repo, bool attach_participant=true)
Bind DCPSInfoRepo IORs to domains.
ACE_Recursive_Thread_Mutex maps_lock_
Guard access to the internal maps.
DOMAINID_TYPE_NATIVE DomainId_t
OPENDDS_VECTOR(DomainRange) domain_ranges_

◆ repository_lost()

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

Failover to a new repository.

Definition at line 1176 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().

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

◆ 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 1271 of file Service_Participant.cpp.

References defaultDiscovery_.

1272 {
1273  this->defaultDiscovery_ = key;
1274 }
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 1076 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().

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

1002 {
1003  if (DCPS_debug_level > 0) {
1004  ACE_DEBUG((LM_DEBUG,
1005  ACE_TEXT("(%P|%t) Service_Participant::set_repo_ior: Repo[%C] == %C\n"),
1006  key.c_str(), ior));
1007  }
1008 
1009  // This is a global used for the bizarre commandline/configfile
1010  // processing done for this class.
1011  got_info = true;
1012 
1013  if (key == "-1") {
1015  }
1016 
1018  if (!discovery_types_.count(repo_type)) {
1019  // Re-use a transport registry function to attempt a dynamic load of the
1020  // library that implements the 'repo_type' (InfoRepoDiscovery)
1021  TheTransportRegistry->load_transport_lib(repo_type);
1022  }
1023 
1024  if (discovery_types_.count(repo_type)) {
1026  cf.open();
1028  ACE_TString section = REPO_SECTION_NAME;
1029  section += ACE_TEXT('\\');
1030  section += ACE_TEXT_CHAR_TO_TCHAR(key.c_str());
1031  cf.open_section(cf.root_section(), section.c_str(), true /*create*/, sect_key);
1032  cf.set_string_value(sect_key, ACE_TEXT("RepositoryIor"),
1033  ACE_TEXT_CHAR_TO_TCHAR(ior));
1034 
1035  discovery_types_[repo_type]->discovery_config(cf);
1036 
1037  this->remap_domains(key, key, attach_participant);
1038  return true;
1039  }
1040 
1041  ACE_ERROR_RETURN((LM_ERROR,
1042  ACE_TEXT("(%P|%t) Service_Participant::set_repo_ior ")
1043  ACE_TEXT("ERROR - no discovery type registered for ")
1044  ACE_TEXT("InfoRepoDiscovery\n")),
1045  false);
1046 }
#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
static const char * DEFAULT_REPO
Key value for the default repository IOR.
Definition: Discovery.h:85
sequence< octet > key
static const ACE_TCHAR REPO_SECTION_NAME[]
#define ACE_TEXT_ALWAYS_CHAR(STRING)
virtual const ACE_Configuration_Section_Key & root_section(void) const
#define OPENDDS_STRING
void remap_domains(Discovery::RepoKey oldKey, Discovery::RepoKey newKey, bool attach_participant=true)
Rebind a domain from one repository to another.
#define ACE_TEXT_CHAR_TO_TCHAR(STRING)
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
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 2786 of file Service_Participant.cpp.

References shutdown_listener_.

2787 {
2788  shutdown_listener_ = listener;
2789 }
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 }
#define ACE_DEBUG(X)
RcHandle< InternalTopic< NetworkInterfaceAddress > > network_interface_address_topic_
#define ACE_ERROR(X)
const ReturnCode_t RETCODE_PRECONDITION_NOT_MET
RcHandle< DomainParticipantFactoryImpl > dp_factory_servant_
DomainRepoMap domainRepoMap_
The DomainId to RepoKey mapping.
const ReturnCode_t RETCODE_ALREADY_DELETED
NetworkConfigMonitor_rch network_config_monitor_
unique_ptr< DataDurabilityCache > transient_data_cache_
The TRANSIENT data durability cache.
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
const ReturnCode_t RETCODE_OUT_OF_RESOURCES
void disconnect(RcHandle< InternalTopic< NetworkInterfaceAddress > > topic)
static void close()
Close the singleton instance of this class.
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
OpenDDS_Dcps_Export LogLevel log_level
const ReturnCode_t RETCODE_ERROR
AtomicBool shut_down_
Used to track state of service participant.
static TransportRegistry * instance()
Return a singleton instance of this class.
const ReturnCode_t RETCODE_OK
unique_ptr< DataDurabilityCache > persistent_data_cache_
The PERSISTENT data durability cache.
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
RcHandle< ShutdownListener > shutdown_listener_
RepoKeyDiscoveryMap discoveryMap_
The RepoKey to Discovery object 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 2954 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.

2955 {
2956  struct NameValue {
2957  const char* name;
2959  };
2960  static const NameValue entries[] = {
2961  {"Normal", Encoding_Normal},
2962  {"WriteOldFormat", Encoding_WriteOldFormat},
2963  {"ReadOldFormat", Encoding_ReadOldFormat},
2964  };
2965  for (size_t i = 0; i < sizeof entries / sizeof entries[0]; ++i) {
2966  if (0 == std::strcmp(entries[i].name, encoding)) {
2967  type_object_encoding(entries[i].value);
2968  return;
2969  }
2970  }
2971  ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: Service_Participant::type_object_encoding: "
2972  "invalid encoding %C\n", encoding));
2973 }
#define ACE_ERROR(X)
const LogLevel::Value value
Definition: debug.cpp:61
TypeObjectEncoding type_object_encoding() const
const char *const name
Definition: debug.cpp:60
const DCPS::Encoding encoding(DCPS::Encoding::KIND_UNALIGNED_CDR, DCPS::ENDIAN_BIG)

◆ 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: