Skip to content

Commit

Permalink
Further renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
KerstinKeller committed Aug 6, 2024
1 parent abf5e69 commit b5779ea
Show file tree
Hide file tree
Showing 16 changed files with 144 additions and 144 deletions.
16 changes: 8 additions & 8 deletions ecal/core/src/ecal_descgate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ namespace eCAL
response_type.name = method.resp_type;
response_type.descriptor = method.resp_desc;

ApplyServiceDescription(m_service_info_map, sample_.service.sname, method.mname, std::stoull(sample_.producer.id), request_type, response_type, GetDataTypeInfoQuality(request_type, true), GetDataTypeInfoQuality(response_type, true));
ApplyServiceDescription(m_service_info_map, sample_.service.sname, method.mname, std::stoull(sample_.identifier.entity_id), request_type, response_type, GetDataTypeInfoQuality(request_type, true), GetDataTypeInfoQuality(response_type, true));
}
}
break;
case bct_unreg_service:
RemServiceDescription(m_service_info_map, sample_.service.sname, std::stoull(sample_.producer.id));
RemServiceDescription(m_service_info_map, sample_.service.sname, std::stoull(sample_.identifier.entity_id));
break;
case bct_reg_client:
for (const auto& method : sample_.client.methods)
Expand All @@ -143,23 +143,23 @@ namespace eCAL
response_type.name = method.resp_type;
response_type.descriptor = method.resp_desc;

