Difference between revisions of "Developer:Davaar:ProductService"

From LinnDocs
Jump to: navigation, search
(Obsolete Functions)
m
 
(137 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 ===
 
 
 
=== Product ===
 
 
 
=== 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.
 
 
 
== 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.
 
 
 
 
 
===SourceXml===
 
SourceXml provides a list of all parameters, for all sources, in XML format.
 
 
 
 
 
===SourceXmlChangeCount===
 
 
 
===Source===
 
 
 
= 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 ==
 
 
 
The names of the following actions have changed:
 
 
 
== Obsolete Functions ==
 
 
 
The SetName function has been removed from the Product service in line with all other configuration settings.
 
 
 
The SetRoom function has been removed from the Product service in line with all other configuration settings.
 
 
 
The StartupSourceIndex function has been removed from the Product service in line with all other configuration settings.
 
 
 
The SetStartupSourceIndexByName function has been removed from the Product service in line with all other configuration settings.
 
 
 
The StartupSourceEnabled function has been removed from the Product service in line with all other configuration settings.
 
 
 
 
 
 
 
=== StartupSource ===
 
 
 
There are two parameters associated with StartupSource, StartupSourceIndex and StartupSourceEnabled. StartupSourceIndex defines what source index should automatically be activated when coming out of standby. When StartupSourceEnabled is set to true, StartupSourceIndex will be applied whenever the Product comes out of standby. If StartupSourceEnabled is false when the Product comes out of standby, the current source will retain the setting it was at prior to entering standby. StartupSourceIndex can be changed using the SetStartupSourceIndex function or the SetStartupSourceIndexByName function. StartupSourceEnabled can be changed using the SetStartupSourceEnabled function.
 
 
 
 
 
 
 
=== SourceSystemName ===
 
 
 
SourceSystemName is a unique fixed name string used to identify each source. SourceSystemName is read only.
 
 
 
=== SourceName ===
 
 
 
SourceName is a unique name string assigned to each source. In the default state, for a given source index, SourceName matches SourceSystemName. SourceName can be changed using the SetSourceName function.
 
 
 
=== SourceType ===
 
 
 
SourceType is a unique type string assigned to each source. SourceType is read only.
 
 
 
=== 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. SourceVisible can be changed using the SetSourceVisible function.
 
'''Note - disabling this flag on a source will not prevent the source from being selected/activated via the functions SetSourceIndex and SetCurrentSourceByName.'''
 

Latest revision as of 08:40, 21 November 2018