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

creation register unregister data races #45

Merged
merged 13 commits into from
Mar 22, 2024
Prev Previous commit
Next Next commit
descgate depends on registration
  • Loading branch information
rex-schilasky committed Mar 20, 2024
commit 5867c67a7e25977c3a0d9501dbde864cf6ce6fc1
4 changes: 4 additions & 0 deletions ecal/core/src/ecal_descgate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,20 @@ namespace eCAL

void CDescGate::Create()
{
#if ECAL_CORE_REGISTRATION
// utilize registration provider and receiver to get descriptions
g_registration_provider()->SetCustomApplySampleCallback("descgate", [this](const auto& sample_) {this->ApplySample(sample_, tl_none); });
g_registration_receiver()->SetCustomApplySampleCallback("descgate", [this](const auto& sample_) {this->ApplySample(sample_, tl_none); });
#endif
}

void CDescGate::Destroy()
{
#if ECAL_CORE_REGISTRATION
// stop registration provider and receiver utilization to get descriptions
g_registration_provider()->RemCustomApplySampleCallback("descgate");
g_registration_receiver()->RemCustomApplySampleCallback("descgate");
#endif
}

void CDescGate::GetTopics(std::unordered_map<std::string, SDataTypeInformation>& topic_info_map_)
Expand Down
Loading