OSDN Git Service

[sensor] clarify definition of the uuid field
authorPeng Xu <pengxu@google.com>
Sat, 23 Apr 2016 05:34:51 +0000 (22:34 -0700)
committerPeng Xu <pengxu@google.com>
Tue, 26 Apr 2016 19:04:01 +0000 (19:04 +0000)
Add description of the byte order the uuid field should use along
with an expample.

Bug: 28305085
Change-Id: If607631f15c1611bd51b158bd80eac1eef331b4b

include/hardware/sensors.h

index 14b8aa5..1d73c31 100644 (file)
@@ -947,7 +947,10 @@ typedef struct dynamic_sensor_meta_event {
     int32_t  connected;
     int32_t  handle;
     const struct sensor_t * sensor; // should be NULL if connected == false
-    uint8_t uuid[16];               // UUID of a dynamic sensor (use platform endianess).
+    uint8_t uuid[16];               // UUID of a dynamic sensor (using RFC 4122 byte order)
+                                    // For UUID 12345678-90AB-CDEF-1122-334455667788 the uuid field
+                                    // should be initialized as:
+                                    // {0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x11, ...}
 } dynamic_sensor_meta_event_t;
 
 /**