A Data Exchange Method between LVC-DE Distributed Synthesis Environment and DDS System

The method automates data exchange between LVC-DE and DDS systems by aligning TENA objects with DDS themes, reducing development time and user effort, enhancing flexibility and efficiency.

CN115421710BActive Publication Date: 2025-07-15UNIT 63892 OF PLA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210865430.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-21
Publication Date
2025-07-15
Estimated Expiration
2042-07-21

AI Technical Summary

Technical Problem

Existing LVC-DE distributed simulation environments and DDS systems require manual, time-consuming, and skill-intensive reprogramming for data model changes, lacking flexibility and efficiency in data exchange.

Method used

Implement a method using TENA objects in LVC-DE environments and DDS themes for data exchange, automating the generation of a gateway executable program to align and update data without manual reprogramming.

Benefits of technology

Significantly reduces development time and user programming requirements, enabling efficient and flexible data exchange between LVC-DE and DDS systems, with an 85% reduction in development cycles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115421710B_ABST
    Figure CN115421710B_ABST
Patent Text Reader

Abstract

The present invention provides a data exchange method between an LVC-DE distributed synthesis environment and a DDS system. By means of the proposed data exchange method between the LVC-DE distributed synthesis environment and the DDS system, it is possible to solve the problems that the existing data exchange method between the LVC-DE distributed synthesis environment and the DDS system depends on custom development, lacks generality, has high requirements for users' programming capabilities, and has a long development cycle. By generating associated files, generality is improved and custom development is not required; by modifying the source code of the executable program and compiling it, the work of user programming is reduced and the development cycle is shortened. By applying it to the LVC-DE distributed synthesis environment system, efficient matching between the LVC-DE distributed synthesis environment and the DDS system can be achieved. The actual test results show that compared with the existing method relying only on custom development, the development cycle of the data exchange method proposed by the present invention is reduced to more than 85%, and users no longer need to perform programming operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data exchange between the LVC-DE distributed synthesis environment and the DDS system, and more particularly, to a method for data exchange between the LVC-DE distributed synthesis environment and the DDS system. Background Art

[0002] The LVC-DE distributed synthesis environment is used to interconnect various real (L), virtual (V), or constructive (C) test resources located in different regions and belonging to different units, support information sharing, resource sharing and reuse, and interconnection, interoperability, and interoperation between systems, and can combine various resources according to the requirements of test tasks to quickly build a large-scale distributed test system.

[0003] The Data Distribution Service (DDS) is a distributed real-time system design specification based on a topic-based publish / subscribe mechanism and high-real-time communication developed by the Object Management Group. DDS standardizes all interfaces and behaviors in the data distribution process. By using a global data space and disconnecting from the central server, entities in the system interact with data as the center, improving communication efficiency. DDS provides comprehensive support for more than 20 configurable QoS policies. Application programs can use QoS policies to prioritize different data topics and information flows, control the number of middleware history caches, ensure reliable delivery of information, the rate of sending data, the time for information subscribers to wait for data and resources, and adapt to low-bandwidth or high-latency links, etc. Currently, DDS has been applied and promoted from the application research and development in the military field to non-military fields such as education, medical care, and commerce, and has wide usability. Therefore, realizing data exchange between the LVC-DE distributed synthesis environment and the DDS system is of great significance for enhancing the application scenarios of the two heterogeneous systems.

[0004] The existing method for data exchange between the LVC-DE distributed synthesis environment and the DDS system is to develop an independent software program in a programming manner according to a fixed data model to complete the data mapping association between the two systems. The implementation principle of this method is simple, but when it is necessary to replace other data models or modify the data model, it is necessary to re-edit the data exchange software program, lacking generality. In addition, since this program needs to be customized and developed for each matched data model, there are problems such as long development time and high requirements for users' programming ability. Therefore, we make improvements to this and propose a method for data exchange between the LVC-DE distributed synthesis environment and the DDS system. Summary of the Invention

[0005] The object of the present invention is to address the problems raised in the current background technology. To achieve the above object of the invention, the present invention provides the following technical solution: A method for data exchange between an LVC-DE distributed synthesis environment and a DDS system, comprising the following steps: S1 Declare a TENA object instance. In the LVC-DE distributed synthesis environment, use the TENA object model as the data structure for describing information exchange, and use the TENA object instance as the basic unit for information exchange. The TENA object model description file complies with the TDLS TENA Definition Language specification;

[0006] S2 Declare a DDS topic. In the DDS system, use the topic as the basic unit for information exchange, and use the topic type as the data structure for describing information exchange. The DDS topic type complies with the IDLS Interface Description Language specification;

