Specifications

3-9
Cisco Unified IP Phone Services Application Development Notes
OL-22505-01
Chapter 3 CiscoIPPhone XML Objects
XML Object Definitions
The Data tag delimits a string of hexadecimal digits that contain the packed value of the pixels in the
display. In the Cisco
Unified IP Phone, each pixel has only four possible values, which means that you
can pack four pixels into a single byte. A pair of hexadecimal digits represents each byte.
Figure 3-4 provides an example of the mechanics of pixel packing. Scanning from left to right in the
display, the illustration shows the process for packing consecutive pixel values of 1, 3, 2, and 0. First,
the pixels get converted to 2-bit binary numbers. Then, the binary pairs get re-ordered in sets of four to
create a single re-ordered byte, which two hexadecimal digits represent.
Figure 3-4 Packed Pixel Translation Example
Example 1
The following XML code defines a CiscoIPPhoneImage object that displays the sequence of pixels shown
in
Figure 3-4 as a graphic positioned at the center of the phone display:
<CiscoIPPhoneImage>
<Title/>
<LocationX>-1</LocationX>
<LocationY>-1</LocationY>
<Width>4</Width>
<Height>1</Height>
<Depth>2</Depth>
<Data>2D</Data>
<Prompt/>
</CiscoIPPhoneImage>
The graphic display comprises a contiguous stream of hexadecimal digits, with no spaces or other
separators. If the number of pixels to be displayed does not represent an even multiple of four, pad the
end of the pixel data with blank (zero value) pixels, so the data is packed correctly. The phone ignores
the padded data.
Tip Before displaying a graphic image on a Cisco Unified IP Phone, the software clears the pane dedicated
to services. If a service has text or other information that must be preserved (including the title area), the
information must get redrawn as part of the graphic. If the title is to be hidden, the graphic must be large
enough to cover it.
Example 2
The following XML code shows the useage of WindowMode attribute in CiscoIPPhoneImage object.
CiscoIPPhoneImage object with no WindowMode attribute. See Figure 3-5.
Pixel values original sequence 1320
Pixel values converted to 2-bit
binary pairs
01 001011
Re-ordered binary pairs
2D
1-byte packed hexadecimal value
00 0110 11