From OpenHome

(Difference between revisions)
Jump to: navigation, search
(SourceXml)
(Architectural Overview)
Line 1: Line 1:
= Architectural Overview =
= Architectural Overview =
-
The Product service contains a summary of a single product’s capabilities.  Control points should begin their interaction with an av.openhome device by searching for the Product service.  Presence of various other services can be inferred from the sources and attributes reported.  
+
The Product service contains a summary of a single product’s capabilities.  Control points should begin their interaction with an av.openhome device by searching for the Product service.  Presence of various other services can be inferred from the sources and attributes this reports.
= Actions =
= Actions =

Revision as of 13:07, 12 June 2013

Contents

Architectural Overview

The Product service contains a summary of a single product’s capabilities. Control points should begin their interaction with an av.openhome device by searching for the Product service. Presence of various other services can be inferred from the sources and attributes this reports.

Actions

Sources

The set of available sources does not vary at run-time (although some source attributes may change). There is always a single source active. Only the active source will play audio or report state updates.

SourceCount

Query the value of the (read-only) SourceCount state variable.

SetSourceIndex

Set the currently active source. The value specified is zero-based and used to index into the source list returned by the SourceXml action / state variable.

SetSourceIndexByName

Set the currently active source. The value specified is matched against the Type attributes from the SourceXml action / state variable.

SourceXml

Query the value of the SourceXml state variable.

SourceXmlChangeCount

Query how often the SourceXml state variable has been updated. This action can be polled by clients that don’t support eventing. Whenever the value returned increases, the SourceXml has been updated so should be queried again.

Network Presentation

Attributes

Return the value of the Attributes state variable.

Manufacturer

Return the values of the ManufacturerName, ManufacturerInfo, ManufacturerUrl, ManufacturerImageUri state variables. All are read-only so the values returned will not vary at runtime.

Model

Return the values of the ModelName, ModelInfo, ModelUrl, ModelImageUri state variables. All are read-only so the values returned will not vary at runtime.

Product

Return the values of the ProductRoom, ProductName, ProductInfo, ProductUrl, ProductImageUri state variables.

Standby

Standby

Return the value of the Standby state variable.

SetStandby

Set the value of the Standby state variable. The SetStandby action provides a means of setting the current standby state of the product.

State Variables

Sources

SourceCount

The number of available sources. Read-only.

SourceIndex

The index of the currently active source. This is zero-based so will be in the range [0..SourceCount-1]

SourceXml

Returns a summary of all sources in the form

<SourceList>
    <Source>
        <Name>[user name for source]</Name>
        <Type>[system name for source.  Read-only]</Type>
        <Visible>[Boolean.  Whether control points should display source]</Visible>
    </sourcetag>
</SourceList>

Network Presentation

Attributes

Space delimited set of values. Each value guarantees the availability of a service or resource, saving a control point for searching for each of these in turn. Supported values for attributes include

- Info – the av.openhome.org:Info:1 service is available
- Time – the av.openhome.org:Time:1 service is available
- Volume – the av.openhome.org:Volume:1 service is available
- Sender - the av.openhome.org:Sender:1 service is available
- App:Config=[link] – web UI for device configuration is available at the url [link]

ManufacturerImageUri

Uri for manufacturer’s logo. Read-only.

ManufacturerInfo

Manufacturer information. Read-only

ManufacturerName

Manufacturer name. Read-only.

ManufacturerUrl

URL for manufacturer web site. Read only.

ModelImageUri

Uri for model’s icon. Read-only.

ModelInfo

Model information. Read-only.

ModelName

Model name. Read-only.

ModelUrl

URL for model web site. Read-only.

ProductImageUri

Uri for product. Read-only.

ProductInfo

Product information. Read-only.

ProductName

User-visible product name. By default this is set to ModelName. Note that the UPnP friendly name is derived by combining this with Room name in the form Room : Name

ProductRoom

The name of the room where the Product is located. Set to “Main Room” by default. ProductRoom is used to group the Product with other related Products in the same physical room (e.g. a source with a pre-amp). Products which are physically linked must always share the same ProductRoom name. Room is set to Main Room by default.

ProductUrl

URL for product web site. This may be the UPnP presentation page.

Standby

Standby

The standby state of a product (true => standby enabled)

Product Service Description (XML)