[0007] S3 Associate the TENA object instance with the DDS topic. After the TENA object instance and the DDS topic are declared, a mapping relationship needs to be established between the two to provide rules for subsequent data exchange between the LVC-DE distributed synthesis environment and the DDS system;

[0008] S4 Compile and generate the gateway executable program. After the association description is completed, automatically modify the source code of the gateway executable program and compile and generate the gateway executable program;

[0009] S5 Execute data exchange. Execute the gateway program. When data is updated in the DDS system or the LVC-DE distributed synthesis environment, data exchange is performed.

[0010] As a preferred technical solution of the present invention, S1 declaring a TENA object instance includes: S1-1 Select the TENA object model description file and save the path address of the object model description file;

[0011] S1-2 Open the TENA object model description file according to the path address and read all the contents of the file;

[0012] S1-3 Judge the structure identifier of each line of the TENA object model description file line by line;

[0013] S1-4-1 If the structure identifier is of types such as local class, class, message, etc., go to step S1-5;

[0014] S1-4-2 If the structure identifier is of the enumeration type, save the enumeration name and enumeration content, store them in the data structure, and go to step S1-3;

[0015] S1-4-3 If the structure identifier is an end symbol, go to step S1-7;

[0016] Within the class / local class / message structure processing branch, S1-5 determines the type identifier of each line of content within the structure;

[0017] S1-6-1 If the content identifier is data, store the type and name of the data in the data structure and go to step S1-5;

[0018] S1-6-2 If the content identifier is a method, store the method return type, name, parameter input / output types, parameter data types, parameter names, error value types, and error value names in the data structure and go to step S1-5;

[0019] S1-6-3 If the content identifier is an end symbol, go to step S1-3;

[0020] S1-7 Rearrange the data structure according to the inheritance and aggregation relationships to form a list of TENA object models;

[0021] S1-8 Select the TENA object model name for which to declare a TENA object instance, input the TENA object instance name, and establish a list of TENA object instances.

[0022] As a preferred technical solution of the present invention, S2 declares a DDS topic, including S2-1 selecting a DDS system IDL file and saving the DDS topic file path address;

[0023] S2-2 Open the DDS system IDL file according to the path address and read all the content of the file;

[0024] S2-3 Determine the structure identifier of each line of the DDS topic file line by line;

[0025] S2-4-1 If the structure identifier is a structure, go to step S2-5;

[0026] S2-4-2 If the structure identifier is an enumeration type, save the enumeration name and enumeration content, store them in the data structure, and go to step S2-3;

[0027] S2-4-3 If the structure identifier is an end symbol, go to step S2-7;

[0028] S2-5 Within the structure data processing branch, determine the type identifier of each line of content within the structure;

[0029] S2-6-1 If the content identifier is data, store the type and name of the data in the data structure and go to step S2-5;

[0030] S2-6-2 If the content identifier is an end symbol, go to step S2-3;

[0031] S2-7 Sort out the data structure according to the nesting relationship to form the DDS system topic list;

[0032] S2-8 Select the DDS system topic type, input the topic name, and establish the DDS system publish topic list and subscribe topic list.

[0033] As a preferred technical solution of the present invention, S3 associates the TENA object instance with the DDS topic, including S3-1 Read the DDS topic list S published or subscribed generated in step S2-8, and expand all the attributes of the topic;

[0034] S3-2 Read the TENA object instance list S ordered or published generated in step S2-8, and expand all the attributes of the object instance;

[0035] S3-3 Select a certain attribute of the TENA object instance and map it to a certain attribute of the DDS topic to establish a mapping list. The mapping content includes the order / publish relationship, TENA object instance type, TENA object instance name, TENA object instance attribute name, TENA object instance attribute data type, DDS topic name, DDS topic type, DDS topic attribute name, and DDS topic attribute type. The rules to be followed for mapping are that one TENA object instance or DDS topic can be mapped to multiple DDS topics or TENA object instances, the same attribute can be mapped to multiple publish attributes, and only one subscribe attribute can be mapped;

[0036] S3-4 Select the main attribute S. When the main attribute of the subscribed data type is updated, publish this data type externally. Save the mapping relationship and store it as an associated description file.xml.

[0037] As a preferred technical solution of the present invention, S4 compiles and generates the gateway executable program, including S4-1 Input the topic name and topic data type associated and mapped by the DDS system, and store them as a list;

[0038] S4-2 Open the gateway source file RunDisplay.cpp, find the location of the addTypeSupport() function, add the DDS registration topic function according to the topic name and topic type in the list content, name the topic as ts_topic name, find the location of the DDSDataWriter() function, and add the data content of the send topic type according to the topic type in the list content, and save the RunDisplay.cpp file;

[0039] S4-3 Open the gateway source file DDSDataReader.cpp, locate the position of the on_data_available() function, add the data content of the received topic type according to the total topic type content in the list, and save the DDSDataReader.cpp file;

