I have a case where I don't control the signal I'm receiving and it varies in what is passed. I'm trying to do something like what is below, but getting compiler issues. Can you recommend how to handle this case?
What I have so far...
template<typename... arg_types> void cleanup_signal(arg_types... args) {
std::vector<std::any> arg_list = {args ...};
for (auto& arg : arg_list)
{
if(arg.type() == typeid(const std::string&)) {
on_signal(std::any_cast<const std::string&>(arg));
return;
}
}
}
Used by:
proxy = sdbus::createProxy(destination_name, object_path);
proxy->uponSignal(signal).onInterface(interface_name).call([this](auto... args) {
cleanup_signal(args...);
});
I have a case where I don't control the signal I'm receiving and it varies in what is passed. I'm trying to do something like what is below, but getting compiler issues. Can you recommend how to handle this case?
What I have so far...
Used by: