Capability - Mysterious Pings
Capability Identifier:
https://tildagon.badge.emfcamp.org/capabilities/registry/example/
Consume mysterious stochastic pings of unknown origin. Who knows where they're coming from! What should you do with them? That's up to you.
Consumers
Subscribe to the event named "mysterious_ping" on the event bus. It contains no data.
class MysteriousPingConsumerApp:
def __init__(self):
eventbus.on("mysterious_ping", mysterious_ping_handler, app)
def mysterious_ping_handler():
blink_leds_rapidly()
For more info on the event bus, see the EventBus docs
Providers
When you feel mysterious, emit an event of type mysterious_ping on the event bus.
from events.custom import CustomEvent
class MysteriousPingProviderApp:
def __init__(self):
pass
def mysteriously():
eventbus.emit(CustomEvent(type="mysterious_ping", data={}))