[hal,ntcore,cscore] Update Handle constants to all caps

This commit is contained in:
Peter Johnson
2026-03-16 21:49:21 -07:00
parent aa88fa0fcf
commit 4059797635
57 changed files with 283 additions and 281 deletions

View File

@@ -31,7 +31,7 @@ void LoggerTest::Generate() {
// generate error message
wpi::nt::Publish(wpi::nt::Handle(wpi::nt::Handle{m_inst}.GetInst(), 5,
wpi::nt::Handle::kTopic),
wpi::nt::Handle::TOPIC),
NT_DOUBLE, "");
}

View File

@@ -25,26 +25,26 @@ void PrintTo(const Event& event, std::ostream* os) {
void PrintTo(const Handle& handle, std::ostream* os) {
*os << "Handle{";
switch (handle.GetType()) {
case Handle::kListener:
*os << "kListener";
case Handle::LISTENER:
*os << "LISTENER";
break;
case Handle::kListenerPoller:
*os << "kListenerPoller";
case Handle::LISTENER_POLLER:
*os << "LISTENER_POLLER";
break;
case Handle::kEntry:
*os << "kEntry";
case Handle::ENTRY:
*os << "ENTRY";
break;
case Handle::kInstance:
*os << "kInstance";
case Handle::INSTANCE:
*os << "INSTANCE";
break;
case Handle::kTopic:
case Handle::TOPIC:
*os << "kTopic";
break;
case Handle::kSubscriber:
*os << "kSubscriber";
case Handle::SUBSCRIBER:
*os << "SUBSCRIBER";
break;
case Handle::kPublisher:
*os << "kPublisher";
case Handle::PUBLISHER:
*os << "PUBLISHER";
break;
default:
*os << "UNKNOWN";

View File

@@ -378,7 +378,7 @@ TEST_F(ServerImplTest, ZeroTimestampNegativeTime) {
// publish before client connect
server.SetLocal(&local, &queue);
constexpr int pubuid = 1;
NT_Topic topicHandle = wpi::nt::Handle{0, 1, wpi::nt::Handle::kTopic};
NT_Topic topicHandle = wpi::nt::Handle{0, 1, wpi::nt::Handle::TOPIC};
constexpr int subuid = 1;
Value defaultValue = Value::MakeDouble(1.0, 10);
defaultValue.SetTime(0);