Improvement #268

Use unsigned values in UUID

Added by Philipp Buluschek over 3 years ago. Updated over 3 years ago.

Status:Closed Start date:10/28/2014
Priority:Low Due date:
Assignee:Stefano Lenzi % Done:

0%

Category:zigbee.basedriver Spent time: -
Target version:org.aaloa.zb4osgi.zigbee.basedriver-0.8.0
Has a patch:No Has license agreement signed:No

Description

The UUID of a devices is composed of values which should all be treated as unsigned - else a strange minus sign (-) appears in the ID (for example, when using endpoints above 128)

Correct the UUID generating method in ZigBeeDeviceImpl to

    private String generateUUID() {
        StringBuffer sb_uuid = new StringBuffer()
                .append(profileId & 0xFFFF).append(":")
                .append(deviceId & 0xFFFF).append(":")
                .append(deviceVersion & 0xFF).append("@")
                .append(node.getIEEEAddress()).append(":")
                .append(endPointAddress & 0xFF);
        return sb_uuid.toString();
    }

Associated revisions

Revision 1073
Added by Stefano Lenzi over 3 years ago

Changed the UUID generation so that it does not contain any negative values ( refs #268 )

History

#1 Updated by Stefano Lenzi over 3 years ago

  • Tracker changed from Bug to Improvement
  • Category set to zigbee.basedriver
  • Status changed from New to In Progress
  • Assignee set to Stefano Lenzi
  • Target version set to org.aaloa.zb4osgi.zigbee.basedriver-0.8.0

i'm going to change it, i think it is less confusing for the users

#2 Updated by Stefano Lenzi over 3 years ago

  • Status changed from In Progress to Resolved

I have changed the code as you suggested, if it is enough for you please close the issue.

#3 Updated by Philipp Buluschek over 3 years ago

  • Status changed from Resolved to Closed

Reviewed code - looks good. Closing.

Also available in: Atom PDF