A Method for Generating Communication Message Unions in an ARINC653 System Based on ICD
By automatically generating communication message common header files of ICD files, the problems of high maintenance costs and human errors in traditional IO partitions are solved, fast and accurate signal checksum code generation is achieved, and the maintenance efficiency and quality of the onboard embedded system is improved.
Patent Information
- Application Number
- CN202211617603.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-15
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-12-15
AI Technical Summary
Traditional IO partitioning is expensive in airborne embedded systems due to frequent ICD changes, and manual writing of shared header files is time-consuming and labor-intensive, and easy to introduce human errors.
The communication message common body generation method based on ICD is adopted. By reading the ICD file, the data list is generated, partition mask replacement and verification are performed, the communication message common body header file is automatically generated, and the hash algorithm is used to quickly locate illegal naming signals.
It improves ICD change efficiency, avoids human errors, shortens coding cycles, and improves the maintainability and product quality of IO partitions.
Smart Images

Figure CN116055031B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of airborne embedded systems, and particularly to a method for generating a communication message union of an ARINC653 system based on an ICD. Background Art
[0002] An ICD is an Interface Control Document, which is used to describe the interface information inside the system and between systems, and records various types of information including signal types, signal values, signal offsets, transmission frequencies, transmission paths, etc. The IO partition is responsible for uniformly completing the message sending, receiving and processing between the VMC module and external devices, involving dozens of systems such as the fuel system, environmental control system, hydraulic system, power supply system, nose wheel steering system, landing gear system, braking system, etc., and there are a large number of interaction message types with each system, and the number of signal quantities is tens of thousands.
[0003] The traditional IO partition adopts a one-to-one working mode of message-port, and a dedicated communication port needs to be configured for each message and the sending and receiving codes need to be written. Moreover, since the requirements of each system cannot be implemented in specific implementation links in the early stage of system design and the requirements change frequently, the subsequent change of the ICD will inevitably lead to large-scale modification of the IO partition code, and the maintenance cost is high.
[0004] Therefore, it is necessary to logically divide the configuration table according to different communication partitions, and write a unified union header file for the communication messages between the IO partition and the same partition, so that the IO partition can obtain signal data without depending on the specific signal name, which can avoid the problem of a large amount of code changes caused by ICD changes, thereby improving the maintainability of the IO partition.
[0005] The following problems need to be solved urgently in the process of manually writing the partition communication message union header file by coders according to the configuration table: (1) It is difficult to verify whether there are signals with illegal naming (including: duplicate naming, naming reserved bit signals) in the configuration table with a large order of magnitude; (2) Using a manual method to extract signals from the ICD file to generate the union header file is extremely time-consuming and laborious and prone to human errors when the ICD data volume is large. Summary of the Invention
[0006] Aiming at the problems that the frequent change of the ICD leads to a large amount of maintenance work of the IO partition code and is prone to human errors, the embodiment of the present application provides a method for generating a communication message union of an ARINC653 system based on an ICD, which can verify the ICD data containing (0, 100000] rows of signals, quickly locate signals with illegal naming, and can automatically generate a communication message union header file for the qualified ICD after verification, improve the ICD change efficiency, and avoid introducing human errors.
[0007] The embodiments of the present application provide the following technical solutions: A method for generating a communication message union of an ARINC653 system based on an ICD, including the following steps:
[0008] S1. Read the ICD file and generate an ICD data list;
[0009] S2. Replace the system name in the ICD data list with a partition mask according to the correspondence between the partition mask and the system name;
[0010] S3. Check the file, verify whether there are signals with the same name and reserved bit naming signals, and display the verification result;
[0011] S4. Generate a communication message union header file for the ICD file that passes the verification.
[0012] According to an embodiment of the present application, the step S1 specifically includes:
[0013] S101. Read the absolute path of the ICD file and check whether the ICD file exists; if the file does not exist, prompt "The file does not exist!" and require re-entering the file path;
[0014] S102. Check whether the ICD file is a ".csv" file; if it is not a ".csv" file, prompt "Please enter a file of type.csv!"; if the file is a ".csv" file, construct a two-dimensional list to store all the data in the ICD and generate the ICD data list.
[0015] According to an embodiment of the present application, the step S2 includes:
[0016] Traverse all the signals in the ICD data list one by one for partition mask replacement, specifically including:
[0017] S20_{1}. Set the mask of all invalid signals to 0x000 so that the invalid signal does not participate in the union generation process; the invalid signal includes a signal starting with "name" and a signal with an empty signal name;
[0018] S20_{2}. Perform a bitwise OR operation on the partition masks of signals with the same message ID as the partition mask of the heartbeat word of the message ID, so that all partitions receiving the signal can receive the corresponding heartbeat word;
[0019] S20_{3}. Convert the system name of the signal source / destination partition and the partition mask.
[0020] According to an embodiment of the present application, in the step S20_{3}, if the system name of the same signal source / destination partition exceeds two, perform a bitwise OR operation on the partition mask.
[0021] According to an embodiment of the present application, step S3 includes:
[0022] Check the signals in the ICD data list line by line, specifically including:
[0023] S301. Duplicate item check; check for signals with the same name. If the signal with the same name is a 429 signal received by VMC, update the name of the 429 signal in the ICD data list and add the corresponding source device name after the signal name; if the signal has the same name and is a heartbeat word, update the name of the heartbeat word signal in the ICD data list and add the corresponding message ID after the signal name; record the remaining signals with the same name in the duplicate item record table.
[0024] S302. Non-compliant item check; if the signal is a reserved bit named signal, record the signal name and the line number where the signal name is located in the non-compliant item record table.
[0025] S303. Display the verification result; if there are duplicate items in the ICD data list, print the duplicate signal, the name of the signal being duplicated, and the line where the duplicate signal is located; if there are non-compliant items in the ICD data list, print the name of the non-compliant item signal and the line where the non-compliant item is located; if the verification is qualified, prompt "There are no duplicate items! There are no non-compliant items!".
[0026] According to an embodiment of the present application, step S4 includes:
[0027] S401. Construct a communication message union header file template;
[0028] S402. Instantiate the communication message union header file template.
[0029] According to an embodiment of the present application, in step S401:
[0030] The process of constructing the communication message union header file template includes: successively constructing the general body frameworks for receiving and sending for all partitions in VMC that communicate with the IO partition.
[0031] According to an embodiment of the present application, in step S402:
[0032] The process of instantiating the communication message union header file template includes:
[0033] During the process of generating the communication message union, a unit for storing all member variables is maintained for each union. For all signals forwarded by each partition on the VMC module to external devices through the IO partition, the signal name can be directly used as a member variable of the corresponding union according to the partition mask. For all signals forwarded by the IO partition on the VMC module to the remaining partitions, multi-partition forwarding is performed, the partition masks are compared bit by bit, the relevant member variables of the union are updated, and the data stored in each unit finally is filled into the union header file template.
[0034] The present invention extracts relevant data based on the key attributes of the ICD for verification, can quickly locate illegally named signals, and can automatically generate the communication message union header file for the IO partition and other application partitions in the VMC module for the verified ICD file.
[0035] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0036] (1) The present invention introduces a hash algorithm to perform a rename verification on the ICD file, and only needs to perform a string comparison on signal names with the same calculation result of the hash function, which shortens the verification time;
[0037] (2) During the ICD verification process, illegally named signals can be accurately located, and ICD file maintenance personnel can quickly modify and improve the configuration table according to the location information, which improves the change efficiency of the ICD file;
[0038] (3) By converting the manual writing of the communication message union header file into automatic generation, the present invention can quickly generate the union header file for a large number of ICD files, avoid introducing human errors, shorten the coding cycle, and improve the product quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0040] Figure 1 It is a schematic diagram of the communication message union header generation process according to an embodiment of the present invention;
[0041] Figure 2 It is a verification ICD activity diagram according to an embodiment of the present invention;
[0042] Figure 3 It is a generation communication message union header file activity diagram according to an embodiment of the present invention;
[0043] Figure 4Schematic diagram of the unqualified result of the display ICD check for the embodiments of the present invention;
[0044] Figure 5 Schematic diagram of the qualified result of the display ICD check for the embodiments of the present invention;
[0045] Figure 6 Schematic diagram of generating a common body header file for the embodiments of the present invention;
[0046] Figure 7 Example of the common body header file for the embodiments of the present invention. Detailed implementation manners
[0047] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0048] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments. The technical solutions of the present invention are clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0049] As Figure 1 shown, the embodiments of the present invention provide a method for generating a communication message common body based on ICD for an ARINC653 system. This embodiment mainly assists developers in quickly generating a communication message common body header file that can be called by the IO partition through the following steps:
[0050] S1. Read the ICD file and generate an ICD data list;
[0051] The specific operations of step S1 are as follows:
[0052] S101. Read the absolute path of the ICD file and check whether the ICD file exists. If the file does not exist, prompt "File does not exist!" and require re-entering the file path.
[0053] S102. Check whether the ICD file is a ".csv" file. If it is not a ".csv" file, prompt "Please enter a file of type.csv!"; if the file is a ".csv" file, construct a two-dimensional list to store all the data in the ICD.
[0054] S2. Replace the system name in the ICD data list with the partition mask according to the correspondence between the partition mask and the system name;
[0055] The specific operations of step S2 are as follows:
[0056] Traverse all signals in the ICD data list one by one for partition mask replacement, specifically including:
[0057] S201. Set the masks of all invalid signals (including signals starting with "name" and signals with empty signal names) to 0x000 so that they do not participate in the union generation process.
[0058] S202. Perform a bitwise OR operation on the partition masks of signals with the same message ID as the partition mask of the heartbeat word for that message ID, so that all partitions receiving the signal can receive the corresponding heartbeat word.
[0059] S203. Convert the system names of the signal source / destination partitions and the partition masks. The conversion rules are shown in Table 1 below:
[0060] Table 1:
[0061] System Name Partition Mask Electromechanical Integrated Management System 0x0000 Power System 0x0002 Electromechanical Management Subsystem 0x0001 Power Supply System 0x0001 Lighting System 0x0001 Cabin Door System 0x0004 Fire Protection System 0x0002 Fuel System 0x0002 Hydraulic System 0x0004 Life Support System 0x0008 Ejection and Rescue System 0x0008 Living Facilities System 0x0008 Environmental Control System 0x0008 Environmental Protection System 0x0010 Liquid Cooling System 0x0010 Auxiliary Power Unit System 0x0002 EWIS System 0x0001 Landing Gear System 0x0004 Pressure Regulation System 0x0008
[0062] If the system names of the same signal destination partition exceed two, perform a bitwise OR operation on the partition mask. For example: fuel system / environment control system, then the mask should be 0x0002|0x0008 = 0x000A.
[0063] S3. Check the file, verify whether there are signals with duplicate names and signals named with reserved bits, and display the check results;
[0064] The specific operations of step S3 are as follows:
[0065] Check the signals in the ICD data list line by line, specifically including:
[0066] S301. Duplicate item check. Check for signals with duplicate names. If the signal with a duplicate name is a 429 signal received by VMC, update the name of the 429 signal in the ICD data list and add the corresponding source device name after the signal name; if the signal names are the same and it is a heartbeat word, update the name of the heartbeat word signal in the ICD data list and add the corresponding message ID after the signal name; other signals with duplicate names are recorded in the duplicate item record table.
[0067] S302. Non-compliant item check. If the signal is a signal named with a reserved bit, record the signal name and its line number in the non-compliant item record table.
[0068] S303. Display the check results. If there are duplicate items in the ICD data list, print the names of the duplicate signals and the signals being duplicated and their lines; if there are non-compliant items in the ICD data list, print the names of the non-compliant item signals and their lines; if the check is qualified, prompt "There are no duplicate items! There are no non-compliant items!".
[0069] In this embodiment, as shown in the appendix Figure 2As shown in the figure, during the verification of the ICD, the RptMsgTbl is used to store the repeated signals, the line numbers where the repeated signals and the signals being repeated are located, and their signal names. The InvldMsgTbl is used to store the line numbers where the named reserved bit signals are located and their signal names. By traversing the ICD data list, all illegal signals are stored in the corresponding MsgTbl. For the 429 signals with duplicate names received by the VMC, their signal names are updated to "429 signal name_source device name", and for the heartbeat word signals with duplicate names, their signal names are updated to "heartbeat word signal name_message ID".
[0070] To accelerate the verification of signals with duplicate names, a hash algorithm is introduced. Since signal names are case-insensitive, the hash function strlen(name) % size is designed, where name is the signal name. Given that C language variable names generally do not exceed 20 characters, size is taken as 20. All signals in the ICD data list are mapped to a hash linked list of length 20 according to the length of the signal name string. Only the signal names with the same hash function calculation results need to be compared for strings, thus reducing the search time.
[0071] S4. Generate a communication message union header file for the ICD file that passes the verification.
[0072] The specific operations of step S4 are as follows:
[0073] S401. Construct a template for the communication message union header file. For all partitions in the VMC that communicate with the IO partition, a general framework for receiving and sending is constructed in sequence.
[0074] S402. Instantiate the template for the communication message union header file.
[0075] As attached Figure 3 As shown in the figure, during the generation of the communication message union, a unit for storing all member variables is maintained for each union. For all signals on the VMC module that are forwarded by the IO partition to external devices (i.e., all signals with the source being the VMC), the signal name can be directly used as a member variable of the corresponding union according to the partition mask. For all signals on the VMC module that are forwarded by the IO partition to other partitions, considering the case of multi-partition forwarding, the partition masks are compared bit by bit to update the member variables of the relevant unions. Finally, according to all the information in the storage units, the template for the partition communication message union header file is instantiated to generate an instance of the communication message union header file that can be called by the IO partition.
[0076] In one embodiment, the method for generating a communication message union of an ARINC653 system based on the ICD, the specific working implementation steps:
[0077] 1). Read the ICD file to generate an ICD data list;
[0078] 1.1) Read the absolute path of the ICD file and verify whether the ICD file exists. If the file does not exist, prompt "File does not exist!" and require re-entry of the file path.
[0079] 1.2) Verify whether the ICD file is a ".csv" file. If it is not a ".csv" file, prompt "Please enter a file of type.csv!"; if the file is a ".csv" file, construct a two-dimensional list to store all the data in the ICD.
[0080] 2) Replace the system names in the ICD data list according to the correspondence between the partition mask and the system name;
[0081] Traverse all the signals in the ICD data list one by one for partition mask replacement, specifically including:
[0082] 2.1) Set the masks of all invalid signals (including signals with "name" as the starting string and signals with empty signal names) to 0x000 so that they do not participate in the union generation process.
[0083] 2.2) Perform a bitwise OR operation on the partition masks of signals with the same message ID as the partition mask of the heartbeat word for that message ID, so that all partitions receiving the signals can receive the corresponding heartbeat word.
[0084] 2.3) Convert the system names of the signal source / destination partitions and the partition masks.
[0085] 3) Verify the file to check for duplicate signal names and reserved bit named signals;
[0086] Verify the signals in the ICD data list line by line, specifically including:
[0087] 3.1) Duplicate item verification. Verify for duplicate signal names. If the duplicate signal is a 429 signal received by VMC, update the 429 signal name in the ICD data list and add the corresponding source device name after the signal name; if the signal names are duplicate and it is a heartbeat word, update the heartbeat word signal name in the ICD data list and add the corresponding message ID after the signal name; other duplicate signal names are recorded in the duplicate item record table.
[0088] 3.2) Non-compliance item verification. If the signal is a reserved bit named signal, record the signal name and its line number in the non-compliance item record table.
[0089] 3.3) Display the verification results. As attached Figure 4 、 Figure 5As shown, when there are duplicate items in the ICD data list, the duplicate signal, the name of the duplicated signal, and its line number are printed; when there are non-compliant items in the ICD data list, the name of the non-compliant item signal and its line number are printed; when the verification is qualified, a prompt of "There are no duplicate items! There are no non-compliant items! Please enter the union header file name:" is given.
[0090] 4). Generate a communication message union header file for the ICD file with qualified verification.
[0091] 4.1) Construct a template for the communication message union header file. Successively construct the general body frameworks for receiving and sending for all partitions communicating with the IO partition in the VMC.
[0092] 4.2) Instantiate the template for the communication message union header file. As shown in the appendix Figure 6 After entering the union header file name ending with ".h", the corresponding header file starts to be generated, and the absolute path of the header file is displayed for the user to view. During the process of generating the communication message union, a unit for storing all member variables is maintained for each union. For all signals forwarded by other partitions on the VMC module to external devices through the IO partition (i.e., all signals with the source being the VMC), according to the partition mask, the signal name can be directly used as the member variable of the corresponding union; for all signals forwarded by the IO partition on the VMC module to other partitions, considering the case of multi-partition forwarding, the partition masks are compared bit by bit, the member variables of the relevant unions are updated, and the data stored in each unit finally is filled into the template. An example of the union header file is shown in the appendix Figure 7 as shown.
[0093] As mentioned above, it is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by this application should be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A method for generating a communication message union of an ARINC653 system based on ICD, characterized in that It includes the following steps: S1. Read the ICD file and generate an ICD data list; S2. Replace the system names in the ICD data list with partition masks according to the correspondence between the partition masks and the system names; The step S2 includes: Traverse all signals in the ICD data list one by one for partition mask replacement, specifically including: S201. Set the masks of all invalid signals to 0x000 so that the invalid signals do not participate in the union generation process; the invalid signals include signals starting with "name" and signals with empty signal names; S202. Perform a bitwise OR operation on the partition masks of signals with the same message ID as the partition mask of the heartbeat word of this message ID, so that all partitions receiving the signals can receive the corresponding heartbeat word; S203. Convert the system names of the signal source / destination partitions and the partition masks; S3. Check the file, verify whether there are signals with the same name and reserved bit named signals, and display the check result; The step S3 includes: Check the signals in the ICD data list line by line, specifically including: S301. Duplicate item check; check for signals with the same name. If the signal with the same name is a 429 signal received by VMC, update the 429 signal name in the ICD data list and add the corresponding source device name after the signal name; if the signals have the same name and are heartbeat words, update the heartbeat word signal name in the ICD data list and add the corresponding message ID after the signal name; record the remaining signals with the same name in the duplicate item record table; S302. Non-compliance item check; if the signal is a reserved bit named signal, record the signal name and the line number where the signal name is located in the non-compliance item record table; S303. Display the check result; if there are duplicate items in the ICD data list, print the names of the duplicate signals and the signals being duplicated and the line where the duplicate signal is located; if there are non-compliance items in the ICD data list, print the signal names of the non-compliance items and the lines where the non-compliance items are located; if the check is qualified, prompt "There are no duplicate items! There are no non-compliance items!"; S4. Generate a communication message union header file for the ICD file that passes the check; The step S4 includes: S401. Build a template for the communication message union header file; S402. Instantiate the template for the communication message union header file.
2. The method for generating a communication message union of an ARINC653 system based on ICD according to claim 1, wherein, The step S1 specifically includes: S101. Read the absolute path of the ICD file and check whether the ICD file exists; if the file does not exist, prompt "The file does not exist!" and require re-entering the file path; S102. Check whether the ICD file is a ".csv" file; if it is not a ".csv" file, prompt "Please enter a file of type.csv!"; if the file is a ".csv" file, build a two-dimensional list to store all data in the ICD and generate the ICD data list.
3. The method for generating a communication message common body of an ARINC653 system based on ICD according to claim 1, wherein In the step S203, if the number of system names in the same signal source / destination partition exceeds two, perform a bitwise OR operation on the partition mask.
4. The method for generating a communication message union of an ARINC653 system based on ICD according to claim 1, wherein In the step S401: The process of building a template for the communication message union header file includes: successively building the general body frameworks for receiving and sending for all partitions communicating with the IO partition in VMC.
5. The method for generating a communication message union of an ARINC653 system based on an ICD according to claim 1, wherein In the said step S402: The process of instantiating the communication message union header file template includes: In the process of generating the communication message union, a unit for storing all member variables is maintained for each union. For all signals forwarded by each partition on the VMC module to external devices through the IO partition, the signal name can be directly used as the member variable of the corresponding union according to the partition mask; for all signals forwarded by the IO partition on the VMC module to the remaining partitions, multi-partition forwarding is performed, the partition masks are compared bit by bit, the member variables of the relevant union are updated, and the data stored in each unit finally is filled into the communication message union header file template.
Citation Information
Patent Citations
Message transferring method and device in multi-partition operating system
CN108319513A
UBIFS-based data automatic restoration method and apparatus
CN108646982A