MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / getEventName

Function getEventName

Tactility/Source/kernel/SystemEvents.cpp:24–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22static std::list<SubscriptionData> subscriptions;
23
24static const char* getEventName(SystemEvent event) {
25 switch (event) {
26 using enum SystemEvent;
27 case BootInitHalBegin:
28 return TT_STRINGIFY(BootInitHalBegin);
29 case BootInitHalEnd:
30 return TT_STRINGIFY(BootInitHalEnd);
31 case BootSplash:
32 return TT_STRINGIFY(BootSplash);
33 case NetworkConnected:
34 return TT_STRINGIFY(NetworkConnected);
35 case NetworkDisconnected:
36 return TT_STRINGIFY(NetworkDisconnected);
37 case Time:
38 return TT_STRINGIFY(Time);
39 }
40
41 check(false); // Missing case above
42}
43
44void publishSystemEvent(SystemEvent event) {
45 LOGGER.info("{}", getEventName(event));

Callers 1

publishSystemEventFunction · 0.85

Calls 1

checkFunction · 0.50

Tested by

no test coverage detected