Difference between revisions of "Developer:Davaar:ProductService"

From LinnDocs
Jump to: navigation, search
(Architectural Overview)
m
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Architectural Overview =
+
See http://wiki.openhome.org/wiki/Av:Developer:ProductService
 
 
The Product service contains basic information concerning a single product. It contains information about what kind of device it is: the model, manufacturer, its name, its room, and details concerning each source within the product. Other basic functionality such as control of the product's standby state are also included.
 
 
 
It should be possible for a control point to create a complete map of the home by subscribing to the Product service of every device.
 
 
 
== Network Presentation ==
 
 
 
=== Attributes ===
 
Every product has one or more attributes indicating the key features supported by that product.
 
 
 
=== Manufacturer ===
 
There are '''four''' Manufacturer parameters; '''Name''', '''Info''', '''Url''' and '''ImageUri'''. They are all text strings.
 
 
 
==== Name ====
 
Name contains the Manufacturer name (example: "''Linn''"). Name is read only.
 
 
 
==== Info ====
 
Info contains more Manufacturer information (example "''Linn Products Ltd''"). Info is read only.
 
 
 
==== Url ====
 
Url contains the Manufacturer website address (example "''http://www.linn.co.uk''"). Url is read only.
 
 
 
==== ImageUri ====
 
ImageUri contains... ImageUri is read only.
 
 
 
=== Model ===
 
 
 
There are '''four''' Model parameters; '''Name''', '''Info''', '''Url''' and '''ImageUri'''.
 
 
 
==== Name ====
 
Name contains the Model name (example: "''Majik DS''"). Name is read only.
 
==== Info ====
 
Info contains more Model information (example "''Linn Hi-Fi component''"). Info is read only.
 
==== Url ====
 
Url contains the Model website address (example "''http://products.linn.co.uk/MajikDS''"). Url is read only.
 
==== ImageUri ====
 
ImageUri contains... ImageUri is read only.
 
 
 
=== Product ===
 
There are '''five''' Product parameters; '''Room''', '''Name''', '''Info''', '''Url''' and '''ImageUri'''. They are all text strings.
 
 
 
==== 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.
 
 
 
==== 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.
 
 
 
==== Info ====
 
Info contains more Product information (example "''Linn Hi-Fi component''"). Info is read only.
 
 
 
==== Url ====
 
Url contains... Url is read only.
 
 
 
==== ImageUri ====
 
ImageUri contains... ImageUri is read only.
 
 
 
== Standby Control==
 
 
 
=== 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 ==
 
 
 
=== Source List===
 
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 the current source 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 ===
 
Every source has four fundamental parameters, '''SourceSystemName''', '''SourceName''', '''SourceVisible''' and '''SourceType'''.
 
 
 
==== SourceSystemName ====
 
 
 
SourceSystemName is a unique 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. It can be read via the '''Source''' action, or the '''SourceXml''' action.
 
 
 
Note - ''a source's "visibility" does not affect its ability to be selected/activated via the functions SetSourceIndex and SetCurrentSourceByName.''
 
 
 
= Actions=
 
 
 
== Network Presentation Actions==
 
=== Attributes Action ===
 
The Attributes action reports a string containing a space separated list of all attributes.
 
 
 
=== Manufacturer Action ===
 
The Manufacturer action returns all four Manufacturer parameters.
 
 
 
=== Model Action ===
 
The Model action returns all four Model parameters.
 
 
 
=== Product Action ===
 
The Product action returns all five Product parameters.
 
 
 
== Standby Actions==
 
=== Standby===
 
The Standby action reports the current standby state of the product.
 
 
 
=== SetStandby===
 
The SetStandby action provides a means of setting the current standby state of the product.
 
 
 
==Source Actions==
 
===SourceXml Action===
 
The SourceXml action returns a list of all source specific parameters, for every source, in XML format.
 
 
 
===SourceXmlChangeCount Action===
 
The SourceXmlChangeCount action returns a count indicating the number of times SourceXml has been updated since power on. This is useful for control points that do not support eventing.
 
 
 
===Source Action===
 
The Source action returns all source specific 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 =
 
 
 
All actions relating to configuration have been removed as part of the migration to the Davaar. 
 
 
 
The domain for the Product service has changed to '''av.openhome.org'''.
 
 
 
== Actions ==
 
=== Changed Actions ===
 
====Standby====
 
The arguments have changed their names as follows:
 
*aStandby -> Value
 
====SetStandby====
 
The arguments have changed their names as follows:
 
*aStandby -> Value
 
====SourceCount====
 
The arguments have changed their names as follows:
 
*aSourceCount -> Value
 
====SourceXml====
 
The arguments have changed their names as follows:
 
*aSourceXml -> Value
 
 
 
====SourceIndex====
 
The arguments have changed their names as follows:
 
*aSourceIndex -> Value
 
====SetSourceIndex====
 
The arguments have changed their names as follows:
 
*aSourceIndex -> Value
 
 
 
====SetSourceIndexByName====
 
The arguments have changed their names as follows:
 
*aSourceName -> Value
 
 
 
=== New Actions ===
 
*Manufacturer
 
*Model
 
*Product
 
*Source
 
*Attributes
 
*SourceXmlChangeCount
 
 
 
=== Obsolete Actions ===
 
*SetName
 
*SetRoom
 
*SetStartupSourceIndex
 
*StartupSourceIndex
 
*SetStartupSourceIndexByName
 
*SetStartupSourceEnabled
 
*StartupSourceEnabled
 
*SetSourceVisible
 
*SetSourceName
 
*SourceAttributes
 

Latest revision as of 08:40, 21 November 2018