You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Lars-Erik Kimmel (JIRA)" <ji...@apache.org> on 2010/09/06 12:20:32 UTC

[jira] Created: (FELIX-2579) deviceType in desciption of subdevices missing

deviceType in desciption of subdevices missing
----------------------------------------------

                 Key: FELIX-2579
                 URL: https://issues.apache.org/jira/browse/FELIX-2579
             Project: Felix
          Issue Type: Bug
            Reporter: Lars-Erik Kimmel
            Priority: Minor


The desciption lacks of deviceType for subdevices.
It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.

a simple workaround helps by introducing a method made of the code in the build of the root device:
	private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr) {
		Object aux = sr.getProperty(UPnPDevice.TYPE);
		if(aux==null){
			devUPnP.setDeviceType(null);
		}else if(aux instanceof String){
			devUPnP.setDeviceType((String) aux);
		}else if(aux instanceof String[]){
			//The property key UPnP.device.type should be a String
			String[] v = (String[]) aux;
			int maxindex=0;
			int max=Integer.parseInt(v[0].substring(v[0].lastIndexOf(":")+1));
			int tmp;
			for (int i = 1; i < v.length; i++) {
				tmp=Integer.parseInt(v[i].substring(v[i].lastIndexOf(":")+1));
				if(max<tmp){
					max=tmp;
					maxindex=i;
				}
			}
			devUPnP.setDeviceType(v[maxindex]);
		}
	}

And call
setDeviceTypeWithHighestVersion(devUPnP, sr);
in buildRootDeviceNode(..) and buildDevice(..)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work stopped: (FELIX-2579) deviceType in desciption of subdevices missing

Posted by "Stefano Lenzi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on FELIX-2579 stopped by Stefano Lenzi.

> deviceType in desciption of subdevices missing
> ----------------------------------------------
>
>                 Key: FELIX-2579
>                 URL: https://issues.apache.org/jira/browse/FELIX-2579
>             Project: Felix
>          Issue Type: Bug
>          Components: UPnP Subproject
>    Affects Versions: upnp-basedriver-0.8.0
>            Reporter: Lars-Erik Kimmel
>            Assignee: Stefano Lenzi
>            Priority: Minor
>             Fix For: upnp-basedriver-1.0.0 
>
>         Attachments: BuildDevice.java
>
>
> The desciption lacks of deviceType for subdevices.
> It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.
> A simple workaround helps by introducing a method
> private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr)
> made of the code in the build of the root device
> and call
> setDeviceTypeWithHighestVersion(devUPnP, sr);
> in buildRootDeviceNode(..) and buildDevice(..)
> This workaround is done in the attached BuildDevice.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work started: (FELIX-2579) deviceType in desciption of subdevices missing

Posted by "Stefano Lenzi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on FELIX-2579 started by Stefano Lenzi.

> deviceType in desciption of subdevices missing
> ----------------------------------------------
>
>                 Key: FELIX-2579
>                 URL: https://issues.apache.org/jira/browse/FELIX-2579
>             Project: Felix
>          Issue Type: Bug
>          Components: UPnP Subproject
>            Reporter: Lars-Erik Kimmel
>            Assignee: Stefano Lenzi
>            Priority: Minor
>         Attachments: BuildDevice.java
>
>
> The desciption lacks of deviceType for subdevices.
> It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.
> A simple workaround helps by introducing a method
> private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr)
> made of the code in the build of the root device
> and call
> setDeviceTypeWithHighestVersion(devUPnP, sr);
> in buildRootDeviceNode(..) and buildDevice(..)
> This workaround is done in the attached BuildDevice.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-2579) deviceType in desciption of subdevices missing

Posted by "Stefano Lenzi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefano Lenzi closed FELIX-2579.
--------------------------------

    Resolution: Fixed

Added the deviceType not only to rootDevice but also to its children

> deviceType in desciption of subdevices missing
> ----------------------------------------------
>
>                 Key: FELIX-2579
>                 URL: https://issues.apache.org/jira/browse/FELIX-2579
>             Project: Felix
>          Issue Type: Bug
>          Components: UPnP Subproject
>    Affects Versions: upnp-basedriver-0.8.0
>            Reporter: Lars-Erik Kimmel
>            Assignee: Stefano Lenzi
>            Priority: Minor
>             Fix For: upnp-basedriver-1.0.0 
>
>         Attachments: BuildDevice.java
>
>
> The desciption lacks of deviceType for subdevices.
> It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.
> A simple workaround helps by introducing a method
> private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr)
> made of the code in the build of the root device
> and call
> setDeviceTypeWithHighestVersion(devUPnP, sr);
> in buildRootDeviceNode(..) and buildDevice(..)
> This workaround is done in the attached BuildDevice.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2579) deviceType in desciption of subdevices missing

