Scenic.PubSub.subscribe

You're seeing just the function subscribe, go back to Scenic.PubSub module for more information.

Specs

subscribe(source_id :: atom()) :: :ok

Subscribe the calling process to receive events about a data source.

The messages the subscriber will start receiving about a data source are:

eventmessage sent to subscribers
data published{{Scenic.PubSub, :data}, {source_id, value, timestamp}}
source registered{{Scenic.PubSub, :registered}, {source_id, opts}}
source unregistered{{Scenic.PubSub, :unregistered}, source_id}

Parameters

  • source_id an atom that is registered to a data source.

Return Value

On success, returns :ok