<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
    <specVersion>
        <major>1</major>
        <minor>0</minor>
    </specVersion>
    <actionList>
        <action>
            <name>Manufacturer</name>
            <argumentList>
                <argument>
                    <name>Name</name>
                    <direction>out</direction>
                    <relatedStateVariable>ManufacturerName</relatedStateVariable>
                </argument>
                <argument>
                    <name>Info</name>
                    <direction>out</direction>
                    <relatedStateVariable>ManufacturerInfo</relatedStateVariable>
                </argument>
                <argument>
                    <name>Url</name>
                    <direction>out</direction>
                    <relatedStateVariable>ManufacturerUrl</relatedStateVariable>
                </argument>
                <argument>
                    <name>ImageUri</name>
                    <direction>out</direction>
                    <relatedStateVariable>ManufacturerImageUri</relatedStateVariable>
                </argument>
            </argumentList>
        </action>
        <action>
            <name>Model</name>
            <argumentList>
                <argument>
                    <name>Name</name>
                    <direction>out</direction>
                    <relatedStateVariable>ModelName</relatedStateVariable>
                </argument>
                <argument>
                    <name>Info</name>
                    <direction>out</direction>
                    <relatedStateVariable>ModelInfo</relatedStateVariable>
                </argument>
                <argument>
                    <name>Url</name>
                    <direction>out</direction>
                    <relatedStateVariable>ModelUrl</relatedStateVariable>
                </argument>
                <argument>
                    <name>ImageUri</name>
                    <direction>out</direction>
                    <relatedStateVariable>ModelImageUri</relatedStateVariable>
                </argument>
            </argumentList>
        </action>
        <action>
            <name>Product</name>
            <argumentList>
                <argument>
                    <name>Room</name>
                    <direction>out</direction>
                    <relatedStateVariable>ProductRoom</relatedStateVariable>
                </argument>
                <argument>
                    <name>Name</name>
                    <direction>out</direction>
                    <relatedStateVariable>ProductName</relatedStateVariable>
                </argument>
                <argument>
                    <name>Info</name>
                    <direction>out</direction>
                    <relatedStateVariable>ProductInfo</relatedStateVariable>
                </argument>
                <argument>
                    <name>Url</name>
                    <direction>out</direction>
                    <relatedStateVariable>ProductUrl</relatedStateVariable>
                </argument>
                <argument>
                    <name>ImageUri</name>
                    <direction>out</direction>
                    <relatedStateVariable>ProductImageUri</relatedStateVariable>
                </argument>
            </argumentList>
        </action>
        <action>
            <name>Standby</name>
            <argumentList>
                <argument>
                    <name>Value</name>
                    <direction>out</direction>
                    <relatedStateVariable>Standby</relatedStateVariable>
                </argument>
            </argumentList>
        </action>
        <action>
            <name>SetStandby</name>
            <argumentList>
                <argument>
                    <name>Value</name>
                    <direction>in</direction>
                    <relatedStateVariable>Standby</relatedStateVariable>
                </argument>
            </argumentList>
        </action>
        <action>
            <name>SourceCount</name>
            <argumentList>
                <argument>
                    <name>Value</name>
                    <direction>out</direction>
                    <relatedStateVariable>SourceCount</relatedStateVariable>
                </argument>
            </argumentList>
        </action>
        <action>
            <name>SourceXml</name>
            <argumentList>
                <argument>
                    <name>Value</name>
                    <direction>out</direction>
                    <relatedStateVariable>SourceXml</relatedStateVariable>
                </argument>
            </argumentList>
        </action>
        <action>
            <name>SourceIndex</name>
            <argumentList>
                <argument>
                    <name>Value</name>
                    <direction>out</direction>
                    <relatedStateVariable>SourceIndex</relatedStateVariable>
                </argument>
            </argumentList>
        </action>
        <action>
            <name>SetSourceIndex</name>
            <argumentList>
                <argument>
                    <name>Value</name>
                    <direction>in</direction>
                    <relatedStateVariable>SourceIndex</relatedStateVariable>
                </argument>
            </argumentList>
        </action>
        <action>
            <name>SetSourceIndexByName</name>
            <argumentList>
                <argument>
                    <name>Value</name>
                    <direction>in</direction>
                    <relatedStateVariable>SourceName</relatedStateVariable>
                </argument>
            </argumentList>
        </action>
        <action>
            <name>Source</name>
            <argumentList>
                <argument>
                    <name>Index</name>
                    <direction>in</direction>
                    <relatedStateVariable>SourceIndex</relatedStateVariable>
                </argument>
                <argument>
                    <name>SystemName</name>
                    <direction>out</direction>
                    <relatedStateVariable>SourceName</relatedStateVariable>
                </argument>
                <argument>
                    <name>Type</name>
                    <direction>out</direction>
                    <relatedStateVariable>SourceType</relatedStateVariable>
                </argument>
                <argument>
                    <name>Name</name>
                    <direction>out</direction>
                    <relatedStateVariable>SourceName</relatedStateVariable>
                </argument>
                <argument>
                    <name>Visible</name>
                    <direction>out</direction>
                    <relatedStateVariable>SourceVisible</relatedStateVariable>
                </argument>
            </argumentList>
        </action>
        <action>
            <name>Attributes</name>
            <argumentList>
                <argument>
                    <name>Value</name>
                    <direction>out</direction>
                    <relatedStateVariable>Attributes</relatedStateVariable>
                </argument>
            </argumentList>
        </action>
        <action>
            <name>SourceXmlChangeCount</name>
            <argumentList>
                <argument>
                    <name>Value</name>
                    <direction>out</direction>
                    <relatedStateVariable>SourceXmlChangeCount</relatedStateVariable>
                </argument>
            </argumentList>
        </action>
    </actionList>
    <serviceStateTable>
        <stateVariable sendEvents="yes">
            <name>ManufacturerName</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>ManufacturerInfo</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>ManufacturerUrl</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>ManufacturerImageUri</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>ModelName</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>ModelInfo</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>ModelUrl</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>ModelImageUri</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>ProductRoom</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>ProductName</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>ProductInfo</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>ProductUrl</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>ProductImageUri</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>Standby</name>
            <dataType>boolean</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>SourceIndex</name>
            <dataType>ui4</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>SourceCount</name>
            <dataType>ui4</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>SourceXml</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="yes">
            <name>Attributes</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="no">
            <name>SourceXmlChangeCount</name>
            <dataType>ui4</dataType>
        </stateVariable>
        <stateVariable sendEvents="no">
            <name>SourceType</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="no">
            <name>SourceName</name>
            <dataType>string</dataType>
        </stateVariable>
        <stateVariable sendEvents="no">
            <name>SourceVisible</name>
            <dataType>boolean</dataType>
        </stateVariable>
    </serviceStateTable>
</scpd>