Posted by "Lars-Erik Kimmel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars-Erik Kimmel updated FELIX-2579:
------------------------------------

    Description: 
The desciption lacks of deviceType for subdevices.
It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.

A simple workaround helps by introducing a method
private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr)
made of the code in the build of the root device
and call
setDeviceTypeWithHighestVersion(devUPnP, sr);
in buildRootDeviceNode(..) and buildDevice(..)

This workaround is done in the attached BuildDevice.java.

  was:
The desciption lacks of deviceType for subdevices.
It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.

a simple workaround helps by introducing a method
private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr)
made of the code in the build of the root device
and call
setDeviceTypeWithHighestVersion(devUPnP, sr);
in buildRootDeviceNode(..) and buildDevice(..)


> deviceType in desciption of subdevices missing
> ----------------------------------------------
>
>                 Key: FELIX-2579
>                 URL: https://issues.apache.org/jira/browse/FELIX-2579
>             Project: Felix
>          Issue Type: Bug
>            Reporter: Lars-Erik Kimmel
>            Priority: Minor
>         Attachments: BuildDevice.java
>
>
> The desciption lacks of deviceType for subdevices.
> It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.
> A simple workaround helps by introducing a method
> private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr)
> made of the code in the build of the root device
> and call
> setDeviceTypeWithHighestVersion(devUPnP, sr);
> in buildRootDeviceNode(..) and buildDevice(..)
> This workaround is done in the attached BuildDevice.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (FELIX-2579) deviceType in desciption of subdevices missing

Posted by "Stefano Lenzi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefano Lenzi reassigned FELIX-2579:
------------------------------------

    Assignee: Stefano Lenzi

> deviceType in desciption of subdevices missing
> ----------------------------------------------
>
>                 Key: FELIX-2579
>                 URL: https://issues.apache.org/jira/browse/FELIX-2579
>             Project: Felix
>          Issue Type: Bug
>          Components: UPnP Subproject
>            Reporter: Lars-Erik Kimmel
>            Assignee: Stefano Lenzi
>            Priority: Minor
>         Attachments: BuildDevice.java
>
>
> The desciption lacks of deviceType for subdevices.
> It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.
> A simple workaround helps by introducing a method
> private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr)
> made of the code in the build of the root device
> and call
> setDeviceTypeWithHighestVersion(devUPnP, sr);
> in buildRootDeviceNode(..) and buildDevice(..)
> This workaround is done in the attached BuildDevice.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2579) deviceType in desciption of subdevices missing

Posted by "Lars-Erik Kimmel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars-Erik Kimmel updated FELIX-2579:
------------------------------------

    Attachment: BuildDevice.java

a fixed BuildDevice.java

> deviceType in desciption of subdevices missing
> ----------------------------------------------
>
>                 Key: FELIX-2579
>                 URL: https://issues.apache.org/jira/browse/FELIX-2579
>             Project: Felix
>          Issue Type: Bug
>            Reporter: Lars-Erik Kimmel
>            Priority: Minor
>         Attachments: BuildDevice.java
>
>
> The desciption lacks of deviceType for subdevices.
> It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.
> a simple workaround helps by introducing a method made of the code in the build of the root device:
> 	private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr) {
> 		Object aux = sr.getProperty(UPnPDevice.TYPE);
> 		if(aux==null){
> 			devUPnP.setDeviceType(null);
> 		}else if(aux instanceof String){
> 			devUPnP.setDeviceType((String) aux);
> 		}else if(aux instanceof String[]){
> 			//The property key UPnP.device.type should be a String
> 			String[] v = (String[]) aux;
> 			int maxindex=0;
> 			int max=Integer.parseInt(v[0].substring(v[0].lastIndexOf(":")+1));
> 			int tmp;
> 			for (int i = 1; i < v.length; i++) {
> 				tmp=Integer.parseInt(v[i].substring(v[i].lastIndexOf(":")+1));
> 				if(max<tmp){
> 					max=tmp;
> 					maxindex=i;
> 				}
> 			}
> 			devUPnP.setDeviceType(v[maxindex]);
> 		}
> 	}
> And call
> setDeviceTypeWithHighestVersion(devUPnP, sr);
> in buildRootDeviceNode(..) and buildDevice(..)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2579) deviceType in desciption of subdevices missing

Posted by "Lars-Erik Kimmel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars-Erik Kimmel updated FELIX-2579:
------------------------------------

    Component/s: UPnP Subproject

