CN111338638A - System and method for realizing automatic generation of communication between embedded software components - Google Patents

System and method for realizing automatic generation of communication between embedded software components Download PDF

Info

Publication number
CN111338638A
CN111338638A CN202010120245.3A CN202010120245A CN111338638A CN 111338638 A CN111338638 A CN 111338638A CN 202010120245 A CN202010120245 A CN 202010120245A CN 111338638 A CN111338638 A CN 111338638A
Authority
CN
China
Prior art keywords
signal
input
output
signals
components
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010120245.3A
Other languages
Chinese (zh)
Inventor
曹晨光
刘金花
侯斐
朱鸣岐
段利泉
程杨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongfeng Electronic Technology Co ltd
Original Assignee
Dongfeng Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongfeng Electronic Technology Co ltd filed Critical Dongfeng Electronic Technology Co ltd
Priority to CN202010120245.3A priority Critical patent/CN111338638A/en
Publication of CN111338638A publication Critical patent/CN111338638A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a system for realizing automatic generation of communication between embedded software components, which comprises an interface specification module, a function block module and a function block module, wherein the interface specification module is used for uniformly abstracting components into function block components and describing external interfaces of the function block components; the signal mapping module is used for maintaining the connection relation of input and output of signals among the functional block components and establishing mapping of the input signals and the output signals; the general communication generation module is used for generating specific compilable executable codes according to the input and output connection relation of the signals according to a specific rule. The invention also relates to a method for realizing automatic generation of communication between embedded software components. By adopting the system and the method for realizing the automatic generation of the communication between the embedded software components, the existing embedded software architecture is improved on the premise of being compatible with historical codes under the condition of not introducing huge and complicated AutoSAR. Software component interfaces are unified through the specification of the component interfaces, and the development is enabled to quickly establish the connection between the components through graphical interface operation.

Description

