Difference between revisions of "Developer:Davaar:ProductService"

From LinnDocs
Jump to: navigation, search
(Room)
m
 
(100 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Architecture Overview =
+
See http://wiki.openhome.org/wiki/Av:Developer:ProductService
 
 
The Product service manages fundamental network presentation attributes for the Product such as Name and Room. It also handles Standby state and source control.
 
 
 
== Network Attributes ==
 
 
 
==== Linked Products ====
 
 
 
A physical product may contain more than one Product and thus be presented as more than one Product service on the network. An example of this would be a preamplifier with an embedded DS source. In this scenario the two Product services are '''''Linked''''' (internally grouped). Linked Products share certain key parameters such as Standby and Room (ie changing Standby on one Product will automatically change the Standby state on all other Products in that '''''Linked''''' group).
 
 
 
==== Attributes ====
 
 
 
==== Manufacturer ====
 
 
 
==== Model ====
 
 
 
Model reports the model name of the hardware device (example ''Majik DS''). Model is read only.
 
 
 
==== Name ====
 
 
 
This is the Product name. The Upnp '''''Friendly Name''''' is derived by combining Room and Name in the format {'''''Room : Name'''''}. By default the Name is the same as the Model.
 
 
 
==== Type ====
 
 
 
This is the Product type (ie Source, Preamp). Type is read only.
 
 
 
==== Room ====
 
 
 
This is the name of the room where the Product is located. Room is used to group the Product with other Products in the same physical room. The Upnp '''''Friendly Name''''' is derived by combining Room and Name in the format {'''''Room : Name'''''}. Products which are '''''Linked''''' always share the same Room name. Room is set to '''''Main Room''''' by default.
 
 
 
==== Product ====
 
 
 
== Standby ==
 
 
 
This is the Standby state of the physical product. Standby can be changed using the SetStandby function. Products which are '''''Linked''''' always share the same Standby state.
 
 
 
== Source Control ==
 
 
 
The Product Service maintains a list of all sources within the Product. The size of this list is fixed for each Product and reported by the SourceCount function. Each source can then be referenced by its unique source index* in the list. Only one source, and thus one index, can be active at any given time. When a new source is selected the previous source is automatically deactivated before activating the new source. [* source index is zero based, ie 0,1,2,3,4,5..n, where n=listsize-1]
 
 
 
==== Source Index ====
 
 
 
The current (ie currently active) source can be changed by source index or source name. The function SetSourceIndex is used to change by index. If the index is out of range an error will be reported. SetSourceIndexByName is used to change to the source whose name matches that specified. If a source of the specified name does not exist, the source will not change and no error will be reported.
 
 
 
==== SourceCount ====
 
 
 
SourceCount returns the number of sources that exist in the Product (ie the source list size). SourceCount is read only.
 
 
 
 
 
== Source Specific Parameters ==
 
Each source has four fundamental parameters, '''SourceSystemName''', '''SourceName''', '''SourceVisible''' and '''SourceType'''.
 
 
 
==== SourceSystemName ====
 
 
 
SourceSystemName is a unique fixed name string used to identify each source. SourceSystemName is read only. It can only be read via the '''Source''' action.
 
 
 
==== SourceName ====
 
 
 
SourceName is a unique name string assigned to each source. In the default state, for a given source index, SourceName matches SourceSystemName. It can be read via the '''Source''' action, or the SourceXml action.
 
 
 
==== SourceType ====
 
 
 
SourceType is a unique type string assigned to each source. SourceType is read only. It can be read via the '''Source''' action, or the SourceXml action.
 
 
 
==== SourceVisible ====
 
 
 
SourceVisible is a unique flag assigned to each source. This flag is used to indicate whether the source is to be displayed (front panel, GUI etc) when browsing through the source list. '''Note - a source's "visibility" does not affect its ability to be selected/activated via the functions SetSourceIndex and SetCurrentSourceByName.'''It can be read via the '''Source''' action, or the SourceXml action.
 
 
 
====SourceXml====
 
SourceXml returns a list of all source specific parameters, for every source, in XML format.
 
 
 
====SourceXmlChangeCount====
 
SourceXmlChangeCount returns a count indicating the number of times SourceXml has been updated. This is useful for control points that do not support eventing.
 
 
 
====Source====
 
Source returns all source parameters for a given source index.
 
 
 
= API Reference =
 
 
 
[http://oss.linn.co.uk/trac/browser/Main/LibUpnpCil/Services/Openhome/Product1.xml Product Service Description (XML)]
 
 
 
= Migration Guide =
 
 
 
== Upnp Action Name Changes ==
 
 
 
None.
 
 
 
== Obsolete Functions ==
 
 
 
The following actions, which relate to configuration, have been removed from the Product service:
 
 
 
===== Network Attribute Actions=====
 
*SetName
 
*SetRoom
 
 
 
===== Source Control Actions=====
 
*SetStartupSourceIndex
 
*StartupSourceIndex
 
*SetStartupSourceIndexByName
 
*SetStartupSourceEnabled
 
*StartupSourceEnabled
 
 
 
===== Source Specific Actions=====
 
*SetSourceVisible
 
*SetSourceName
 

Latest revision as of 08:40, 21 November 2018