Cisco OL-18696-01 Development Manual page 22

Unified ip phone services application development notes
Table of Contents

Advertisement

XML Object Definitions
Use
LocationX
of the graphic at the pixel defined by these two parameters. Setting the X and Y location values to (0, 0)
positions the graphic at the upper, left corner of the display. Setting the X and Y location values to (-1,
-1) centers the graphic in the services pane of the phone display.
Use
Width
the
Data
specifies the number of bits per pixel. Cisco Unified IP Phones support a maximum value of 2. A
Depth
bit depth of 1 is black and white.
The
Data
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 2-3
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 2-3
Example
The following XML code defines a
in
Figure 2-3
<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.
Cisco Unified IP Phone Services Application Development Notes
2-8
and
to position the graphic on the phone display. Position the upper, left corner
LocationY
and
to size the graphic. If the values do not match with the pixel stream specified in
Height
field, results will be unpredictable incorrect.
tag delimits a string of hexadecimal digits that contain the packed value of the pixels in the
provides an example of the mechanics of pixel packing. Scanning from left to right in the
Packed Pixel Translation Example
Pixel values original sequence
Pixel values converted to 2-bit
binary pairs
Re-ordered binary pairs
1-byte packed hexadecimal value
CiscoIPPhoneImage
as a graphic positioned at the center of the phone display:
Chapter 2
CiscoIPPhone XML Objects
1
3
01
11
00
10
2D
object that displays the sequence of pixels shown
2
0
10
00
11
01
OL-18696-01

Advertisement

Table of Contents
loading

This manual is also suitable for:

7900 series

Table of Contents