System and method for realizing automatic generation of communication between embedded software components
Technical Field
The invention relates to the technical field of computers, in particular to the field of embedded software development, and specifically relates to a system and a method for realizing automatic generation of communication between embedded software components.
Background
The structured design and code automatic generation technology has been applied in the field of embedded software development for many years, wherein AutoSAR is a more prominent technology. However, the AutoSAR is large and complex, its application often requires expensive commercial software, and the original code is difficult to reuse. On the other hand, due to cost limitations of some ECUs, their hardware resource capabilities are limited and it is unlikely that they will run a cumbersome software architecture.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a system and a method for realizing the communication between the automatic generation embedded software components, which have the advantages of high efficiency, simple structure and wider application range.
In order to achieve the above object, the system and method for automatically generating communication between embedded software components of the present invention are as follows:
the system for realizing the automatic generation of the communication between the embedded software components is mainly characterized by comprising the following components:
the interface specification module is used for uniformly abstracting the components into functional block components and describing external interfaces of the functional block components;
the signal mapping module is connected with the interface specification module and used for maintaining the connection relation of input and output of signals among the functional block components and establishing mapping of the input signals and the output signals;
and the general communication generating module is connected with the signal mapping module and is used for generating specific codes which can be compiled and executed according to the input-output connection relation of the signals according to a specific rule.
Preferably, the function block component of the interface specification module includes a name, an operation state, an input signal list, an output signal list, a calibration parameter list, and a configuration parameter list.
Preferably, the interface specification module further includes a function block component list for providing query service for maintaining signal mapping.
Preferably, the mapping of the input signal and the output signal of the signal mapping module is that one input signal corresponds to one output signal, and one output signal corresponds to a plurality of input signals.
Preferably, the general communication generating module generates codes according to the item contents, the function block components and the signal connection condition.
Preferably, the general communication generation module uses a global variable temporary storage signal and generates a corresponding read-write function for a variable to realize input and output of the signal.
The method for automatically generating the communication between the embedded software components based on the system is mainly characterized by comprising the following steps:
(1) the interface specification module abstracts the components into functional block components uniformly and describes external interfaces of the functional block components;
(2) the signal mapping module maintains the connection relation of input and output of signals between the functional block components and establishes mapping of the input signals and the output signals;
(3) the general communication generation module generates specific compiling executable codes according to the input and output connection relation of the signals according to a specific rule.
Preferably, the step (2) specifically comprises the following steps:
(2.1) providing a function block component list with compatible data types, and searching a matched output signal according to an input signal;
(2.2) inquiring the input signal for reference of the output signal, deleting the reference of the input signal in the input signal reference list of the output signal, and deleting the input signal;
and (2.3) traversing an input signal reference list of the output signals, inquiring corresponding input signals, deleting references to the output signals, and deleting the output signals after all elements of the input signal reference list are processed.
By adopting the system and the method for realizing the automatic generation of the communication between the embedded software components, the existing embedded software architecture is improved on the premise of being compatible with historical codes under the condition of not introducing huge and complicated AutoSAR. Software component interfaces are unified through the specification of the component interfaces, and the development is enabled to quickly establish the connection between the components through graphical interface operation. The reusability of software components is improved through integration with historical codes, and the software development efficiency is accelerated.
Drawings
FIG. 1 is a schematic diagram of a system for implementing communications between automatically generated embedded software components in accordance with the present invention.
FIG. 2 is a diagram of a mapping relationship for a system implementing automatically generated communication between embedded software components of the present invention.
FIG. 3 is a block diagram of an embodiment of a system implementing the automatic generation of communications between embedded software components of the present invention.
Detailed Description
In order to more clearly describe the technical contents of the present invention, the following further description is given in conjunction with specific embodiments.
This implementation of the invention automatically generates a system for communication between embedded software components, including:
the interface specification module is used for uniformly abstracting the components into functional block components and describing external interfaces of the functional block components;
the signal mapping module is connected with the interface specification module and used for maintaining the connection relation of input and output of signals among the functional block components and establishing mapping of the input signals and the output signals;
and the general communication generating module is connected with the signal mapping module and is used for generating specific codes which can be compiled and executed according to the input-output connection relation of the signals according to a specific rule.
As a preferred embodiment of the present invention, the function block component of the interface specification module includes a name, an operation state, an input signal list, an output signal list, a calibration parameter list, and a configuration parameter list.
As a preferred embodiment of the present invention, the interface specification module further includes a function block component list for providing query service for maintaining signal mapping.
As a preferred embodiment of the present invention, the mapping between the input signal and the output signal of the signal mapping module is that one input signal corresponds to one output signal, and one output signal corresponds to a plurality of input signals.
In a preferred embodiment of the present invention, the general communication generation module generates codes according to the contents of items, functional block components and signal connections.
As a preferred embodiment of the present invention, the general communication generation module uses a temporary storage signal of a global variable and generates a corresponding read-write function for the variable to realize input and output of the signal.
The method for automatically generating the communication between the embedded software components based on the system comprises the following steps:
(1) the interface specification module abstracts the components into functional block components uniformly and describes external interfaces of the functional block components;
(2) the signal mapping module maintains the connection relation of input and output of signals between the functional block components and establishes mapping of the input signals and the output signals;
(2.1) providing a function block component list with compatible data types, and searching a matched output signal according to an input signal;
(2.2) inquiring the input signal for reference of the output signal, deleting the reference of the input signal in the input signal reference list of the output signal, and deleting the input signal;
(2.3) traversing an input signal reference list of the output signals, inquiring corresponding input signals, deleting references to the output signals, and deleting the output signals after all elements of the input signal reference list are processed;
(3) the general communication generation module generates specific compiling executable codes according to the input and output connection relation of the signals according to a specific rule.
In the embodiment of the present invention, the drawbacks of the prior art are overcome, and a method for automatically generating communication between embedded software components is provided, including: an interface specification module, a signal mapping module and a General communication generation module (GCL). The interface specification module abstracts each software component into a functional block component uniformly and describes the external interface of the functional block component. And the signal mapping module maintains the connection relation of the input and the output of the signals among the functional block components. The general communication generating module generates specific compiling executable codes according to the input-output connection relation of the signals according to a specific rule.
The interface specification module uses 1 xml file with a specific format to describe the external interfaces of 1 part, and has the use conditions of the parts in another 1 xml statistical item with a specific format.
The signal mapping module maintains the signal input and output relationship between the functional block components using 1 xml of a specific format.
And the universal communication generation module generates a plurality of universal communication source files according to the input of the signal mapping.
The interface specification module abstracts each software component into a functional block component uniformly, and describes an external interface of the software component by using an interface specification xml. The function block component xml file comprises the following contents:
name refers to the Name of the function block component; runnable refers to the running state, including initialization functions, periodically executed functions, startup delays and cycles; input signals refer to an Input signal list, wherein signals comprise names, data types, synchronous or asynchronous, and whether forced Input is performed or not; output signals refers to a list of Output signals, including signal name and data type; calibration parameters refers to a calibration parameter list; configurations refers to a list of configuration parameters.
The interface specification module also maintains a loaded functional block component list to provide query service for the signal mapping module to maintain the signal mapping.
The signal mapping module maintains the connection relationship of the input and the output of the signals between the functional block components as shown in fig. 2. An input signal-to-output signal connection is referred to as a signal map. The signal mapping can be completely designed and maintained by graphical interface software.
One input signal can only correspond to 1 output signal, and 1 output signal can correspond to a plurality of input signals. There are therefore only 1 reference to the output signal in the re-input signal and there is a list of references to the input signal in the re-output signal. The mapping of the input signal and the output signal has the following operations:
1. new signal mapping
The user looks for a matchable output signal starting from the input signal. The system firstly provides a function block component list with compatible data types for a user, and then displays output signals for the user after selecting the function block components. Only the mandatory input signal has to be connected to the output signal.
2. Deleting input signals
A reference to an output signal is found in the input signal, and a backtracking to the output signal is performed, with the reference to the input signal deleted in its input signal reference list. Finally the input signal itself is deleted.
3. Deleting output signals
And traversing an input signal reference list in the output signal, finding the corresponding input signal, and deleting the reference of the input signal to the output signal. And deleting the output signal after all elements in the input signal reference list are processed.
Obviously, if a connected function block component is deleted, all input signals and output signals of the function block component should be deleted, that is, the above operation steps 2 and 3 are repeated.
The Communication mechanism is called a General Communication Layer (General Communication). The general communication generation module maps the signal according to a specific rule to generate a code which can be compiled and executed. Depending on the programming language, operating system and kernel module used. These codes are consistent with calls to input signals and output signals within the function block components.
The method for automatically generating communication among embedded software components abstracts the software components into reusable function block components and uniformly abstracts communication mechanisms among the function block components. Thus, various configuration files may be used to describe the software components and the communications between them. The general communication generation module needs to select which function block components and the signal connection condition between them to automatically generate codes according to specific items.
In addition, the method has the following characteristics:
(1) and the data is stored by using xml, so that the compatibility problem caused by the versions of development environment and tools is avoided.
(2) All the Function block components can be collectively placed in one Function Library to be centrally and uniformly managed. For example, the compatibility tracing of different versions of a certain function block component can be realized by adding version information in xml of the interface specification.
The specific embodiment of the invention is as follows:
this example is based on language C, no operating system, and uses the Round Robin algorithm as scheduler for scheduling between tasks.
The interface specification module of the invention is realized according to the following scheme:
the function block component corresponding to the interface specification comprises a header file and a source file. The header file only includes declarations of Init and Run functions:
extern void<functionName>_Init()
extern void<functionName>_Run()
for the input signal of the synchronous call, the head file also comprises the declaration of the following functions:
extern void<functionName>_<SignalName>_Indication()
this function is called in the function generated by the general communication generation module.
The signal mapping module of the invention is realized according to the following scheme:
the signal mapping is not a part of the C code, and does not directly generate the C code, but manages input signals and output signals of each interface specification by using xml, and provides a data structure of signal connection for the general communication generation module. For this purpose, the PC software with a graphical interface is programmed in Qt to allow the user to add/delete/modify the signal connections between the functional block components under the graphical interface. The software is schematically shown in fig. 3.
An input signal list and an output signal list are maintained in the signal mapping, and each element of the output signal list has 1 pointer array pointing to the input signal. Each element of the input signal list has 1 pointer to the output signal. When the function block component selector adds or deletes a new function block component, the input signal list and the output signal list are updated accordingly.
The general communication generation module of the invention is realized by the following scheme:
the generic communication generation module is not part of the C-code and functions to generate the C-code from a data structure provided by the signal map. Because the Round Robin scheduler is based on time slice and non-preemptive scheduling, the read-write competition problem of the shared memory area does not exist. Therefore, the signals are temporarily stored by using global variables, and corresponding read-write functions are generated for the variables to realize the input and output of the signals.
The generation rule of the general communication input signal function is defined as:
general communication _ Read _ < function block assembly Name > _< input signal Name > (signalDatatype value ptr)
When the function is implemented, the global variable is assigned to valuePtr.
The generation rule of the general communication output signal function is defined as:
general communication _ Write _ < function block assembly Name > _< output signal Name > (signalDatatype value)
The function, when implemented, assigns a value to a global variable assignment. If an input signal requiring a synchronous call is connected, a function < functionName > _ SignalName > _ Indication () that has been generated in the function block component is also called to execute the synchronous code.
By adopting the system and the method for realizing the automatic generation of the communication between the embedded software components, the existing embedded software architecture is improved on the premise of being compatible with historical codes under the condition of not introducing huge and complicated AutoSAR. Software component interfaces are unified through the specification of the component interfaces, and the development is enabled to quickly establish the connection between the components through graphical interface operation. The reusability of software components is improved through integration with historical codes, and the software development efficiency is accelerated.
In this specification, the invention has been described with reference to specific embodiments thereof. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.