[0040] S4-4 Generate an idl format description file according to the TENA object model file, compile the idl description file, generate the source code of the supporting project file, and replace the generated project file into the gateway program project to achieve the effect of changing the object model file;

[0041] S4-5 After all the code of the gateway program project is replaced, compile the gateway program project to generate the gateway executable program.

[0042] As a preferred technical solution of the present invention, S5 performs data exchange,

[0043] S5a-1 Receive the TENA object instance data published by the LVC-DE distributed synthesis environment;

[0044] S5a-2 Determine whether the TENA object instance received from the LVC-DE distributed synthesis environment is associated with the DDS topic subscribed in the mapping. If so, execute (5a-3); otherwise, end this operation;

[0045] S5a-3 Parse the TENA object instance data received from the LVC-DE distributed synthesis environment according to the basic data type and store it in the corresponding position of the mapping information list;

[0046] S5a-4 Determine whether the main attribute has been updated according to the content of the mapping information list. If the main attribute is updated, execute (5a-5); if the main attribute is not updated, end this operation;

[0047] S5a-5 Call the DDSDataWriter() function, fill the data parsed in (5a-3) into the sample of the DDS system subscribed topic associated with the TENA object instance published by the LVC-DE distributed synthesis environment, and publish it to the DDS system.

[0048] As a preferred technical solution of the present invention, S5 performs data exchange, and also includes S5b-1 Receive the topic sample published by the DDS system;

[0049] S5b-2 Determine whether the topic received from the DDS system is the TENA object instance of the LVC-DE distributed synthesis environment subscribed in the associated mapping. If so, execute (5b-3); otherwise, end this operation;

[0050] S5b-3 parses the topic samples received from the DDS system according to the basic data types and stores them in the corresponding positions of the mapping information list;

[0051] S5b-4 determines whether the main attributes are updated according to the content of the mapping information list. If the main attributes are updated, execute (5a-5); if the main attributes are not updated, end this operation;

[0052] S5b-5 calls the on_UpdateObjectInstanceAttributeValues() function, fills the data parsed in (5b-3) into the data of the TENA object instance ordered by the LVC-DE distributed synthesis environment associated with the DDS system publishing topic, and publishes it to the LVC-DE distributed synthesis environment.

[0053] Compared with the prior art, the beneficial effects of the present invention are:

[0054] In the solution of the present invention:

[0055] 1. By the proposed data exchange method between the LVC-DE distributed synthesis environment and the DDS system, it can solve the problems that the existing data exchange method between the LVC-DE distributed synthesis environment and the DDS system depends on custom development, lacks generality, has high requirements for users' programming ability, and has a long development cycle. By generating associated files, the generality is improved and custom development is not required; by modifying the source code of the executable program and compiling, the work of user programming is reduced and the development cycle is shortened;

[0056] 2. By being applied to the LVC-DE distributed synthesis environment system, it can achieve efficient matching between the LVC-DE distributed synthesis environment and the DDS system. The actual test results show that compared with the existing method that only relies on custom development, the development cycle of the data exchange method proposed by this invention is reduced to more than 85%, and users no longer need to perform programming operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 It is the flowchart of declaring a TENA object instance provided by the present invention;

[0058] Figure 2 It is the flowchart of declaring a DDS topic provided by the present invention;

[0059] Figure 3 It is the flowchart of associating a TENA object instance with a DDS topic provided by the present invention;

[0060] Figure 4 It is the flowchart of compiling and generating a gateway executable program provided by the present invention;

[0061] Figure 5Process diagram for the LVC-DE distributed synthesis environment provided by the present invention to update data to the DDS system;

[0062] Figure 6 Process diagram for the DDS system provided by the present invention to update data to the LVC-DE distributed synthesis environment. Specific embodiments

[0063] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are specific embodiments of the present invention and do not cover all embodiments.

[0064] Therefore, the following detailed description of the embodiments of the present invention is not intended to limit the scope of the claimed invention, but merely represents some embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.

[0065] It should be noted that, without conflict, the embodiments in the present invention and the features and technical solutions in the embodiments may be combined with each other. It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0066] Embodiment: Please refer to Figure 1-6 , a data exchange method between an LVC-DE distributed synthesis environment and a DDS system, including the following steps: S1 Declare a TENA object instance. The LVC-DE distributed synthesis environment uses the TENA object model as the data structure for describing information exchange and the TENA object instance as the basic unit for information exchange. The TENA object model description file complies with the TDLS TENA Definition Language specification; S2 Declare a DDS topic. The DDS system uses the topic as the basic unit for information exchange and the topic type as the data structure for describing information exchange. The DDS topic type complies with the IDLS Interface Description Language specification; S3 Associate the TENA object instance with the DDS topic. After the declaration of the TENA object instance and the DDS topic is completed, a mapping relationship needs to be established between the two to provide rules for subsequent data exchange between the LVC-DE distributed synthesis environment and the DDS system; S4 Compile and generate the gateway executable program. After the association description is completed, the source code of the gateway executable program is automatically modified and compiled to generate the gateway executable program; S5 Execute data exchange. Execute the gateway executable program to perform data exchange when data is updated in the DDS system or the LVC-DE distributed synthesis environment.

