pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • Examples
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

Pebble C API

  • Pebble C API
  • Pebble JavaScript API
  • PebbleKit JS
  • PebbleKit iOS
  • PebbleKit Android
  • Foundation
    • App
    • App Communication
    • App Glance
    • AppMessage
    • AppSync
    • AppWorker
    • DataLogging
    • DataStructures
      • UUID
    • Dictation
    • Dictionary
    • Event Service
      • AccelerometerService
      • AppFocusService
      • BatteryStateService
      • CompassService
      • ConnectionService
      • HealthService
      • TickTimerService
    • Exit Reason
    • Internationalization
    • Launch Reason
    • Logging
    • Math
    • Memory Management
    • Platform
    • Resources
      • File Formats
    • Storage
    • Timer
    • Wakeup
    • Wall Time
    • WatchInfo
    • Rocky
  • Graphics
    • Draw Commands
    • Drawing Paths
    • Drawing Primitives
    • Drawing Text
    • Fonts
    • Graphics Context
    • Graphics Types
      • Color Definitions
  • User Interface
    • Animation
      • PropertyAnimation
    • Clicks
    • Layers
      • ActionBarLayer
      • BitmapLayer
      • MenuLayer
      • RotBitmapLayer
      • ScrollLayer
      • SimpleMenuLayer
      • StatusBarLayer
      • TextLayer
    • Light
    • Preferences
    • UnobstructedArea
    • Vibes
    • Window
      • ActionMenu
      • NumberWindow
    • Window Stack
  • Standard C
    • Format
    • Locale
    • Math
    • Memory
    • String
    • Time

UUID

Function Documentation

bool uuid_equal(const Uuid * uu1, const Uuid * uu2)

Compares two UUIDs.

Returns

True if the two UUIDs are equal, false if they are not.

void uuid_to_string(const Uuid * uuid, char * buffer)

Writes UUID in a string form into buffer that looks like the following... {12345678-1234-5678-1234-567812345678} or {NULL UUID} if NULL was passed.

Parameters

uuid

The Uuid to write into the buffer as human-readable string

buffer

Memory to write the string to. Must be at least UUID_STRING_BUFFER_LENGTH bytes long.

Data Structure Documentation

struct Uuid

Data Fields

uint8_t byte0
uint8_t byte1
uint8_t byte2
uint8_t byte3
uint8_t byte4
uint8_t byte5
uint8_t byte6
uint8_t byte7
uint8_t byte8
uint8_t byte9
uint8_t byte10
uint8_t byte11
uint8_t byte12
uint8_t byte13
uint8_t byte14
uint8_t byte15

Macro Definition Documentation

#define UUID_SIZE 16
#define UuidMake ( p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)

Make a Uuid object from sixteen bytes.

Returns

A Uuid structure representing the bytes p0 to p15.

#define UuidMakeFromBEBytes ( b)

Creates a Uuid from an array of bytes with 16 bytes in Big Endian order.

Returns

The created Uuid

#define UuidMakeFromLEBytes ( b)

Creates a Uuid from an array of bytes with 16 bytes in Little Endian order.

Returns

The created Uuid

#define UUID_STRING_BUFFER_LENGTH (32 + 4 + 2 + 1)

The minimum required length of a string used to hold a uuid (including null).

Need some help?

Functions

  • uuid_equal
  • uuid_to_string

Data Structures

  • Uuid

Macro Defintions

  • UUID_SIZE
  • UuidMake
  • UuidMakeFromBEBytes
  • UuidMakeFromLEBytes
  • UUID_STRING_BUFFER_LENGTH

Getting Help

Do you have questions about the Pebble SDK?

Do you need some help understanding something on this page?

You can either take advantage of our awesome developer community and check out the SDK Help forums, or you can send us a message through the website!