Yamaha MusicCast™ v0.1.1 MusicCast.Network

A module for supervising a network of MusicCast devices.

Summary

Functions

Adds a new device to the network

Starts a network as part of a supervision tree

Subscribes the current process to notifications from the given device

Unsubscribes the current process from notification from the given device

Returns the PID for the registered device id

Returns a list of all registered devices

Functions

Adds a new device to the network.

start_link(options \\ [])

Starts a network as part of a supervision tree.

subscribe(device_id)
subscribe(MusicCast.Network.Entity.device_id) ::
  {:ok, pid} |
  {:error, {:already_registered, pid}}

Subscribes the current process to notifications from the given device.

unsubscribe(device_id)
unsubscribe(MusiCast.Network.device_id) :: :ok

Unsubscribes the current process from notification from the given device.

Returns the PID for the registered device id.

which_devices(keys \\ :lazy)
which_devices(MusicCast.Network.Entity.lookup_opts) :: [tuple]

Returns a list of all registered devices.