Yamaha MusicCast™ v0.1.3 MusicCast.Network.Entity

A module for managing MusicCast™ enabled devices.

A network entity is automatically started when a MusicCast enabled device is discovered. See the MusicCast.UPnP.SSDPClient for implementation details. Once started, the entity process is available to the network registry via it MusicCast device ID. See MusicCast.whereis/1 and MusicCast.which_devices/1 for more details about the network registry.

Each entity process keeps it state synchronized with the device it is paired with. This task is acomplished by the MusicCast.Network.EventListener process which forwards incoming YXC unicast messages to the affected entity processes. See MusicCast.subscribe/1 and MusicCast.unsubscribe/1 for more details.

Summary

Functions

Looks-up the value(s) for the given key(s)

Plays the given URL

Starts an entity as part of a supervision tree

Types

device_id()
device_id() :: String.t
ip_address()
ip_address() :: {0..255, 0..255, 0..255, 0..255}
lookup_key()
lookup_key ::
  :host |
  :upnp |
  :device_id |
  :network_name |
  :status |
  :playback
lookup_keys()
lookup_keys() :: [lookup_key] | lookup_key
upnp_desc()
upnp_desc() :: Map.t

Functions

__lookup__(pid, keys)
__lookup__(GenServer.server, lookup_keys) :: [term] | term

Looks-up the value(s) for the given key(s).

play_url(pid, url)
play_url(pid, String.t) :: :ok | {:error, term}

Plays the given URL.

start_link(addr, upnp_desc, options \\ [])

Starts an entity as part of a supervision tree.

stop(pid)

See GenServer.stop/1.