[0067] S1 declares that the TENA object instance includes S1-1 to select the TENA object model description file and save the path address of the object model description file;

[0068] S1-2 Open the TENA object model description file according to the path address and read all the content of the file;

[0069] S1-3 Judge the structure identifier of each line of the TENA object model description file line by line;

[0070] S1-4-1 If the structure identifier is of types such as local class, class, message, etc., go to step S1-5;

[0071] S1-4-2 If the structure identifier is of enumeration type, save the enumeration name and content, store them in the data structure, and go to step S1-3;

[0072] S1-4-3 If the structure identifier is an end symbol, go to step S1-7;

[0073] S1-5 Within the class / local class / message structure processing branch, judge the type identifier of each line of content within the structure;

[0074] S1-6-1 If the content identifier is data, store the type and name of the data in the data structure and go to step S1-5;

[0075] S1-6-2 If the content identifier is a method, store the method return type, name, parameter input / output types, parameter data types, parameter names, error value types, and error value names in the data structure and go to step S1-5;

[0076] S1-6-3 If the content identifier is an end symbol, go to step S1-3;

[0077] S1-7 Re-organize the data structure according to the inheritance and aggregation relationships to form a TENA object model list;

[0078] S1-8 Select the TENA object model name for which the TENA object instance is to be declared, input the TENA object instance name, and establish a TENA object instance list.

[0079] The pseudocode for S1 to declare a TENA object instance in the " ${module name}.tdl" file definition format is:

[0080]

[0081]

[0082] S2 declares that the DDS topic includes S2-1 selecting the DDS system IDL file and saving the path address of the DDS topic file;

[0083] S2-2 Open the DDS system IDL file according to the path address and read all the contents of the file;

[0084] S2-3 Judge the structure identifier of each line of the DDS topic file line by line;

[0085] S2-4-1 If the structure identifier is a structure, go to step S2-5;

[0086] S2-4-2 If the structure identifier is an enumeration type, save the enumeration name and enumeration content, store them in the data structure, and go to step S2-3;

[0087] S2-4-3 If the structure identifier is an end symbol, go to step S2-7;

[0088] S2-5 In the structural data processing branch, judge the type identifier of each line of content in the structure;

[0089] S2-6-1 If the content identifier is data, store the type and name of the data in the data structure and go to step S2-5;

[0090] S2-6-2 If the content identifier is an end symbol, go to step S2-3;

[0091] S2-7 Sort out the data structure according to the nesting relationship to form a DDS system topic list;

[0092] S2-8 Select the DDS system topic type, input the topic name, and establish a DDS system publish topic list and a subscribe topic list.

[0093] The pseudo-code file definition format of the DDS topic "${module name}.idl" file defined by S2 is: Module moduleName

[0094]

[0095]

[0096] S3 associates the TENA object instance with the DDS topic, including S3-1 reading the DDS topic list S published or subscribed generated in step S2-8 and expanding all the attributes of the topic;

[0097] S3-2 Read the TENA object instance list S subscribed or published generated in step S2-8 and expand all the attributes of the object instance;

[0098] S3-3 Select a certain attribute of the TENA object instance to map with a certain attribute of the DDS topic, establish a mapping list, and the mapping content includes subscription and publication relationships, TENA object instance types, TENA object instance names, TENA object instance attribute names, TENA object instance attribute data types, DDS topic names, DDS topic types, DDS topic attribute names, and DDS topic attribute types. The rules to be followed for mapping are that one TENA object instance or DDS topic can be mapped to multiple DDS topics or TENA object instances, the same attribute can be mapped to multiple publication attributes, and only one subscription attribute can be mapped;

[0099] S3-4 Select the main attribute S. When the main attribute of the subscribed data type is updated, publish this data type. Save the mapping relationship and store it as an associated description file.xml.

[0100] The definition format of the S3 associated TENA object instance associated description file.xml is: <Attribute Association Information>

[0101] <Class List Information>

[0102]

[0103]

[0104]

[0105]

[0106]

[0107]

[0108] < / Class List Information>

[0109] <Gateway Information struct="DDS" Aname="DDS Heterogeneous System Object Model File Path" Bname="TENA System Object Model File Path" model="openDDS / >

