Skip to content

Commit

Permalink
[config] Rename host_group_name to shm_transport_domain (#1945)
Browse files Browse the repository at this point in the history
  • Loading branch information
Peguen authored Jan 24, 2025
1 parent 8ab86bf commit dfcb4b5
Show file tree
Hide file tree
Showing 48 changed files with 226 additions and 226 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ ProcessWidget::ProcessWidget(QWidget *parent)
host.name = "Host";
preconfigured_group_by_settings.push_back(host);

EcalmonTreeWidget::GroupSetting host_group;
host_group.group_by_columns = { (int)ProcessTreeModel::Columns::HOST_GROUP_NAME };
host_group.auto_expand = 0;
host_group.name = "Host Group";
preconfigured_group_by_settings.push_back(host_group);
EcalmonTreeWidget::GroupSetting shm_transport_domain;
shm_transport_domain.group_by_columns = { (int)ProcessTreeModel::Columns::SHM_TRANSPORT_DOMAIN };
shm_transport_domain.auto_expand = 0;
shm_transport_domain.name = "SHM Transport Domain";
preconfigured_group_by_settings.push_back(shm_transport_domain);

setGroupSettings(preconfigured_group_by_settings, group_by_enabled_columns);

Expand Down
10 changes: 5 additions & 5 deletions app/mon/mon_gui/src/widgets/models/process_tree_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ QVariant ProcessTreeItem::data(Columns column, Qt::ItemDataRole role) const
{
return process_.hname().c_str();
}
else if (column == Columns::HGNAME)
else if (column == Columns::SHM_TRANSPORT_DOMAIN)
{
return process_.hgname().c_str();
return process_.shm_transport_domain().c_str();
}
else if (column == Columns::PID)
{
Expand Down Expand Up @@ -118,7 +118,7 @@ QVariant ProcessTreeItem::data(Columns column, Qt::ItemDataRole role) const
else if ((role == Qt::ItemDataRole::DisplayRole) || (role == Qt::ItemDataRole::ToolTipRole))
{
if ((column == Columns::HNAME)
|| (column == Columns::HGNAME)
|| (column == Columns::SHM_TRANSPORT_DOMAIN)
|| (column == Columns::PNAME)
|| (column == Columns::UNAME))
{
Expand Down Expand Up @@ -157,7 +157,7 @@ QVariant ProcessTreeItem::data(Columns column, Qt::ItemDataRole role) const
else if (role == (Qt::ItemDataRole)ItemDataRoles::FilterRole) //-V1016 //-V547
{
if ((column == Columns::HNAME)
|| (column == Columns::HGNAME)
|| (column == Columns::SHM_TRANSPORT_DOMAIN)
|| (column == Columns::PNAME)
|| (column == Columns::UNAME))
{
Expand Down Expand Up @@ -243,7 +243,7 @@ QVariant ProcessTreeItem::data(Columns column, Qt::ItemDataRole role) const
else if (role == Qt::ItemDataRole::FontRole)
{
if ((column == Columns::HNAME)
|| (column == Columns::HGNAME)
|| (column == Columns::SHM_TRANSPORT_DOMAIN)
|| (column == Columns::PNAME)
|| (column == Columns::UNAME))
{
Expand Down
2 changes: 1 addition & 1 deletion app/mon/mon_gui/src/widgets/models/process_tree_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ProcessTreeItem :
{
RCLOCK,
HNAME,
HGNAME,
SHM_TRANSPORT_DOMAIN,
PID,
PNAME,
UNAME,
Expand Down
6 changes: 3 additions & 3 deletions app/mon/mon_gui/src/widgets/models/process_tree_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ProcessTreeModel : public GroupTreeModel
GROUP,
UNIT_NAME,
HOST_NAME,
HOST_GROUP_NAME,
SHM_TRANSPORT_DOMAIN,
PID,
PROCESS_NAME,
PARAMETERS,
Expand Down Expand Up @@ -85,7 +85,7 @@ class ProcessTreeModel : public GroupTreeModel
{ Columns::GROUP, "Group" },
{ Columns::UNIT_NAME, "Process" },
{ Columns::HOST_NAME, "Host" },
{ Columns::HOST_GROUP_NAME, "Host Group" },
{ Columns::SHM_TRANSPORT_DOMAIN, "Host Group" },
{ Columns::PID, "PID" },
{ Columns::PROCESS_NAME, "Process Path" },
{ Columns::PARAMETERS, "Command line" },
Expand All @@ -104,7 +104,7 @@ class ProcessTreeModel : public GroupTreeModel
{ Columns::GROUP, -1 },
{ Columns::UNIT_NAME, (int)ProcessTreeItem::Columns::UNAME },
{ Columns::HOST_NAME, (int)ProcessTreeItem::Columns::HNAME },
{ Columns::HOST_GROUP_NAME, (int)ProcessTreeItem::Columns::HGNAME},
{ Columns::SHM_TRANSPORT_DOMAIN, (int)ProcessTreeItem::Columns::SHM_TRANSPORT_DOMAIN},
{ Columns::PID, (int)ProcessTreeItem::Columns::PID },
{ Columns::PROCESS_NAME, (int)ProcessTreeItem::Columns::PNAME },
{ Columns::PARAMETERS, (int)ProcessTreeItem::Columns::PPARAM },
Expand Down
10 changes: 5 additions & 5 deletions app/mon/mon_gui/src/widgets/models/topic_tree_item.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2024 Continental Corporation
* Copyright (C) 2016 - 2025 Continental Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -52,9 +52,9 @@ QVariant TopicTreeItem::data(Columns column, Qt::ItemDataRole role) const
{
return topic_.hname().c_str();
}
else if (column == Columns::HGNAME)
else if (column == Columns::SHM_TRANSPORT_DOMAIN)
{
return topic_.hgname().c_str();
return topic_.shm_transport_domain().c_str();
}
else if (column == Columns::PID)
{
Expand Down Expand Up @@ -234,7 +234,7 @@ QVariant TopicTreeItem::data(Columns column, Qt::ItemDataRole role) const
else if (role == (Qt::ItemDataRole)ItemDataRoles::FilterRole) //-V1016 //-V547
{
if ((column == Columns::HNAME)
|| (column == Columns::HGNAME)
|| (column == Columns::SHM_TRANSPORT_DOMAIN)
|| (column == Columns::PNAME)
|| (column == Columns::UNAME)
|| (column == Columns::TNAME)
Expand Down Expand Up @@ -299,7 +299,7 @@ QVariant TopicTreeItem::data(Columns column, Qt::ItemDataRole role) const
{

if ((column == Columns::HNAME)
|| (column == Columns::HGNAME)
|| (column == Columns::SHM_TRANSPORT_DOMAIN)
|| (column == Columns::PNAME)
|| (column == Columns::UNAME)
|| (column == Columns::TNAME)
Expand Down
4 changes: 2 additions & 2 deletions app/mon/mon_gui/src/widgets/models/topic_tree_item.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2019 Continental Corporation
* Copyright (C) 2016 - 2025 Continental Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,7 +39,7 @@ class TopicTreeItem :
{
RCLOCK,
HNAME,
HGNAME,
SHM_TRANSPORT_DOMAIN,
PID,
PNAME,
UNAME,
Expand Down
8 changes: 4 additions & 4 deletions app/mon/mon_gui/src/widgets/models/topic_tree_model.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2019 Continental Corporation
* Copyright (C) 2016 - 2025 Continental Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -51,7 +51,7 @@ class TopicTreeModel : public GroupTreeModel
DIRECTION,
UNIT_NAME,
HOST_NAME,
HOST_GROUP_NAME,
SHM_TRANSPORT_DOMAIN,
PID,
PROCESS_NAME,
TOPIC_TYPE,
Expand Down Expand Up @@ -90,7 +90,7 @@ class TopicTreeModel : public GroupTreeModel
{ Columns::GROUP, "Group" },
{ Columns::HEARTBEAT, "Heartbeat" },
{ Columns::HOST_NAME, "Host" },
{ Columns::HOST_GROUP_NAME, "Host Group" },
{ Columns::SHM_TRANSPORT_DOMAIN, "SHM Transport Domain" },
{ Columns::PID, "PID" },
{ Columns::PROCESS_NAME, "Process Path" },
{ Columns::UNIT_NAME, "Process" },
Expand All @@ -114,7 +114,7 @@ class TopicTreeModel : public GroupTreeModel
{ Columns::GROUP, -1 },
{ Columns::HEARTBEAT, (int)TopicTreeItem::Columns::RCLOCK },
{ Columns::HOST_NAME, (int)TopicTreeItem::Columns::HNAME },
{ Columns::HOST_GROUP_NAME, (int)TopicTreeItem::Columns::HGNAME },
{ Columns::SHM_TRANSPORT_DOMAIN, (int)TopicTreeItem::Columns::SHM_TRANSPORT_DOMAIN },
{ Columns::PID, (int)TopicTreeItem::Columns::PID },
{ Columns::PROCESS_NAME, (int)TopicTreeItem::Columns::PNAME },
{ Columns::UNIT_NAME, (int)TopicTreeItem::Columns::UNAME },
Expand Down
4 changes: 2 additions & 2 deletions doc/rst/configuration/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ Registration settings are listed in the section ``registration``

enable to receive registration information on the same local machine

.. option:: host_group_name
.. option:: shm_transport_domain

``<hostname>``, default ``""``

host group name that enables interprocess mechanisms across (virtual) host borders (e.g. Docker);
shm transport domain that enables interprocess mechanisms across (virtual) host borders (e.g. Docker);
by default equivalent to local host name

.. option:: network_enabled
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/include/ecal/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace eCAL
ECAL_API size_t GetTcpPubsubWriterThreadpoolSize ();
ECAL_API int GetTcpPubsubMaxReconnectionAttemps ();

ECAL_API std::string GetHostGroupName ();
ECAL_API std::string GetShmTransportDomain ();

/////////////////////////////////////
// time
Expand Down
4 changes: 2 additions & 2 deletions ecal/core/include/ecal/config/registration.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* =========================== LICENSE =================================
*
* Copyright (C) 2016 - 2024 Continental Corporation
* Copyright (C) 2016 - 2025 Continental Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -69,7 +69,7 @@ namespace eCAL
bool network_enabled { false }; /*!< true = all eCAL components communicate over network boundaries
false = local host only communication (Default: false) */
bool loopback { true }; //!< enable to receive udp messages on the same local machine (Default: true)
std::string host_group_name { "" }; /*!< Common host group name that enables interprocess mechanisms across
std::string shm_transport_domain { "" }; /*!< Common shm transport domain that enables interprocess mechanisms across
(virtual) host borders (e.g, Docker); by default equivalent to local host name (Default: "") */
Layer::Configuration layer;
};
Expand Down
6 changes: 3 additions & 3 deletions ecal/core/include/ecal/process.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ namespace eCAL
ECAL_API std::string GetHostName();

/**
* @brief Get current host group name.
* @brief Get current SHM transport domain.
*
* @return Host group name or empty string if failed.
* @return SHM transport domain or empty string if failed.
**/
ECAL_API std::string GetHostGroupName();
ECAL_API std::string GetShmTransportDomain();

/**
* @brief Get current unit name (defined via eCAL::Initialize).
Expand Down
4 changes: 2 additions & 2 deletions ecal/core/include/ecal/types/monitoring.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace eCAL
{
int32_t rclock{0}; //!< registration clock (heart beat)
std::string hname; //!< host name
std::string hgname; //!< host group name
std::string shm_transport_domain; //!< shm transport domain
int32_t pid{0}; //!< process id
std::string pname; //!< process name
std::string uname; //!< unit name
Expand All @@ -100,7 +100,7 @@ namespace eCAL
{
int32_t rclock{0}; //!< registration clock
std::string hname; //!< host name
std::string hgname; //!< host group name
std::string shm_transport_domain; //!< shm transport domain
int32_t pid{0}; //!< process id
std::string pname; //!< process name
std::string uname; //!< unit name
Expand Down
14 changes: 7 additions & 7 deletions ecal/core/src/config/builder/registration_attribute_builder.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2024 Continental Corporation
* Copyright (C) 2016 - 2025 Continental Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,12 +26,12 @@ namespace eCAL
{
Registration::SAttributes attr;

attr.timeout = std::chrono::milliseconds(reg_config_.registration_timeout);
attr.refresh = reg_config_.registration_refresh;
attr.network_enabled = reg_config_.network_enabled;
attr.loopback = reg_config_.loopback;
attr.host_name = eCAL::Process::GetHostName();
attr.host_group_name = reg_config_.host_group_name;
attr.timeout = std::chrono::milliseconds(reg_config_.registration_timeout);
attr.refresh = reg_config_.registration_refresh;
attr.network_enabled = reg_config_.network_enabled;
attr.loopback = reg_config_.loopback;
attr.host_name = eCAL::Process::GetHostName();
attr.shm_transport_domain = reg_config_.shm_transport_domain;

attr.process_id = process_id_;

Expand Down
12 changes: 6 additions & 6 deletions ecal/core/src/config/configuration_to_yaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ namespace YAML
node["registration_refresh"] = config_.registration_refresh;
node["network_enabled"] = config_.network_enabled;
node["loopback"] = config_.loopback;
node["host_group_name"] = config_.host_group_name;
node["shm_transport_domain"] = config_.shm_transport_domain;
return node;
}

Expand All @@ -153,11 +153,11 @@ namespace YAML
AssignValue<bool>(config_.loopback, node_, "loopback");
AssignValue<eCAL::Registration::Layer::Configuration>(config_.layer, node_, "layer");

// By default the host_group_name is set with the current host name.
// If the user does not specify the host group name in the yaml, leave it like it is.
std::string host_group_name;
AssignValue<std::string>(host_group_name, node_, "host_group_name");
if (!host_group_name.empty()) config_.host_group_name = host_group_name;
// By default the shm_transport_domain is set with the current host name.
// If the user does not specify the shm transport domain in the yaml, leave it like it is.
std::string shm_transport_domain;
AssignValue<std::string>(shm_transport_domain, node_, "shm_transport_domain");
if (!shm_transport_domain.empty()) config_.shm_transport_domain = shm_transport_domain;

return true;
}
Expand Down
4 changes: 2 additions & 2 deletions ecal/core/src/config/default_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ namespace eCAL
ss << R"( registration_timeout: )" << config_.registration.registration_timeout << "\n";
ss << R"( # Enable to receive registration information on the same local machine)" << "\n";
ss << R"( loopback: )" << config_.registration.loopback << "\n";
ss << R"( # Host group name that enables interprocess mechanisms across (virtual))" << "\n";
ss << R"( # SHM transport domain that enables interprocess mechanisms across (virtual))" << "\n";
ss << R"( # host borders (e.g, Docker); by default equivalent to local host name)" << "\n";
ss << R"( host_group_name: )" << quoteString(config_.registration.host_group_name) << "\n";
ss << R"( shm_transport_domain: )" << quoteString(config_.registration.shm_transport_domain) << "\n";
ss << R"( # true = all eCAL components communicate over network boundaries)" << "\n";
ss << R"( # false = local host only communication (Default: false))" << "\n";
ss << R"( network_enabled: )" << config_.registration.network_enabled << "\n";
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/src/config/ecal_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace eCAL
size_t GetTcpPubsubWriterThreadpoolSize () { return GetConfiguration().transport_layer.tcp.number_executor_writer;}
int GetTcpPubsubMaxReconnectionAttemps () { return GetConfiguration().transport_layer.tcp.max_reconnections;}

std::string GetHostGroupName () { return GetConfiguration().registration.host_group_name; }
std::string GetShmTransportDomain () { return GetConfiguration().registration.shm_transport_domain; }

/////////////////////////////////////
// time
Expand Down
6 changes: 3 additions & 3 deletions ecal/core/src/ecal_process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ namespace eCAL

sstream << "------------------------- NETWORK --------------------------------" << '\n';
sstream << "Host name : " << Process::GetHostName() << '\n';
sstream << "Host group name : " << Process::GetHostGroupName() << '\n';
sstream << "SHM transport domain : " << Process::GetShmTransportDomain() << '\n';

if (Config::IsNetworkEnabled())
{
Expand Down Expand Up @@ -245,9 +245,9 @@ namespace eCAL
return(g_host_name);
}

std::string GetHostGroupName()
std::string GetShmTransportDomain()
{
return Config::GetHostGroupName().empty() ? GetHostName() : Config::GetHostGroupName();
return Config::GetShmTransportDomain().empty() ? GetHostName() : Config::GetShmTransportDomain();
}

std::string GetUnitName()
Expand Down
Loading

0 comments on commit dfcb4b5

Please sign in to comment.