ApplyServiceDescription(m_client_info_map, sample_.client.sname, method.mname, std::stoull(sample_.producer.id), request_type, response_type, GetDataTypeInfoQuality(request_type, false), GetDataTypeInfoQuality(response_type, false));
ApplyServiceDescription(m_client_info_map, sample_.client.sname, method.mname, std::stoull(sample_.identifier.entity_id), request_type, response_type, GetDataTypeInfoQuality(request_type, false), GetDataTypeInfoQuality(response_type, false));
}
break;
case bct_unreg_client:
RemServiceDescription(m_client_info_map, sample_.client.sname, std::stoull(sample_.producer.id));
RemServiceDescription(m_client_info_map, sample_.client.sname, std::stoull(sample_.identifier.entity_id));
break;
case bct_reg_publisher:
ApplyTopicDescription(m_publisher_info_map, sample_.topic.tname, std::stoull(sample_.producer.id), sample_.topic.tdatatype, GetDataTypeInfoQuality(sample_.topic.tdatatype, true));
ApplyTopicDescription(m_publisher_info_map, sample_.topic.tname, std::stoull(sample_.identifier.entity_id), sample_.topic.tdatatype, GetDataTypeInfoQuality(sample_.topic.tdatatype, true));
break;
case bct_unreg_publisher:
RemTopicDescription(m_publisher_info_map, sample_.topic.tname, std::stoull(sample_.producer.id));
RemTopicDescription(m_publisher_info_map, sample_.topic.tname, std::stoull(sample_.identifier.entity_id));
break;
case bct_reg_subscriber:
ApplyTopicDescription(m_subscriber_info_map, sample_.topic.tname, std::stoull(sample_.producer.id), sample_.topic.tdatatype, GetDataTypeInfoQuality(sample_.topic.tdatatype, false));
ApplyTopicDescription(m_subscriber_info_map, sample_.topic.tname, std::stoull(sample_.identifier.entity_id), sample_.topic.tdatatype, GetDataTypeInfoQuality(sample_.topic.tdatatype, false));
break;
case bct_unreg_subscriber:
RemTopicDescription(m_subscriber_info_map, sample_.topic.tname, std::stoull(sample_.producer.id));
RemTopicDescription(m_subscriber_info_map, sample_.topic.tname, std::stoull(sample_.identifier.entity_id));
break;
default:
{
Expand Down
45 changes: 23 additions & 22 deletions ecal/core/src/monitoring/ecal_monitoring_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ namespace eCAL
bool CMonitoringImpl::RegisterTopic(const Registration::Sample& sample_, enum ePubSub pubsub_type_)
{
const auto& sample_topic = sample_.topic;
const int process_id = sample_.producer.process_id;
const int process_id = sample_.identifier.process_id;
const std::string& topic_name = sample_topic.tname;
const int32_t topic_size = sample_topic.tsize;
bool topic_tlayer_ecal_udp(false);
Expand Down Expand Up @@ -253,11 +253,11 @@ namespace eCAL
const std::lock_guard<std::mutex> lock(pTopicMap->sync);

// common infos
const std::string& host_name = sample_.producer.host_name;
const std::string& host_name = sample_.identifier.host_name;
const std::string& host_group_name = sample_topic.hgname;
const std::string& process_name = sample_topic.pname;
const std::string& unit_name = sample_topic.uname;
const std::string& topic_id = sample_.producer.id;
const std::string& topic_id = sample_.identifier.entity_id;
std::string direction;
switch (pubsub_type_)
{
Expand Down Expand Up @@ -338,7 +338,7 @@ namespace eCAL
{
const auto& sample_topic = sample_.topic;
const std::string& topic_name = sample_topic.tname;
const std::string& topic_id = sample_.producer.id;
const std::string& topic_id = sample_.identifier.entity_id;

// unregister from topic map
STopicMonMap* pTopicMap = GetMap(pubsub_type_);
Expand All @@ -358,10 +358,10 @@ namespace eCAL
bool CMonitoringImpl::RegisterProcess(const Registration::Sample& sample_)
{
const auto& sample_process = sample_.process;
const std::string& host_name = sample_.producer.host_name;
const std::string& host_name = sample_.identifier.host_name;
const std::string& host_group_name = sample_process.hgname;
const std::string& process_name = sample_process.pname;
const int process_id = sample_.producer.process_id;
const int process_id = sample_.identifier.process_id;
const std::string& process_param = sample_process.pparam;
const std::string& unit_name = sample_process.uname;
const auto& sample_process_state = sample_process.state;
Expand Down Expand Up @@ -409,7 +409,7 @@ namespace eCAL
{
const auto& sample_process = sample_.process;
const std::string& process_name = sample_process.pname;
const int process_id = sample_.producer.process_id;
const int process_id = sample_.identifier.process_id;

// create map key
const std::string process_name_id = process_name + std::to_string(process_id);
Expand All @@ -425,10 +425,10 @@ namespace eCAL

bool CMonitoringImpl::RegisterServer(const Registration::Sample& sample_)
{
const auto& sample_producer = sample_.producer;
const std::string& service_id = sample_producer.id;
const int32_t process_id = sample_producer.process_id;
const std::string& host_name = sample_producer.host_name;
const auto& sample_identifier = sample_.identifier;
const std::string& service_id = sample_identifier.entity_id;
const int32_t process_id = sample_identifier.process_id;
const std::string& host_name = sample_identifier.host_name;

const auto& sample_service = sample_.service;
const std::string& service_name = sample_service.sname;
Expand Down Expand Up @@ -477,11 +477,12 @@ namespace eCAL

bool CMonitoringImpl::UnregisterServer(const Registration::Sample& sample_)
{
const auto& sample_service = sample_.service;
const auto& sample_producer = sample_.producer;
const auto& sample_service = sample_.service;
const auto& sample_identifier = sample_.identifier;

const std::string& service_name = sample_service.sname;
const std::string& service_id = sample_producer.id;
const int process_id = sample_producer.process_id;
const std::string& service_id = sample_identifier.entity_id;
const int process_id = sample_identifier.process_id;

// create map key
const std::string service_name_id = service_name + service_id + std::to_string(process_id);
Expand All @@ -497,10 +498,10 @@ namespace eCAL

bool CMonitoringImpl::RegisterClient(const Registration::Sample& sample_)
{
const auto& sample_producer = sample_.producer;
const std::string& service_id = sample_producer.id;
const int32_t process_id = sample_producer.process_id;
const std::string& host_name = sample_producer.host_name;
const auto& sample_identifier = sample_.identifier;
const std::string& service_id = sample_identifier.entity_id;
const int32_t process_id = sample_identifier.process_id;
const std::string& host_name = sample_identifier.host_name;

const auto& sample_client = sample_.client;
const std::string& service_name = sample_client.sname;
Expand Down Expand Up @@ -544,9 +545,9 @@ namespace eCAL

bool CMonitoringImpl::UnregisterClient(const Registration::Sample& sample_)
{
const auto& sample_producer = sample_.producer;
const std::string& service_id = sample_producer.id;
const int32_t process_id = sample_producer.process_id;
const auto& sample_identifier = sample_.identifier;
const std::string& service_id = sample_identifier.entity_id;
const int32_t process_id = sample_identifier.process_id;

const auto& sample_client = sample_.client;
const std::string& service_name = sample_client.sname;
Expand Down
12 changes: 6 additions & 6 deletions ecal/core/src/pubsub/ecal_pubgate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ namespace eCAL

// TODO: Substitute ProducerInfo type
CDataWriter::SSubscriptionInfo subscription_info;
subscription_info.host_name = ecal_sample_.producer.host_name;
subscription_info.topic_id = ecal_sample_.producer.id;
subscription_info.process_id = ecal_sample_.producer.process_id;
subscription_info.host_name = ecal_sample_.identifier.host_name;
subscription_info.topic_id = ecal_sample_.identifier.entity_id;
subscription_info.process_id = ecal_sample_.identifier.process_id;
const SDataTypeInformation topic_information = ecal_topic.tdatatype;

CDataWriter::SLayerStates layer_states;
Expand Down Expand Up @@ -183,9 +183,9 @@ namespace eCAL

//TODO: Remove the subscription info type
CDataWriter::SSubscriptionInfo subscription_info;
subscription_info.host_name = ecal_sample_.producer.host_name;
subscription_info.topic_id = ecal_sample_.producer.id;
subscription_info.process_id = ecal_sample_.producer.process_id;
subscription_info.host_name = ecal_sample_.identifier.host_name;
subscription_info.topic_id = ecal_sample_.identifier.entity_id;
subscription_info.process_id = ecal_sample_.identifier.process_id;

// unregister subscriber
const std::shared_lock<std::shared_timed_mutex> lock(m_topic_name_datawriter_sync);
Expand Down
12 changes: 6 additions & 6 deletions ecal/core/src/pubsub/ecal_subgate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ namespace eCAL

// TODO: Remove the PublicationInfo type
CDataReader::SPublicationInfo publication_info;
publication_info.host_name = ecal_sample_.producer.host_name;
publication_info.topic_id = ecal_sample_.producer.id;
publication_info.process_id = ecal_sample_.producer.process_id;
publication_info.host_name = ecal_sample_.identifier.host_name;
publication_info.topic_id = ecal_sample_.identifier.entity_id;
publication_info.process_id = ecal_sample_.identifier.process_id;
const SDataTypeInformation topic_information = ecal_topic.tdatatype;

CDataReader::SLayerStates layer_states;
Expand Down Expand Up @@ -285,9 +285,9 @@ namespace eCAL

// TODO: Remove the SPublicationInfo type!
CDataReader::SPublicationInfo publication_info;
publication_info.host_name = ecal_sample_.producer.host_name;
publication_info.topic_id = ecal_sample_.producer.id;
publication_info.process_id = ecal_sample_.producer.process_id;
publication_info.host_name = ecal_sample_.identifier.host_name;
publication_info.topic_id = ecal_sample_.identifier.entity_id;
publication_info.process_id = ecal_sample_.identifier.process_id;

// unregister publisher
const std::shared_lock<std::shared_timed_mutex> lock(m_topic_name_datareader_sync);
Expand Down
16 changes: 8 additions & 8 deletions ecal/core/src/readwrite/ecal_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,10 +570,10 @@ namespace eCAL
Registration::Sample ecal_reg_sample;
ecal_reg_sample.cmd_type = bct_reg_subscriber;

auto& ecal_reg_sample_producer = ecal_reg_sample.producer;
ecal_reg_sample_producer.process_id = m_pid;
ecal_reg_sample_producer.id = m_topic_id;
ecal_reg_sample_producer.host_name = m_host_name;
auto& ecal_reg_sample_identifier = ecal_reg_sample.identifier;
ecal_reg_sample_identifier.process_id = m_pid;
ecal_reg_sample_identifier.entity_id = m_topic_id;
ecal_reg_sample_identifier.host_name = m_host_name;

auto& ecal_reg_sample_topic = ecal_reg_sample.topic;
ecal_reg_sample_topic.hgname = m_host_group_name;
Expand Down Expand Up @@ -649,10 +649,10 @@ namespace eCAL
Registration::Sample ecal_unreg_sample;
ecal_unreg_sample.cmd_type = bct_unreg_subscriber;

auto& ecal_reg_sample_producer = ecal_unreg_sample.producer;
ecal_reg_sample_producer.process_id = m_pid;
ecal_reg_sample_producer.id = m_topic_id;
ecal_reg_sample_producer.host_name = m_host_name;
auto& ecal_reg_sample_identifier = ecal_unreg_sample.identifier;
ecal_reg_sample_identifier.process_id = m_pid;
ecal_reg_sample_identifier.entity_id = m_topic_id;
ecal_reg_sample_identifier.host_name = m_host_name;

auto& ecal_reg_sample_topic = ecal_unreg_sample.topic;
ecal_reg_sample_topic.hgname = m_host_group_name;
Expand Down
16 changes: 8 additions & 8 deletions ecal/core/src/readwrite/ecal_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,10 @@ namespace eCAL
Registration::Sample ecal_reg_sample;
ecal_reg_sample.cmd_type = bct_reg_publisher;

auto& ecal_reg_sample_producer = ecal_reg_sample.producer;
ecal_reg_sample_producer.process_id = m_pid;
ecal_reg_sample_producer.id = m_topic_id;
ecal_reg_sample_producer.host_name = m_host_name;
auto& ecal_reg_sample_identifier = ecal_reg_sample.identifier;
ecal_reg_sample_identifier.process_id = m_pid;
ecal_reg_sample_identifier.entity_id = m_topic_id;
ecal_reg_sample_identifier.host_name = m_host_name;

auto& ecal_reg_sample_topic = ecal_reg_sample.topic;
ecal_reg_sample_topic.hgname = m_host_group_name;
Expand Down Expand Up @@ -713,10 +713,10 @@ namespace eCAL
Registration::Sample ecal_unreg_sample;
ecal_unreg_sample.cmd_type = bct_unreg_publisher;

auto& ecal_reg_sample_producer = ecal_unreg_sample.producer;
ecal_reg_sample_producer.process_id = m_pid;
ecal_reg_sample_producer.id = m_topic_id;
ecal_reg_sample_producer.host_name = m_host_name;
auto& ecal_reg_sample_identifier = ecal_unreg_sample.identifier;
ecal_reg_sample_identifier.process_id = m_pid;
ecal_reg_sample_identifier.entity_id = m_topic_id;
ecal_reg_sample_identifier.host_name = m_host_name;

auto& ecal_reg_sample_topic = ecal_unreg_sample.topic;
ecal_reg_sample_topic.hgname = m_host_group_name;
Expand Down
12 changes: 6 additions & 6 deletions ecal/core/src/registration/ecal_process_registration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ eCAL::Registration::Sample eCAL::Registration::GetProcessRegisterSample()
Registration::Sample process_sample;
process_sample.cmd_type = bct_reg_process;

auto& process_sample_producer = process_sample.producer;
process_sample_producer.host_name = eCAL::Process::GetHostName();
process_sample_producer.process_id = eCAL::Process::GetProcessID();
auto& process_sample_identifier = process_sample.identifier;
process_sample_identifier.host_name = eCAL::Process::GetHostName();
process_sample_identifier.process_id = eCAL::Process::GetProcessID();

auto& process_sample_process = process_sample.process;
process_sample_process.hgname = eCAL::Process::GetHostGroupName();
Expand Down Expand Up @@ -98,9 +98,9 @@ eCAL::Registration::Sample eCAL::Registration::GetProcessUnregisterSample()
Registration::Sample process_sample;
process_sample.cmd_type = bct_unreg_process;

auto& process_sample_producer = process_sample.producer;
process_sample_producer.host_name = eCAL::Process::GetHostName();
process_sample_producer.process_id = eCAL::Process::GetProcessID();
auto& process_sample_identifier = process_sample.identifier;
process_sample_identifier.host_name = eCAL::Process::GetHostName();
process_sample_identifier.process_id = eCAL::Process::GetProcessID();

auto& process_sample_process = process_sample.process;
process_sample_process.pname = eCAL::Process::GetProcessName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace eCAL
bool CSampleApplier::IsHostGroupMember(const Registration::Sample& sample_) const
{
std::string host_group_name;
std::string host_name = sample_.producer.host_name;
const std::string host_name = sample_.identifier.host_name;
switch (sample_.cmd_type)
{
case bct_reg_publisher:
Expand Down Expand Up @@ -96,7 +96,7 @@ namespace eCAL
bool CSampleApplier::IsSameProcess(const Registration::Sample& sample_) const
{
// is this actually sufficient? should we also check host_name?
int32_t pid = sample_.producer.process_id;
const int32_t pid = sample_.identifier.process_id;
return pid == m_pid;
}

Expand Down
Loading

0 comments on commit b5779ea

Please sign in to comment.