CN109597612A - Automatic code generation method for CAN communication protocol of electric vehicle - Google Patents
Automatic code generation method for CAN communication protocol of electric vehicle Download PDFInfo
- Publication number
- CN109597612A CN109597612A CN201811507297.5A CN201811507297A CN109597612A CN 109597612 A CN109597612 A CN 109597612A CN 201811507297 A CN201811507297 A CN 201811507297A CN 109597612 A CN109597612 A CN 109597612A
- Authority
- CN
- China
- Prior art keywords
- code
- file
- host computer
- electric car
- variable
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 40
- 238000000034 method Methods 0.000 title claims abstract description 29
- 230000008676 import Effects 0.000 claims description 6
- 238000012423 maintenance Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 4
- 230000008901 benefit Effects 0.000 description 3
- 241001553014 Myrsine salicina Species 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000003912 environmental pollution Methods 0.000 description 1
- 230000007257 malfunction Effects 0.000 description 1
- 230000013011 mating Effects 0.000 description 1
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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40006—Architecture of a communication node
- H04L12/40013—Details regarding a bus controller
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40215—Controller Area Network CAN
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Communication Control (AREA)
Abstract
The invention relates to an automatic code generation method for a CAN communication protocol of an electric automobile, which comprises the following steps: step 1, inputting data: inputting and inputting state variable names required to be received or sent according to different CAN communication protocols in an excel form according to requirements; step 2, generating a protocol: opening the corresponding excel table in the step 1 by using an upper computer and clicking to generate a code; step 3, importing the file: opening the upper computer in the step 2, and then selecting a file opening button; and 4, generating a code: clicking a code generation button in the upper computer; step 5, sending a code: the method CAN automatically generate codes for receiving and sending partial programs of different whole vehicle CAN communication protocols, improves the code compiling efficiency and the code compiling accuracy at one time, saves the code compiling time and the final code testing time, and CAN quickly match the problems of frequently increasing and modifying the CAN protocol in the vehicle debugging process.
Description
Technical field
The present invention relates to communication protocol techniques field, especially a kind of electric car CAN communication agreement real time workshop
Method.
Background technique
With becoming increasingly conspicuous for problem of environmental pollution, new-energy automobile few, high energy efficiency, low noise with polluted gas discharge amount
The remarkable advantage of sound, low operating cost just gradually replaces common fuel-engined vehicle.In numerous new-energy automobiles, electric car
With emerging favorite the advantages that " zero-emission " as automobile market.In recent years, in the wide participation of national policy guidance and enterprise
Under, electric car industry development is swift and violent, and corresponding mating electrically-charging equipment demand is also increasing, and electric car is at present in reality
It is increasingly wider in being used in life, especially ride-type electric car.
But in the prior art, there is no unified CAN communication agreement standard of compiling, mesh between different electric car producers
As long as preceding all agreement Inter or Motorola's format are just, leading to program wildcard in this way, there are problems.
Summary of the invention
In view of the above situation, it is necessary to provide and a kind of subprogram be sended and received to different vehicle CAN communication agreements
The method for carrying out real time workshop, improves written in code efficiency and a written in code accuracy, has saved written in code
Time and final code tester time, also can for often increasing and modifying CAN protocol problem present in vehicle debugging process
Rapid matching.
A kind of electric car CAN communication agreement real time workshop method, comprising the following steps:
Step 1, it input data: is inputted as requested in excel table according to different CAN communication agreements needing to receive
Or the state variable title sent;
Step 2, it generates agreement: clicking generation code again with the correspondence excel table in host computer opening steps 1, complete
The transmitting-receiving of CAN communication agreement configures;
Step 3, file imports: the host computer in opening steps 2, then file button is opened in selection, then editting
Excel file importing enter, generate have Notes of Key Data interface CAN communication configuration protocol;
Step 4, it generates code: clicking the generation button code in host computer, that is, produce one
CodeGenerate.txt file, the program copy such as corresponding function position in file;
Step 5, it sends code: the code generated in step 4 is sent the variable assignments inside program to automatic
The variable of generation, be received back come directly the variable assignments automatically generated be program built-in variable.
State variable title includes that start bit, signal length, offset, precision and connector are compiled in step 1 described above
Number information carries out code building with dedicated host computer in the step 2, and the overlapping of host computer supported protocol reports an error in the step 2
The function of function and inter format and Motorola's format free switching, in the step 5, if what assignment procedure did not malfunctioned,
Then representative code is correct, in the step 1-5, later period upgrade maintenance when, it is only necessary to change after excel and generate code again i.e.
It can.
The present invention can send and receive subprogram to different vehicle CAN communication agreements and carry out real time workshop
Method improves written in code efficiency and a written in code accuracy, has saved written in code time and final code tester
It time, also can Rapid matching for often increasing and modifying CAN protocol problem present in vehicle debugging process.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
A kind of electric car CAN communication agreement real time workshop method of the present invention is further elaborated.It should be appreciated that herein
Described specific examples are only used to explain the present invention, is not intended to limit the present invention.
Embodiment 1:
A kind of electric car CAN communication agreement real time workshop method of the embodiment of the present invention, comprising the following steps:
Step 1, it input data: is inputted as requested in excel table according to different CAN communication agreements needing to receive
Or the state variable title sent;
Step 2, it generates agreement: clicking generation code again with the correspondence excel table in host computer opening steps 1, complete
The transmitting-receiving of CAN communication agreement configures;
Step 3, file imports: the host computer in opening steps 2, then file button is opened in selection, then editting
Excel file importing enter, generate have Notes of Key Data interface CAN communication configuration protocol;
Step 4, it generates code: clicking the generation button code in host computer, that is, produce one
CodeGenerate.txt file, the program copy such as corresponding function position in file;
Step 5, it sends code: the code generated in step 4 is sent the variable assignments inside program to automatic
The variable of generation, be received back come directly the variable assignments automatically generated be program built-in variable.
Embodiment 2:
A kind of electric car CAN communication agreement real time workshop method of the embodiment of the present invention, comprising the following steps:
Step 1, input data: input is inputted according to different CAN communication agreements needs as requested in excel table
The state variable title for receiving or sending, such as start bit, signal length, offset, precision and connector number information;
Step 2, it generates agreement: clicking generation again with the correspondence excel table in dedicated host computer host computer opening steps 1
Code completes the transmitting-receiving configuration of CAN communication agreement;
Step 3, file imports: the host computer in opening steps 2, then file button is opened in selection, then editting
Excel file importing enter, generate have Notes of Key Data interface CAN communication configuration protocol;
Step 4, it generates code: clicking the generation button code in host computer, that is, produce one
CodeGenerate.txt file, the program copy such as corresponding function position in file;
Step 5, it sends code: the code generated in step 4 is sent the variable assignments inside program to automatic
The variable of generation, be received back come directly the variable assignments automatically generated be program built-in variable.
Embodiment 3:
A kind of electric car CAN communication agreement real time workshop method of the embodiment of the present invention, comprising the following steps:
Step 1, it input data: is inputted as requested in excel table according to different CAN communication agreements needing to receive
Or the state variable title sent, such as start bit, signal length, offset, precision and connector number information;
Step 2, it generates agreement: clicking generation again with the correspondence excel table in dedicated host computer host computer opening steps 1
Code completes the transmitting-receiving configuration of CAN communication agreement, wherein the overlapping of host computer supported protocol report an error function and inter format with rub
The function of Toro glug formula free switching;
Step 3, file imports: the host computer in opening steps 2, then file button is opened in selection, then editting
Excel file importing enter, generate have Notes of Key Data interface CAN communication configuration protocol;
Step 4, it generates code: clicking the generation button code in host computer, that is, produce one
CodeGenerate.txt file, the program copy such as corresponding function position in file;
Step 5, it sends code: the code generated in step 4 is sent the variable assignments inside program to automatic
The variable of generation, be received back come directly the variable assignments automatically generated be program built-in variable.
Embodiment 4:
A kind of electric car CAN communication agreement real time workshop method of the embodiment of the present invention, comprising the following steps:
Step 1, it input data: is inputted as requested in excel table according to different CAN communication agreements needing to receive
Or the state variable title sent, such as start bit, signal length, offset, precision and connector number information;
Step 2, it generates agreement: clicking generation again with the correspondence excel table in dedicated host computer host computer opening steps 1
Code completes the transmitting-receiving configuration of CAN communication agreement, wherein the overlapping of host computer supported protocol report an error function and inter format with rub
The function of Toro glug formula free switching;
Step 3, file imports: the host computer in opening steps 2, then file button is opened in selection, then editting
Excel file importing enter, generate have Notes of Key Data interface CAN communication configuration protocol;
Step 4, it generates code: clicking the generation button code in host computer, that is, produce one
CodeGenerate.txt file, the program copy such as corresponding function position in file;
Step 5, it sends code: the code generated in step 4 is sent the variable assignments inside program to automatic
The variable of generation, be received back come directly the variable assignments automatically generated be program built-in variable, if assignment procedure does not malfunction
, then representative code is correct, later period upgrade maintenance when, it is only necessary to generate code again after changing excel.
The present invention can send and receive subprogram to different vehicle CAN communication agreements and carry out real time workshop
Method improves written in code efficiency and a written in code accuracy, has saved written in code time and final code tester
It time, also can Rapid matching for often increasing and modifying CAN protocol problem present in vehicle debugging process.
The above described is only a preferred embodiment of the present invention, be not intended to limit the present invention in any form, though
So the present invention has been disclosed as a preferred embodiment, and however, it is not intended to limit the invention, any technology people for being familiar with this profession
Member, without departing from the scope of the present invention, when the technology contents using the disclosure above are modified or are modified
It is right according to the technical essence of the invention for the equivalent embodiment of equivalent variations, but without departing from the technical solutions of the present invention
Any simple modification, equivalent change and modification made by above embodiments, all of which are still within the scope of the technical scheme of the invention.
Claims (6)
1. a kind of electric car CAN communication agreement real time workshop method, it is characterised in that: the following steps are included: step 1,
Input data: it is inputted as requested in excel table according to different CAN communication agreements the state for needing to receive or send
Name variable;
Step 2, it generates agreement: clicking generation code again with the correspondence excel table in host computer opening steps 1, it is logical to complete CAN
Believe the transmitting-receiving configuration of agreement;
Step 3, file imports: host computer in opening steps 2, then file button is opened in selection, then editting
The importing of excel file is entered, and the CAN communication configuration protocol for having Notes of Key Data interface is generated;
Step 4, it generates code: clicking the generation button code in host computer, that is, produce a CodeGenerate.txt text
Part, the program copy such as corresponding function position in file;
Step 5, it sends code: the code generated in step 4 is sent the variable assignments inside program to automatically generating
Variable, be received back come directly the variable assignments automatically generated be program built-in variable.
2. a kind of electric car CAN communication agreement real time workshop method as described in claim 1, it is characterised in that: institute
Stating state variable title in step 1 includes start bit, signal length, offset, precision and connector number information.
3. a kind of electric car CAN communication agreement real time workshop method as described in claim 1, it is characterised in that: institute
It states in step 2 and carries out code building with dedicated host computer.
4. a kind of electric car CAN communication agreement real time workshop method as described in claim 1, it is characterised in that: institute
State the function that host computer supported protocol in step 2 is overlapped report an error function and inter format and Motorola's format free switching.
5. a kind of electric car CAN communication agreement real time workshop method as described in claim 1, it is characterised in that: institute
It states in step 5, if what assignment procedure did not malfunctioned, representative code is correct.
6. a kind of electric car CAN communication agreement real time workshop method as described in claim 1, it is characterised in that: institute
State in step 1-5, later period upgrade maintenance when, it is only necessary to generate code again after changing excel.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811507297.5A CN109597612A (en) | 2018-12-10 | 2018-12-10 | Automatic code generation method for CAN communication protocol of electric vehicle |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811507297.5A CN109597612A (en) | 2018-12-10 | 2018-12-10 | Automatic code generation method for CAN communication protocol of electric vehicle |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109597612A true CN109597612A (en) | 2019-04-09 |
Family
ID=65960682
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811507297.5A Pending CN109597612A (en) | 2018-12-10 | 2018-12-10 | Automatic code generation method for CAN communication protocol of electric vehicle |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109597612A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111880780A (en) * | 2020-07-28 | 2020-11-03 | 北京经纬恒润科技有限公司 | Method, device and platform for developing boot loader of MCU (microprogrammed control Unit) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130097085A1 (en) * | 2005-03-16 | 2013-04-18 | Dt Labs, Llc | Apparatus for customer authentication of an item |
CN106407117A (en) * | 2016-09-27 | 2017-02-15 | 浪潮软件集团有限公司 | Universal interface test method |
CN106603482A (en) * | 2016-05-26 | 2017-04-26 | 欣旺达电子股份有限公司 | Method and device for automatically generating CAN communication protocol code |
CN107179971A (en) * | 2017-05-23 | 2017-09-19 | 上海蔚来汽车有限公司 | Automatic coding and system for CAN troubleshooting |
CN107247582A (en) * | 2017-04-14 | 2017-10-13 | 惠州市蓝微新源技术有限公司 | It is a kind of to automatically generate the method that CAN sends and receives code |
-
2018
- 2018-12-10 CN CN201811507297.5A patent/CN109597612A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130097085A1 (en) * | 2005-03-16 | 2013-04-18 | Dt Labs, Llc | Apparatus for customer authentication of an item |
CN106603482A (en) * | 2016-05-26 | 2017-04-26 | 欣旺达电子股份有限公司 | Method and device for automatically generating CAN communication protocol code |
CN106407117A (en) * | 2016-09-27 | 2017-02-15 | 浪潮软件集团有限公司 | Universal interface test method |
CN107247582A (en) * | 2017-04-14 | 2017-10-13 | 惠州市蓝微新源技术有限公司 | It is a kind of to automatically generate the method that CAN sends and receives code |
CN107179971A (en) * | 2017-05-23 | 2017-09-19 | 上海蔚来汽车有限公司 | Automatic coding and system for CAN troubleshooting |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111880780A (en) * | 2020-07-28 | 2020-11-03 | 北京经纬恒润科技有限公司 | Method, device and platform for developing boot loader of MCU (microprogrammed control Unit) |
CN111880780B (en) * | 2020-07-28 | 2024-03-15 | 北京经纬恒润科技股份有限公司 | Method, device and platform for developing boot loader of MCU |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103218294B (en) | A kind of adjustment method of embedded system, debugging conversion equipment and system | |
CN101841515B (en) | Target variable protocol data unit codec code automatic generation implementation method | |
CN109740222B (en) | Testing device and system for automobile networking scene | |
CN109783195A (en) | A kind of real-time adjustment method of intelligent contract based on container | |
CN104978191A (en) | Application deployment method and server | |
CN104331366A (en) | Test case design efficiency promotion method and system | |
US20130167119A1 (en) | Apparatus and method for supporting software development for vehicle | |
CN102541596A (en) | Operating system upgrading method and device | |
US20130103379A1 (en) | Apparatus and method for verifying interoperability between application software and autosar service | |
CN111427940B (en) | Self-adaptive database conversion method and device | |
CN115357252B (en) | Source code file generation method and device, electronic equipment and storage medium | |
CN110007941A (en) | A kind of the MCU firmware and upgrade method of Intelligent refuse classification recovery system | |
CN109597612A (en) | Automatic code generation method for CAN communication protocol of electric vehicle | |
CN113591422B (en) | System for generating test case flow information in chip verification and application | |
CN103077066A (en) | Method and system for embedding product key information during compiling | |
CN107015831A (en) | A kind of client updating management method upgraded based on server end and system | |
CN112559373B (en) | Software compatibility management method and system | |
CN115080104A (en) | Method and system for automatically configuring COM (component object model) code in Autosar | |
CN108599782A (en) | Waveform component parameter management method based on SCA | |
JP2023531701A (en) | Efficient controller data generation and extraction | |
CN112230848A (en) | NVM automatic configuration method, device and equipment | |
CN109918082A (en) | The compiling system and method for software development | |
CN101931545A (en) | Method and device for repeatedly producing or repeatedly upgrading firewall | |
CN104843031A (en) | Configuration method for trackside and vehicle-mounted wireless units | |
CN113950143B (en) | Internet of things equipment positioning method and device, server and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190409 |