[summary of the invention]
Main purpose of the present invention provides a kind of set/card separated graphical interface system based on the Client/Server structure, can solve to block in the separation between machine and card holds auxiliary equipment to lack the demonstration problem of resource, make card end auxiliary equipment under the situation that does not have local demonstration resource, the presentation control function that still possesses graphical interfaces makes the complete applied business of card end auxiliary equipment carrying become possibility.Card end is auxiliary will be as the realization carrier of applied business, and insert main frame easily and make it enjoy applied business service in the card, the function of expansion main frame, and cost is low.Therefore, the present invention will make the digital multimedia product development more flexibly and possess the longer product life cycle.
Set/card separated graphical interface system based on the Client/Server structure provided by the invention can realize that the DVB-CI interface standard, the UTI interface standard that are adopted are all supported bidirectional data transfers on the basis of the separation between machine and card interface standard of supporting transmitted in both directions; In addition, also support general bidirectional protocol interface, as Ethernet interface.But set up the data channel of a transmitted in both directions, the order or the data that are used to show control operation of transmission of graphical interface system by these interface protocols.Host side is responsible for finishing explanation and execution corresponding actions, return data and result phase on request from the demonstration control command of card end as server; The card end connects host side as client by showing the Control Server program, by the protocol command bag of graphical interfaces operation, realizes the control to the display device of host side.
Set/card separated graphical interface system based on the Client/Server structure provided by the invention possesses the query manipulation that main frame is shown resource, comprise: to the inquiry of main frame display device attribute, the setting of display properties, wherein attribute kit contains screen size and the information of being supported such as color depth.Card end all pass through this operation before carrying out the Graphic Interface Control operation, finish the attribute information of main frame display device is collected and disposed, so that plan attributes such as the positions of elements that will show or color better, reaches better display effect.
Set/card separated graphical interface system based on the Client/Server structure provided by the invention possesses the configuration operation of palette, comprising: obtain system palette, palette is set.Consider that some low side main process equipment display unit must have the palette support, therefore after having obtained display attribute information, need the suitable palette of customization.Because to be all graphical interfaces show gets the color base plinth for this, therefore carries out configuration operation before demonstration.
Set/card separated graphical interface system based on the Client/Server structure provided by the invention possesses the paintbrush control operation, comprising: the obtaining of the shape setting of paintbrush, color setting, current paintbrush attribute.Can realize multiple different line patterns by configuration,, therefore determine the pattern and the color of lines in the basic configuration again because paintbrush is the basis of basic mapping operation to paintbrush.
Set/card separated graphical interface system based on the Client/Server structure provided by the invention possesses basic picture operation, comprising: draw point, picture straight line, trace, picture rectangle frame and filling rectangle, draw oval frame and filled ellipse shape, draw arbitrary polygon and fill arbitrary polygon.The aggregate of these basic mapping operations has just been formed complete interfaces windows.
Set/card separated graphical interface system based on the Client/server structure provided by the invention possesses the literal display operation, comprising: word-base management, font setting, current font attribute obtain, the literal indication range is measured, literal shows.The management of character library and font or configuration can be supported the literal of Suresh Kumar, rich interface; And the demonstration of literal and basic mapping operation just can be formed complete graphical interfaces; The measurement of literal is to adjust the function that graphical interfaces adapts to screen size or viewing area automatically in order to realize.
Set/card separated graphical interface system based on the Client/server structure provided by the invention possesses the graphics field operation, comprising: the graphics field copy, paste the graphics field.These are the region operations to graphical interfaces on the screen, and main purpose is to raise the efficiency, because some zone of repeating to show can realize by the mode that copy is pasted, and do not need to repaint figure.Most typical application is to move down screen display, only needs to upgrade the zone in the bottom new delegation, and other remain unchanged up to move and get final product.
Set/card separated graphical interface system based on the Client/server structure provided by the invention possesses the display operation of picture file, comprising: display element picture, display file picture.The card end can be finished image in internal memory, be shown on the screen by interface is disposable; Can directly give main frame in addition, and assigned address shows with file transfer.
Card end is set up a virtual display device by this graphical interface system, and forms the display interface storehouse of a cover control virtual display device, shows control operation according to the demand of applied business, makes the application developer discover difference less than wherein.
Set/card separated graphical interface system based on the Client/server structure provided by the invention can be realized on the physical interface of supporting transmitted in both directions, sets up data transmission channel by host-host protocol, finishes the agreement control of this graphical interface system.
The interface protocol of the set/card separated graphical interface system based on the Client/server structure provided by the invention can be realized on the basis of transmitted in both directions agreement.The level that whole system realizes as shown in Figure 1.Wherein " interface protocol " can be transmitted in both directions agreements such as ICP/IP protocol, ISO7816, DVB-CI, UTI, the definition of graphical interfaces interface operable can be totally independent of the connecting interface agreement between the machine card and exist, and it is portable preferably to guarantee that therefore this system possesses.In the accompanying drawing 1, main frame general reference data and/or the equipment that carries out the multimedia processing and show are as equipment such as television receiver, set-top box, multimedia servers; The external accessory of card end general reference main frame is as smart card, SIM card and external data storage/association's treatment facility.
In the set/card separated graphical interface system based on the Client/server structure provided by the invention, the Client/server structure is a flexible allocation, and main frame both can be a server end, also can be client; And card end auxiliary equipment also both can be a server end, also can be client.So long as an end of being responsible for providing equipment to show just becomes server; What use that the other side's display device finishes graphical interfaces by interface is exactly client.
In a word, set/card separated graphical interface system based on the Client/server structure provided by the invention need not be fixed display device or resource to exist or is bundled on main process equipment or the external accessory, it both may reside in host side, also may reside in the card end.Be used for finishing using and controlling by making of graphical interface system to distal displayed equipment or resource.
[embodiment]
● example is to use based on the data broadcast service of the Digital Television separation between machine and card of UTI interface.
Host side equipment:
1 main frame adopts the digital television receiver of the ST5518 scheme of a low side configuration (as: 2M Flash, 8M Ram).
2 possess UTI interface hardware and driving, agreement support.
3 possess the Server end interface layer based on the set/card separated graphical interface system of Client/server structure.
4 have display device and control interface.
Main frame only is responsible for the control display device, by the interface protocol of graphical interface system, explains the graphical interfaces operational order of card end, work such as finish that command execution and state outcome are returned.
Card end equipment:
The configuration of 1 end is decided according to data broadcasting applied business demand.
2 possess UTI interface hardware and driving, agreement support.
3 possess the client-side interface layer based on the set/card separated graphical interface system of Client/server structure.
4 complete data broadcast service application programs.
The card end is one to be possessed and main frame connection interface, but does not possess the equipment of graphical display output interface.It has carried complete application program software, by the graphical interface system agreement, by with the connecting interface of main frame, send various graphical interfaces operational orders to host side, the display device of main control system end indirectly, the graphical interfaces of finishing applied business presents.As Fig. 2, can form a complete virtual display device interface at the card end, supply is used with program body.
The hierarchical structure that system realizes as shown in Figure 2.The program development of card end is identical with host side, encapsulate by the interface protocol of " virtual display device control interface " among Fig. 2 layer set/card separated graphical interface system, form a virtual display device control API, make applied business program development personnel discover difference less than wherein, help the unification and the portability of development and Design.The operation of the control API of the display device that it is virtual be based upon main frame and the card between connecting interface on, at first on the physical connection interface between main frame and the card, both sides use unified interface protocol, set up an independent data transmission channel on this basis, by transmitting various graphical display control commands, realize control to display device non-indigenous.
The basis that whole system is implemented is the physical connection of the USB interface of host side and card end, as the UTI interface module part in accompanying drawing 3 and the accompanying drawing 4, the hardware foundation of host side and all prerequisite UTI interface of card end: USB interface, host side is equipped with USB HOST control module, and the card end then is to exist as USB device; Perhaps can be conversely, host side exists as USB device, and the card end is equipped with USB HOST control module.Host side and card end can be coupled together by USB interface, and the physical transfer of finishing hardware layer the most basic in the accompanying drawing 2 connects.
On the physical connection basis, hold the transmission controlling and driving program that need finish on the basic USB interface in host side and card, by the transmission channel of USB interface, finish original data interaction interface, be that basic data I/O passage is prepared in the realization of UTI agreement.
On the basis that basic data interaction interface has been arranged, as shown in accompanying drawing 2, host side and card end all must be realized the UTI protocol layer, finish the data interaction of UTI agreement, for the communication of application layer provides transmission channel.
Pass through the UTI agreement between the application layer of host side and card end, set up an independently data transmission channel, be used for transmitting the packet of the control command of the good various graphical interface systems of unified Definition, hold as the Server end and the Client of graphical interface system in the accompanying drawing 2.The software of host side and card end is responsible for finishing the parsing and the command action of various command bag and is carried out, thereby the display device of controlling the other side indirectly shows the Graphics Application interface of oneself.
Card end in the accompanying drawing 3 can form the control API of a virtual demonstration resource or equipment, is used for copying and simulating the control of actual local display device, thus the difference of shielding bottom inside, the unitized overall development pattern.
In addition, the protocol interface definition based on the set/card separated graphical interface system of Client/server structure based on the UTI interface protocol is listed below:
1. display properties is provided with interface
● obtain the display device attribute
At first need to obtain the basic display attribute information of main frame display device, the color depth that comprises size and supported.
The request of table 1 display attribute information
Grammer |
Bit number |
Type |
display_info_req(){ display_info_req_tag } |
24 |
uimsbf |
After main frame receives the request of module, the essential information of the display properties of current system will be returned.
Table 2 display attribute information data
Grammer |
Bit number |
Type |
display_info_reply(){ display_info_reply_tag length weight height depth style } |
24 16 16 16 16 |
uimsbf uimsbf uimsbf uimsbf uimsbf |
Width: screen width
Height: screen height
Depth: the color depth of demonstration is defined as follows:
The definition of table 3 depth color depth
The depth value |
The color depth definition |
64 |
64 looks |
32 |
32 looks |
16 |
16 looks |
8 |
256 looks |
Other |
Keep |
● brush color is set
Brush color, type, width are set.Before the picture operation beginning of module, rely on this to order the color that paintbrush is set.
Table 4 is provided with the order of paintbrush attribute
Grammer |
Bit number |
Type |
set_pen_style_cmd(){ set_pen_style_tag length_field()=5 type width red green blue } |
24 8 8 8 8 8 |
uimsbf uimsbf uimsbf uimsbf uimsbf uimsbf |
Type is the type of paintbrush, the shape of a single point unit of its decision paintbrush.
Width is the width of paintbrush, and it has determined the thickness of paintbrush, the length of side of the square pen of expression in the operation of reality; The diameter of circular pen.
Wherein color is made of the color value of RGB pattern red, green, blue.Main frame will be the current window color of each module independent maintenance.
2. basic graphic operation interface
Basic graphic operation comprises: draw point, setting-out, picture hollow rectangle, curve, polygon frame and filled polygon frame.Can expand according to the needs of system, add new graphic operation.
● draw point
Table 5 is drawn the dot command bag
Grammer |
Bit number |
Type |
draw_point_cmd(){ draw_point_tag length x y } |
24 16 16 |
uimsbf uimsbf uimsbf |
Only (x y) gets final product the coordinate of needs point, is initial point with the upper left corner.
● setting-out
The type of line comprises: patterns such as straight line, curve and various solid wire, dotted line.
Table 6 setting-out order bag
Grammer |
Bit number |
Type |
draw_line_cmd(){ draw_line_tag length line_type line_style x1 y1 x2 y2 r } |
24 8 8 16 16 16 16 16 |
uimsbf uimsbf uimsbf uimsbf uimsbf uimsbf uimsbf uimsbf |
Line_type is the type of line
Line_style is the pattern of setting-out.
The starting point coordinate of line be (x1, y1), terminal point coordinate be (x2, y2).With the screen upper left corner is initial point.
The sweep that will use when r is trace is so that (x1 is y1) with (x2, y2) two points are the diameter coordinate.
● draw the hollow rectangle frame
Table 7 is drawn the order of hollow rectangle frame
Grammer |
Bit number |
Type |
draw_rect_cmd(){ draw_rect_tag length line_style x y width height } |
24 8 16 16 16 16 |
uimsbf uimsbf uimsbf uimsbf uimsbf uimsbf |
(x, y), width and height are the wide and high of rectangle to the coordinate in the rectangle frame upper left corner.
● fill rectangle
Table 8 is filled the rectangle frame order
Grammer |
Bit number |
Type |
fill_rect_cmd(){ fill_rect_tag length x y width height } |
24 16 16 16 16 |
uimsbf uimsbf uimsbf uimsbf uimsbf |
The starting point of rectangle frame is defined as the summit in the upper left corner, its starting point coordinate be (x, y).
Width and height are the wide and high of rectangle.
With the screen upper left corner is initial point.
● draw hollow ellipse shape frame
Table 9 is drawn the order of hollow ellipse shape frame
Grammer |
Bit number |
Type |
draw_ellipse_cmd(){ draw_ellipse_tag length line_style x y v_r h_r } |
24 8 16 16 16 16 |
uimsbf uimsbf uimsbf uimsbf uimsbf uimsbf |
(x y) is the coordinate of central point.
V_r is vertical radius length.
V_h is the radius length of level.
● filled ellipse shape
The order of table 10 filled ellipse shape frame
Grammer |
Bit number |
Type |
fill_ellipse_cmd(){ fill_ellipse_tag length x y v_r h_r } |
24 16 16 16 16 |
uimsbf uimsbf uimsbf uimsbf uimsbf |
(x y) is the coordinate of central point.
V_r is vertical radius length.
V_h is the radius length of level.
● draw the polygon frame
Table 11 is drawn the order of polygon frame
Grammer |
Bit number |
Type |
draw_polygon_cmd(){ draw_polygon_tag length line_style point_number for(i=0;i<point_number;i++){ x y } } |
24 8 16 16 16 |
uimsbf uimsbf uimsbf uimsbf uimsbf |
Point_number is polygonal number of vertices.
(x y) is the coordinate on each summit of polygon.
● filled polygon
The order of table 12 filled polygon
Grammer |
Bit number |
Type |
fill_polygon_cmd(){ fill_polygon_tag length point_number for(i=0;i<point_number;i++){ x y } } |
24 16 16 16 |
uimsbf uimsbf uimsbf uimsbf |
Point_number is polygonal number of vertices.
(x y) is the coordinate on each summit of polygon.
3. picture file display interface
● picture shows
The card end can be finished the demonstration of picture by directly transmitting picture file in host side.
Table 13 picture file shows
Grammer |
Bit number |
Type |
show_image_file_cmd(){ show_image_file_tag length_field() apdu_number last_apdu_number if(apdu_number=0){ file_name_len for(i=0;i<file_name_len;i++){ file_name_text } } for(i=0;i<N;i++){ file_data } } |
24 16 16 8 8 8 |
uimsbf uimsbf uimsbf uimsbf uimsbf uimsbf |
Apdu_number and last_apdu_number are bulk-breaking deblockings number.
File_name_len is the length of filename.
File_name_text is the filename word string.
Extension name in the filename word string will be as the type code of this document.
File_data is a file data.
4. character library and font control interface
This interface is used to realize the function of main control system character library and font, relates to: character library option interface, font attribute are provided with interface and literal display interface.
● the character library setting
Table 14 is provided with the current character library order of main frame
Grammer |
Bit number |
Type |
select_font_req(){ select_font_req_tag length_field() font_name_len for(i=0;i<font_name_len;i++){ font_name_text } } |
24 8 8 |
uimsbf uimsbf uimsbf |
Font_name_len is the length of name of character library.
Font_name_text is the name character of character library.
Character library as index, after main frame receives this order, will change current use character library with character library title word string.
● the font setting
Be used for the specific object of font or the setting of effect.
Table 15 is provided with the current font attribute of main frame
Grammer |
Bit number |
Type |
set_font_type_req(){ set_font_type_req_tag length_field() italic underline rotate reserved rotate_degree font_size font_weight font_color } |
24 1 1 2 4 8 8 16 32 |
uimsbf uimsbf uimsbf uimsbf uimsbf uimsbf uimsbf uimsbf uimsbf |
Italic is the switch sign whether font uses the italic pattern.0: do not use; 1: use.
Underline be down setting-out pattern enable sign.0: do not use; 1: use.
Rotate is the sign whether font rotates, and rotate_degree is the number of degrees of rotation.
Font_size is the size of font, generally refers to font height here, is unit with the pixel.
Font_weight is the severe of font, the thickness of expression font, and the concrete effect of this value will be held the main frame decision by HOST.
Font_color is the color setting of font.Here define color can independently separate with the brush color of drawing, and is independent of each other.
● the literal DCI
After module sets current character library and font attribute by above-mentioned interface, can send the order of display text to host side.
The order of table 16 display text
Grammer |
Bit number |
Type |
show_text_cmd(){ show_text_tag length_field() x y style |
24 16 16 16 |
uimsbf uimsbf uimsbf uimsbf |
text_len for(i=0;i<text_len;i++){ text_char } } |
32 8 |
uimsbf uimsbf |
(x, y): be that literal is presented at the coordinate position on the screen.
Text_char: character information.
Text_len is a string length.
Style: display styles.
Host side is shown to literal on the screen after receiving this order.
● interface measured in literal
Module can be measured screen area size or the scope that it takies according to word content by above-mentioned interface setting when showing.
Table 17 literal measuring command
Grammer |
Bit number |
Type |
measure_text_req(){ measure_text_req_tag length_field() text_len for(i=0;i<text_len;i++){ text_char } } |
24 32 8 |
uimsbf uimsbf uimsbf |
5. graphics field operation-interface
In some applications, a certain zone copy of screen need be operated, paste again.For example typical rolling operation.
● the graphics field copy function
Table 18 copy command
Grammer |
Bit number |
Type |
copy_area_cmd(){ copy_area_tag length_feld() x y width height } |
24 16 16 16 16 |
uimsbf uimsbf uimsbf uimsbf uimsbf |
(x y) is the top left corner apex coordinate in the zone that will copy.
Width is the width value that will copy the zone.
Height is the height value that will copy the zone.
● the graphics field paste operation
Table 19 paste command
Grammer |
Bit number |
Type |
past_area_cmd(){ |
|
|
past_area_cmd_tag length_field() src_xdc_area_handler dest_x dest_y dest_width dest_height } |
24 32 16 16 16 16 |
uimsbf uimsbf uimsbf uimsbf uimsbf uimsbf |
Src_xdc_area_handler is the sign in pictorial data source, is to return after the copy command operation.
(dest_x dest_y) is the top left corner apex coordinate of the target area that will paste.
Dest_width is the width value of target area.
Dest_height is the height value of target area.
The whole functional layout of card end as shown in Figure 3.