mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[ntcore] Unify listeners (#4536)
This combines all 4 NT listener APIs (topic, value, connection, and logging) into a single unified listener API.
This commit is contained in:
@@ -13,11 +13,12 @@ wpi::mutex InstanceImpl::s_mutex;
|
||||
using namespace std::placeholders;
|
||||
|
||||
InstanceImpl::InstanceImpl(int inst)
|
||||
: logger_impl(inst),
|
||||
logger(
|
||||
std::bind(&LoggerImpl::Log, &logger_impl, _1, _2, _3, _4)), // NOLINT
|
||||
connectionList(inst),
|
||||
localStorage(inst, logger),
|
||||
: listenerStorage{inst},
|
||||
logger_impl{listenerStorage},
|
||||
logger{
|
||||
std::bind(&LoggerImpl::Log, &logger_impl, _1, _2, _3, _4)}, // NOLINT
|
||||
connectionList{inst, listenerStorage},
|
||||
localStorage{inst, listenerStorage, logger},
|
||||
m_inst{inst} {
|
||||
logger.set_min_level(logger_impl.GetMinLevel());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user