A method for constructing DDS communication middleware on a wing highlight operation system
By building a DDS communication middleware on the SylixOS system, the compatibility problem of RTI Connext DDS on SylixOS was solved, and secure and reliable communication of the domestic real-time operating system was realized, meeting the real-time communication needs of distributed systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIHANG UNIV
- Filing Date
- 2023-09-28
- Publication Date
- 2026-05-15
AI Technical Summary
The existing RTI Connext DDS communication middleware has not been fine-tuned for the SylixOS system, resulting in a technical blind spot when deploying DDS communication middleware on the SylixOS embedded real-time operating system, which cannot meet the needs of localization and the market application of real-time communication.
Using the RealEvo-IDE integrated development environment and the official Makefile of RTI Connext DDS, the SylixOS Shared Lib project was built, and the RTI Connext DDS source code was modified to generate dynamic link library files adapted for SylixOS. The rtiddsgen tool was used to generate DDS application code with custom data structures, and the DDS application was developed and deployed using RealEvo-IDE.
It enables secure, reliable, and real-time communication between the SylixOS system and other devices, meets the communication needs of distributed systems, and provides a universal method for porting other middleware to the SylixOS system.
Smart Images

Figure CN117331570B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the development of embedded real-time operating systems and the deployment of data distribution services, specifically to a method for constructing DDS communication middleware on the WingHui operating system. Background Technology
[0002] Data Distribution Service (DDS) is a next-generation data-centric communication middleware protocol and API standard developed by the Object Management Group (OMG) based on standards such as HLA and CORBA. It adopts a publish / subscribe model, emphasizes data-centricity, provides rich quality of service policies, and allows for flexible configuration of data transmission methods within the system, meeting various distributed communication needs. RTIConnext DDS, developed by Real-Time Innovations (RTI) in the United States, was the first commercial DDS product fully compliant with the OMG DDS specification. It holds an 80% market share globally and is widely used in aviation, aerospace, shipbuilding, defense, finance, communications, and automotive fields, including combat systems, ship defense systems, and autonomous driving systems.
[0003] SylixOS is an original large-scale embedded real-time operating system developed by WingHui Information Technology Co., Ltd. Its kernel is 100% self-developed, possessing completely independent and controllable technical capabilities, meeting domestic production requirements. It supports SMP multi-core real-time scheduling and can run on various CPU architecture platforms. Currently, it is widely used in power plants, power grids, aerospace, rail transportation, automotive electronics, industrial automation, communications, and other fields with high real-time requirements. RealEvo-IDE is an integrated development environment (IDE) developed for SylixOS. It integrates design, development, debugging, simulation, deployment, and testing functions, allowing users to develop and debug the operating system kernel, BSP, drivers, and applications.
[0004] RTI Connext DDS only implements the code for publish, subscribe, and QoS policies based on OMG DDS; it doesn't offer a directly deployable product. In practice, users need to compile compatible library files based on their hardware platform architecture and operating system version. While RTI Connext DDS provides compilation instructions for Linux, LynxOS, macOS, VxWorks, and Windows, and some research has shown the ability to generate DDS libraries compatible with VxWorks and VxWorks653 systems, this involves setting up a cross-compilation environment on Linux and using the Makefile provided by RTI Connext DDS. The SylixOS project uses the Windows-based RealEvo-IDE integrated development environment, requiring a complete project rebuild. Furthermore, RTI Connext DDS does not support SylixOS, and some macro definitions in the DDS source code conflict, necessitating fine-tuning. Therefore, deploying DDS communication middleware on SylixOS remains a technological blind spot.
[0005] However, with the rapid development of the Internet of Things, real-time communication of embedded terminals has huge market application prospects. Since SylixOS is an embedded real-time operating system independently developed in my country, it meets the needs of domestic production and will definitely have a place in the domestic embedded terminal market. Deploying DDS on SylixOS to achieve secure and reliable distributed communication has good application prospects. Summary of the Invention
[0006] To meet the current market demand for DDS data distribution functionality in the SylixOS embedded real-time operating system and to solve the aforementioned technical problems, this invention proposes a method for constructing a DDS communication middleware on the SylixOS embedded real-time operating system. Specifically, this invention uses the SylixOS embedded real-time operating system and the RTI Connext DDS 5.0.0 product for construction.
[0007] This invention provides a method for constructing a DDS communication middleware on the SylixOS embedded real-time operating system, as shown in the appendix. Figure 1 As shown, the specific steps include:
[0008] Step S1: For a specific hardware platform architecture, use the RealEvo-IDE integrated development environment to build a SylixOS Base project that is compatible with the hardware platform architecture;
[0009] Step S2: Refer to the official Makefile and documentation of RTI Connext DDS to build the corresponding SylixOS Shared Lib project using the RealEvo-IDE integrated development environment;
[0010] Step S3: Based on the errors reported during the compilation process and relevant information about the SylixOS system, modify the relevant source code of RTI Connext DDS;
[0011] Step S4: Compile the SylixOS Shared Lib project and deploy the generated dynamic link library files to the hardware platform.
[0012] Step S5: Use the rtiddsgen tool and IDL files to generate DDS application code with custom data structures.
[0013] Step S6: Develop and deploy the DDS application using RealEvo-IDE.
[0014] Now, applications developed on the SylixOS system can call the corresponding API functions to establish communication with other devices through DDS.
[0015] It is important to emphasize that existing research has already explored building DDS communication middleware on systems such as VxWorks and Linux. The main difference between this invention and their methods lies in the fact that existing research utilizes the configuration files provided by the RTI Connext DDS official website to build a cross-compilation environment on Linux, ultimately compiling a DDS library adapted to the operating system. However, RTI Connext DDS has not been tweaked for SylixOS, does not provide corresponding configuration files, and lacks cross-compilation tools for Linux. Its development environment, RealEvo-IDE developed by Yihui Information, is only compatible with Windows systems. Furthermore, the method for developing SylixOS applications using RealEvo-IDE differs from the Linux cross-compilation method. To address these differences in system and development environments, this invention adjusts the file structure of RTI Connext DDS and proposes a method for building a SylixOS system DDS communication middleware on Windows, following the SylixOS application development methodology.
[0016] The beneficial effects of this invention are: it enables the domestically developed real-time operating system SylixOS to communicate with other devices via DDS, satisfying the requirements of secure, reliable, and real-time communication in distributed systems. The technical approach provided by this invention can offer a universal method for porting other middleware to the SylixOS system. Attached Figure Description
[0017] Appendix Figure 1 Flowchart of the construction method of DDS communication middleware on SylixOS real-time operating system
[0018] Appendix Figure 2 libnddscorez library file module diagram
[0019] Appendix Figure 3 libnddscz library file module diagram
[0020] Appendix Figure 4 Illustration of adding macro definitions to the LibraryVersion.c file
[0021] Appendix Figure 5 Illustration of content deletion in osapi.1.0 / srcC / memory / heap.c
[0022] Appendix Figure 6 A diagram showing the addition of content to osapi.1.0 / srcC / sharedMemory / sharedMemorySemMutex_sysv.c.
[0023] Appendix Figure 7 A diagram illustrating the comments in osapi.1.0 / srcC / sharedMemory / sharedMemorySemMutex_sysv.c.
[0024] Appendix Figure 8 Illustration of added content in osapi.1.0 / srcC / sharedMemory / sharedMemorySegment_sysv.c
[0025] Appendix Figure 9 Illustration of adding macro definitions in osapi.1.0 / srcC / socket / Socket.c
[0026] Appendix Figure 10 Add a definition diagram to transport.1.0 / srcC / common / Stat.c
[0027] Appendix Figure 11 Add macro definitions to infrastructure / ProductVersion.c (see diagram)
[0028] Appendix Figure 12 Illustration of adding macro definitions in ndds_config / Version_t.c
[0029] Appendix Figure 13 The compilation result of the libd project (image)
[0030] Appendix Figure 14 Schematic diagram of the final compilation folder structure of the libc project
[0031] Appendix Figure 15 IDL file diagram used in embodiments of the present invention
[0032] Appendix Figure 16 Schematic diagram of the project structure of the publisher program ddspub in this embodiment of the invention
[0033] Appendix Figure 17 Result diagram of using DDS communication middleware in this embodiment of the invention Detailed Implementation
[0034] The specific embodiments of the present invention will now be described with reference to the accompanying drawings.
[0035] This invention uses the Fudan Microelectronics FMQL45T900 platform, which runs the SylixOS operating system on an ARMv7 architecture processor, to enable communication between different applications on the same platform and between different applications on different platforms via the DDS communication middleware.
[0036] The specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0037] This invention utilizes RTI Connect DDS to construct a distributed real-time communication middleware on the SylixOS embedded real-time operating system. The specific steps of the construction method are as follows:
[0038] Step S1: For a specific hardware platform architecture, use the RealEvo-IDE integrated development environment to build a SylixOS Base project that is compatible with the hardware platform architecture.
[0039] Step S1.1: Create a new SylixOS Base project. Enter the project name and click "Next" to enter the Base type selection page.
[0040] Step S1.2: Select "SylixOS version" as "default" and click "Next" to enter the Base settings page.
[0041] Step S1.3: Set basic compilation options, mainly including toolchain, debug level, processor and floating-point processor settings.
[0042] Here, you need to select the appropriate CPU type based on the actual SylixOS target system. In this example, "Toolchain" is set to "arm-sylixos-toolchain", "Debug Level" is set to "debug", "CPU Type" is set to "cortex-a7", and "FPU Type" is set to "disable". Click "Next" to proceed to the component selection page.
[0043] Step S1.4: Select the required components.
[0044] In this embodiment, select the components "libsylixos" and "libcextern", click "Finish", and complete the project creation.
[0045] Step S1.5: In the "Project Explorer", locate and select the newly created SylixOS Base project, right-click and select "Build Project" to compile the project.
[0046] Step S2: Refer to the official Makefile and documentation of RTI Connext DDS to build the corresponding SylixOS Shared Lib project using the RealEvo-IDE integrated development environment.
[0047] Step S2.1: Study the Makefile file in the root directory of the DDS source code to determine the file compilation order.
[0048] The Makefile, located in the root directory of the DDS source code, is used to compile and generate the complete DDS library. This file is mainly divided into two parts. The first part deploys the overall architecture of the DDS project files to be compiled and generated, listing them in the form of folders. These folders have logical dependencies on the folders and modules listed before them, and compilation is performed in the order of the list. Therefore, the order of the list is very important. The first-level order is: logging, unit test folders, core product folders, API folders, and feature test folders. Here, a folder set represents a collection of folders providing similar functionality.
[0049] Referring to the official RTI Connext DDS documentation RTI_CoreLibrariesAndUtilities_PlatformNotes.pdf, building an application using C requires compiling the libnddscz and libnddscorez library files. Analysis of the Makefile reveals that the libnddscorez library files mainly include logging, unit test folder sets, and the product's core folder set, as shown in the attached file. Figure 2 As shown; the libnddscz library files mainly consist of an API folder set. Since the program is written in C, only the dds_c.1.0 folder needs to be included, as shown in the attached file. Figure 3 As shown.
[0050] Step S2.2: Build the project for logging, unit test folders, and the core folders of the product.
[0051] Step S2.2.1: Create a new SylixOS Shared Lib project libd.
[0052] Step S2.2.2: Delete the files in the libd project template's src folder, and copy the DDS source code log records, unit test folder set, and product core folder set to the libd project's root directory's src folder. Figure 2 The folder shown.
[0053] Step S2.2.3: Copy the include folder from the core.1.0 folder of the DDS source code to the src folder, and copy sql.h, sqlext.h, sqltypes.h, and sqlucode.h from resource.2.0 / makehome / headerFixes / unix in the DDS source code to the src / include / share folder.
[0054] Step S2.2.4: Configure libd project compilation options.
[0055] Step S2.2.4.1: Select the libd project, right-click and select "Properties", then select "Compiler Setting" under "SylixOS Project", and set C Flags to "-Os-DCPU=ARMARCH7-mlittle-endian-DRTI_MULTICAST-DRTI_ENDIAN_LITTLE-ansi-fno-builtin-mlong-calls-DTOOL_FAMILY=gnu-DTOOL=sfgnu-DRTI_UNIX-DRTI_LINUX-DRTI_USE_MUNCH-DRTI_GCC3-DRTI_POSIX_THREADS".
[0056] Step S2.2.4.2: Add "Include Path" with the path ". / src / include / share".
[0057] Step S2.3: Build the C language API folder set project.
[0058] Step S2.3.1: Create a new SylixOS Shared Lib project libc.
[0059] Step S2.3.2: Delete the files in the libc project template src folder, and copy the files in the DDS source code dds_c.1.0 / srcC folder to the src folder.
[0060] Step S2.3.3: Copy the DDS source code dds_c.1.0 / include folder to the root directory of the libc project.
[0061] Step S2.3.4: Copy the files in the DDS source code core.1.0 / include / share folder and osapi.1.0 / srcC / semaphore / peer to the libc project root directory include / share folder.
[0062] Step S2.3.5: Configure the libc project compilation options.
[0063] Step S2.3.5.1: Select the libc project, right-click and select "Properties", then select "Compiler Setting" under "SylixOS Project", and set C Flags to "-Os-DCPU=ARMARCH7-mlittle-endian-DRTI_MULTICAST-DRTI_ENDIAN_LITTLE-ansi-fno-builtin-mlong-calls-DTOOL_FAMILY=gn u-DTOOL=sfgnu-DRTI_UNIX-DRTI_LINUX-DRTI_USE_MUNCH-DRTI_GCC3-DRTI_POSIX_THREADS".
[0064] Step S2.3.5.2: Add "Include Path", as follows:
[0065] ". / src / log / peer"
[0066] ". / src / topic / peer"
[0067] ". / src / builtin / peer",
[0068] ". / src / builtin / h"
[0069] ". / src / builtintypes / peer",
[0070] “. / src / builtintypes / h”、
[0071] “. / src / data / h”、
[0072] “. / src / data / peer”、
[0073] “. / src / domain / h”、
[0074] “. / src / domain / peer”、
[0075] “. / src / dynamicdata / h”、
[0076] “. / src / dynamicdata / peer”、
[0077] “. / src / factory_plugin / h”、
[0078] “. / src / factory_plugin / peer”、
[0079] “. / src / infrastructure / h”、
[0080] “. / src / infrastructure / peer”、
[0081] “. / src / license / h”、
[0082] “. / src / license / peer”、
[0083] “. / src / monitoring / peer”、
[0084] “. / src / monitoring / h”、
[0085] “. / src / ndds_config / h”、
[0086] “. / src / ndds_config / peer”、
[0087] “. / src / ndds_discovery / h”、
[0088] “. / src / ndds_discovery / peer”、
[0089] “. / src / ndds_transport / h”、
[0090] “. / src / ndds_transport / peer”、
[0091] “. / src / ndds_utility / h”、
[0092] “. / src / ndds_utility / peer”、
[0093] “. / src / publication / peer”、
[0094] “. / src / publication / h”、
[0095] “. / src / sequence / h”、
[0096] “. / src / sequence / peer”、
[0097] “. / src / sqlfilter / h”、
[0098] “. / src / sqlfilter / peer”、
[0099] “. / src / string / h”、
[0100] “. / src / string / peer”、
[0101] “. / src / subscription / peer”、
[0102] “. / src / subscription / h”、
[0103] “. / src / topic / h”、
[0104] “. / src / typecode / h”、
[0105] “. / src / typecode / peer”、
[0106] “. / src / typeobject / h”、
[0107] “. / src / typeobject / peer”、
[0108] “. / src / xml / peer”、
[0109] “. / src / xml / h”、
[0110] “. / include / share”
[0111] Step S3: Due to file structure adjustments and differences in system macro definitions and compilation environments, it is necessary to adjust the DDS source code; based on the errors reported during the compilation process and in conjunction with relevant SylixOS system documentation, modify the RTI Connext DDS related source code;
[0112] Step S3.1: Modify the corresponding files in the libd project.
[0113] Step S3.1.1: Delete the srcC / log / Log.silent.c file in each subfolder.
[0114] Step S3.1.2: Since the file structure has been adjusted, the header file reference path needs to be modified. For example, the file advlog.1.0 / srcC / logger / Logger.c has the following original reference path:
[0115] #include"log.peer.h"
[0116] #include"contextStack.peer.h"
[0117] #include"LoggerDevices.pkg.h"
[0118] #include"LoggerFormat.pkg.h"
[0119] It needs to be changed to:
[0120] #include".. / log / peer / log.peer.h"
[0121] #include".. / contextStack / peer / contextStack.peer.h"
[0122] #include". / h / LoggerDevices.pkg.h"
[0123] #include". / h / LoggerFormat.pkg.h"
[0124] The documents involved are:
[0125]
[0126]
[0127]
[0128]
[0129]
[0130]
[0131]
[0132]
[0133]
[0134]
[0135]
[0136]
[0137] Step S3.1.3: Delete the following files:
[0138] cdr.1.0 / srcC / typeObject / typeObjectSequences.c
[0139] osapi.1.0 / srcC / sharedMemory / sharedMemorySegment_inty.c
[0140] osapi.1.0 / srcC / sharedMemory / sharedMemorySegment_posix.c
[0141] osapi.1.0 / srcC / sharedMemory / sharedMemorySegment_vx6.c
[0142] osapi.1.0 / srcC / sharedMemory / sharedMemorySegment_win.c
[0143] osapi.1.0 / srcC / sharedMemory / sharedMemorySemMutex_inty.c
[0144] osapi.1.0 / srcC / sharedMemory / sharedMemorySemMutex_posix.c
[0145] osapi.1.0 / srcC / sharedMemory / sharedMemorySemMutex_vx6.c
[0146] osapi.1.0 / srcC / sharedMemory / sharedMemorySemMutex_win.c
[0147] osapi.1.0 / srcC / sharedMemory / sysvTrack.c
[0148] osapi.1.0 / srcC / sharedMemory / sysvTrack.h
[0149] pres.1.0 / srcC / participant / ParticipantParam.c
[0150] reda.1.0 / srcC / circularList /
[0151] xml.1.0 / srcC / expat / xmltok_ns.c
[0152] xml.1.0 / srcC / expat / xmltok_impl.c
[0153] Step S3.1.4: Change Package to Static in line 45 of advlog.1.0 / srcC / logger / LoggerFormat.c.
[0154] Step S3.1.5: Add the macro definition to core_version.1.0 / srcC / version / LibraryVersion.c, as shown in the attached file. Figure 4 As shown.
[0155] Step S3.1.6: Delete the appendix in osapi.1.0 / srcC / memory / heap.c Figure 5 The content shown.
[0156] Step S3.1.7: In osapi.1.0 / srcC / process / Host.c, comment out line 71 #include<sockLib.h> Line 128 #include<linux / sockios.h> .
[0157] Step S3.1.8: In osapi.1.0 / srcC / semaphore / semaphore.c, line 690 PTHREAD_RECU RSIVE_MUTEX_INITIALIZER_NP is undefined, change it to PTHREAD_MUTEX_INITIALIZER.
[0158] Step S3.1.9: In osapi.1.0 / srcC / sharedMemory / sharedMemorySemMutex_sysv.c, add the following... Figure 6 The header file references and macro definitions are shown; because `union semun` is redefined, it is commented out, as shown in the appendix. Figure 7 As shown.
[0159] Step S3.1.10: In osapi.1.0 / srcC / sharedMemory / sharedMemorySegment_sysv.c, add the following... Figure 8 The header file references and macro definitions are shown, and line 90 RTI_PRIVATE is changed to Static.
[0160] Step S3.1.11: In osapi.1.0 / srcC / socket / Socket.c, add macro definitions as shown in the attached file. Figure 9 As shown.
[0161] Step S3.1.12: In osapi.1.0 / srcC / thread / Thread.c, comment out line 121 #include<syscall.h> .
[0162] Step S3.1.13: In transport.1.0 / srcC / common / Stat.c, add the appendix Figure 10 The definition is shown.
[0163] Step S3.1.14: In transport.1.0 / srcC / udpv4 / Udpv4.c, comment out #include on line 284.<sockLib.h> Comment out #include on line 333<linux / sockios.h> Line 388 UIO_MAXIOV is undefined, change it to AIO_MAX.
[0164] Step S3.1.15: In xml.1.0 / srcC / expat / xmlparse.c, comment out line 76: #errormemmove does not exist on this platform, nor is a substitute available.
[0165] Step S3.1.16: In xml.1.0 / srcC / expat / xmltok.c, change the reference paths of xmltok_impl.c and xmltok_ns.c to absolute paths.
[0166] Step S3.2: Modify the corresponding files in the libc project.
[0167] Step S3.2.1: Change line 308 of domain / DomainParticipantFactory.c to #include"semaphore.peer.h".
[0168] Step S3.2.2: Add macro definitions to infrastructure / ProductVersion.c, as shown in the attached file. Figure 11 As shown.
[0169] Step S3.2.3: Add macro definitions in ndds_config / Version_t.c, as shown in the attached file. Figure 12 As shown.
[0170] Step S3.2.4: Comment out `struct REDAWorker*worker;` or `Peer struct REDAWorker*worker;` in the following file:
[0171]
[0172]
[0173] Step S3.2.5: Change Peer to Static in line 612 of publication / DataWriter.c.
[0174] Step S4: Compile the SylixOS Shared Lib project and deploy the generated dynamic link library files to the hardware platform.
[0175] Step S4.1: Compile the libd project.
[0176] Step S4.1.1: After completing the corresponding DDS source code modifications, select the libd project, right-click and select "Build Project" to compile the project, obtaining the libd.so dynamic library file, as shown in the attached file. Figure 13 As shown.
[0177] Step S4.2: Compile the libc project.
[0178] Step S4.2.1: After completing the corresponding DDS source code modification, select the libc project, right-click and select "Build Project" to compile the project.
[0179] The Makefile generated by SylixOS was compiled in the wrong order, which prevented the final library file from being generated, but all the intermediate .o files were generated successfully.
[0180] Step S4.2.2: Use the generated intermediate .o files to write a Makefile to complete the final compilation process. Create a new folder with the structure shown in the attached file. Figure 14 As shown.
[0181] Step S4.2.3: Move the .o files in the / release (or debug) / obj / libc.so / src / log folder under the libc project to the libdds_c_log_normalzd.a folder, and move the .o files in the other folders of / release (or debug) / obj / libc.so / src / to libdds_czd.a. Execute the make command to finally generate the libnddscz.so library file.
[0182] Step S4.3: Upload the two generated library files to the SylixOS system's " / lib" directory (or other SylixOS dynamic library search paths, such as " / usr / lib", " / usr / local / lib", etc.). If the application references the library file during compilation, the loader will automatically load the dynamic link library when the application runs.
[0183] Step S5: Use the rtiddsgen tool and IDL files to generate DDS application code with a custom data structure.
[0184] Step S5.1: Define the data structure to be transmitted using an IDL file.
[0185] IDL (Interface Definition Language) is used to define the data types and variable lengths for data transmitted using DDS communication, and it is independent of programming languages. The IDL file used in this embodiment is attached. Figure 15 As shown, the file defines a structure named stu, which has a long integer variable id and a string variable name.
[0186] Step S5.2: Use the rtiddsgen tool to generate DDS application code from the IDL file.
[0187] The rtiddsgen tool is located in the scripts folder under the root directory of the DDS software installation. In the Windows command prompt, type the following command: "%NDDSHOME%\scripts\rtiddsgen.bat" -pauseAtEnd -ppDisable -language C -stringSize 255 -sequenceSize 100 -inputIdl"C:\Users\Administrator\Desk top\temp\stu.idl"", which will generate DDS application code for the custom data structure defined in the IDL file.
[0188] Step S6: Develop and deploy the DDS application using RealEvo-IDE.
[0189] Step S6.1: Develop the publisher program ddspub using RealEvo-IDE. Follow the SylixOS APP project wizard to generate a simple, compileable, and runnable program.
[0190] Step S6.2: Delete the files in the src folder of the ddspub project root directory. Copy the DDS application code generated in step S5.2 to the src folder. Combine the header files in the include folders of each directory of the DDS source code and put them into the include folder. Copy the two library files compiled in step S4 to the lib folder. The final file structure is shown in the attached figure. Figure 16 As shown.
[0191] Step S6.3: Configure the relevant settings for the ddspub project.
[0192] Set the C Flags compilation options to "-DRTI_UNIX-DRTI_LINUX". Add "Include Path" with paths ". / include" and ". / include / ndds". Edit "Linker Setting" and add the library files that need to be linked, namely the two dynamic link library files copied to the lib folder in step S6.2.
[0193] Step 6.4: Compile the ddspub project.
[0194] In the "Project Explorer", select the created ddspub project, right-click and select "Build Project" to complete the compilation of the ddspub project. After successful compilation, a Debug folder will be generated under the ddspub project, and the compiled ddspub executable file will be generated in the Debug folder.
[0195] Step S6.5: Deploy the publisher program ddspub.
[0196] Step S6.5.1: Configure the upload device.
[0197] Select the ddspub project, right-click and select "Properties" → "SylixOS Project" → "Device Setting". Then click "New Device" to add a new device configuration. Finally, select the newly added device on the "DeviceSetting" configuration page and click OK to complete the setup.
[0198] Step S6.5.2: Upload the application.
[0199] After setting the target file, select the ddspub project, right-click, and in the pop-up dialog box, select the "SylixOS" option. Then, select "Upload RealEvo IDE" to start uploading the file. If the file upload is successful, "Upload file success!" will be displayed in the pop-up "Console". If the file upload fails, "Upload file failed!" will be displayed. This is usually due to network or other reasons, such as an incorrect IP address, incorrect username or password, or firewall blocking.
[0200] Step S6.6: Refer to steps S6.1 to S6.5 to develop and deploy the subscriber program ddssub.
[0201] DDS communication can be achieved by launching the publisher program ddspub and the subscriber program ddssub on both the same and different hardware platforms. The communication results are shown in the attached figure. Figure 17 As shown.
[0202] As described above, this invention enables network communication between the SylixOS system and other devices by building a DDS communication middleware on the SylixOS operating system.
[0203] Based on the construction method provided by this invention, a DDS link library file adapted to the SylixOS operating system can be compiled. By calling the DDS application API, applications can be developed to achieve secure, reliable, and real-time data transmission on different embedded platforms, thereby building a distributed system with specific functions.
[0204] Any obvious modifications, equivalent substitutions, or further optimizations made to the above details without departing from the basic technical concept and spirit of the present invention shall be included within the scope of the claims of the present invention.
Claims
1. A method for constructing DDS communication middleware on the WingHui operating system, characterized in that, The communication middleware utilizes the RTI Connext DDS product to build a DDS communication middleware adapted to the SylixOS embedded real-time operating system on the Windows platform; the DDS communication middleware includes a DDS link library and encapsulated entity creation, publishing, and subscription application interfaces; the SylixOS embedded real-time operating system provides a supporting environment for the DDS communication middleware, providing some operating system low-level API support; the construction method includes the following steps: Step S1: Use the RealEvo-IDE integrated development environment to build a SylixOS Base project that is compatible with the hardware platform architecture; Step S2: Use the RealEvo-IDE integrated development environment to build the corresponding SylixOS Shared Lib project; Step S3: Modify the relevant source code of RTI Connext DDS in response to the errors reported during the compilation process; Step S4: Compile the SylixOS Shared Lib project and deploy the generated dynamic link library files to the hardware platform; Step S5: Use the rtiddsgen tool and IDL files to generate DDS application code with a custom data structure; Step S6: Develop and deploy the DDS application using RealEvo-IDE.
2. The method for constructing DDS communication middleware on the WingHui operating system according to claim 1, characterized in that, In step S2, the specific steps are as follows: Step S2.1: Determine the file compilation order based on the Makefile in the DDS source code root directory; Step S2.2: Build the project for logging, unit test folders, and the core folders of the product; Step S2.3: Build the C language API folder set project.
3. The method for constructing DDS communication middleware on the WingHui operating system according to claim 1, characterized in that, In step S3, the specific steps are as follows: Step S3.1: Modify the log records, unit test folder sets, and corresponding files in the product's core folder set project; Step S3.2: Modify the corresponding files in the C language API folder set project.
4. The method for constructing DDS communication middleware on the WingHui operating system according to claim 1, characterized in that... In step S4, the specific steps are as follows: Step S4.1: Compilation log recording, unit test folder set, and core folder set project of the product; Step S4.2: Compile the C language API folder set project; Step S4.3: Deploy the two compiled library files to SylixOS.
5. The method for constructing DDS communication middleware on the WingHui operating system according to claim 1, characterized in that, In step S5, the specific steps are as follows: Step S5.1: Define the data structure to be transmitted using an IDL file; Step S5.2: Use the rtiddsgen tool to generate DDS application code from the IDL file.
6. The method for constructing DDS communication middleware on the WingHui operating system according to claim 1, characterized in that, In step S6, the specific steps are as follows: Step 6.1: Develop the publisher program ddspub using RealEvo-IDE; Step 6.2: Copy the DDS application code, header files, and library files to the ddspub project; Step 6.3: Configure the relevant settings for the ddspub project; Step 6.4: Compile the ddspub project; Step 6.5: Deploy the publisher program ddspub; Step 6.6: Refer to steps S6.1 to S6.5 to develop and deploy the subscriber program ddssub.