Files
softbus_OPC/tools/topic_watcher.cpp

16 lines
472 B
C++
Raw Permalink Normal View History

2026-06-11 19:00:49 +08:00
#include <softbus_bus/Bus.h>
#include <iostream>
#include <string>
int main()
{
auto& bus = softbus::bus::Bus::instance();
bus.subscribe("#", [](const softbus::bus::BusMessage& msg) {
std::cout << "[topic] " << msg.topic << std::endl;
});
std::cout << "topic_watcher: attach to daemon process is standalone demo only." << std::endl;
std::cout << "Use daemon logs or integrate watcher via shared bus in-process." << std::endl;
return 0;
}