[0110] <Attribute Subscription Information>

[0111] <Subscription Class Information type="" stream="A2B" name="TENA System Object Instance Data Type" id="Object Instance Name">

[0112] <Ordering Attribute Information targetName="TENA Instance Attribute Name" fromAttrName="DDS Heterogeneous System Attribute Name" mainState="Main Attribute Identifier" targetAttr="TENA System Object Instance Attribute Data Type" fromName="DDS Heterogeneous System Topic Type" fromAttrType="Data Type" fromClassID="DDS Heterogeneous System Topic Name" / > ...

[0114] < / Ordering Class Information>

[0115] <Publishing Class Information type="" stream="B2A" name="DDS Heterogeneous System Topic Data Type" id="DDS Heterogeneous System Topic Name">

[0116] <Publishing Attribute Information targetName="DDS Heterogeneous System Topic Data Name" fromAttrName="TENA System Object Instance Attribute Name" mainState="Main Attribute Identifier" targetAttr="DDS Heterogeneous System Topic Attribute Data Type" fromName="TENA System Object Instance Name" fromAttrType="TENA System Object Instance Attribute Data Type" fromClassID="TENA System Object Instance Name" / > ...

[0118] < / Publishing Class Information>

[0119] < / Attribute Ordering Information>

[0120] < / Attribute Association Information>

[0121] S4 Compile to Generate the Gateway Executable Program, which includes inputting the topic name and topic data type associated with the DDS system in S4-1 and storing them as a list;

[0122] In S4-2, open the gateway source file RunDisplay.cpp, find the location of the addTypeSupport() function, add the DDS registration topic function according to the topic name and topic type in the list content, name the topic as ts_topic name, find the location of the DDSDataWriter() function, add the content of the sending topic type data according to the topic type in the list content, and save the RunDisplay.cpp file;

[0123] S4-3 Open the gateway source file DDSDataReader.cpp, locate the position of the on_data_available() function, add the data content of the received topic type according to the general topic type in the list, and save the DDSDataReader.cpp file;

[0124] S4-4 Generate an idl format description file according to the TENA object model file, compile the idl description file, generate the source code of the supporting project file, and replace the generated project file into the gateway program project to achieve the effect of changing the object model file;

[0125] S4-5 After all the code of the gateway program project is replaced, compile the gateway program project to generate the gateway executable program.

[0126] S5 Perform data exchange, including S5a-1 Receive the TENA object instance data published by the LVC-DE distributed synthetic environment;

[0127] S5a-2 Determine whether the TENA object instance received from the LVC-DE distributed synthetic environment is associated with the DDS topic subscribed in the mapping. If so, execute (5a-3); otherwise, end this operation;

[0128] S5a-3 Parse the TENA object instance data received from the LVC-DE distributed synthetic environment according to the basic data type and store it in the corresponding position of the mapping information list;

[0129] S5a-4 Determine whether the main attribute has been updated according to the content of the mapping information list. If the main attribute is updated, execute (5a-5); if the main attribute is not updated, end this operation;

[0130] S5a-5 Call the DDSDataWriter() function to fill the data parsed in (5a-3) into the sample of the DDS system subscribed topic associated with the TENA object instance published by the LVC-DE distributed synthetic environment and publish it to the DDS system.

[0131] S5 Perform data exchange, and also include S5b-1 Receive the topic sample published by the DDS system;

[0132] S5b-2 Determine whether the topic received from the DDS system is the TENA object instance of the LVC-DE distributed synthetic environment subscribed in the associated mapping. If so, execute (5b-3); otherwise, end this operation;

[0133] S5b-3 Parse the topic sample received from the DDS system according to the basic data type and store it in the corresponding position of the mapping information list;

[0134] S5b-4 determines whether the main attribute has been updated according to the content of the mapping information list. If the main attribute is updated, execute (5a-5); if the main attribute is not updated, end this operation.

[0135] S5b-5 calls the on_UpdateObjectInstanceAttributeValues() function, fills the data parsed in (5b-3) into the data of the TENA object instance ordered by the LVC-DE distributed synthesis environment associated with the DDS system publishing topic, and publishes it to the LVC-DE distributed synthesis environment.

[0136] Working principle: During the use of the present invention, in S1, a TENA object instance is declared. The LVC-DE distributed synthesis environment uses the TENA object model as the data structure for describing information exchange, and the TENA object instance is used as the basic unit of information exchange. The TENA object model description file complies with the TDLS TENA Definition Language specification; in S2, a DDS topic is declared. The DDS system uses the topic as the basic unit of information exchange, and the topic type is used as the data structure for describing information exchange. The DDS topic type complies with the IDLS Interface Description Language specification; in S3, the TENA object instance is associated with the DDS topic. After the declaration of the TENA object instance and the DDS topic is completed, a mapping relationship needs to be established between the two to provide rules for subsequent data exchange between the LVC-DE distributed synthesis environment and the DDS system; in S4, a gateway executable program is compiled and generated. After the association description is completed, the source code of the gateway executable program is automatically modified, and the gateway executable program is compiled and generated; in S5, data exchange is executed. The gateway executable program is executed, and data exchange is performed when data is updated in the DDS system or the LVC-DE distributed synthesis environment. S1 declaring a TENA object instance includes S1-1 selecting a TENA object model description file and saving the path address of the object model description file; S1-2 opening the TENA object model description file according to the path address and reading all the contents of the file; S1-3 judging the structure identifier of each line of the TENA object model description file line by line; S1-4-1 if the structure identifier is of types such as local class, class, message, etc., go to step S1-5; S1-4-2 if the structure identifier is of enumeration type, save the enumeration name and enumeration content, store them in the data structure, and go to step S1-3; S1-4-3 if the structure identifier is an end symbol, go to step S1-7; S1-7 re-organize the data structure according to the inheritance and aggregation relationships to form a TENA object model list; S1-8 select the TENA object model name for which a TENA object instance is to be declared, input the TENA object instance name, and establish a TENA object instance list. The pseudo-code for the definition format of the " ${module name}.tdl" file for S1 to declare a TENA object instance is:

[0137]

[0138]

[0139] Step S2 declares that the DDS topic includes S2-1 to select the DDS system IDL file and save the path address of the DDS topic file; S2-2 to open the DDS system IDL file according to the path address and read all the contents of the file; S2-3 to judge the structure identifier of each line of the DDS topic file line by line; S2-4-1 if the structure identifier is a structure, go to step S2-5; S2-4-2 if the structure identifier is an enumeration type, save the enumeration name and enumeration content, store them in the data structure, and go to step S2-3; S2-4-3 if the structure identifier is an end symbol, go to step S2-7; S2-5 in the structure data processing branch, judge the type identifier of each line content in the structure; S2-6-1 if the content identifier is data, store the type and name of the data in the data structure and go to step S2-5; S2-6-2 if the content identifier is an end symbol, go to step S2-3; S2-7 sort out the data structure according to the nesting relationship to form a DDS system topic list; S2-8 select the DDS system topic type, input the topic name, and establish a DDS system publish topic list and a subscribe topic list.

[0140] The pseudo-code file definition format of the DDS topic "${module name}.idl" file definition format declared in S2 is: Module moduleName

[0141]

[0142]

[0143] S3 Associates the TENA object instance with the DDS topic, including: S3-1 Reads the DDS topic list generated in step S2-8, publishes or subscribes to it, and expands all the attributes of the topic; S3-2 Reads the TENA object instance list generated in step S2-8, subscribes to or publishes it, and expands all the attributes of the object instance; S3-3 Selects a certain attribute of the TENA object instance and maps it to a certain attribute of the DDS topic to establish a mapping list. The mapping content includes the subscription / publishing relationship, TENA object instance type, TENA object instance name, TENA object instance attribute name, TENA object instance attribute data type, DDS topic name, DDS topic type, DDS topic attribute name, and DDS topic attribute type. The rule to be followed for mapping is that one TENA object instance or DDS topic can be mapped to multiple DDS topics or TENA object instances, the same attribute can be mapped to multiple publishing attributes, and only one subscription attribute can be mapped; S3-4 Selects the main attribute. When the main attribute of the subscribed data type is updated, the data type is published externally. Saves the mapping relationship and stores it as an associated description file.xml.

[0144] The definition format of the S3 associated TENA object instance associated description file.xml is: <Attribute Association Information>

[0145] <Class List Information>

[0146] <List A Information number = "Number of DDS Topics">

[0147] <List A Sub-Information name = "Topic Data Type" id = "Topic Name" relation = "Subscription / Publishing Relationship" / >

[0148] < / List A Information>

[0149] <List B Information number = "Number of TENA Object Instances">

[0150] <List B Sub-Information name = "Object Instance Data Type" id = "Object Instance Name" relation = "Subscription / Publishing Relationship" / >

[0151] < / List B Information>

[0152] < / Class List Information>

[0153] <Gateway Information struct = "DDS" Aname = "DDS Heterogeneous System Object Model File Path" Bname = "TENA System Object Model File Path" model = "openDDS / >

[0154] <Attribute Subscription Information>

[0155] <Ordering class information type="" stream="A2B" name="TENA system object instance data type" id="Object instance name">

