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

Function publishSystemEvent

Tactility/Source/kernel/SystemEvents.cpp:44–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void publishSystemEvent(SystemEvent event) {
45 LOGGER.info("{}", getEventName(event));
46
47 if (mutex.lock(MAX_TICKS)) {
48 for (auto& subscription : subscriptions) {
49 if (subscription.event == event) {
50 subscription.handler(event);
51 }
52 }
53
54 mutex.unlock();
55 }
56}
57
58SystemEventSubscription subscribeSystemEvent(SystemEvent event, OnSystemEvent handler) {
59 if (mutex.lock(MAX_TICKS)) {

Callers 5

initFunction · 0.85
onTimeSyncedFunction · 0.85
eventHandlerFunction · 0.85
setTimeZoneFunction · 0.85
bootThreadCallbackMethod · 0.85

Calls 4

getEventNameFunction · 0.85
infoMethod · 0.80
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected