Scenic.PubSub.publish

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

publish(source_id, data)

View Source

Specs

publish(source_id :: atom(), data :: any()) :: :ok

Publish a data point from a data source.

When a data source uses publish/2 to publish data, that data is recorded in the cache and a

  {{Scenic.PubSub, :data}, {source_id, my_value, timestamp}}

message is sent to each subscriber. The timestamp is the current time in microseconds as returned from :os.system_time(:micro_seconds).

Parameters

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

Return Value

On success, returns :ok

It returns {:error, :not_registered} if the caller is not the registered process for the data source.