A code encapsulation method, device and computer-readable storage medium

An encapsulation method and code technology, applied in the direction of code compilation, program code conversion, etc., can solve the problems of cumbersome and time-consuming encapsulation process, and achieve the effect of simple and fast encapsulation

Active Publication Date: 2020-11-13
BEIJING ELECTRIC VEHICLE
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The technical problem to be solved by the present invention is to provide a code packaging method, device and computer-readable storage medium to solve the problem of manually converting the source code to conform to the Simulink specification when C / C++ codes are packaged into the Simulink environment in the prior art code, the encapsulation process is cumbersome, and when there are many encapsulation programs, it takes a long time

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A code encapsulation method, device and computer-readable storage medium
  • A code encapsulation method, device and computer-readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will describe in detail with reference to the drawings and specific embodiments.

[0038] See figure 1 , which shows a schematic flowchart of the code encapsulation method provided by the embodiment of the present invention.

[0039] An embodiment of the present invention provides a code encapsulation method, which may include:

[0040] Step 101, receiving C / C++ language code, and identifying the function name, function parameter and input / output interface of the C / C++ language code.

[0041] In this step, the user imports the C / C++ language code, and identifies the function name, function parameters, and input and output interfaces of the C / C++ language code, so that the C / C++ language code can be encapsulated and run in Simulink for combination simulation.

[0042] Step 102, generate an object module conforming to the Simulink sta...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a code encapsulation method and device and a readable storage medium of a computer, The code encapsulation method includes the following steps that a C / C++ language code is received, and the function name, function parameter and input / output interfaces of the C / C++ language code are identified; according to the function name, the function parameter and the input / output interfaces, a target module conforming to the Simulink standard format is generated, and the target module is obtained. Designers do not need to learn the encapsulation process under the Simulink, the transition from the pure manual code development to the MBD development is achieved, and the C / C++ language code can be easily and quickly encapsulated to the Simulink.

Description

technical field [0001] The invention relates to the field of computer software, in particular to a code packaging method, device and computer-readable storage medium. Background technique [0002] Simulink is the mainstream algorithm design tool nowadays, and designers often need to integrate the verified algorithm code written in C / C++ into the Simulink environment for co-simulation. Simulink itself supports C / C++ code inheritance, but when integrating C / C++ code into Simulink, the designer first needs to modify the source code into code that conforms to the Simulink specification, that is, manually code the s-function function form, which is based on Simulink Modified C language functions in the standard format, and at the same time be proficient in using Simulink's legacy code tool toolbox. If there are hundreds of programs that need to be packaged, especially when the code contains objects, it will take several months for debugging and integration. Contents of the inve...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/41
CPCG06F8/41
Inventor 裴萍张友换尹颖王雪莹
Owner BEIJING ELECTRIC VEHICLE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products