Data Distribution Service-Based Simulator Networking Method, System, Device, and Medium
By generating a publish-subscribed communication template program for simulator interface programs and data distribution services, the problem of high efficiency and insufficient communication real-time nature of the simulator networking method in the prior art is solved, efficient networking without middleware forwarding and platform upgrades is achieved, and real-time and efficiency of simulator networking is improved.
Patent Information
- Application Number
- CN202411177687.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2044-08-26
AI Technical Summary
The existing DDS-based emulator networking methods have shortcomings in terms of efficiency and real-time communication when implementing networking functions. It is necessary to add DDS middleware forwarding software or overall upgrade and compilation of simulation platform code, resulting in increased time delay and bandwidth consumption.
By generating a publish subscription communication template program for simulator interface programs and data distribution services based on the interface definition language file, the mapping of simulator interface data and data distribution network data is realized, avoiding the overall upgrade and compilation of DDS middleware forwarding software and simulation platform code, and using fixed frequency call and interrupt processing methods to process state data and interactive data.
The development process of networking functions is shortened, time delay and bandwidth consumption is reduced, and the efficiency of networking functions and communication real-time performance is improved.
Smart Images

Figure CN119182675B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of simulator networking, and in particular to a simulator networking method, system, device and medium based on Data Distribution Service (DDS). Background Art
[0002] In the technical field of simulator networking, distributed network communication technology plays a key role in the flight formation training and cooperative combat simulation of multiple simulators, ensuring low latency and high reliability of data transmission, which is crucial for enhancing the realism of the simulation environment and the effectiveness of training. The current distributed network communication technology usually involves architectures such as Distributed Interactive Simulation (DIS), High Level Architecture (HLA), and Data Distribution Service (DDS). However, due to differences in the implementation levels of DIS interface standards and HLA interface standards by different manufacturers, there are usually challenges in the interconnection of systems based on these standards. In contrast, since the underlying layer of the DDS architecture uniformly adopts the RealTime Publish Subscribe (RTPS) protocol, the networking solution based on DDS can more conveniently achieve interoperability between simulators.
[0003] The current DDS-based simulator networking methods mainly include two types. One method is to upgrade the simulator through the DDS middleware forwarding software to enable the simulator to have networking capabilities. The other method is to directly embed the DDS data interface into the simulator simulation software to implement the functional development and upgrade of the simulator simulation software, enabling the simulator to have networking capabilities. However, the former increases the time delay and bandwidth consumption of network communication, reducing the real-time performance of communication, and the latter requires a complete upgrade and compilation of the original platform code, with relatively large investment in manpower and time. The above shows that the current DDS-based simulator networking methods are insufficient in terms of communication real-time performance or efficiency in implementing networking functions. Summary of the Invention
[0004] The present invention provides a simulator networking method, system, device and medium based on data distribution service, which is used to solve the deficiencies in the efficiency and communication real-time performance of the existing DDS-based simulator networking method when implementing the networking function, and realizes simulator networking without adding DDS middleware forwarding software or overall upgrading and compiling the simulation platform code. Only after generating the simulator interface program and simulator interface program according to the interface definition language file, the simulator interface data and data distribution network data can be mapped, shortening the development process when implementing the networking function, reducing time delay and bandwidth consumption, and thus improving the efficiency and communication real-time performance when implementing the networking function.
[0005] The present invention provides a simulator networking method based on data distribution service, including the following steps.
[0006] According to the interface definition language determination rules, determine all interface data required for simulator networking to obtain an interface definition language file.
[0007] According to the interface definition language file, combined with the interface definition language template program generation tool, generate a publish-subscribe communication template program for the data distribution service in the data distribution service unit.
[0008] According to the interface definition language file, combined with the simulator interface definition rules, generate a simulator interface program in the data distribution service unit.
[0009] According to the publish-subscribe communication template program and the simulator interface program, map the simulator interface data and the data distribution network data.
[0010] According to the simulator networking method based on data distribution service provided by the present invention, the publish-subscribe communication template program includes: a subscription class family publish-subscribe communication template program and a publish class family publish-subscribe communication template program; according to the publish-subscribe communication template program and the simulator interface program, mapping the simulator interface data and the data distribution network data includes: according to the subscription class family publish-subscribe communication template program and the publish class family publish-subscribe communication template program, reading the data distribution network data in the subscription class family and writing the data distribution network data to the first pointer position in the simulator interface program; according to the subscription class family publish-subscribe communication template program and the publish class family publish-subscribe communication template program, reading the simulator interface data from the second pointer position in the simulator interface program and writing the simulator interface data to the data distribution service network.
[0011] A simulator networking method based on data distribution service provided by the present invention further includes: instantiating a subscription class family as a first type of object and instantiating a publishing class family as a second type of object in a data distribution service manager; passing a first pointer position corresponding to simulator interface data to the first type of object, and passing a second pointer position corresponding to the simulator interface data to the second type of object; initializing the network states of the first type of object and the second type of object; and updating the simulator interface data in the publishing class family when the initialization is completed and a network connection is established.
[0012] A simulator networking method based on data distribution service provided by the present invention, the mapping result includes: a mapping relationship between the simulator and the data distribution service network, and a publishing and subscribing relationship between the data distribution service unit and other function simulation units of the simulator.
[0013] A simulator networking method based on data distribution service provided by the present invention further includes: when the data in the data distribution network is status data, updating the status data by using a fixed-frequency call mode; when the data in the data distribution network is interaction data, performing an interrupt processing mode to perform interrupt processing and resolution on the interaction data to obtain a resolution result; and performing simulation according to the resolution result.
[0014] A simulator networking method based on data distribution service provided by the present invention, performing an interrupt processing mode to perform interrupt processing and resolution on the interaction data to obtain a resolution result, includes: determining an interrupt request according to relevant information of the interaction data; when the interrupt request matches the interrupt registration information, assigning the interaction data as interrupt data, and generating a target interrupt request carrying the interrupt data, where the interrupt registration information is pre-registered to an interrupt trigger source system; and triggering a corresponding interrupt registration information processing function according to the target interrupt request to perform resolution on the interrupt data to obtain a resolution result.
[0015] The present invention also provides a simulator networking system based on data distribution service, which is characterized by including: a subscription class family of data distribution service, a publishing class family, a data distribution service unit, and a data distribution service manager; wherein, the subscription class family is used for subscribing to data distribution network data of the data distribution service network; the publishing class family is used for publishing simulator interface data to the data distribution service network; the data distribution service unit is used for determining a publish-subscribe communication template program and a simulator interface program. The publish-subscribe communication template program is generated based on an interface definition language file and an interface definition language template program generation tool, and the simulator interface program is generated based on the interface definition language file and simulator interface definition rules; the data distribution service manager is used for instantiating the subscription class family as a first type of object and instantiating the publishing class family as a second type of object; passing the first pointer position corresponding to the simulator interface data to the first type of object, and passing the second pointer position corresponding to the simulator interface data to the second type of object; initializing the network states of the first type of object and the second type of object; and updating the simulator interface data in the publishing class family when the initialization is completed and the network connection is established. Among them, the publish-subscribe communication template program of the subscription class family and the publish-subscribe communication template program of the publishing class family are determined based on the interface definition language file and the interface definition language template program, and the interface definition language file is determined based on the interface definition language determination rules.
[0016] The present invention also provides a simulator networking device based on data distribution service, including the following modules.
[0017] A file determination module, configured to determine all interface data required for simulator networking according to the interface definition language determination rules, and obtain an interface definition language file.
[0018] A template program determination module, configured to generate a publish-subscribe communication template program of the data distribution service in the data distribution service unit according to the interface definition language file and in combination with an interface definition language template program generation tool.
[0019] An interface program determination module, configured to generate a simulator interface program in the data distribution service unit according to the interface definition language file and in combination with simulator interface definition rules.
[0020] A data mapping module, configured to map simulator interface data and data distribution network data according to the publish-subscribe communication template program and the simulator interface program.
[0021] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method for simulator networking based on data distribution service as described in any one of the above is implemented.
[0022] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements any one of the above-mentioned simulator networking methods based on data distribution services.
[0023] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements any one of the above-mentioned simulator networking methods based on data distribution services.
[0024] A simulator networking method, system, device, and medium based on data distribution services provided by the present invention determine all interface data required for simulator networking by determining rules according to the Interface Definition Language (IDL) to obtain an IDL file; generate a publish-subscribe communication template program for data distribution services in the data distribution service unit by combining the IDL file with an IDL template program generation tool; generate a simulator interface program in the data distribution service unit by combining the IDL file with simulator interface definition rules; and map simulator interface data and data distribution network data according to the publish-subscribe communication template program and the simulator interface program. The technical solution of the present invention is used to solve the deficiencies in the efficiency and communication real-time performance of the existing DDS-based simulator networking methods when implementing the networking function, and to achieve simulator networking without adding DDS middleware forwarding software or overall upgrading and compilation of the simulation platform code. Only after generating the simulator interface program and the simulator interface program according to the IDL file, the simulator interface data and data distribution network data can be mapped to realize simulator networking, shortening the development process when implementing the networking function and reducing time delay and bandwidth consumption, thereby improving the efficiency and communication real-time performance when implementing the networking function. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0026] Figure 1 is a schematic diagram of the scenario of the simulator networking method based on data distribution services provided by the present invention;
[0027] Figure 2 is a schematic diagram of the structure of the simulator networking system provided by the present invention;
[0028] Figure 3 is a schematic flowchart of the simulator networking method based on data distribution services provided by the present invention.
[0029] Figure 4 It is a schematic structural diagram of a simulator networking system based on data distribution service provided by the present invention.
[0030] Figure 5 It is a schematic structural diagram of a simulator networking device based on data distribution service provided by the present invention.
[0031] Figure 6 It is a schematic structural diagram of an electronic device provided by the present invention. Detailed implementation manners
[0032] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative efforts shall fall within the protection scope of the present invention.
[0033] To better understand the embodiments of the present invention, the background technology will be elaborated in detail first.
[0034] The current DDS-based simulator networking methods generally include two types. One method is to upgrade the simulator through a DDS middleware forwarding software to enable the simulator to have networking capabilities. The other method is to directly embed the DDS data interface into the simulator simulation software to implement the functional development and upgrade of the simulator simulation software, so that the simulator has networking capabilities.
[0035] For the first method, specifically, the DDS intermediate forwarding software communicates with the simulator through sockets (SOCKETS), and also communicates with the DDS network. The DDS intermediate forwarding software is responsible for converting the data sent by the SOCKET into DDS communication data, or receiving DDS network data and converting it into SOCKET data. The original simulator simulation network platform does not need to conduct integrated development of the DDS communication module, but such conversion increases the time delay and bandwidth consumption of network communication, reduces the real-time performance of communication, loses the natural technical advantages of distributed networking technology, and the existence of the DDS intermediate forwarding software also increases the system maintenance cost.
[0036] For the second method, specifically, the original simulator simulation platform is functionally developed and upgraded, and the DDS data communication interface is directly embedded into the simulator simulation platform software. The entire process requires re-modifying and compiling the code of the original platform software, and the input of manpower and time is relatively large.
[0037] In summary, the current DDS-based simulator networking methods have deficiencies in terms of high efficiency or communication real-time performance when implementing the networking function.
[0038] In addition, in the current DDS-based simulator networking method, simulator simulation nodes can act as Publishers in the DDS network to send their own data to the DDS network, or as Subscribers to receive data from other simulators in the DDS network. It should be noted that the data processed by the simulator can be divided into two categories: status data and interaction data. Among them, status data involves self-descriptive information of a single simulator, such as position, attitude, and on-board system status, etc., which has no direct impact on other simulators and generally changes in real time; interaction data directly affects the behavior of other simulators, such as collisions between simulators or weapon hit situations, which changes under specific circumstances.
[0039] The updates of the status data and interaction data involved in the above two methods are both achieved through calls at a fixed frequency. Due to the existence of the time difference in the call cycle, the simulation status of interaction data between different simulators may be out of sync, which has a negative impact on the effect of multi-aircraft formation or cooperative training, and even directly interrupts the training.
[0040] To solve the above technical problems, the embodiment of this statement provides a simulator networking method based on the data distribution service, which does not require adding DDS middleware forwarding software, nor does it require overall upgrading and compilation of the simulation platform code. Only after generating the simulator interface program and the simulator interface program according to the interface definition language file, the simulator interface data and the data distribution network data can be mapped to achieve simulator networking, shortening the development process when implementing the networking function, reducing time delay and bandwidth consumption, and thus improving the efficiency and communication real-time performance when implementing the networking function.
[0041] In addition, through the modular mounting method for the DDS networking upgrade of the original simulator, a data distribution service unit (DDSUnit) is mounted in the simulator simulation network. Without overall upgrading and compilation of the simulation platform code, the DDS network data is directly mapped to the simulator individual simulation network data (such as simulator interface data), and there is no need to communicate through SOCKET, avoiding the time consumption and bandwidth occupation of SOCKET communication, and also reducing the maintenance cost of the intermediate forwarding software.
[0042] Furthermore, the DDS network data is divided into status data and interaction data according to functional characteristics, and different processing schemes are adopted. Among them, the status data is mapped through fixed-frequency calls to ensure that the simulator can update the data written by the individual publisher and read the data subscribed by the network in each simulation cycle; the interaction data is mapped through interrupt triggers. When receiving DDS network data, the interrupt handler is directly triggered without waiting for calls, avoiding the simulation state differences caused by the call time difference.
[0043] To better understand the embodiments of the present invention, the scenario of the simulator networking method based on the data distribution service will be elaborated in detail below.
[0044] Figure 1 It is a schematic diagram of the scenario of the simulator networking method based on the data distribution service provided by the present invention. As Figure 1 shown, the scenario of the simulator networking method based on the data distribution service includes at least one simulator, a data distribution service unit, and a DDS network.
[0045] Among them, at least one simulator may include: Simulator1, Simulator2, Simulator3, Simulator4, …, SimulatorN, etc. N is the total number of simulators connected to the DDS network, and N is a positive integer. This embodiment does not limit this.
[0046] For the i-th simulator Simulatori among the N simulators, the simulator may include: a data distribution service unit (DDS Unit), and may also include: peripheral simulation modules such as a motion system (Motion), an instructor operating station (IOS), a sound system (Sound), a visual system (Visual), and a cockpit system (Cockpit).
[0047] Among them, the motion system responds to the attitude changes of the simulated subject by acquiring the 6-degree-of-freedom (DOF) data output by the main simulation system; the instructor console system can inject settings such as weather, reposition, malfunction, and subject into the simulation system of the main simulation system, and can also receive the aircraft parameters of the main simulation system for display; the sound system is used for playing environmental sounds and audio sounds to simulate various sounds heard in the cockpit; the visual system is used to present the external view of the cockpit observed from the eye point in the cockpit, including the scene changes with the position / attitude (Eye) of the main perspective eye point, weather environment, entity targets, etc., and the visual system can return the height above terrain (HAT) and height of terrain (HOT) information to the main simulation system. The cockpit equipment system (Cockpit) is installed with real components or simulation components consistent with the real aircraft equipment, provides cockpit operation signal input to the main simulation system through the cockpit interface system (CockpitIO), and components such as indicator lights in the cockpit obtain the signal output of the main simulation system through the cockpit interface system to present an indication state consistent with the real aircraft.
[0048] In addition, the main simulation system of the simulator further includes: other function simulation units of the simulator such as flight, airborne, avionics, fire control, and environment. Data communication is carried out between the simulation units through the simulator simulation network.
[0049] Specifically, in the scenario of the simulator networking method based on the data distribution service, the basic principles for realizing the modular networking of the simulator include: the networking principle and the modular principle.
[0050] Networking principle: Publish the simulator data of the simulator simulation network to the DDS network through DDSUnit, and subscribe to other simulator data from the DDS network and publish it to the simulator simulation network.
[0051] Modular principle: A complete flight simulator simulation system includes a simulator simulation network that supports the mounting of different simulation function modules. The DDSUnit can be modularly mounted into the corresponding simulator simulation network. Specifically, to achieve high efficiency in the development of the simulator networking function, the original functional part is not modified. Instead, a networking module, namely the DDSUnit, is added to the original simulator simulation network. Among them, the DDSUnit is used to implement the interaction between DDS network data and simulator simulation network data and can be compiled into a dll file or an so file for the simulator simulation platform to call. The DDSUnit is also used to subscribe to and obtain the data of other function simulation units of the simulator and publish and write the data of the simulator where it is located into the shared area for other function simulation units of the simulator to use.
[0052] Figure 2 It is a schematic structural diagram of the simulator networking system provided by the present invention. As Figure 2 shown, the simulator networking system may include: a Data Distribution Service Unit (DDSUnit), a subscription family of the Data Distribution Service (DDS Subscriber), a publication family of the Data Distribution Service (DDS Publisher), a Data Distribution Service Manager (DDS Manager), a module unit of the Data Distribution Service (DDSModulUnit), a compilation file module (Makefile), and a call function (DDS Lib).
[0053] Among them, the Data Distribution Service Unit is used to determine the publish-subscribe communication template program and the simulator interface program. The publish-subscribe communication template program is generated based on an Interface Definition Language file and an Interface Definition Language template program generation tool, and the simulator interface program is generated based on an Interface Definition Language file and simulator interface definition rules.
[0054] The subscription family is used to subscribe to the data distribution network data of the Data Distribution Service network; the publication family is used to publish simulator interface data to the Data Distribution Service network.
[0055] The Data Distribution Service Manager is used to uniformly manage the family initialization, data update, etc. of the subscription family and the publication family.
[0056] The module unit of the Data Distribution Service, which can also be called the simulator simulation network data interface docking module, is used to subscribe to the data of other function simulation units of the simulator from the simulator simulation network and publish the DDS network data to the simulator simulation network.
[0057] The compilation file compiles all the programs in the DDSUnit and links the basic library files required for DDS communication to generate a final dll library or so library that can be called by the simulator simulation network platform.
[0058] Specifically, the specific principle of implementing the modular networking of the simulator through the functional part in DDSUnit may include: the networking principle and the modular principle.
[0059] The networking principle includes: integrating library files of DDS Lib, which provide interface methods for joining the DDS network and performing data reading / writing. Only by integrating these library files into the networking function module can the DDS network be accessed through the function interfaces provided in the library files; integrating DDS Publisher, this class family contains one or more DDS publishing classes generated from interface definition language files. Each DDS publishing class can use the DDS initialization function interface provided by DDS Lib to implement the network access function of the publishing class, and use the DDS network data writing interface to write the data of other function simulation units of the simulator obtained by DDSModulUnit into the DDS network; integrating DDS Subscriber, this class family contains one or more DDS subscription classes generated from interface definition language files. Each DDS subscription class can use the DDS initialization function interface provided by DDS Lib to implement the network access function of the subscription class, and use the DDS network data reading interface to write the data received in the DDS network into the interface data defined in DDSModulUnit; since DDS Subscriber and DDS Publisher may contain multiple networking class interfaces, and multiple class interfaces contain common behaviors such as initialization, in order to uniformly call the common behaviors of DDS Subscriber and DDS Publisher, various class families are instantiated in the DDS Manager functional part, and then the instantiated objects of various class families (i.e., class objects) are added to the corresponding publishing class container or subscription class container. Finally, the containers are traversed to achieve unified call control of behaviors such as initialization.
[0060] The modular principle includes: integrating the DDSModulUnit class, which is developed according to the calling rules of the simulator simulation platform. After being compiled into the DDSModuleUnit.dll or DDSModuleUnit.so file, it can be integrated and called by the simulation platform. DDSModulUnit establishes a publish / subscribe data cross-linking relationship with other functional modules in the simulator simulation system during the startup phase according to the module development rules of the simulation platform. During the running phase, it can receive the calculation outputs of other simulation modules according to the simulation scheduling frequency and transmit them to the DDS Publisher. Then, the DDS Publisher writes the data into the DDS network. It can also send the obtained DDS network data to other functional modules in the simulator simulation network; The Makefile can compile DDSUnit into the DDSModuleUnit.dll or DDSModuleUnit.so file for the simulator simulation platform to mount. Since DDSUnit is developed according to the calling rules of the simulator simulation platform, DDSUnit supports the data interaction function with other functional modules provided by the simulator simulation platform. When the simulator simulation platform starts, it loads the callable file DDSModuleUnit.dll or DDSModuleUnit.so, instantiates the DDSModulUnit functional module, and establishes a publish / subscribe data cross-linking relationship with the instantiated objects of other functional modules. Then, during the running phase, it uniformly updates the cross-linking data between different functional modules according to the simulation call frequency. In addition, the Makefile links the basic library files required for DDS communication. Therefore, DDSUnit supports the function of interacting with the DDS network. DDSUnit realizes the two-way data interaction between the simulator simulation network and the DDS data network.
[0061] It should be noted that the execution subject involved in the embodiments of the present invention can be a simulator networking device based on the data distribution service, or an electronic device. Optionally, the electronic device may include: a computer, a mobile terminal, etc.
[0062] The following further describes the embodiments of the present invention by taking an electronic device as an example.
[0063] Figure 3 It is a schematic flowchart of the simulator networking method based on the data distribution service provided by the present invention. As Figure 3 shown, the method includes the following steps 301-step 304.
[0064] Step 301: Determine all interface data required for simulator networking according to the rules of the interface definition language to obtain an interface definition language file.
[0065] Among them, the interface definition language determination rule is a rule for defining the interface data required for the simulator to connect to the network, and it usually depends on the specific interface definition language specification or the standard of the programming language used.
[0066] The interface definition language file is an abstract language file used to define the interfaces of software components and does not depend on any specific programming language.
[0067] Specifically, according to the interface definition language determination rule, all the interface data required for the simulator to connect to the network is determined and written to obtain the interface definition language file. During the whole process, through the interface definition language file, data types, interfaces, methods, and the specifications of other software components can be defined, and these definitions can then be converted into codes in multiple programming languages, thus realizing cross-language communication and integration.
[0068] Step 302: According to the interface definition language file, combined with the interface definition language template program generation tool, generate the publish-subscribe communication template program of the data distribution service in the data distribution service unit.
[0069] Among them, the data distribution service unit is used to determine the publish-subscribe communication template program and the simulator interface program. The publish-subscribe communication template program is generated based on the interface definition language file and the interface definition language template program generation tool, and the simulator interface program is generated based on the interface definition language file and the simulator interface definition rule.
[0070] The interface definition language template program generation tool is a tool for generating template programs, and this embodiment does not limit it.
[0071] Specifically, after obtaining the interface definition language file, combined with the interface definition language template program generation tool, in the data distribution service unit, generate the publish-subscribe communication template program based on the interface definition language file and the interface definition language template program generation tool, thereby reducing the repetitive work of developers and significantly improving the development efficiency.
[0072] Step 303: According to the interface definition language file, combined with the simulator interface definition rule, generate the simulator interface program in the data distribution service unit.
[0073] Among them, the simulator interface program is used to subscribe to the data of other parts of the simulator in the simulator individual simulation network and publish the DDS network data to the simulator individual simulation network.
[0074] Specifically, based on the simulator interface definition rule, in the data distribution service unit, generate the simulator interface program according to the interface definition language file, thereby reducing the repetitive work of developers and significantly improving the development efficiency.
[0075] Step 304: Map the simulator interface data and the data distribution network data according to the publish-subscribe communication template program and the simulator interface program.
[0076] Among them, the publish-subscribe communication template program includes: the subscription class family publish-subscribe communication template program and the publish class family publish-subscribe communication template program.
[0077] Map the simulator interface data and the data distribution network data according to the publish-subscribe communication template program and the simulator interface program to obtain a mapping result. The whole process does not require the overall upgrade and compilation of the simulation platform code, making the development more rapid and efficient.
[0078] In some embodiments, the mapping result includes: the mapping relationship between the simulator and the data distribution service network, and the publish-subscribe relationship between the data distribution service unit and other functional simulation units of the simulator.
[0079] Among them, other functional simulation parts of the simulator can be, for example, peripheral simulation systems such as a motion system, an instructor console system, a sound system, a visual system, and a cockpit system. This embodiment does not limit this.
[0080] In some embodiments, the specific implementation manner of mapping the simulator interface data and the data distribution network data according to the publish-subscribe communication template program and the simulator interface program is as follows: Read the data distribution network data in the subscription class family according to the subscription class family publish-subscribe communication template program and the publish class family publish-subscribe communication template program, and write the data distribution network data to the first pointer position in the simulator interface program; Read the simulator interface data from the second pointer position in the simulator interface program according to the subscription class family publish-subscribe communication template program and the publish class family publish-subscribe communication template program, and write the simulator interface data to the data distribution service network.
[0081] Among them, the first pointer position is the position for storing the written data distribution network data, and the second pointer position is the position for storing the simulator interface data.
[0082] Specifically, after determining the publish-subscribe communication template program and the simulator interface program, according to the subscription-class-family publish-subscribe communication template program and the publish-class-family publish-subscribe communication template program, read the data distribution network data in the subscription class family and write the data distribution network data to the first pointer position in the simulator interface program; at the same time, according to the subscription-class-family publish-subscribe communication template program and the publish-class-family publish-subscribe communication template program, read the simulator interface data from the second pointer position in the simulator interface program and write the simulator interface data to the data distribution service network. During the whole process, the data distribution network data can be accurately found through the first pointer position, and the simulator interface data can be accurately read through the second pointer position, improving the data writing efficiency.
[0083] In some embodiments, it further includes: in the data distribution service manager, instantiate the subscription class family as the first type of object and instantiate the publish class family as the second type of object; pass the first pointer position corresponding to the simulator interface data to the first type of object, and pass the second pointer position corresponding to the simulator interface data to the second type of object; initialize the network status of the first type of object and the second type of object; when the initialization is completed and the network connection is established, update the simulator interface data in the publish class family.
[0084] Among them, the first type of object is a subscription interface instantiated based on the subscription class family, and the second type of object is a publish interface instantiated based on the publish class family.
[0085] Specifically, in order to map the simulator interface data and the data distribution network data, in the data distribution service manager, it is necessary to instantiate the subscription class family as the first type of object and instantiate the publish class family as the second type of object; pass the first pointer position corresponding to the simulator interface data to the first type of object, and pass the second pointer position corresponding to the simulator interface data to the second type of object; initialize the network status of the first type of object and the second type of object; when the initialization is completed and the network connection is established, update the simulator interface data in the publish class family. The whole process does not need to communicate through middleware and update the simulator interface data in the publish class family, making the development faster and more efficient.
[0086] Existing data for the data distribution network data are all updated in a fixed-frequency manner. Embodiments of the present invention involve different processing methods for status data and interaction data.
[0087] Among them, for the status data, a fixed-frequency call method is used for data update. When the DDS Subscriber receives the DDS network data of the type of status data, it will not directly write the status data into the simulator simulation network, but wait until the next call of the simulator simulation program to update the received status data to the simulator simulation network.
[0088] In some embodiments, it further includes: when the data in the data distribution network is status data, the status data is updated by using a fixed-frequency call method; when the data in the data distribution network is interaction data, an interrupt processing method is adopted to perform interrupt processing and resolution on the interaction data to obtain a resolution result; and simulation is performed according to the resolution result.
[0089] Among them, the fixed-frequency call method is to read and write the published and subscribed data by fixed-frequency call for the status data. The interrupt processing method is that for the interaction data, instead of waiting for the periodic call of the simulator program, the interrupt information is directly sent to the simulator in the form of an interrupt, and for the system that needs to process the interaction data, the interrupt processing mechanism is triggered, and the next processing and resolution are directly performed according to the interrupt information.
[0090] Specifically, it is determined whether the data in the data distribution network is status data or interaction data. When the data in the data distribution network is status data, the status data is updated by using a fixed-frequency call method; when the data in the data distribution network is interaction data, an interrupt processing method is adopted to perform interrupt processing and resolution on the interaction data to obtain a resolution result; and simulation is performed according to the resolution result. The method of updating data by fixed-frequency call in the whole process can avoid the stability problems of the simulation platform caused by a large number of interrupt trigger processes, make the simulation system more stable and controllable, and the interaction data is mapped by the interrupt trigger method. When the DDS network data is received, the interrupt processing program is directly triggered without waiting for the call, which has higher real-time performance and avoids the simulation state difference caused by the call time difference.
[0091] In some embodiments, the specific implementation manner of performing interrupt processing and resolution on the interaction data by using the interrupt processing method to obtain a resolution result includes the following: determining an interrupt request according to the relevant information of the interaction data; when the interrupt request matches the interrupt registration information, assigning the interaction data to the interrupt data and generating a target interrupt request carrying the interrupt data, where the interrupt registration information is pre-registered to the interrupt trigger source system; and triggering the corresponding interrupt registration information processing function according to the target interrupt request to perform resolution on the interrupt data to obtain a resolution result.
[0092] Among them, the interrupt registration information includes the interrupt trigger source system name, interrupt type, interrupt name, and interrupt processing function, etc. The relevant information of the interaction data can be, for example, information such as the type and meaning of the DDS data. This embodiment does not limit this.
[0093] Specifically, the agreed interruption registration information includes the interruption trigger source system name, interruption type, interruption name, and interruption handling function. When the simulator program starts, the interruption information is registered into the simulator emulation network so that the simulator program can wait for the trigger information during operation. When the subscription class family receives the subscribed interaction data, it first defines the interruption request according to information such as the type and meaning of the DDS data, including the interruption trigger source system name, interruption data, interruption data type, interruption name, etc. The interruption trigger source system name, interruption type, and interruption name information should be consistent with the information for processing interruption registration. Then, the data received by the subscription class family is assigned to the interruption data, and finally, the interruption request is sent. After the interruption request is sent, it will enter the interruption handling function that is consistent with the interruption registration information. To further ensure the correctness of the interruption data, after entering the interruption function, according to the target interruption request, the corresponding interruption registration information processing function is triggered. First, operations such as the quantity verification and type verification of the interruption data are required. After determining that the quantity and type of the received interruption data are consistent with the quantity and type of the target interruption data, the value of the interruption data is retrieved, and further logical processing is performed according to the value of the interruption data.
[0094] The advantage of this setting is that the status data is mapped through the fixed-frequency call method to ensure that each simulation cycle of the simulator individual can achieve the update of the individual published data writing and the update of the network subscription data reading. The interaction data is mapped through the interruption trigger method. When the DDS network data is received, the interruption handling program is directly triggered without waiting for a call, avoiding the simulation state difference caused by the call time difference.
[0095] A method for networking a simulator based on data distribution service provided by the present invention determines rules according to the Interface Definition Language (IDL), determines all interface data required for simulator networking, and obtains an IDL file; according to the IDL file, in combination with an IDL template program generation tool, generates a publish-subscribe communication template program for the data distribution service in the data distribution service unit; according to the IDL file, in combination with the simulator interface definition rules, generates a simulator interface program in the data distribution service unit; maps simulator interface data and data distribution network data according to the publish-subscribe communication template program and the simulator interface program. On the basis of the above embodiments, the technical solution of the present invention is used to solve the deficiencies in the efficiency and communication real-time performance of the existing DDS-based simulator networking method when implementing the networking function, and realizes that there is no need to add DDS middleware forwarding software, nor to perform overall upgrade and compilation of the simulation platform code. Only after generating the simulator interface program and the simulator interface program according to the IDL file, can the simulator interface data and the data distribution network data be mapped to realize simulator networking, shorten the development process when implementing the networking function, and reduce time delay and bandwidth consumption, thereby improving the efficiency and communication real-time performance when implementing the networking function.
[0096] Figure 4 is a schematic structural diagram of a simulator networking system based on data distribution service provided by the present invention, as Figure 4 shown, the simulator networking system 400 based on data distribution service includes a subscription class family 401 of the data distribution service, a publish class family 402, a data distribution service unit 403, and a data distribution service manager 404.
[0097] Among them, the subscription class family is used to subscribe to the data distribution network data of the data distribution service network 10; the publishing class family is used to publish simulator interface data to the data distribution service network; the data distribution service unit is used to determine the publish-subscribe communication template program and the simulator interface program. The publish-subscribe communication template program is generated based on the interface definition language file and the interface definition language template program generation tool, and the simulator interface program is generated based on the interface definition language file and the simulator interface definition rule; the data distribution service manager is used to instantiate the subscription class family as the first type of object and instantiate the publishing class family as the second type of object; pass the first pointer position corresponding to the simulator interface data to the first type of object, and pass the second pointer position corresponding to the simulator interface data to the second type of object; initialize the network status of the first type of object and the second type of object; when the initialization is completed and the network connection is established, update the simulator interface data in the publishing class family. Among them, the publish-subscribe communication template program of the subscription class family and the publish-subscribe communication template program of the publishing class family are determined based on the interface definition language file and the interface definition language template program, and the interface definition language file is determined based on the interface definition language determination rule.
[0098] Among them, the simulator networking system based on the data distribution service further includes the DDS Lib call function. The call function is a library file for DDS distributed network communication and is the basis for implementing the DDS networking function call. The simulator networking system based on the data distribution service further includes the Makefile compilation file, which is used to compile all the programs in the data distribution service unit and link the basic library files required for DDS communication to generate the final dll or so library that can be called by the simulator simulation network platform.
[0099] Specifically, the library file provides interface methods for joining the DDS network and performing data reading / writing. Only by integrating these library files into the simulator networking system based on the data distribution service can the DDS network be accessed through the function interfaces provided in the library file. The publishing class family contains one or more DDS publishing classes generated from the interface definition language file. Each DDS publishing class can use the DDS initialization function interface provided by DDS Lib to implement the network access function of the publishing class, and use the DDS network data writing interface to write the data of other simulation function modules of the simulator obtained by the data distribution service unit into the DDS network. The subscription class family contains one or more DDS subscription classes generated from the interface definition language file. Each DDS subscription class can use the DDS initialization function interface provided by DDS Lib to implement the network access function of the subscription class, and use the DDS network data reading interface to write the data received in the DDS network into the interface data defined in the data distribution service unit.
[0100] Further, since the publishing family and the subscribing family may contain multiple networked class interfaces, and multiple class interfaces all contain common behaviors such as initialization, in order to uniformly call the common behaviors of the publishing family and the subscribing family, classes are instantiated in the data distribution service manager part, and then the instantiated objects of these classes are added to the publishing class container or the subscribing class container. Finally, the containers are traversed to achieve unified call control of behaviors such as initialization.
[0101] Specifically, a data distribution service unit is integrated in the simulator networking system based on the data distribution service. The data distribution service unit is a class developed according to the calling rules of the simulator simulation platform. After being compiled into a.dll or.so file, it can be integrated and called by the simulation platform. The data distribution service unit establishes a publish / subscribe data cross-linking relationship with other functional modules in the simulator simulation system during the startup phase according to the simulation platform calling module development rules. During the running phase, it can receive the calculation outputs of other simulation modules according to the simulation scheduling frequency and transmit them to the publishing family, and then write the data into the DDS network through the publishing family. It can also send the obtained DDS network data to other functional modules in the simulator simulation network. The Makefile file can compile the DDS data distribution service unit into a.dll or.so file for the simulator simulation platform to mount. Since the data distribution service unit is developed according to the calling rules of the simulator simulation platform, the data distribution service unit supports the data interaction function with other functional modules provided by the simulator simulation platform. The simulator simulation platform loads the.dll or.so callable file at startup, instantiates the data distribution service manager, and establishes a publish / subscribe data cross-linking relationship with the instantiated objects of other functional modules. Then, during the running phase, the cross-linking data between different functional modules is uniformly updated according to the simulation calling frequency. And the Makefile links the basic library files required for DDS communication, so the data distribution service unit supports the function of interacting with the DDS network. The data distribution service unit realizes the bidirectional data interaction between the simulator simulation network and the DDS data network.
[0102] A simulator networking system based on data distribution service provided by the present invention includes a subscription class family, a publishing class family, a data distribution service unit, and a data distribution service manager of the data distribution service. Among them, the subscription class family is used to subscribe to data distribution network data of the data distribution service network 10; the publishing class family is used to publish simulator interface data to the data distribution service network; the data distribution service unit is used to determine a publish-subscribe communication template program and a simulator interface program. The publish-subscribe communication template program is generated based on an interface definition language file and an interface definition language template program generation tool, and the simulator interface program is generated based on an interface definition language file and simulator interface definition rules; the data distribution service manager is used to instantiate the subscription class family as a first type of object and instantiate the publishing class family as a second type of object; pass the first pointer position corresponding to the simulator interface data to the first type of object, and pass the second pointer position corresponding to the simulator interface data to the second type of object; initialize the network states of the first type of object and the second type of object; when the initialization is completed and a network connection is established, update the simulator interface data in the publishing class family. Among them, the publish-subscribe communication template program of the subscription class family and the publish-subscribe communication template program of the publishing class family are determined based on an interface definition language file and an interface definition language template program, and the interface definition language file is determined based on interface definition language determination rules. On the basis of the above embodiments, the technical solution of the present invention is used to solve the deficiencies in both the efficiency and communication real-time performance of the current DDS-based simulator networking method when implementing the networking function, and realize that there is no need to add DDS middleware forwarding software, nor to perform an overall upgrade and compilation of the simulation platform code. Only after generating the simulator interface program and the simulator interface program according to the interface definition language file, the simulator interface data and the data distribution network data can be mapped to realize simulator networking, shortening the development process when implementing the networking function, reducing time delay and bandwidth consumption, and thus improving the efficiency and communication real-time performance when implementing the networking function.
[0103] The simulator networking device based on data distribution service provided by the present invention will be described below. The simulator networking device based on data distribution service described below can be mutually corresponding and referred to the simulator networking method described above.
[0104] Figure 5 is a schematic structural diagram of the simulator networking device based on data distribution service provided by the present invention. As Figure 5 shown, the simulator networking device 500 based on data distribution service includes the following: a file determination module 501, a template program determination module 502, an interface program determination module 503, and a data mapping module 504.
[0105] A file determination module 501, configured to determine all interface data required for the simulator to connect to the network according to the rules determined by the interface definition language, and obtain an interface definition language file.
[0106] A template program determination module 502, configured to generate a publish-subscribe communication template program for the data distribution service in the data distribution service unit according to the interface definition language file and in combination with an interface definition language template program generation tool.
[0107] An interface program determination module 503, configured to generate a simulator interface program in the data distribution service unit according to the interface definition language file and in combination with the simulator interface definition rules.
[0108] A data mapping module 504, configured to map the simulator interface data and the data distribution network data according to the publish-subscribe communication template program and the simulator interface program.
[0109] Optionally, the publish-subscribe communication template program includes: a subscription class family publish-subscribe communication template program and a publish class family publish-subscribe communication template program.
[0110] Optionally, the data mapping module 504 is specifically configured to: read the data distribution network data in the subscription class family according to the subscription class family publish-subscribe communication template program and the publish class family publish-subscribe communication template program, and write the data distribution network data to the first pointer position in the simulator interface program; read the simulator interface data from the second pointer position in the simulator interface program according to the subscription class family publish-subscribe communication template program and the publish class family publish-subscribe communication template program, and write the simulator interface data to the data distribution service network.
[0111] Optionally, the device further includes: a data update module. The data update module is configured to: instantiate the subscription class family as a first type of object and instantiate the publish class family as a second type of object in the data distribution service manager; pass the first pointer position corresponding to the simulator interface data to the first type of object, and pass the second pointer position corresponding to the simulator interface data to the second type of object; initialize the network states of the first type of object and the second type of object; and update the simulator interface data in the publish class family when the initialization is completed and the network connection is established.
[0112] Optionally, the mapping result includes: the mapping relationship between the simulator and the data distribution service network, and the publish-subscribe relationship between the data distribution service unit and other function simulation units of the simulator.
[0113] Optionally, the device further includes: a simulation module. The simulation module is configured to: when the data in the data distribution network is status data, update the status data by using a fixed-frequency call method; when the data in the data distribution network is interaction data, perform interruption processing and resolution on the interaction data by using an interruption processing method to obtain a resolution result; and perform simulation according to the resolution result.
[0114] Optionally, the simulation module performs interruption processing and resolution on the interaction data by using an interruption processing method to obtain a resolution result. Specifically, the simulation module is configured to: determine an interruption request according to relevant information of the interaction data; when the interruption request matches the interruption registration information (the interruption registration information is pre-registered to the interruption trigger source system), assign the interaction data as interruption data and generate a target interruption request carrying the interruption data; and trigger a corresponding interruption registration information processing function according to the target interruption request to perform resolution on the interruption data to obtain a resolution result.
[0115] Figure 6 is a schematic structural diagram of an electronic device provided by the present invention. As Figure 6 shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640. Among them, the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call logic instructions in the memory 630 to execute a simulator networking method based on a data distribution service. The method includes: determining all interface data required for simulator networking according to rules defined by an interface definition language to obtain an interface definition language file; generating a publish-subscribe communication template program for the data distribution service in a data distribution service unit according to the interface definition language file and in combination with an interface definition language template program generation tool; generating a simulator interface program in the data distribution service unit according to the interface definition language file and in combination with simulator interface definition rules; and mapping simulator interface data and data distribution network data according to the publish-subscribe communication template program and the simulator interface program.
[0116] In addition, when the logical instructions in the above-mentioned memory 630 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0117] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the simulator networking method based on data distribution services provided by the above-mentioned various methods. The method includes: determining all interface data required for simulator networking according to the interface definition language determination rules to obtain an interface definition language file; generating a publish-subscribe communication template program for data distribution services in the data distribution service unit by combining the interface definition language file and an interface definition language template program generation tool; generating a simulator interface program in the data distribution service unit by combining the interface definition language file and simulator interface definition rules; and mapping simulator interface data and data distribution network data according to the publish-subscribe communication template program and the simulator interface program.
[0118] On another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the simulator networking method based on data distribution services provided by the above-mentioned various methods. The method includes: determining all interface data required for simulator networking according to the interface definition language determination rules to obtain an interface definition language file; generating a publish-subscribe communication template program for data distribution services in the data distribution service unit by combining the interface definition language file and an interface definition language template program generation tool; generating a simulator interface program in the data distribution service unit by combining the interface definition language file and simulator interface definition rules; and mapping simulator interface data and data distribution network data according to the publish-subscribe communication template program and the simulator interface program.
[0119] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0120] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or equivalently replace some of the technical features. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.
Claims
1. A simulator networking method based on data distribution service, characterized in that Including: Determine all interface data required for the simulator to connect to the network according to the rules of the Interface Definition Language (IDL), and obtain the IDL file; According to the IDL file, in combination with the IDL template program generation tool, generate the publish-subscribe communication template program for the data distribution service in the data distribution service unit; According to the IDL file, in combination with the simulator interface definition rules, generate the simulator interface program in the data distribution service unit; Map the simulator interface data and the data distribution network data according to the publish-subscribe communication template program and the simulator interface program; The publish-subscribe communication template program includes: the publish-subscribe communication template program for the subscription class family and the publish-subscribe communication template program for the publish class family; the mapping of the simulator interface data and the data distribution network data according to the publish-subscribe communication template program and the simulator interface program includes: reading the data distribution network data in the subscription class family according to the publish-subscribe communication template program for the subscription class family and the publish-subscribe communication template program for the publish class family, and writing the data distribution network data to the first pointer position in the simulator interface program; reading the simulator interface data from the second pointer position in the simulator interface program according to the publish-subscribe communication template program for the subscription class family and the publish-subscribe communication template program for the publish class family, and writing the simulator interface data to the data distribution service network; further including: instantiating the subscription class family as the first type of object and instantiating the publish class family as the second type of object in the data distribution service manager; passing the first pointer position corresponding to the simulator interface data to the first type of object, and passing the second pointer position corresponding to the simulator interface data to the second type of object; initializing the network status of the first type of object and the second type of object; when the initialization is completed and the network connection is established, updating the simulator interface data in the publish class family.
2. The method for connecting a simulator based on a data distribution service according to claim 1, wherein: The mapping result includes: the mapping relationship between the simulator and the data distribution service network, and the publish-subscribe relationship between the data distribution service unit and other function simulation units of the simulator.
3. The simulator networking method based on data distribution service according to claim 1, wherein The method further includes: When the data distribution network data is status data, update the status data by using a fixed-frequency call method; When the data distribution network data is interaction data, perform interrupt processing and resolution on the interaction data by using an interrupt processing method to obtain a resolution result; perform simulation according to the resolution result.
4. The simulator networking method based on data distribution service according to claim 3, wherein The performing interrupt processing and resolution on the interaction data by using an interrupt processing method to obtain a resolution result includes: Determine an interrupt request according to the relevant information of the interaction data; When the interrupt request matches the interrupt registration information, assign the interaction data as interrupt data, and generate a target interrupt request carrying the interrupt data, where the interrupt registration information is pre-registered to the interrupt trigger source system. Trigger a corresponding interrupt registration information processing function according to the target interrupt request, and resolve the interrupt data to obtain the resolution result.
5. A simulator networking system based on data distribution service, characterized in that, Including: The subscription class family, the publishing class family, the data distribution service unit, and the data distribution service manager of the data distribution service; where The subscription class family is used to subscribe to the data distribution network data of the data distribution service network; The publishing class family is used to publish simulator interface data to the data distribution service network; The data distribution service unit is used to determine the publish-subscribe communication template program and the simulator interface program. The publish-subscribe communication template program is generated based on the interface definition language file and the interface definition language template program generation tool, and the simulator interface program is generated based on the interface definition language file and the simulator interface definition rule; The data distribution service manager is used to instantiate the subscription class family as the first type of object and instantiate the publishing class family as the second type of object; pass the first pointer position corresponding to the simulator interface data to the first type of object, and pass the second pointer position corresponding to the simulator interface data to the second type of object; initialize the network status of the first type of object and the second type of object; when the initialization is completed and the network connection is established, update the simulator interface data in the publishing class family; Among them, the publish-subscribe communication template program of the subscription class family and the publish-subscribe communication template program of the publishing class family are determined based on the interface definition language file and the interface definition language template program, and the interface definition language file is determined based on the interface definition language determination rule.
6. A simulator networking device based on data distribution service, characterized in that, Including: The file determination module is used to determine all interface data required for the simulator to connect to the network according to the interface definition language determination rule to obtain the interface definition language file; The template program determination module is used to generate the publish-subscribe communication template program of the data distribution service in the data distribution service unit according to the interface definition language file in combination with the interface definition language template program generation tool; The interface program determination module is used to generate the simulator interface program in the data distribution service unit according to the interface definition language file in combination with the simulator interface definition rule; The data mapping module is used to map the simulator interface data and the data distribution network data according to the publish-subscribe communication template program and the simulator interface program; The publish-subscribe communication template program includes: a subscription class family publish-subscribe communication template program and a publish class family publish-subscribe communication template program; the mapping of simulator interface data and data distribution network data according to the publish-subscribe communication template program and the simulator interface program includes: reading the data distribution network data in the subscription class family according to the subscription class family publish-subscribe communication template program and the publish class family publish-subscribe communication template program, and writing the data distribution network data to the first pointer position in the simulator interface program; reading the simulator interface data from the second pointer position in the simulator interface program according to the subscription class family publish-subscribe communication template program and the publish class family publish-subscribe communication template program, and writing the simulator interface data to the data distribution service network; it further includes: instantiating the subscription class family as a first type of object and instantiating the publish class family as a second type of object in the data distribution service manager; passing the first pointer position corresponding to the simulator interface data to the first type of object, and passing the second pointer position corresponding to the simulator interface data to the second type of object; initializing the network states of the first type of object and the second type of object; when the initialization is completed and the network connection is established, updating the simulator interface data in the publish class family.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the simulator networking method based on data distribution service according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the simulator networking method based on data distribution service according to any one of claims 1 to 4.
Citation Information
Patent Citations
Service management method based on data subscription and distribution network
CN115361298A
Data transmission method and device based on data distribution service
CN117440446A