Share this

Graphical Interface Development Based on the VxWorks Embedded Operating System

2026-04-06 07:59:11 · · #1
Abstract: This paper mainly describes the relevant technologies for graphical interface development using WindML, the graphical development component of the embedded operating system VxWorks. It summarizes the overall framework of program design and solutions to some problems encountered in actual programming, and implements the expansion of WindML's functionality. Keywords: Embedded operating system; Graphical interface; VxWorks Introduction Embedded systems are products that combine advanced computer technology, semiconductor technology, and electronic technology with specific applications in various industries. Obviously, the operating system in an embedded system is the core of the entire system. VxWorks, as a high-performance embedded operating system, is quite good in terms of reliability, real-time performance, scalability, openness, and ease of use. This paper mainly uses WindML to solve the problems encountered in general graphical development of embedded systems, elaborates on the key technologies in some implementations, and summarizes the general process of graphical interface development for reference. VxWorks Overview: VxWorks is an embedded real-time operating system (RTOS) designed and developed by Wind River Systems in 1983. It is highly flexible, featuring up to 1800 powerful application programming interfaces (APIs); secondly, it has broad applicability, suitable for product designs ranging from the simplest to the most complex; thirdly, it is highly reliable, applicable to critical missions from anti-lock braking systems to space exploration; and finally, it is highly adaptable, compatible with all popular CPU platforms. The VxWorks embedded real-time operating system includes core functionalities such as the Wind microkernel, advanced network support, robust file system and I/O management, and support for C++ and other standards. Tornado and WindML Overview: WindML (Wind Media Library) provides support for multimedia applications running on embedded systems, as well as a framework for developing customizable, standardized device drivers. Furthermore, WindML provides a suite of tools for handling input devices and process events. Most of these functionalities are accomplished through the APIs provided by WindML. WindML consists of two parts: a Software Development Kit (SDK) and a Hardware Development Kit (DDK). The SDK is used to develop applications, providing comprehensive APIs for graphics, input processing, multimedia, fonts, and memory management, and allowing developers to write simple, hardware-independent code on different hardware platforms. The DDK is used for driver development, providing a complete set of driver references for typical hardware configurations, as well as a series of APIs that enable developers to quickly develop drivers. The DDK is extensible and customizable. The DDK is an intermediary layer between the SDK and the hardware, directly connecting to the hardware devices of the application object (including monitors, video, audio, keyboards, and mice). Figure 1 shows the automatic hiding flowchart, and Figure 2 shows the window interlocking flowchart. The overall framework of graphical interface development technology programs: Almost all practical application programming has a framework to follow, and graphical development using WindML is no exception. Although it limits the emergence of some personalized and unique programs, it can reduce programming errors and improve programming efficiency. The overall framework of graphical development design mainly involves calling `uglInitialize` to initialize UGL (Universal Graphics Library), load device drivers, create graphics environment variables, release all resources, and exit. A brief introduction to basic operations in a 2D graphics library: ● Basic drawing elements: Basic graphics are composed of simple geometric elements, including ellipses, lines, and polygons. ● Text rendering and font management: Provides a simple method to draw text information onto the display device. ● Bitmap management: The API provides a simple mechanism to create and render monochrome, color, and transparent bitmap images to the display device. ● Graphics pointer management: A pointer is an image created by the application and positioned on the screen by the pointer device. It supports 254 colors, as well as transparent and inverted pixels. ● Batch drawing: Performs drawing operations, ensuring the integrity of the drawing process, minimizing screen flicker, and making the most efficient use of system resources. ● Graphics environment variables: Contains all information about the characteristics of the drawing, such as basic drawing elements, default bitmap, clipping and viewing area sizes, raster mode, and fonts used for text rendering. ● Color management: Under various display modes or display device types, the color management API facilitates application software development and optimization. ● Double buffering technology: Primarily used to reduce screen flicker during high-frequency or large-area refreshes. Using the API, objects can be drawn onto an undisplayed page (or buffer), and then displayed when the drawing is finished. Event handling—generally includes handling mouse, touchscreen, keyboard, and user-defined events. Region and window management—including region and clipping; and window management. Multimedia—including video, audio, and JPEG. Resource management—including general resources, memory management, device driver registry, overlay surfaces, driver information and management. Implementing extended functionality: In actual programming, you will always encounter various problems. Some can be solved using existing functions, while others cannot be directly solved. We usually write a program to extend the existing functionality (using existing functions and specific algorithms to complete specific functions). Several practical problems I encountered when programming with WindML components were solved through functionality extension. These problems will be discussed in detail below: Automatic hiding of pointers with delay: This is achieved by looping through the event queue and processing events of type pointer to complete mouse message responses. However, before this, the position, image, and size of the mouse pointer must be initialized and displayed on the monitor. Then, during event handling, if the event information cannot be obtained through the function `uglEventGet` (i.e., the function returns a status of `UGL_STATUS_Q_EMPTY`), and if a specific condition is met at this time, or if the system has been idle for a certain period of time, the program will call the function `uglCursorOff` to hide the pointer until a mouse event enters the event queue and is obtained, at which point the function `uglCursorOn` will be called to display the pointer. See Figure 1 for the flowchart. Window Interlocking: Window interlocking requires that at most one window be displayed on the entire screen. To display another window, the current window must be closed. The WindML component itself does not provide this interlocking function. Windows in the component can overlap and nest; theoretically, as long as the system provides sufficient resources, an unlimited number of windows can be displayed on the screen. See Figure 2 for the flowchart. Screen Capture Technology: In the WindML component, all images, text, windows, etc., are drawn onto the display device in pixel form. Therefore, once an object is drawn onto the display device, it is impossible to obtain an object in a certain area using a given function. Thus, a problem arises when user input is required and then the information is retrieved: user input can be achieved by responding to keyboard events and refreshing the corresponding display area; however, retrieving the information from the display area becomes tricky because the WindML component lacks a function to implement this functionality. Therefore, WindML must be extended to implement screen word capture. First, the user input is placed in a window, assuming there are more than one, but no more than ten, items arranged in vertical order. Second, the OK button is clicked within the window to capture the word, while the CANCLE button is clicked. Third, keyboard events are assumed to only respond to number keys, the '.' key, and the four arrow keys. Fourth, all dynamically updated data is stored in a string array pointer and released before closing the window. Keypad Function Simulation Technology: WindML lacks controls like buttons, so to implement the functions of various Windows controls, one must either purchase the Zinc component from Wind River or utilize WindML's existing functionality for simulation. The button control is used as an example to illustrate how to implement button functionality using WindML. First, we must complete the button's appearance design: initially, draw a rectangle within a specified area using one color, and write text inside the rectangle to represent the button's released state; when the pointer clicks on this area, we must simulate the button's pressed state, which can be achieved by redrawing the area with a different color and rewriting the text. Second, we must know through the program when the pointer clicks on the area. We can use the macro `UGL_POINT_IN_RECT(point, rect)` to determine this. When the left mouse button is pressed, we can obtain the current pointer position (x, y) through an event, setting `point.x = x` and `point.y = y`. If `point` is within the given `rect` range (the specified area mentioned above), the macro returns `UGL_TRUE`; otherwise, it returns `GL_FALSE`. This achieves the simulation of the button's function. Since the entire process is relatively simple, a flowchart is not provided here. Conclusion In summary, the WindML graphical development component of the VxWorks embedded real-time operating system is quite powerful in graphical interface development. However, because its development capabilities are very low-level, some common Windows functions do not have direct function or function block implementations. However, because it operates at a very low level, we can extend WindML's functionality through certain algorithms to achieve the desired results. Overall, WindML components are powerful but incomplete, and require a significant amount of code. However, in the embedded systems field, achieving such functionality while emphasizing real-time performance and minimal resource consumption is already quite excellent. References: 1. 'WindML Programmer's Guide 2.0 Beta-2', Wind River Systems, Inc. 2. 'VxWorks Programmer's Guide 5.4', Wind River Systems, Inc.
Read next

CATDOLL 60CM Sasha Silicone

Height: 60cm Silicone Weight: 2.7kg Shoulder Width: 14cm Bust/Waist/Hip: 27/24/31cm Oral Depth: N/A Vaginal Depth: 3-8c...

Articles 2026-02-22
CATDOLL Airi Soft Silicone Head

CATDOLL Airi Soft Silicone Head

Articles
2026-02-22
CATDOLL 135CM Laura

CATDOLL 135CM Laura

Articles
2026-02-22
CATDOLL Hanako Soft Silicone Head

CATDOLL Hanako Soft Silicone Head

Articles
2026-02-22