> deviceType in desciption of subdevices missing
> ----------------------------------------------
>
>                 Key: FELIX-2579
>                 URL: https://issues.apache.org/jira/browse/FELIX-2579
>             Project: Felix
>          Issue Type: Bug
>          Components: UPnP Subproject
>            Reporter: Lars-Erik Kimmel
>            Priority: Minor
>         Attachments: BuildDevice.java
>
>
> The desciption lacks of deviceType for subdevices.
> It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.
> A simple workaround helps by introducing a method
> private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr)
> made of the code in the build of the root device
> and call
> setDeviceTypeWithHighestVersion(devUPnP, sr);
> in buildRootDeviceNode(..) and buildDevice(..)
> This workaround is done in the attached BuildDevice.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2579) deviceType in desciption of subdevices missing

Posted by "Lars-Erik Kimmel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars-Erik Kimmel updated FELIX-2579:
------------------------------------

    Description: 
The desciption lacks of deviceType for subdevices.
It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.

a simple workaround helps by introducing a method
private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr)
made of the code in the build of the root device
and call
setDeviceTypeWithHighestVersion(devUPnP, sr);
in buildRootDeviceNode(..) and buildDevice(..)

  was:
The desciption lacks of deviceType for subdevices.
It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.

a simple workaround helps by introducing a method made of the code in the build of the root device:
	private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr) {
		Object aux = sr.getProperty(UPnPDevice.TYPE);
		if(aux==null){
			devUPnP.setDeviceType(null);
		}else if(aux instanceof String){
			devUPnP.setDeviceType((String) aux);
		}else if(aux instanceof String[]){
			//The property key UPnP.device.type should be a String
			String[] v = (String[]) aux;
			int maxindex=0;
			int max=Integer.parseInt(v[0].substring(v[0].lastIndexOf(":")+1));
			int tmp;
			for (int i = 1; i < v.length; i++) {
				tmp=Integer.parseInt(v[i].substring(v[i].lastIndexOf(":")+1));
				if(max<tmp){
					max=tmp;
					maxindex=i;
				}
			}
			devUPnP.setDeviceType(v[maxindex]);
		}
	}

And call
setDeviceTypeWithHighestVersion(devUPnP, sr);
in buildRootDeviceNode(..) and buildDevice(..)


> deviceType in desciption of subdevices missing
> ----------------------------------------------
>
>                 Key: FELIX-2579
>                 URL: https://issues.apache.org/jira/browse/FELIX-2579
>             Project: Felix
>          Issue Type: Bug
>            Reporter: Lars-Erik Kimmel
>            Priority: Minor
>         Attachments: BuildDevice.java
>
>
> The desciption lacks of deviceType for subdevices.
> It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.
> a simple workaround helps by introducing a method
> private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr)
> made of the code in the build of the root device
> and call
> setDeviceTypeWithHighestVersion(devUPnP, sr);
> in buildRootDeviceNode(..) and buildDevice(..)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2579) deviceType in desciption of subdevices missing

Posted by "Lars-Erik Kimmel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars-Erik Kimmel updated FELIX-2579:
------------------------------------

    Comment: was deleted

(was: a fixed BuildDevice.java)

> deviceType in desciption of subdevices missing
> ----------------------------------------------
>
>                 Key: FELIX-2579
>                 URL: https://issues.apache.org/jira/browse/FELIX-2579
>             Project: Felix
>          Issue Type: Bug
>            Reporter: Lars-Erik Kimmel
>            Priority: Minor
>         Attachments: BuildDevice.java
>
>
> The desciption lacks of deviceType for subdevices.
> It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.
> a simple workaround helps by introducing a method
> private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr)
> made of the code in the build of the root device
> and call
> setDeviceTypeWithHighestVersion(devUPnP, sr);
> in buildRootDeviceNode(..) and buildDevice(..)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2579) deviceType in desciption of subdevices missing

Posted by "Stefano Lenzi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefano Lenzi updated FELIX-2579:
---------------------------------

        Fix Version/s: upnp-basedriver-1.0.0 
    Affects Version/s: upnp-basedriver-0.8.0

> deviceType in desciption of subdevices missing
> ----------------------------------------------
>
>                 Key: FELIX-2579
>                 URL: https://issues.apache.org/jira/browse/FELIX-2579
>             Project: Felix
>          Issue Type: Bug
>          Components: UPnP Subproject
>    Affects Versions: upnp-basedriver-0.8.0
>            Reporter: Lars-Erik Kimmel
>            Assignee: Stefano Lenzi
>            Priority: Minor
>             Fix For: upnp-basedriver-1.0.0 
>
>         Attachments: BuildDevice.java
>
>
> The desciption lacks of deviceType for subdevices.
> It can be pinned down to BuildDevice, where only in the description of the root device the deviceType with the highest supported version is added to the document.
> A simple workaround helps by introducing a method
> private static void setDeviceTypeWithHighestVersion(Device devUPnP, ServiceReference sr)
> made of the code in the build of the root device
> and call
> setDeviceTypeWithHighestVersion(devUPnP, sr);
> in buildRootDeviceNode(..) and buildDevice(..)
> This workaround is done in the attached BuildDevice.java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.