[0156] <Ordering attribute information targetName="TENA instance attribute name" fromAttrName="DDS heterogeneous system attribute name" mainState="Main attribute identifier" targetAttr="TENA system object instance attribute data type" fromName="DDS heterogeneous system topic type" fromAttrType="Data type" fromClassID="DDS heterogeneous system topic name" / > ...

[0158] < / Ordering class information>

[0159] <Publishing class information type="" stream="B2A" name="DDS heterogeneous system topic data type" id="DDS heterogeneous system topic name">

[0160] <Publishing attribute information targetName="DDS heterogeneous system topic data name" fromAttrName="TENA system object instance attribute name" mainState="Main attribute identifier" targetAttr="DDS heterogeneous system topic attribute data type" fromName="TENA system object instance name" fromAttrType="TENA system object instance attribute data type" fromClassID="TENA system object instance name" / > ...

[0162] < / Publishing class information>

[0163] < / Attribute ordering information>

[0164] < / Attribute association information>

[0165] The S4 compilation to generate the gateway executable program includes: S4-1 input the topic names and topic data types associated and mapped by the DDS system, and store them as a list; S4-2 open the gateway source file RunDisplay.cpp, locate the position of the addTypeSupport() function, add the DDS registration topic function according to the topic names and topic types in the list content, name the topic as ts_topic name, locate the position of the DDSDataWriter() function, add the data content of the sending topic type according to the topic type in the list content, and save the RunDisplay.cpp file; S4-3 open the gateway source file DDSDataReader.cpp, locate the position of the on_data_available() function, add the data content of the receiving topic type according to the topic type in the list content, and save the DDSDataReader.cpp file; S4-4 generate an idl format description file according to the TENA object model file, compile the idl description file, generate the source code of the supporting project file, and replace the generated project file into the gateway program project to achieve the effect of changing the object model file; S4-5 after all the code of the gateway program project is replaced, compile the gateway program project to generate the gateway executable program. S5 Execute data exchange includes: S5a-1 receive the TENA object instance data published by the LVC-DE distributed synthetic environment; S5a-2 determine whether the TENA object instance received from the LVC-DE distributed synthetic environment is associated and mapped to the subscribed DDS topic. If so, execute (5a-3), otherwise end this operation; S5a-3 parse the TENA object instance data received from the LVC-DE distributed synthetic environment according to the basic data type and store it in the corresponding position of the mapping information list; S5a-4 determine whether the main attribute is updated according to the content of the mapping information list. If the main attribute is updated, execute (5a-5), otherwise end this operation; S5a-5 call the DDSDataWriter() function, fill the data parsed in (5a-3) into the sample of the DDS system subscribed topic associated with the TENA object instance published by the LVC-DE distributed synthetic environment, and publish it to the DDS system.S5 performs data exchange, and further includes: S5b-1 receiving the topic samples published by the DDS system; S5b-2 determining whether the topic received from the DDS system is the LVC-DE distributed synthetic environment TENA object instance subscribed in the association mapping. If so, execute (5b-3), otherwise end this operation; S5b-3 parsing the topic samples received from the DDS system according to the basic data types and storing them in the corresponding positions of the mapping information list; S5b-4 judging whether the main attributes are updated according to the content of the mapping information list. If the main attributes are updated, execute (5a-5), if the main attributes are not updated, end this operation; S5b-5 calling the on_UpdateObjectInstanceAttributeValues() function, filling the data parsed in (5b-3) into the data of the LVC-DE distributed synthetic environment subscribed TENA object instance associated with the topic published by the DDS system, and publishing it to the LVC-DE distributed synthetic environment.

[0166] The above embodiments are only used to illustrate the present invention and do not limit the technical solutions described in the present invention. Although the present specification has described the present invention in detail with reference to the above respective embodiments, the present invention is not limited to the above specific implementation manners. Therefore, any modification or equivalent replacement to the present invention; and all technical solutions and their improvements that do not deviate from the spirit and scope of the invention are covered by the scope of the claims of the present invention.

Claims

