Drawing priority parameterization control method for ARINC661
Through the drawing depth of Space state stack and DSCB state stack management, and the parameterized control method is adopted, the problem of inefficient widget display priority control in the existing technology is solved, and efficient and concise display priority management is achieved.
Patent Information
- Application Number
- CN202510338781.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-08-01
AI Technical Summary
The prior art is inefficient, has complex logic and messy code structure when implementing widget display priority control, making it difficult to efficiently manage complex display sequences.
The drawing depth is managed through the Space state stack and the DSCB state stack, and the parameterized control method is adopted to allocate depth space and insert subspace, simplify the drawing order and avoid traversing widgets multiple times.
It improves display efficiency, simplifies the code structure, reduces the difficulty of widget development, and realizes logical simplicity and efficient display priority management.
Smart Images

Figure CN120406941A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of integrated civil aircraft avionics systems, and relates to a civil aircraft cockpit display system based on ARINC661, and particularly relates to a parametric control method for rendering priority for ARINC661. Background Art
[0002] An A661 server is a graphics server implemented based on the ARINC661 specification and is an important part of the cockpit display system of modern civil aircraft. In the composition of modern avionics systems (abbreviated as avionics systems), the main work content of the A661 server is to load a definition file (DF), receive dynamic data of user applications (UAs) and excitation signals of peripherals, and through comprehensive parsing and calculation of such information, complete the real-time rendering of UA screens and process interaction requests from crew members. As a window for displaying each UA screen, the A661 server has requirements for rapid interaction response and real-time and reliable screen updates.
[0003] The display screen of the A661 SERVER is composed of layers (layers), and each layer is composed of many widgets. These widgets have the following characteristics: 1. The widgets form a tree structure. 2. There may be widget nodes on the widget tree with special display priority requirements. For example, (a) Some primitives of widgets such as MapHorz_ItemList and MapVert_ItemList need to be displayed below all widgets in the same layer, while some primitives are displayed at the normal level. (b) For popup-type widgets, the popup part needs to be displayed on the top layer when it pops up. (c) When an editbox-type widget is in the edit state, the cursor needs to be displayed below it. 3. Other widgets on the widget tree are displayed in the "preorder" order of the tree.
[0004] The prior art implements the widget display order based on the rendering order. To achieve such a complex display priority, it is necessary to: 1. Traverse all widgets in the same layer three times. In the first traversal, render the primitives displayed below all widgets, and so on for the second and third traversals; 2. Save the popup rendering position during the layer rendering stage and render it separately at the end; 3. Determine whether to render the cursor by the editbox according to the editbox state. This mechanism has disadvantages such as low efficiency (because the coordinate transformation state machine needs to run three times), complex logic, and messy code structure. Summary of the Invention
[0005] The object of the present invention is to provide a parameterized control method for drawing priorities for ARINC661, which controls the display priority by setting parameters instead of changing the drawing order. Compared with the previous technologies, the display priorities of each primitive are controlled by simply setting parameters, without traversing the widgets multiple times, avoiding complex drawing orders, having high efficiency, simple logic, and reducing the development difficulty of widget code.
[0006] The object of the present invention is achieved by the following technical solutions:
[0007] A parameterized control method for drawing priorities for ARINC661 manages the drawing depth through a Space status stack and a DSCB status stack;
[0008] Within the drawing depth, a depth space is first allocated for drawing the top-level primitives, and then when drawing each layer, a depth space is allocated for each layer. Three depth sub-spaces, namely LEVEL_1, LEVEL_2, and LEVEL_3, are allocated within each depth space to draw the primitives in the upper layer, the same layer, and the lower layer within the layer respectively. If a primitive that needs to be inserted for display is encountered, an insertion sub-space is allocated within the depth space to draw the inserted primitive;
[0009] The Space status stack consists of several Space_units. The status parameters maintained by the Space_unit include Maxdepth, Mindepth, State, and Curdepth, which are used to manage the three depth sub-spaces of LEVEL_1, LEVEL_2, and LEVEL_3 and the insertion sub-space. Among them:
[0010] Among them, Maxdepth and Mindepth respectively represent the maximum depth value and the minimum depth value of the depth range of the depth sub-space or the insertion sub-space;
[0011] State indicates whether the Space_unit is occupied;
[0012] Curdepth represents the current depth used for drawing in the depth sub-space or the insertion sub-space, which is initialized to Maxdepth and will be updated as the primitives are drawn;
[0013] The DSCB status stack consists of several layer status frames and a reserved top - level display status frame. The status parameters maintained by each status frame include depth Space, current Space, current depth level, current spacetype, curBlockMaxDepth, and curBlockMinDepth, which are used to manage the depth space required during the drawing process of a given layer. Among them:
[0014] depth Space points to three Space_units that manage the three depth sub - spaces of LEVEL_1, LEVEL_2, and LEVEL_3 in the depth space;
[0015] current Space points to the variable Curdepth of Space_unit
[0016] current depth level points to which of the three depth sub - spaces of LEVEL_1, LEVEL_2, and LEVEL_3 is the current depth sub - space;
[0017] current space type points to the category of the current depth sub - space, either a normal sub - space or an inserted sub - space;
[0018] curBlockMaxDepth saves the maximum depth of the depth space, and curBlockMinDepth saves the minimum depth of the depth space.
[0019] Preferably, a method for parametric control of drawing priority for ARINC661 has the following drawing process:
[0020] Step 1: The A661 server initializes the DSCB status stack and the Space status stack, allocates the top - level display depth space, and hands it over to the reserved top - level display status frame of the DSCB status stack for management;
[0021] Step 2: The A661 server traverses all layers. For each layer to be drawn, it saves the current depth space information into the current layer status frame of the DSCB status stack, allocates a depth space for the layer to be drawn, hands it over to the layer status frame of the DSCB status stack pointed to by the stack pointer for management, sets the newly allocated depth space as the current one, and increments the stack pointer by 1;
[0022] Step 3: Draw the primitive of each widget within the layer. For each completed drawing of a widget primitive, a depth update step needs to be subtracted from the variable Curdepth of the corresponding Space_unit in the Space status stack; (a) If the primitive needs to be displayed on the top layer, switch from the current depth subspace to the specified subspace in the top layer display status frame, that is, save the current drawing depth to the variable Curdepth of the Space_unit pointed to by current Space in the current layer status frame, then switch to the specified depth subspace of the reserved top layer display status frame, read the depth space information Curdepth, and set it as the current drawing depth to complete the drawing of the top layer display primitive; (b) If the primitive needs to be inserted for display, reserve an insertion depth space between the primitive sequences that need to be inserted for display, that is, pre-allocate an insertion subspace before drawing a certain primitive, which is managed by the Space_unit in the Space status stack, where Maxdepth is set to the current drawing depth, and Mindepth is the current drawing depth minus the size of the specified insertion subspace, and then skip this reserved insertion subspace to complete the drawing of the remaining primitives; when drawing the inserted primitive, switch from the current depth subspace to the reserved insertion depth subspace, that is, save the current drawing depth to the current depth subspace of the current layer status frame in the DSCB status stack, set the current Space in the DSCB status stack of the current layer status frame to the insertion depth space, set the current space type to the insertion subspace, read the Curdepth of the insertion subspace and set it as the current drawing depth to complete the drawing of the inserted primitive; (c) If the primitive needs to be displayed above, at the same level, or below other widgets in the layer, switch from the current drawing depth subspace to the corresponding LEVEL_1, LEVEL_2, or LEVEL_3 depth subspace, that is, save the current drawing depth to Curdepth of the Space_unit, then update the current Space in the DSCB status stack to the new depth subspace, update the currentdepth level to the corresponding LEVEL_1, LEVEL_2, or LEVEL_3, read the Curdepth in this depth subspace and set it as the current drawing depth to complete the drawing; after completing the drawing of the top layer display primitive or the inserted primitive, restore to the original depth subspace to complete the drawing of the primitives of the remaining widgets.
[0023] Preferably, the drawing process further includes:
[0024] When saving the current depth space to the current layer state frame, it should be checked whether the current depth space exceeds the range specified by the corresponding Maxdepth and Mindepth. If it exceeds, the exceeded part should be subtracted to achieve the independence of depth sub-spaces, and the error should be recorded. When applying to insert a sub-space, it should be checked whether the current sub-space is an inserted sub-space. If it is an inserted sub-space, the application to insert the space should be stopped.
[0025] The beneficial effects of the present invention are as follows:
[0026] By calling the interface to set parameters, the present invention can achieve the top-level display, inserted display of specific graphic elements, or display the graphic elements below, on the same layer, or above other graphic elements in the current layer, which can avoid repeated traversal and complex drawing order, simplify the code structure, reduce the development difficulty of the widget, and improve the efficiency. Brief Description of the Drawings
[0027] Figure 1 It is a schematic diagram of the management model of the DSCB status stack and the Space status stack in a method for parametric control of drawing priority for ARINC661.
[0028] Figure 2 It is a schematic diagram of the functions of each status frame of the DSCB status stack.
[0029] Figure 3 It is a schematic diagram of the single-cycle drawing process of the A661 server screen in a method for parametric control of drawing priority for ARINC661. Detailed Embodiment
[0030] The present invention will be further described in detail below with reference to the drawings and embodiments.
[0031] See Figure 1 As shown, a method for parametric control of drawing priority for ARINC661 shown in this embodiment manages the drawing depth through the Space status stack and the DSCB (Depth Space Control Block) status stack to achieve multi-level display priority parametric control.
[0032] The DSCB status stack consists of several layer status frames and a reserved top - layer display status frame. The status parameters maintained by each status frame include depth Space, current Space, current depth level, cur rent spacetype, curBlockMaxDepth, curBlockMinDepth, which are used to manage the depth space required during the drawing process of a given layer. The depth space is a sub - interval within the maximum drawing depth range. Drawing a primitive within this depth space means that the drawing depth of the primitive is within this sub - interval. The depth space consists of three depth sub - spaces: LEVEL_1, LEVEL_2, and LEVEL_3.
[0033] The Space status stack consists of several Space_units. The status parameters maintained by a Space_unit include Maxdepth, Mindepth, State, Curdepth, which are used to manage the three depth sub - spaces of LEVEL_1, LEVEL_2, and LEV EL_3 and the inserted sub - space. Therefore, the number of Space_units needs to meet the requirements of three times the number of status frames and the inserted space.
[0034] In the initial state, a depth space of a fixed size is allocated within the drawing depth for drawing the top - layer primitives, so that this depth space has the minimum (it can also be set to the maximum, depending on the settings of the graphics driver. It can be set that the smaller the graphics driver depth, the higher or lower the display priority. For the sake of description, assume that the smaller the depth, the higher the priority, the same below) depth range. This depth space is managed by the status parameters maintained by the reserved top - layer display status frame of the DSCB status stack (such as Figure 2As shown, specifically, curBlockMaxDepth stores the maximum depth of this depth space, and curBlockMinDepth stores the minimum depth of this depth space; three depth sub-spaces are allocated for this depth space, namely LEVEL_1, LEVEL_2, and LEVEL_3. The three depth sub-spaces can allocate the depth space determined by curBlockMaxDepth and curBlockMinDepth according to a custom ratio. That is, the depth ranges of the three depth sub-spaces are (curBlockMinDepth, curBlockMinDepth + x1), (curBlockMinDepth + x1 + step, curBlockMinDepth + x2), and (curBlockMinDepth + x2 + step, curBlockMaxDepth), where x1 and x2 are increments determined according to the ratio, and step is the depth update step. The information of these three depth sub-spaces is respectively saved into the state parameters maintained by three Space_units. The three Space_units are associated with depthSpace, that is, the relevant three Space_units can be found through depthSpace. Among them, Maxdepth and Mindepth respectively represent the maximum and minimum depth values of the depth range of the depth sub-space, state indicates whether this Space_unit is occupied, and is initialized to 0. The state of these three Space_units is set to 1 because they are occupied. Curdepth represents the current depth used for drawing in this depth sub-space and is initialized to Maxdepth. As the primitive is drawn, Curdepth will be updated; the initial current depth sub-space for this depth space is set to LEVEL_2 and saved into current depth level (managing the level of the current depth sub-space, that is, LEVEL_x) and current Space (managing the Space_unit corresponding to LEVEL_x, that is, the corresponding Space_unit can be found through current Space). The type of the initial current depth sub-space is set to the normal sub-space (NORMAL_TYPE, and the other is the inserting sub-space INSERTING_TYPE, see the following for details) and saved into current spacetype. This depth space is used as the depth space for drawing the primitives displayed at the top layer. When starting to draw a certain layer, according to the number of widgets contained in the layer, on the basis of the Mindepth of the previous layer state frame, a depth space of an appropriate size is applied downward and managed by the layer state frame of DSCB. The specific process is the same as the management of reserving the top layer display state frame, and at the same time, the stack top pointer is incremented by 1.
[0035] When rendering widgets within a layer, if the primitives of a widget need to be displayed on the top layer, first save the current depth space information to the DSCB current layer status frame. Then switch to the specified depth subspace of the reserved top layer display status frame. After the rendering is completed, switch back to the original layer status frame to complete the rendering of the remaining widget primitives.
[0036] When rendering widgets within a layer, if the primitives of a widget do not need to be displayed on the top layer, switch among the three depth subspaces within the same depth space. This can display the primitives below, at the same level as, or above other primitives in the current layer. At the same time, this technology supports the inserted display of primitives. An inserted depth space is reserved between the sequences of primitives that need to be inserted and displayed. Switch to this pre-allocated depth subspace and complete the rendering of the inserted primitives to achieve the display of the primitive within the continuous sequence of primitives.
[0037] As Figure 3 shown, the following is the single-cycle rendering process of the A661 server screen based on the rendering priority parameterization control technology for ARINC661:
[0038] 1. The A661 server initializes the DSCB status stack and the Space status stack. Allocate the top layer display depth space.
[0039] 2. The A661 server traverses all layers. For each layer to be rendered, save the current depth space information to the DSCB current layer status frame, allocate a depth space for the layer to be rendered, and hand it over to the layer status frame of the DSCB status stack pointed to by the stack pointer (i.e., the top status frame). Set this depth space as the current one, and increment the stack pointer by 1 so that the stack pointer always points to the top of the stack.
[0040] 3. Draw the primitives of each widget within the layer. After each widget primitive is drawn, the current drawing depth needs to be decreased by a depth update step. (a) If the primitive needs to be displayed on the top layer, switch from the current depth subspace to the specified subspace in the top layer display state frame. That is, save the current drawing depth to the variable Curdepth of the Space_unit pointed to by currentSpace in the current layer state frame, then switch to the specified depth subspace of the reserved top layer display state frame, read the depth space information Curdepth, and set it as the current drawing depth to complete the drawing of the top layer display primitive. (b) If the primitive needs to be inserted for display, reserve an insertion subspace between the primitive sequences that need to be inserted for display. That is, pre-allocate a depth subspace before drawing a certain primitive (also managed by Space_stack, similar to the NORMAL_TYPE depth subspace, with the special feature that Maxdepth is set to the current drawing depth, and Mindepth is the current drawing depth minus the size of the specified insertion space, generally 50 * the depth update step, so that an insertion space can be left in the current depth subspace), and update the drawing depth to the Mindepth of the insertion depth space to skip this reserved space, then complete the drawing of the remaining primitives. When drawing the inserted primitive, switch from the current depth subspace to the reserved insertion depth subspace. That is, save the current drawing depth to the current depth subspace of the current DSCB state frame, set the currentSpace of the current DSCB state frame to the insertion depth space, set the current space type to INSERTING_TYPE, read the Curdepth of the insertion space and set it as the current drawing depth to complete the drawing of the inserted primitive. (c) If the primitive needs to be displayed above, at the same level, or below other widgets in the layer, switch from the current drawing subspace to the corresponding LEVEL_1, LEVEL_2, or LEVEL_3 depth subspace. That is, save the current drawing depth to the Curdepth of the Space_unit managed by current Space, then update current Space to the new depth subspace, update the current depth level to the corresponding LEVEL_1, LEVEL_2, or LEVEL_3, read the Curdepth in this depth subspace and set it as the current drawing depth to complete the drawing. After completing the drawing of special primitives (such as top layer display primitives, inserted display primitives, etc.), restore to the original depth subspace to complete the drawing of the primitives of the remaining widgets.
[0041] 4. In the process of display priority management, to ensure reliability and robustness, various security checks should be carried out: 1 When saving the current drawing depth into the current state frame, it should be verified whether the current drawing depth exceeds the range specified by the corresponding Maxdepth and Mindepth. If it exceeds, the exceeded part should be subtracted to achieve the independence of depth subspaces and record the error. 2 When applying for an insertion space, it should be verified whether the current space is an insertion space. If it is an insertion space, the application for the insertion space should be stopped to avoid the nesting of insertion spaces.
[0042] It can be understood that for those of ordinary skill in the art, equivalent substitutions or changes can be made according to the technical solution of the present invention and its inventive concept, and all such changes or substitutions should fall within the protection scope of the claims appended to the present invention.
Claims
1. A parameterized control method for drawing priorities oriented to ARINC661, characterized in that Manage the drawing depth through the Space status stack and the DSCB status stack; First, allocate a depth space within the drawing depth for drawing the top-level primitives. Then, when drawing each layer, allocate a depth space for each layer. In each depth space, allocate three depth sub-spaces, namely LEVEL_1, LEVEL_2, and LEVEL_3, for drawing the primitives in the upper, same, and lower layers within the layer respectively. If there are primitives that need to be inserted for display, then allocate an insertion sub-space within the depth space for drawing the inserted primitives; The Space status stack consists of several Space_units. The status parameters maintained by the Space_unit include Maxdepth, Mindepth, State, and Curdepth, which are used to manage the three depth sub-spaces of LEVEL_1, LEVEL_2, and LEVEL_3 and the insertion sub-space. Among them: Among them, Maxdepth and Mindepth respectively represent the maximum depth value and the minimum depth value of the depth range of the depth sub-space or the insertion sub-space; state indicates whether this Space_unit is occupied; Curdepth represents the current depth used for drawing in the depth sub-space or the insertion sub-space, and is initialized to Maxdepth. As the primitives are drawn, Curdepth will be updated; The DSCB status stack consists of several layer status frames and a reserved top-level display status frame. The status parameters maintained by each status frame include depth Space, current Space, current depth level, current space type, curBlockMaxDepth, and curBlockMinDepth, which are used to manage the depth space required during the drawing of a given layer. Among them: depth Space points to the three Space_units that manage the three depth sub-spaces of LEVEL_1, LEVEL_2, and LEVEL_3 under the management depth space; current Space points to the variable Curdepth of the Space_unit current depth level points to which of the three depth sub-spaces of LEVEL_1, LEVEL_2, and LEVEL_3 is the current depth sub-space; current space type points to the category of the current depth sub-space, either a normal sub-space or an insertion sub-space; curBlockMaxDepth stores the maximum depth of the depth space, and curBlockMinDepth stores the minimum depth of the depth space.
2. The parametric control method for drawing priority according to claim 1, which is oriented to ARINC661, is characterized in that The drawing process is as follows: Step 1: The A661server initializes the DSCB status stack and the Space status stack, allocates the top-level display depth space, and hands it over to the reserved top-level display status frame of the DSCB status stack for management; Step 2: The A661 server traverses all layers. For each layer to be drawn, it saves the current depth space information into the current layer status frame of the DSCB status stack, allocates a depth space for the layer to be drawn, hands it over to the layer status frame of the DSCB status stack pointed to by the stack pointer for management, sets the newly allocated depth space as the current one, and increments the stack pointer by 1; Step 3: Draw the primitives of each widget within the layer. For each completed primitive drawing of a widget, the depth update step size needs to be subtracted from the variable Curdepth of the corresponding Space_unit in the Space state stack. (a) If the primitive needs to be displayed on the top layer, switch from the current depth subspace to the specified subspace of the top display state frame, that is, save the current drawing depth to the variable Curdepth of the Space_unit pointed to by current Space in the current layer state frame, then switch to the specified depth subspace of the reserved top display state frame, read the depth space information Curdepth, and set it as the current drawing depth to complete the drawing of the top display primitive. (b) If the primitive needs to be inserted for display, reserve the insertion depth space between the primitive sequences that need to be inserted for display, that is, pre-allocate the insertion subspace before drawing a certain primitive, which is managed by the Space_unit in the Space state stack. Set Maxdepth to the current drawing depth, and Mindepth to the current drawing depth minus the size of the specified insertion subspace, then skip this reserved insertion subspace to complete the drawing of the remaining primitives. When drawing the inserted primitive, switch from the current depth subspace to the reserved insertion depth subspace, that is, save the current drawing depth to the current depth subspace of the current layer state frame in the DSCB state stack, set the current Space in the DSCB state stack of the current layer state frame to the insertion depth space, set the current space type to the insertion subspace, read the Curdepth of the insertion subspace and set it as the current drawing depth to complete the drawing of the inserted primitive. (c) If the primitive needs to be displayed above, at the same level, or below other widgets within the layer, switch from the current drawing depth subspace to the corresponding LEVEL_1, LEVEL_2, or LEVEL_3 depth subspace, that is, save the current drawing depth to the Curdepth of the Space_unit, then update the current Space in the DSCB state stack to the new depth subspace, update the currentdepth level to the corresponding LEVEL_1, LEVEL_2, or LEVEL_3, read the Curdepth in this depth subspace and set it as the current drawing depth to complete the drawing. After completing the drawing of the top display primitive or the inserted display primitive, restore to the original depth subspace to complete the drawing of the primitives of the remaining widgets.
3. A method for parametric control of drawing priorities for ARINC661 according to claim 2, characterized in that The drawing process also includes: When saving the current depth space to the current layer state frame, it should be verified whether the current depth space exceeds the range specified by the corresponding Maxdepth and Mindepth. If it exceeds, subtract the exceeded part to achieve the independence of depth subspaces and record the error. When applying to insert a subspace, it should be verified whether the current subspace is the subspace to be inserted. If it is the subspace to be inserted, the application to insert the space should be stopped.