![Obihai Technology OBi1032 Скачать руководство пользователя страница 132](http://html2.mh-extra.com/html/obihai-technology/obi1032/obi1032_administration-manual_3151346132.webp)
Copyright 2010-2017 Obihai Technology, Inc.
132
value of OP1 by the numerical value of OP2. OP1
and OP2 are converted to signed integers before
the multiply.
? and :
Syntax: OP1
?
OP2
:
OP3
Returns OP2 (unchanged) if the numerical value of
OP1 is not "0", or OP2 (unchanged) otherwise
((a==b)?x:y) returns "y"
? and ,
Syntax: OP1
?
OP2
,
OP3
?
OP4
,
…
Return OP2 if the numerical value of OP1 is not "0",
otherwise return the result of the next sub-
expression after the comma, or return an empty
string if there are no more sub-expressions.
(A==B?X,C==D?E) returns an empty-string
(A==B?X,C==C?Y) returns Y
(A==B?X,D) returns D
Note: >, <, and & must be properly escaped in an XML document.
Note: An integer is 32-bit value from -2147483648 to 2147483647.
Color and Color Pattern
A color value is an integral value where the least significant byte is Blue value (0-255), the next byte the Green value (0-
255), and the next byte the Red Value (0-255); the rest of the bytes are not used and must be set to 0. Examples of
color value: 0, 31947013, 0xff0000, 0xffff00. In addition, you can use a predefined color name instead of RGB value. The
following color names are defined: black, white, red, green, blue, cyan, magenta, yellow, brown, lightred, lightgreen,
lightblue, lightcyan, lightmagenta, lightgray, and darkgray.
A color pattern is a comma separated 3-tuple that specifies a starting color, an ending color, and a direction. The phone
renders the color by starting the value at the starting color at one bounding edge and gradually varies it until it reaches
the ending color at the opposite bounding edge. The direction 0 specifies that the variation is from top to bottom, and
1 from left to right. Examples of color patterns are: "0,0xffffff,1", "red,blue,0", "black,0xffffff,1". If you only specify the
starting color, it becomes just a simple color. If you do not specify the direction, the default is 0.
<ScreenItem> XML
This is an XML document with the root element <ScreenItem>. Here is an example of a <ScreenItem> defined for a
CallItem
:
<
ScreenItem
bgcolor
=
"
0xcccccc
"
hlcolor
=
"
0xffffff
"
height
=
"
204
"
height2
=
"
102
"
>
<
setvar
name
=
"
cid
"
value
=
"
http://abc-pub.com/cid-var-tree.php?name=$name&tel=$number
"
/>
<!-- A 32-pixel high caption for each item -->
<
span
height
=
"
32
"
bgcolor
=
"
0x11cccc
"
font
=
"
@gfont-bold
"
textcolor
=
"
0xffffff
"
>
<
img
height
=
"
30
"
width
=
"
30
"
xpos
=
"
5
"
ypos
=
"
2
"
src
=
"
$stateIcon
"
/>
<
text
align
=
"
center
"
valign
=
"
center
"
size
=
"
18
"
>
<
dict
ns
=
"
cs
"
>
$state
</
dict
>
   
$timer
</
text
>
<
text
align
=
"
right
"
valign
=
"
center
"
size
=
"
18
"
>
$index
</
text
>
</
span
>
<!-- Show this if nitems < 2 (fits 1 item on screen) -->
<
span
ypos
=
"
32
"
display
=
"
$eval($nitems
<
2)
"
>
<!-- If a picture path is not given, shown a generic picture:lock.png -->
<
img
height
=
"
60
"
width
=
"
60
"
xpos
=
"
20
"
valign
=
"
center
"
src
=
"
$pic
"
display
=
"
$eval({$pic}!=)
"
/>
<
img
height
=
"
60
"
width
=
"
60
"
xpos
=
"
20
"
valign
=
"
center
"
src
=
"
http://192.168.15.225:8080/lock.png
"
display
=
"
$eval($pic==)
"
/>
<!-- Show Caller ID: Name, Number, and Organization -->
<
text
xpos
=
"
110
"
ypos
=
"
50
"
size
=
"
20
"
width
=
"
120
"
resize
=
"
10
"
wrap
=
"
0
"
font
=
"
@gfont-bold
"
textcolor
=
"
0
"
>
$name
</
text
>
<
text
xpos
=
"
110
"
ypos
=
"
82
"
size
=
"
18
"
width
=
"
120
"
resize
=
"
10
"
wrap
=
"
0
"
font
=
"
@gfont
"
textcolor
=
"
0x050505
"
>
$number
</
text
>
<
text
xpos
=
"
110
"
ypos
=
"
106
"
size
=
"
18
"
width
=
"
120
"
resize
=
"
10
"
wrap
=
"
0
"
font
=
"
@gfont
"
textcolor
=
"
0x050505
"
>
$cid.org
</
text
>
</
span
>
<!-- Show this if nitems > 1 (fits 2 items on screen) -->
<
span
ypos
=
"
32
"
display
=
"
$eval($nitems
>
1)
"
>