<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2011 Bluetooth SIG, Inc. All rights reserved. -->
<Descriptor xsi:noNamespaceSchemaLocation="http://schemas.bluetooth.org/Documents/descriptor.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="org.bluetooth.descriptor.gatt.characteristic_presentation_format" uuid="2904" name="Characteristic Presentation Format">
  <InformativeText>
    <Abstract>
        The Characteristic Presentation Format descriptor defines the format of the Characteristic Value.            
		</Abstract>
    <InformativeDisclaimer/>
    <Summary>
        One or more Characteristic Presentation Format descriptors may be present. If multiple of these descriptors are present, then a Aggregate Formate descriptor is present.
        This descriptor is read only and does not require authentication or authorization to read.
        This descriptor is composed of five parts: format, exponent, unit, name space and description.
        The Format field determines how a single value contained in the Characteristic Value is formatted.
        The Exponent field is used with interger data types to determine how the Characteristic Value is furhter formatted.
        The actual value = Characteristic Value * 10^Exponent.            
		</Summary>
    <Examples>
      <Example>
            When encoding an IPv4 address, the uint32 Format type is used.
		</Example>
      <Example>
            When encoding an IPv6 address, the uint128 Format type is used.
		</Example>
      <Example>
            When encoding a Bluetooth address (BD_ADDR), the uint48 Format type is used.
		</Example>
      <Example>
            For a Characteristic Value of 23 and an Exponent of 2, the actual value is 2300
		</Example>
      <Example>
            For a Characteristi Value of 3892 and an Exponent of -3, the actual value is 3.892
		</Example>
    </Examples>
  </InformativeText>
  <Value>
    <Field name="Format">
      <Requirement>Mandatory</Requirement>
      <Format>8bit</Format>
      <Minimum>0</Minimum>
      <Maximum>27</Maximum>
      <Enumerations>
        <Enumeration key="0" value="Reserved For Future Use" />
        <Enumeration key="1" value="Boolean" />
        <Enumeration key="2" value="unsigned 2-bit integer" />
        <Enumeration key="3" value="unsigned 4-bit integer" />
        <Enumeration key="4" value="unsigned 8-bit integer" />
        <Enumeration key="5" value="unsigned 12-bit integer" />
        <Enumeration key="6" value="unsigned 16-bit integer" />
        <Enumeration key="7" value="unsigned 24-bit integer" />
        <Enumeration key="8" value="unsigned 32-bit integer" />
        <Enumeration key="9" value="unsigned 48-bit integer" />
        <Enumeration key="10" value="unsigned 64-bit integer" />
        <Enumeration key="11" value="unsigned 128-bit integer" />
        <Enumeration key="12" value="signed 8-bit integer" />
        <Enumeration key="13" value="signed 12-bit integer" />
        <Enumeration key="14" value="signed 16-bit integer" />
        <Enumeration key="15" value="signed 24-bit integer" />
        <Enumeration key="16" value="signed 32-bit integer" />
        <Enumeration key="17" value="signed 48-bit integer" />
        <Enumeration key="18" value="signed 64-bit integer" />
        <Enumeration key="19" value="signed 128-bit integer" />
        <Enumeration key="20" value="IEEE-754 32-bit floating point" />
        <Enumeration key="21" value="IEEE-754 64-bit floating point" />
        <Enumeration key="22" value="IEEE-11073 16-bit SFLOAT" />
        <Enumeration key="23" value="IEEE-11073 32-bit FLOAT" />
        <Enumeration key="24" value="IEEE-20601 format" />
        <Enumeration key="25" value="UTF-8 string" />
        <Enumeration key="26" value="UTF-16 string" />
        <Enumeration key="27" value="Opaque Structure" />
        <Reserved start="28" end="255"></Reserved>
      </Enumerations>
    </Field>
    <Field name="Exponent">
      <Requirement>Mandatory</Requirement>
      <Format>sint8</Format>
    </Field>
    <Field name="Unit">
      <InformativeText>
                The Unit is a UUID.
			</InformativeText>
      <Requirement>Mandatory</Requirement>
      <Format>uint16</Format>
    </Field>
    <Field name="Namespace">
      <InformativeText>
                The Name Space field is used to indentify the organization that is responsible for defining the enumerations for the description field.
			</InformativeText>
      <Requirement>Mandatory</Requirement>
      <Format>8bit</Format>
      <Minimum>0</Minimum>
      <Maximum>1</Maximum>
      <Enumerations>
        <Enumeration key="1" value="Bluetooth SIG Assigned Numbers" />
        <ReservedForFutureUse start="2" end="255" />
      </Enumerations>
    </Field>
    <Field name="Description">
      <InformativeText>
                The Description is an enumerated value from the organization identified by the Name Space field.
			</InformativeText>
      <Requirement>Mandatory</Requirement>
      <Format>16bit</Format>
    </Field>
  </Value>
</Descriptor>