1. A data exchange method between an LVC-DE distributed synthesis environment and a DDS system, characterized in that It includes the following steps: S1: Declare a TENA object instance: In the LVC-DE distributed synthesis environment, use the TENA object model as the data structure for describing information exchange, with the TENA object instance as the basic unit of information exchange. The TENA object model description file complies with the TDLS TENA Definition Language specification; S2: Declare a DDS topic: In the DDS system, use the topic as the basic unit of information exchange and the topic type as the data structure for describing information exchange. The DDS topic type complies with the IDLS Interface Description Language specification; S3: Associate the TENA object instance with the DDS topic: After completing the declaration of the TENA object instance and the DDS topic, a mapping relationship needs to be established between the two to provide rules for subsequent data exchange between the LVC-DE distributed synthesis environment and the DDS system; S4: Compile and generate the gateway executable program: After completing the association description, automatically modify the source code of the gateway executable program and compile it to generate the gateway executable program; S5: Execute data exchange: Execute the gateway executable program to perform data exchange when data is updated in the DDS system or the LVC-DE distributed synthesis environment; The S1 includes the following steps: S1-1: Select the TENA object model description file and save the path address of the object model description file; S1-2: Open the TENA object model description file according to the path address and read all the contents of the file; S1-3: Judge the structure identifier of each line of the TENA object model description file line by line; The S2 includes the following steps: S2-1: Select the DDS system IDL file and save the path address of the DDS topic file; S2-2: Open the DDS system IDL file according to the path address and read all the contents of the file; S2-3: Judge the structure identifier of each line of the DDS topic file line by line; The S4 includes the following steps: S4-1: Input the topic name and topic data type associated with the DDS system and store them as a list; S4-2: Open the gateway source file RunDisplay.cpp, find the location of the addTypeSupport() function, add the DDS registration topic function according to the topic name and topic type in the list content, name the topic as ts_topic name, find the location of the DDSDataWriter() function, and add the data content of the sending topic type according to the topic type in the list content, and save the RunDisplay.cpp file; S4-3: Open the gateway source file DDSDataReader.cpp, find the location of the on_data_available() function, add the data content of the receiving topic type according to the topic type in the list content, and save the DDSDataReader.cpp file; S4-4: Generate an idl format description file according to the TENA object model file, compile the idl format description file, generate the source code of the supporting project file, and replace the generated project file into the gateway program project to achieve the effect of changing the object model file; S4-5: After all the codes of the gateway program project are replaced, compile the gateway program project to generate a gateway executable program.

2. The data exchange method between an LVC-DE distributed synthesis environment and a DDS system according to claim 1, characterized in that After executing the said S1-3, continue to execute the following steps: S1-4-1 If the structure identifier is a local class or a message type, go to step S1-5; S1-4-2 If the structure identifier is an enumeration type, save the enumeration name and enumeration content, store them in the data structure, and go to S1-3; S1-4-3: If the structure identifier is an end symbol, go to S1-7; S1-5: In the processing branch of the local class or message type structure, judge the type identifier of each line of content in the structure; S1-6-1: If the content identifier is data, store the type and name of the data in the data structure, and go to S1-5; S1-6-2: If the content identifier is a method, store the method return type, name, parameter input / output type, parameter data type, parameter name, error value type, and error value name in the data structure, and go to S1-5; S1-6-3: If the content identifier is an end symbol, go to S1-3; S1-7: Rearrange the data structure according to the inheritance and aggregation relationships to form a TENA object model list; S1-8: Select the TENA object model name for which to declare a TENA object instance, input the TENA object instance name, and establish a TENA object instance list.

3. A method for data exchange between an LVC-DE distributed synthesis environment and a DDS system according to claim 2, characterized in that After executing the said S2-3, continue to execute the following steps: S2-4-1: If the structure identifier is a structure, go to S2-5; S2-4-2: If the structure identifier is an enumeration type, save the enumeration name and enumeration content, store them in the data structure, and go to S2-3; S2-4-3: If the structure identifier is an end symbol, go to S2-7; S2-5: In the processing branch of the structure data, judge the type identifier of each line of content in the structure; S2-6-1: If the content identifier is data, store the type and name of the data in the data structure, and go to S2-5; S2-6-2: If the content identifier is an end symbol, go to S2-3; S2-7: Rearrange the data structure according to the nesting relationship to form a DDS system topic list; S2-8: Select the DDS system topic type, input the topic name, and establish a DDS system publish topic list and a subscribe topic list.

4. A method for data exchange between an LVC-DE distributed synthesis environment and a DDS system according to claim 3, characterized in that, The said S5 includes the following steps: S5a-1: Receive the TENA object instance data published by the LVC-DE distributed synthesis environment; S5a-2: Judge whether the TENA object instance received from the LVC-DE distributed synthesis environment is associated with the subscribed DDS topic in the mapping. If so, execute S5a-3; If not, end this operation; S5a-3: Parse the TENA object instance data received from the LVC-DE distributed synthesis environment according to the basic data type and store it in the corresponding position of the mapping information list; S5a-4: Determine whether the main attribute has been updated according to the content of the mapping information list. If the main attribute is updated, execute S5a-5; if the main attribute is not updated, end this operation. S5a-5: Call the DDSDataWriter() function, fill the data parsed in S5a-3 into the sample of the DDS system subscription topic associated with the TENA object instance published in the LVC-DE distributed synthesis environment, and publish it to the DDS system.

Citation Information

Patent Citations

  • Automatic generation method of simulation framework for LVC

    CN106951310A

  • KR1016021000000B1