Claims (8)

1. A system for enabling communications between automatically generated embedded software components, said system comprising:
the interface specification module is used for uniformly abstracting the components into functional block components and describing external interfaces of the functional block components;
the signal mapping module is connected with the interface specification module and used for maintaining the connection relation of input and output of signals among the functional block components and establishing mapping of the input signals and the output signals;
and the general communication generating module is connected with the signal mapping module and is used for generating specific codes which can be compiled and executed according to the input-output connection relation of the signals according to a specific rule.
2. The system of claim 1, wherein the function block components of the interface specification module comprise a name, an operating status, an input signal list, an output signal list, a calibration parameter list, and a configuration parameter list.
3. The system for enabling automated generation of communication between embedded software components of claim 1, wherein said interface specification module further comprises a list of function block components for providing query services for maintaining signal mappings.
4. The system for facilitating automatic generation of communication between embedded software components of claim 1, wherein the mapping of the input signals and the output signals of the signal mapping module is such that one input signal corresponds to one output signal and one output signal corresponds to multiple input signals.
5. The system for implementing automated generation of communication between embedded software components of claim 1, wherein said generic communication generation module generates code based on project content, function block components and signal connections.
6. The system for implementing communication between automatically generated embedded software components as claimed in claim 1, wherein said general communication generation module uses global variable temporary signal and generates corresponding read-write function for variable to implement signal input and output.
7. A method for automatically generating communication between embedded software components based on the system of claim 1, the method comprising the steps of:
(1) the interface specification module abstracts the components into functional block components uniformly and describes external interfaces of the functional block components;
(2) the signal mapping module maintains the connection relation of input and output of signals between the functional block components and establishes mapping of the input signals and the output signals;
(3) the general communication generation module generates specific compiling executable codes according to the input and output connection relation of the signals according to a specific rule.
8. The method for automatically generating communication between embedded software components according to claim 7, wherein the step (2) comprises the following steps:
(2.1) providing a function block component list with compatible data types, and searching a matched output signal according to an input signal;
(2.2) inquiring the input signal for reference of the output signal, deleting the reference of the input signal in the input signal reference list of the output signal, and deleting the input signal;
and (2.3) traversing an input signal reference list of the output signals, inquiring corresponding input signals, deleting references to the output signals, and deleting the output signals after all elements of the input signal reference list are processed.
CN202010120245.3A 2020-02-26 2020-02-26 System and method for realizing automatic generation of communication between embedded software components Pending CN111338638A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010120245.3A CN111338638A (en) 2020-02-26 2020-02-26 System and method for realizing automatic generation of communication between embedded software components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010120245.3A CN111338638A (en) 2020-02-26 2020-02-26 System and method for realizing automatic generation of communication between embedded software components

Publications (1)

Publication Number Publication Date
CN111338638A true CN111338638A (en) 2020-06-26

Family

ID=71183656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010120245.3A Pending CN111338638A (en) 2020-02-26 2020-02-26 System and method for realizing automatic generation of communication between embedded software components

Country Status (1)

Country Link
CN (1) CN111338638A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022110970A1 (en) * 2020-11-27 2022-06-02 华为技术有限公司 Parameter configuration method, apparatus and system
CN115657634A (en) * 2022-09-30 2023-01-31 成都赛力斯科技有限公司 Automobile software architecture, module association method, computer device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819426A (en) * 2012-02-29 2012-12-12 浙江大学 Method for synchronizing AUTOSAR (automotive open system architecture) model to Simulink model
CN105137943A (en) * 2015-09-06 2015-12-09 同济大学 Micro hybrid power system integrated control software framework
CN108069012A (en) * 2016-11-14 2018-05-25 托奇多有限责任公司 For running the system of the ship equipped with motor
US10120662B1 (en) * 2018-02-28 2018-11-06 Kitty Hawk Corporation Protocol compiler to generate flight code and routing tables
CN109789842A (en) * 2016-10-03 2019-05-21 日立汽车系统株式会社 On-board processing device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819426A (en) * 2012-02-29 2012-12-12 浙江大学 Method for synchronizing AUTOSAR (automotive open system architecture) model to Simulink model
CN105137943A (en) * 2015-09-06 2015-12-09 同济大学 Micro hybrid power system integrated control software framework
CN109789842A (en) * 2016-10-03 2019-05-21 日立汽车系统株式会社 On-board processing device
CN108069012A (en) * 2016-11-14 2018-05-25 托奇多有限责任公司 For running the system of the ship equipped with motor
US10120662B1 (en) * 2018-02-28 2018-11-06 Kitty Hawk Corporation Protocol compiler to generate flight code and routing tables

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李欢等: "基于软件组件库的柴油机ECU软件设计与实现", 《汽车工程》 *
高成 等: "《最新集成电路测试动技术》", 28 February 2009, 国防工业出版社 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022110970A1 (en) * 2020-11-27 2022-06-02 华为技术有限公司 Parameter configuration method, apparatus and system
CN115657634A (en) * 2022-09-30 2023-01-31 成都赛力斯科技有限公司 Automobile software architecture, module association method, computer device and storage medium
CN115657634B (en) * 2022-09-30 2024-06-04 重庆赛力斯凤凰智创科技有限公司 Automobile software architecture, module association method, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US9934005B2 (en) Dynamically building locale objects or subsections of locale objects based on historical data
US6023579A (en) Computer-implemented method for generating distributed object interfaces from metadata
US8621419B2 (en) Automating the life cycle of a distributed computing application
KR101795844B1 (en) Runtime system
US8108851B2 (en) External registration for function configuration within a client platform application
US6564368B1 (en) System and method for visual application development without programming
US6971093B1 (en) Techniques for maintaining compatibility of a software core module and an interacting module
US20090037478A1 (en) Dependency processing of computer files
CN111736826B (en) Multi-source remote sensing data engineering tool set system and integration method
CN111857801B (en) Construction method of mobile application
CN101645009A (en) Web service integrated development system and method
CN111338638A (en) System and method for realizing automatic generation of communication between embedded software components
CN114115838A (en) Data interaction method and system based on distributed components and cloud platform
US9141353B2 (en) Dynamically building locale objects at run-time
US6704802B1 (en) Method and system for communicating between independent software modules
CN116048518B (en) Automatic generation method of comprehensive avionics system security codes for antenna operating system
US11080102B2 (en) System and method for developing modularized application
CN114416202B (en) Mobile terminal SDK calling method and system
AU2019100212A4 (en) System and method for developing modularized application
CN112000447B (en) Hardware equipment management method and device in double-core intelligent electric meter and computer equipment
CN117234466B (en) Enterprise management software development method, system, equipment and storage medium
CN117369784B (en) Processing system and method of service interface
CN112732240B (en) Java component generation method and device
Pop et al. Introducing support for embedded and real-time devices into existing hierarchical component system: Lessons learned
CN115390937A (en) Intelligent contract operation method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200626

RJ01 Rejection of invention patent application after publication