CN112199081A - Method for automatically adjusting port of generating software subsystem - Google Patents
Method for automatically adjusting port of generating software subsystem Download PDFInfo
- Publication number
- CN112199081A CN112199081A CN202011082924.2A CN202011082924A CN112199081A CN 112199081 A CN112199081 A CN 112199081A CN 202011082924 A CN202011082924 A CN 202011082924A CN 112199081 A CN112199081 A CN 112199081A
- Authority
- CN
- China
- Prior art keywords
- port
- interface
- software subsystem
- input
- subsystem
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 230000006870 function Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides a method for automatically adjusting and generating a port of a software subsystem, which comprises the following steps: step S1, automatically adding ports with corresponding number according to the number of the interfaces of the software subsystem; step S2, acquiring the position of each interface of the software subsystem; step S3, the position of the port is set according to the position of each interface, so that the ports correspond to the interfaces one by one. The method for automatically adjusting and generating the port of the software subsystem automatically adds the input and output signal port to the module packaged as the software subsystem and automatically connects the line, thereby greatly reducing the working hours, improving the working efficiency and keeping the appearance attractive.
Description
Technical Field
The invention relates to the technical field of software development, in particular to a method for automatically adjusting and generating a port of a software subsystem.
Background
Control software of an automotive electronic ECU, including advanced driving assistance function software, is developing application layer software by using a model-based design mode. As a formalized development method, a model is required to be connected through various different basic modules to form a software subsystem, and then a larger software component is formed through the software subsystem. For complex applications, the number of layers, subsystems and modules included in the model is huge, and manual adjustment of the module positions of the model is time-consuming and labor-consuming.
According to the industry standard MAAB, the software subsystem is often positioned at the upper level in multiple levels of the model, the number of input and output ports is generally large, ports are added manually and adjusted to be aligned with the software subsystem interface, and the connection is performed, so that time and labor are wasted. In a plurality of workloads, operations with the same mode can be extracted, an automatic tool is designed, repeated labor is automatically realized, and the working efficiency is improved.
Disclosure of Invention
In view of the shortcomings of the prior art, the present invention provides a method for automatically adjusting and generating ports of a software subsystem with high efficiency.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
a method of automatically adjusting a port of a generating software subsystem, the method comprising the steps of:
step S1, automatically adding ports with corresponding number according to the number of the interfaces of the software subsystem;
step S2, acquiring the position of each interface of the software subsystem;
step S3, the position of the port is set according to the position of each interface, so that the ports correspond to the interfaces one by one.
Further, the step S3, setting the position of the port according to the position of each interface, so that the port corresponds to the interface one by one, includes:
traversing the ports, setting the central height position of each port as a longitudinal coordinate same as the corresponding interface position, and setting the transverse coordinate as a position at a first distance on one side of the software subsystem.
Further, the interface includes an input interface and/or an output interface, the port includes an input port and/or an output port, the input interface corresponds to the input port, and the output interface corresponds to the output port.
Further, when the interface simultaneously comprises an input interface and an output interface, the port simultaneously comprises an input port and an output port, the input port is positioned at one side of the software subsystem, and the output port is positioned at the other side of the software subsystem; and the first distance of the input port abscissa at one side of the software subsystem is equal to or different from the first distance of the output port abscissa at the other side of the software subsystem.
Further, the first distance is 10-500 pixels.
Further, the first distance is 50 pixels.
Further, the method further comprises:
and step S4, traversing each port, and automatically connecting to the corresponding interface of the software subsystem.
Further, the method further comprises:
the position of the subsystem is moved, and then steps S3, S4 are repeated.
The method for automatically adjusting and generating the port of the software subsystem automatically adds the input and output signal port to the module packaged as the software subsystem and automatically connects the line, thereby greatly reducing the working hours, improving the working efficiency and keeping the appearance attractive. The method for automatically adjusting and generating the port of the software subsystem finishes the whole automatic process by using the programming language script suitable for a graphic development tool, can be directly operated in a command line window, can be added into a right-click menu, can be added into a menu of a model editing environment, or can be called back to operate after a mouse is clicked on an independent user interface, can design an independent software plug-in, does not depend on an additional development environment, and can be realized by designing software on an original development platform.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for automatically adjusting a port of a software subsystem according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a method for automatically adjusting a port of a software subsystem, including the following steps:
step S1, automatically adding ports with corresponding number according to the number of the interfaces of the software subsystem;
step S2, acquiring the position of each interface of the software subsystem;
step S3, the position of the port is set according to the position of each interface, so that the ports correspond to the interfaces one by one.
In step S3, the setting of the port position according to the position of each interface to make the port correspond to the interface one to one includes:
traversing the ports, setting the central height position of each port as a longitudinal coordinate same as the corresponding interface position, and setting the transverse coordinate as a position at a first distance on one side of the software subsystem. Of course, the center height position of the port may also be moved a second distance from the longitudinal coordinate of the corresponding interface position, depending on the actual situation.
Further, the interface includes an input interface and/or an output interface, the port includes an input port and/or an output port, the input interface corresponds to the input port, and the output interface corresponds to the output port.
When the interface simultaneously comprises an input interface and an output interface, the port simultaneously comprises an input port and an output port, the input port is positioned at one side of the software subsystem, and the output port is positioned at the other side of the software subsystem. Such as input port on the left side and output port on the right side. Of course, other sides can be adjusted according to actual conditions. Moreover, the first distance of the input port abscissa at one side of the software subsystem and the first distance of the output port abscissa at the other side of the software subsystem may be equal or unequal.
The port abscissa is located at the first distance on one side of the software subsystem, and can be adjusted and set according to actual conditions, and the premise is mainly that the port abscissa is attractive, has no overlap and has no cross. Preferably, the first distance is 10-500 pixels. In one embodiment, the first distance is 50 pixels.
Further, the method further comprises:
and step S4, traversing each port, and automatically connecting to the corresponding interface of the software subsystem.
Further, the method further comprises:
the position of the subsystem is moved, and then steps S3, S4 are repeated.
Due to pixel errors on different resolution computers, it is possible that the wiring will automatically bend at right angles. Therefore, the position of the subsystem can be moved with the mouse, and then the steps S3, S4 are repeated until the automatic connection is beautiful, has no overlap, and has no intersection.
The method for automatically adjusting and generating the port of the software subsystem automatically adds the input and output signal port to the module packaged as the software subsystem and automatically connects the line, thereby greatly reducing the working hours, improving the working efficiency and keeping the appearance attractive. The method for automatically adjusting and generating the port of the software subsystem finishes the whole automatic process by using the programming language script suitable for a graphic development tool, can be directly operated in a command line window, can be added into a right-click menu, can be added into a menu of a model editing environment, or can be called back to operate after a mouse is clicked on an independent user interface, can design an independent software plug-in, does not depend on an additional development environment, and can be realized by designing software on an original development platform.
The above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention disclosed herein are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
Claims (8)
1. A method for automatically tuning a port of a generating software subsystem, the method comprising the steps of:
step S1, automatically adding ports with corresponding number according to the number of the interfaces of the software subsystem;
step S2, acquiring the position of each interface of the software subsystem;
step S3, the position of the port is set according to the position of each interface, so that the ports correspond to the interfaces one by one.
2. The method according to claim 1, wherein the step S3, setting the position of the port according to the position of each interface, so that the port corresponds to the interface one by one, includes:
traversing the ports, setting the central height position of each port as a longitudinal coordinate same as the corresponding interface position, and setting the transverse coordinate as a position at a first distance on one side of the software subsystem.
3. The method of claim 2, wherein the interface comprises an input interface and/or an output interface, and wherein the port comprises an input port and/or an output port, and wherein the input interface corresponds to the input port and the output interface corresponds to the output port.
4. The method of claim 3, wherein when the interface includes both an input interface and an output interface, the port includes both an input port and an output port, the input port is located on one side of the software subsystem, and the output port is located on the other side of the software subsystem; and the first distance of the input port abscissa at one side of the software subsystem is equal to or different from the first distance of the output port abscissa at the other side of the software subsystem.
5. The method of claim 2, wherein the first distance is 10-500 pixels.
6. The method of claim 2, wherein the first distance is 50 pixels.
7. The method of claim 1, further comprising:
and step S4, traversing each port, and automatically connecting to the corresponding interface of the software subsystem.
8. The method of claim 7, further comprising:
the position of the subsystem is moved, and then steps S3, S4 are repeated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011082924.2A CN112199081B (en) | 2020-10-12 | 2020-10-12 | Method for automatically adjusting ports of generating software subsystem |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011082924.2A CN112199081B (en) | 2020-10-12 | 2020-10-12 | Method for automatically adjusting ports of generating software subsystem |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112199081A true CN112199081A (en) | 2021-01-08 |
CN112199081B CN112199081B (en) | 2024-05-24 |
Family
ID=74012898
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011082924.2A Active CN112199081B (en) | 2020-10-12 | 2020-10-12 | Method for automatically adjusting ports of generating software subsystem |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112199081B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140189637A1 (en) * | 2012-12-28 | 2014-07-03 | Mathworks, Inc. | Preventing interference between subsystem blocks at a design time |
CN105808216A (en) * | 2014-12-29 | 2016-07-27 | 联创汽车电子有限公司 | Vehicle-mounted control software system policy code and underlying code integration method |
CN109002645A (en) * | 2018-08-14 | 2018-12-14 | 中国铁道科学研究院集团有限公司 | EMU subsystem modeling method and device |
CN111353235A (en) * | 2020-03-13 | 2020-06-30 | 上海介方信息技术有限公司 | Component port modeling method based on model drive and terminal |
CN111679868A (en) * | 2020-06-02 | 2020-09-18 | 上海元城汽车技术有限公司 | Automobile software model integration method, device, equipment and storage medium |
-
2020
- 2020-10-12 CN CN202011082924.2A patent/CN112199081B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140189637A1 (en) * | 2012-12-28 | 2014-07-03 | Mathworks, Inc. | Preventing interference between subsystem blocks at a design time |
CN105808216A (en) * | 2014-12-29 | 2016-07-27 | 联创汽车电子有限公司 | Vehicle-mounted control software system policy code and underlying code integration method |
CN109002645A (en) * | 2018-08-14 | 2018-12-14 | 中国铁道科学研究院集团有限公司 | EMU subsystem modeling method and device |
CN111353235A (en) * | 2020-03-13 | 2020-06-30 | 上海介方信息技术有限公司 | Component port modeling method based on model drive and terminal |
CN111679868A (en) * | 2020-06-02 | 2020-09-18 | 上海元城汽车技术有限公司 | Automobile software model integration method, device, equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
徐轶飞: "车身控制模块硬件在环仿真系统的研究和实现", 《中国优秀硕士学位论文全文数据库》, no. 2019, pages 035 - 178 * |
Also Published As
Publication number | Publication date |
---|---|
CN112199081B (en) | 2024-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113094784B (en) | Adjacent complex underground engineering parametric modeling method based on building information model | |
CN112149216A (en) | Regular monomer building BIM automatic modeling system and method based on vector data | |
CN103605845A (en) | Machine tool fixture library management system based on assembling knowledge description | |
CN108875167A (en) | A kind of construction site three dimensional arrangement optimization method based on BIM technology | |
JPH08212241A (en) | Design method for mask pattern for semiconductor integrated circuit or directly plotting pattern on wafer and their design rule confirming method | |
CN111090969A (en) | EDA tool-based flat panel display layout generation method | |
CN112199081A (en) | Method for automatically adjusting port of generating software subsystem | |
CN107895065A (en) | A kind of plant design method based on 3-D technology | |
CN115048707B (en) | Edge component splitting method based on building information model | |
US20230048643A1 (en) | High-Precision Map Construction Method, Apparatus and Electronic Device | |
CN107066376A (en) | A kind of automatic test verification method tested for GUI | |
CN112163270B (en) | CFD automatic modeling and analyzing system and method based on ANSA and StarCCM + platform | |
CN110700583A (en) | Aluminum template pre-assembly system and method based on three-dimensional BIM technology | |
CN112269355B (en) | Graphical interactive auxiliary numerical control programming method and software system | |
CN112149377B (en) | Method and device for rapidly generating FPD layout and readable storage medium | |
CN110083859B (en) | Quick automatic design method and system | |
CN111400991A (en) | Circuit diagram rapid design method based on hardware electrical interface relation | |
CN103164546A (en) | Generation method of schematic circuit diagram connecting line | |
CN112287021A (en) | Data real-time synchronization parameter generation method, data real-time synchronization parameter synchronization method, data real-time synchronization parameter generation device, data real-time synchronization parameter synchronization device, storage medium and terminal | |
CN114818073B (en) | Modeling method and system based on 3D3S | |
CN111611684B (en) | Method, system, device and storage medium for generating interference zone logic block | |
CN108363779A (en) | A kind of method of batch autocad file intelligence inserting block | |
CN112699510B (en) | Simulation manufacturing method, device, equipment and storage medium for automobile door glass | |
CN116070307A (en) | Structure model generation method, device, computer equipment and storage medium | |
JPS6061866A (en) | Chamfering system of graphic processing system |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |