Skip to content

Commit

Permalink
Merge pull request OpenDDS#4488 from jrw972/opendds-prefix-not-needed
Browse files Browse the repository at this point in the history
`OPENDDS` prefix is not necessary in ConfigStore
  • Loading branch information
jrw972 authored Feb 26, 2024
2 parents 1c22955 + fe67f27 commit 8a80ceb
Show file tree
Hide file tree
Showing 14 changed files with 270 additions and 270 deletions.
22 changes: 11 additions & 11 deletions dds/DCPS/ConfigStoreImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ ConfigStoreImpl::get_boolean(const char* key,

if (debug_logging) {
ACE_DEBUG((LM_DEBUG, "(%P|%t) %C: ConfigStoreImpl::get_boolean: %C=%C\n",
OPENDDS_CONFIG_DEBUG_LOGGING,
CONFIG_DEBUG_LOGGING,
cp.key().c_str(),
retval ? "true" : "false"));
}
Expand Down Expand Up @@ -230,7 +230,7 @@ ConfigStoreImpl::get_int32(const char* key,

if (debug_logging) {
ACE_DEBUG((LM_DEBUG, "(%P|%t) %C: ConfigStoreImpl::get_int32: %C=%d\n",
OPENDDS_CONFIG_DEBUG_LOGGING,
CONFIG_DEBUG_LOGGING,
cp.key().c_str(),
retval));

Expand Down Expand Up @@ -279,7 +279,7 @@ ConfigStoreImpl::get_uint32(const char* key,

if (debug_logging) {
ACE_DEBUG((LM_DEBUG, "(%P|%t) %C: ConfigStoreImpl::get_int32: %C=%u\n",
OPENDDS_CONFIG_DEBUG_LOGGING,
CONFIG_DEBUG_LOGGING,
cp.key().c_str(),
retval));

Expand Down Expand Up @@ -326,7 +326,7 @@ ConfigStoreImpl::get_float64(const char* key,

if (debug_logging) {
ACE_DEBUG((LM_DEBUG, "(%P|%t) %C: ConfigStoreImpl::get_float64: %C=%g\n",
OPENDDS_CONFIG_DEBUG_LOGGING,
CONFIG_DEBUG_LOGGING,
cp.key().c_str(),
retval));

Expand Down Expand Up @@ -369,7 +369,7 @@ ConfigStoreImpl::get_string(const char* key,

if (debug_logging) {
ACE_DEBUG((LM_DEBUG, "(%P|%t) %C: ConfigStoreImpl::get_string: %C=%C\n",
OPENDDS_CONFIG_DEBUG_LOGGING,
CONFIG_DEBUG_LOGGING,
cp.key().c_str(),
retval.in()));

Expand Down Expand Up @@ -416,7 +416,7 @@ ConfigStoreImpl::get_duration(const char* key,

if (debug_logging) {
ACE_DEBUG((LM_DEBUG, "(%P|%t) %C: ConfigStoreImpl::get_duration: %C=%C\n",
OPENDDS_CONFIG_DEBUG_LOGGING,
CONFIG_DEBUG_LOGGING,
cp.key().c_str(),
to_dds_string(retval).c_str()));

Expand Down Expand Up @@ -468,7 +468,7 @@ ConfigStoreImpl::get(const char* key,

if (debug_logging) {
ACE_DEBUG((LM_DEBUG, "(%P|%t) %C: ConfigStoreImpl::get: %C=%C\n",
OPENDDS_CONFIG_DEBUG_LOGGING,
CONFIG_DEBUG_LOGGING,
cp.key().c_str(),
retval.c_str()));

Expand Down Expand Up @@ -626,7 +626,7 @@ ConfigStoreImpl::get(const char* key,

if (debug_logging) {
ACE_DEBUG((LM_DEBUG, "(%P|%t) %C: ConfigStoreImpl::get: %C=%C\n",
OPENDDS_CONFIG_DEBUG_LOGGING,
CONFIG_DEBUG_LOGGING,
cp.key().c_str(),
time_duration_to_string(retval, format).c_str()));
}
Expand Down Expand Up @@ -806,7 +806,7 @@ ConfigStoreImpl::get(const char* key,

if (debug_logging) {
ACE_DEBUG((LM_DEBUG, "(%P|%t) %C: ConfigStoreImpl::get: %C=%C\n",
OPENDDS_CONFIG_DEBUG_LOGGING,
CONFIG_DEBUG_LOGGING,
cp.key().c_str(),
LogAddr(retval.to_addr()).c_str()));
}
Expand Down Expand Up @@ -967,7 +967,7 @@ ConfigStoreImpl::get(const char* key,

if (debug_logging) {
ACE_DEBUG((LM_DEBUG, "(%P|%t) %C: ConfigStoreImpl::get: %C=%C\n",
OPENDDS_CONFIG_DEBUG_LOGGING,
CONFIG_DEBUG_LOGGING,
key,
network_address_set_to_string(retval, format).c_str()));
}
Expand Down Expand Up @@ -1051,7 +1051,7 @@ take_has_prefix(ConfigReader_rch reader,
return false;
}

bool ConfigStoreImpl::debug_logging = OPENDDS_CONFIG_DEBUG_LOGGING_default;
bool ConfigStoreImpl::debug_logging = CONFIG_DEBUG_LOGGING_default;

void
process_section(ConfigStoreImpl& config_store,
Expand Down
4 changes: 2 additions & 2 deletions dds/DCPS/ConfigStoreImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
namespace OpenDDS {
namespace DCPS {

const char OPENDDS_CONFIG_DEBUG_LOGGING[] = "OPENDDS_CONFIG_DEBUG_LOGGING";
const bool OPENDDS_CONFIG_DEBUG_LOGGING_default = false;
const char CONFIG_DEBUG_LOGGING[] = "CONFIG_DEBUG_LOGGING";
const bool CONFIG_DEBUG_LOGGING_default = false;

OpenDDS_Dcps_Export
OPENDDS_VECTOR(String) split(const String& str,
Expand Down
8 changes: 4 additions & 4 deletions dds/DCPS/InfoRepoDiscovery/InfoRepoDiscovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ namespace DCPS {

InfoRepoDiscovery::InfoRepoDiscovery(const String& name)
: name_(name)
, config_prefix_(ConfigPair::canonicalize("OPENDDS_REPOSITORY_" + name))
, config_prefix_(ConfigPair::canonicalize("REPOSITORY_" + name))
, use_bidir_giop_(TheServiceParticipant->use_bidir_giop())
, orb_from_user_(false)
, config_store_(make_rch<ConfigStoreImpl>(TheServiceParticipant->config_topic()))
Expand All @@ -146,7 +146,7 @@ InfoRepoDiscovery::InfoRepoDiscovery(const String& name)
InfoRepoDiscovery::InfoRepoDiscovery(const String& name,
const DCPSInfo_var& info)
: name_(name)
, config_prefix_(ConfigPair::canonicalize("OPENDDS_REPOSITORY_" + name))
, config_prefix_(ConfigPair::canonicalize("REPOSITORY_" + name))
, info_(info)
, use_bidir_giop_(TheServiceParticipant->use_bidir_giop())
, orb_from_user_(false)
Expand Down Expand Up @@ -289,7 +289,7 @@ String
InfoRepoDiscovery::ior() const
{
return TheServiceParticipant->config_store()->get(config_key("RepositoryIor").c_str(),
(key() == Discovery::DEFAULT_REPO) ? TheServiceParticipant->config_store()->get(OPENDDS_COMMON_DCPS_INFO_REPO, "file://repo.ior") : "");
(key() == Discovery::DEFAULT_REPO) ? TheServiceParticipant->config_store()->get(COMMON_DCPS_INFO_REPO, "file://repo.ior") : "");
}

TransportConfig_rch
Expand Down Expand Up @@ -950,7 +950,7 @@ InfoRepoDiscovery::Config::discovery_config()
const Service_Participant::RepoKeyDiscoveryMap& discoveryMap = TheServiceParticipant->discoveryMap();

typedef OPENDDS_VECTOR(String) VecType;
const VecType cseq = TheServiceParticipant->config_store()->get_section_names("OPENDDS_REPOSITORY");
const VecType cseq = TheServiceParticipant->config_store()->get_section_names("REPOSITORY");
for (VecType::const_iterator pos = cseq.begin(), limit = cseq.end(); pos != limit; ++pos) {
if (discoveryMap.find(*pos) == discoveryMap.end()) {
InfoRepoDiscovery_rch discovery(make_rch<InfoRepoDiscovery>(*pos));
Expand Down
54 changes: 27 additions & 27 deletions dds/DCPS/RTPS/ICE/Ice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,136 +18,136 @@ OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
namespace OpenDDS {
namespace ICE {

const char OPENDDS_ICE_TA[] = "OPENDDS_ICE_TA";
const char OPENDDS_ICE_CONNECTIVITY_CHECK_TTL[] = "OPENDDS_ICE_CONNECTIVITY_CHECK_TTL";
const char OPENDDS_ICE_CHECKLIST_PERIOD[] = "OPENDDS_ICE_CHECKLIST_PERIOD";
const char OPENDDS_ICE_INDICATION_PERIOD[] = "OPENDDS_ICE_INDICATION_PERIOD";
const char OPENDDS_ICE_NOMINATED_TTL[] = "OPENDDS_ICE_NOMINATED_TTL";
const char OPENDDS_ICE_SERVER_REFLEXIVE_ADDRESS_PERIOD[] = "OPENDDS_ICE_SERVER_REFLEXIVE_ADDRESS_PERIOD";
const char OPENDDS_ICE_SERVER_REFLEXIVE_INDICATION_COUNT[] = "OPENDDS_ICE_SERVER_REFLEXIVE_INDICATION_COUNT";
const char OPENDDS_ICE_DEFERRED_TRIGGERED_CHECK_TTL[] = "OPENDDS_ICE_DEFERRED_TRIGGERED_CHECK_TTL";
const char OPENDDS_ICE_CHANGE_PASSWORD_PERIOD[] = "OPENDDS_ICE_CHANGE_PASSWORD_PERIOD";
const char ICE_TA[] = "ICE_TA";
const char ICE_CONNECTIVITY_CHECK_TTL[] = "ICE_CONNECTIVITY_CHECK_TTL";
const char ICE_CHECKLIST_PERIOD[] = "ICE_CHECKLIST_PERIOD";
const char ICE_INDICATION_PERIOD[] = "ICE_INDICATION_PERIOD";
const char ICE_NOMINATED_TTL[] = "ICE_NOMINATED_TTL";
const char ICE_SERVER_REFLEXIVE_ADDRESS_PERIOD[] = "ICE_SERVER_REFLEXIVE_ADDRESS_PERIOD";
const char ICE_SERVER_REFLEXIVE_INDICATION_COUNT[] = "ICE_SERVER_REFLEXIVE_INDICATION_COUNT";
const char ICE_DEFERRED_TRIGGERED_CHECK_TTL[] = "ICE_DEFERRED_TRIGGERED_CHECK_TTL";
const char ICE_CHANGE_PASSWORD_PERIOD[] = "ICE_CHANGE_PASSWORD_PERIOD";

void Configuration::T_a(const DCPS::TimeDuration& x)
{
TheServiceParticipant->config_store()->set(OPENDDS_ICE_TA,
TheServiceParticipant->config_store()->set(ICE_TA,
x,
DCPS::ConfigStoreImpl::Format_IntegerMilliseconds);
}

DCPS::TimeDuration Configuration::T_a() const
{
return TheServiceParticipant->config_store()->get(OPENDDS_ICE_TA,
return TheServiceParticipant->config_store()->get(ICE_TA,
DCPS::TimeDuration(0, 50000),
DCPS::ConfigStoreImpl::Format_IntegerMilliseconds);
}

void Configuration::connectivity_check_ttl(const DCPS::TimeDuration& x)
{
TheServiceParticipant->config_store()->set(OPENDDS_ICE_CONNECTIVITY_CHECK_TTL,
TheServiceParticipant->config_store()->set(ICE_CONNECTIVITY_CHECK_TTL,
x,
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}

DCPS::TimeDuration Configuration::connectivity_check_ttl() const
{
return TheServiceParticipant->config_store()->get(OPENDDS_ICE_CONNECTIVITY_CHECK_TTL,
return TheServiceParticipant->config_store()->get(ICE_CONNECTIVITY_CHECK_TTL,
DCPS::TimeDuration(5 * 60),
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}

void Configuration::checklist_period(const DCPS::TimeDuration& x)
{
TheServiceParticipant->config_store()->set(OPENDDS_ICE_CHECKLIST_PERIOD,
TheServiceParticipant->config_store()->set(ICE_CHECKLIST_PERIOD,
x,
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}

DCPS::TimeDuration Configuration::checklist_period() const
{
return TheServiceParticipant->config_store()->get(OPENDDS_ICE_CHECKLIST_PERIOD,
return TheServiceParticipant->config_store()->get(ICE_CHECKLIST_PERIOD,
DCPS::TimeDuration(10),
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}

void Configuration::indication_period(const DCPS::TimeDuration& x)
{
TheServiceParticipant->config_store()->set(OPENDDS_ICE_INDICATION_PERIOD,
TheServiceParticipant->config_store()->set(ICE_INDICATION_PERIOD,
x,
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}

DCPS::TimeDuration Configuration::indication_period() const
{
return TheServiceParticipant->config_store()->get(OPENDDS_ICE_INDICATION_PERIOD,
return TheServiceParticipant->config_store()->get(ICE_INDICATION_PERIOD,
DCPS::TimeDuration(15),
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}

void Configuration::nominated_ttl(const DCPS::TimeDuration& x)
{
TheServiceParticipant->config_store()->set(OPENDDS_ICE_NOMINATED_TTL,
TheServiceParticipant->config_store()->set(ICE_NOMINATED_TTL,
x,
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}

DCPS::TimeDuration Configuration::nominated_ttl() const
{
return TheServiceParticipant->config_store()->get(OPENDDS_ICE_NOMINATED_TTL,
return TheServiceParticipant->config_store()->get(ICE_NOMINATED_TTL,
DCPS::TimeDuration(5 * 60),
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}

void Configuration::server_reflexive_address_period(const DCPS::TimeDuration& x)
{
TheServiceParticipant->config_store()->set(OPENDDS_ICE_SERVER_REFLEXIVE_ADDRESS_PERIOD,
TheServiceParticipant->config_store()->set(ICE_SERVER_REFLEXIVE_ADDRESS_PERIOD,
x,
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}

DCPS::TimeDuration Configuration::server_reflexive_address_period() const
{
return TheServiceParticipant->config_store()->get(OPENDDS_ICE_SERVER_REFLEXIVE_ADDRESS_PERIOD,
return TheServiceParticipant->config_store()->get(ICE_SERVER_REFLEXIVE_ADDRESS_PERIOD,
DCPS::TimeDuration(30),
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}

void Configuration::server_reflexive_indication_count(size_t x)
{
TheServiceParticipant->config_store()->set_uint32(OPENDDS_ICE_SERVER_REFLEXIVE_INDICATION_COUNT,
TheServiceParticipant->config_store()->set_uint32(ICE_SERVER_REFLEXIVE_INDICATION_COUNT,
static_cast<DDS::UInt32>(x));
}

size_t Configuration::server_reflexive_indication_count() const
{
return TheServiceParticipant->config_store()->get_uint32(OPENDDS_ICE_SERVER_REFLEXIVE_INDICATION_COUNT,
return TheServiceParticipant->config_store()->get_uint32(ICE_SERVER_REFLEXIVE_INDICATION_COUNT,
10);
}

void Configuration::deferred_triggered_check_ttl(const DCPS::TimeDuration& x)
{
TheServiceParticipant->config_store()->set(OPENDDS_ICE_DEFERRED_TRIGGERED_CHECK_TTL,
TheServiceParticipant->config_store()->set(ICE_DEFERRED_TRIGGERED_CHECK_TTL,
x,
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}

DCPS::TimeDuration Configuration::deferred_triggered_check_ttl() const
{
return TheServiceParticipant->config_store()->get(OPENDDS_ICE_DEFERRED_TRIGGERED_CHECK_TTL,
return TheServiceParticipant->config_store()->get(ICE_DEFERRED_TRIGGERED_CHECK_TTL,
DCPS::TimeDuration(5 * 60),
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}

void Configuration::change_password_period(const DCPS::TimeDuration& x)
{
TheServiceParticipant->config_store()->set(OPENDDS_ICE_CHANGE_PASSWORD_PERIOD,
TheServiceParticipant->config_store()->set(ICE_CHANGE_PASSWORD_PERIOD,
x,
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}

DCPS::TimeDuration Configuration::change_password_period() const
{
return TheServiceParticipant->config_store()->get(OPENDDS_ICE_CHANGE_PASSWORD_PERIOD,
return TheServiceParticipant->config_store()->get(ICE_CHANGE_PASSWORD_PERIOD,
DCPS::TimeDuration(5 * 60),
DCPS::ConfigStoreImpl::Format_IntegerSeconds);
}
Expand Down
Loading

0 comments on commit 8a80ceb

Please sign in to comment.