Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] subscriber configuration #1604

Merged
merged 2 commits into from
May 17, 2024
Merged

Conversation

rex-schilasky
Copy link
Contributor

Description

CSubscriber configuration introduced.

@rex-schilasky rex-schilasky changed the title Feature/subscriber config [core] subscriber configuration May 17, 2024
@rex-schilasky rex-schilasky added the cherry-pick-to-NONE Don't cherry-pick these changes label May 17, 2024
Copy link
Contributor

@KerstinKeller KerstinKeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve, but we need to keep thinking about the two comments which I made.

@@ -96,6 +91,11 @@ namespace eCAL
return(m_created);
}

bool CSubscriber::Create(const std::string& topic_name_)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rex-schilasky why did you add this function?

udp.enable = eCAL::Config::IsUdpMulticastRecEnabled();

// tcp config
tcp.enable = eCAL::Config::IsTcpRecEnabled();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a bit strange, because you give default values in ecal_subscriber_config.h but then in the constructor, assign the values from eCAL::Config.
We need to align with @Peguen but I agree maybe it makes sense that the eCAL::Config has a way to fill them with values from the Ini file...

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

}

void CPubGate::Create()
void CPubGate::Start()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'Start' can be made static [readability-convert-member-functions-to-static]

ecal/core/src/pubsub/ecal_pubgate.h:43:

-     void Start();
+     static void Start();

}

bool CSubscriber::Create(const std::string& topic_name_, const SDataTypeInformation& topic_info_)
bool CSubscriber::Create(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const Subscriber::Configuration& config_)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: parameter 'config_' is unused [misc-unused-parameters]

Suggested change
bool CSubscriber::Create(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const Subscriber::Configuration& config_)
bool CSubscriber::Create(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const Subscriber::Configuration& /*config_*/)

@rex-schilasky rex-schilasky merged commit 410aae0 into master May 17, 2024
16 of 19 checks passed
@rex-schilasky rex-schilasky deleted the feature/subscriber-config branch May 17, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-to-NONE Don't cherry-pick these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants