Defining a UUID for each SDK+ child entity

Document created by cdnadmin on Jan 24, 2014
Version 1Show Document
  • View in full screen mode
This document was generated from CDN thread

Created by: Christopher Verges on 16-02-2011 10:13:47 AM
Dear EnergyWise team,
 
In the SDK+ library, we are now able to enumerate child entities on an endpoint.  How do we assign a UUID for each of these child entities such that this UUID would get returned by a mapi query?  Also, is there an example in the RefAgent code that I'm missing related to this?
 
Example output from querying an endpoint child entity and a VoIP phone using the mapi tool:
 
Running testGetIds()...
row 1: Name = endpoint_child_entity, Addr = 192.168.2.40, UID =  Index = 0
row 2: Name = SEPB41489A2F670, Addr = 10.0.2.212, UID = 2b26f125df4b47258ca179739933c386 Index = 1

 
Note that the UUID is defined for the VoIP entity, but not for the child entity of the endpoint.
 
Thanks,
Chris

Subject: RE: Defining a UUID for each SDK+ child entity
Replied by: Brock Miller on 16-02-2011 03:08:20 PM
Dear EnergyWise team,
 
In the SDK+ library, we are now able to enumerate child entities on an endpoint.  How do we assign a UUID for each of these child entities such that this UUID would get returned by a mapi query?  Also, is there an example in the RefAgent code that I'm missing related to this?
 
Example output from querying an endpoint child entity and a VoIP phone using the mapi tool:


Running testGetIds()...
row 1: Name = endpoint_child_entity, Addr = 192.168.2.40, UID =  Index = 0
row 2: Name = SEPB41489A2F670, Addr = 10.0.2.212, UID = 2b26f125df4b47258ca179739933c386 Index = 1


 
Note that the UUID is defined for the VoIP entity, but not for the child entity of the endpoint.
 
Thanks,
Chris

Hi Chris,
 
The UUID will always get returned via MAPI queries.  I think the issue here is how we are displaying it from the example output above.  Currently that example code has a quick method of converting the 32-byte buffer and printing it as an array of %c characters.  This is not a true way to show the UUID and is most likely causing nothing to show up in your output (the ID may start with '0' in this case, hence the empty string).
 
Ideally we need to convert the 32-byte ID into 64-hex characters and display that or opt for another approach.  You are welcome to modify this in the interim to enable the display of the other IDs.
 
Thanks,
 
Brock

Attachments

    Outcomes