Summary of the invention
The object of the present invention is to provide the method, device and equipments that a kind of UDS diagnostic interface software generates, and give birth to for accelerating
At the speed of UDS diagnostic interface software, the probability for mistake occur is reduced, to promote the efficiency and quality of software development.
In order to solve the above technical problems, the present invention provides a kind of method that UDS diagnostic interface software generates, comprising:
When receiving Software Create order, load UDS diagnoses questionnaire survey list file;
It is read in UDS diagnosis questionnaire survey list file and diagnoses interface related list with UDS;
Diagnostic parameters is obtained in the list, and the Diagnostic parameters is converted into software source code by preset rules,
To generate UDS diagnostic interface software.
Optionally, the list specifically includes: vehicle trouble code DTC list, snapshot and growth data list and vehicle
Related data flow DID list.
Optionally, described that Diagnostic parameters is obtained in the list, and be converted to the Diagnostic parameters by preset rules
Software source code specifically includes:
The vehicle trouble code DTC list is read, determines fault message related column;
The fault message in the fault message related column is read according to line number;
The fault message is arranged by the sequence of the line number, is written in enumerated variable, to obtain UDS troubleshooting rope
Draw list.
Optionally, the vehicle trouble code DTC list is read described, after determining fault message related column, further includes:
The malfunctioning interface signal of each fault message and the error code of each fault message are read according to the line number;
The malfunctioning interface signal and the error code are corresponded, each failure letter is defined in a manner of macrodefinition
Breath, defines table to generate UDS error code.
Optionally, the vehicle trouble code DTC list is read described, after determining fault message related column, further includes:
The fault message is combined according to the call format of fault-finding function, is written in specified file, with life
At fault-finding function.
Optionally, described that Diagnostic parameters is obtained in the list, and be converted to the Diagnostic parameters by preset rules
Software source code specifically includes:
The vehicle-relevant data stream DID list is read, determines vehicle-relevant data stream DID information;
The vehicle-relevant data stream DID information is arranged and defined, to generate UDS fault car related data flow
DID list.
Optionally, described that Diagnostic parameters is obtained in the list, and be converted to the Diagnostic parameters by preset rules
Software source code specifically includes:
The snapshot and growth data list are read, frame information is freezed in acquisition;
The frame information that freezes is arranged and defined, to generate UDS fail frost frame list.
Optionally, described to receive software command, specially receive the click order on Software Create tools interfaces.
In order to solve the above technical problems, the present invention also provides the devices that a kind of UDS diagnostic interface software generates, comprising:
Loading module, for when receiving Software Create order, load UDS to diagnose questionnaire survey list file;
Read module diagnoses interface related column with UDS for reading in UDS diagnosis questionnaire survey list file
Table;
Conversion module converts the Diagnostic parameters for obtaining Diagnostic parameters in the list, and by preset rules
For software source code, to generate UDS diagnostic interface software.
In order to solve the above technical problems, the present invention also provides the equipment that a kind of UDS diagnostic interface software generates, comprising:
Memory, for storing instruction, described instruction include that UDS diagnostic interface software described in above-mentioned any one generates
The step of method;
Processor, for executing described instruction.
The method that UDS diagnostic interface software provided by the present invention generates, by adding when receiving Software Create order
It carries UDS and diagnoses questionnaire survey list file, read from UDS diagnosis questionnaire survey list file and diagnose interface related list with UDS,
And Diagnostic parameters is obtained in lists, Diagnostic parameters is converted into software source code by preset rules, according to software source code
UDS diagnostic interface software is generated, the mode for automatically generating UDS diagnostic interface software is provided, when needing to examine again UDS
It when slave interrupt interface software is rebuild or updated, is write manually without software engineer, to make the creation of UDS diagnostic interface software
It is more efficient and not easy to make mistakes, and then ensure that UDS to the accuracy of battery pack inline diagnosis.The present invention also provides a kind of UDS
The device and equipment that diagnostic interface software generates, have above-mentioned beneficial effect, details are not described herein.
Specific embodiment
Core of the invention is to provide a kind of method, device and equipment that UDS diagnostic interface software generates, and gives birth to for accelerating
At the speed of UDS diagnostic interface software, the probability for mistake occur is reduced, to promote the efficiency and quality of software development.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Fig. 1 is the flow chart for the method that a kind of UDS diagnostic interface software provided in an embodiment of the present invention generates.Such as Fig. 1 institute
Show, the method that UDS diagnostic interface software generates includes:
S10: when receiving Software Create order, load UDS diagnoses questionnaire survey list file.
Battery management controller, it is referred to as automatically controlled, it is the MC centre as battery pack, carries to battery physics
Parameter real time monitoring, battery status estimation, inline diagnosis and early warning, charge and discharge and preliminary filling control, balanced management and heat management etc.
Task.The diagnostic software of present battery Management Controller is by controller software Developmental Engineer according to " UDS diagnoses questionnaire survey
Table " in information, manual write software code realizes the diagnostic function of battery management controller." UDS diagnoses questionnaire survey
Table " it is an Excel file, it is a document referring to ISO14229 specification definition, wherein defining electronic control unit ECU
All UDS needed support are serviced, are negated that the UDS such as corresponding code, fault flag, data flow diagnose relevant content, are one
Normative document.
In specific implementation, software command is received, the click life on Software Create tools interfaces is specially received
It enables.The operation interface of UDS diagnosis interface code Core Generator can be established by softwares such as MATLAB, and is set in the operation interface
Set interface list path and " UDS diagnoses questionnaire " load path.Start generation when user clicks in operation interface
After button, " UDS diagnoses questionnaire " file is transferred in path to preset family.
S11: it is read in UDS diagnosis questionnaire survey list file and diagnoses interface related list with UDS.
It is voluntarily selected according to preset selection or user, reads in " UDS diagnoses questionnaire " file and examined with UDS
The relevant list of slave interrupt interface usually may include vehicle trouble code DTC list (" 6-1_DTCList "), snapshot and growth data
List (" 6-3_Snapshot&ExtendedDataRe ") and vehicle-relevant data stream DID list (" 7-1_DIDList ").
" UDS diagnoses questionnaire " document analysis method is after opening " UDS diagnoses questionnaire " file, first
It is read out each list according to sheet file name, is read in rows and columns again after reading interior in each table in each list
Hold.
S12: Diagnostic parameters is obtained in lists, and Diagnostic parameters is converted into software source code by preset rules.
After respectively being arranged by each row of the preset list in traversal " UDS diagnoses questionnaire " file, needed for acquisition
Battery management controller Diagnostic parameters, then Diagnostic parameters is converted into software source code by preset rules.
In specific implementation, previously according to functional module needed for UDS diagnostic interface software, transformation rule is set, will be read
Information in the list taken carries out induction-arrangement, and is converted to diagnostic source code.
After source code needed for generating, show that UDS interface code generates the prompt completed in operation interface.It is optional
Ground during generating source code is when the error occurs shown in operation interface or the main interface (such as matlab) for writing software
Show error message.
The method that UDS diagnostic interface software provided in an embodiment of the present invention generates, by receiving Software Create order
When, load UDS diagnoses questionnaire survey list file, reads from UDS diagnosis questionnaire survey list file interface related with UDS diagnosis
List, and Diagnostic parameters is obtained in lists, Diagnostic parameters is converted into software source code by preset rules, according to software source
Code building UDS diagnostic interface software provides the mode for automatically generating UDS diagnostic interface software, right when needing again
It when UDS diagnostic interface software is rebuild or updated, is write manually without software engineer, to make UDS diagnostic interface software
Creation it is more efficient and not easy to make mistakes, and then ensure that UDS to the accuracy of battery pack inline diagnosis.
Fig. 2 is a kind of stream for generating UDS and diagnosing fault the specific embodiment of index list provided in an embodiment of the present invention
Cheng Tu.
On the basis of the above embodiments, step S12 may include:
The DTC list of vehicle trouble code is read, determines fault message related column.
According to the fault message in line number read failure information related column.
Fault message is arranged by the sequence of line number, is written in enumerated variable, to obtain UDS troubleshooting index list.
In specific implementation, as shown in Fig. 2, can specifically include:
S20: the DTC list of vehicle trouble code is read;
S21: being defined the attribute respectively arranged in table, determines the related column of fault message:
DTC_Meaning=4
DTC_Number=2
Row Initial Value definition ir=0;
S22: line number ir++ (successively each fault message is identified according to line number);
S23: reading the interface signal of each fault message according to line number, by the interface signal of reading according to the sequence of line number
It is arranged, is written in enumerated variable;
S24: judge whether line number ir is last line;If it is, terminating;If it is not, then return step S22.
Index list is diagnosed fault by the UDS that above step generates entire battery management controller.
Fig. 3 is a kind of flow chart for generating UDS error code and defining the specific embodiment of table provided in an embodiment of the present invention.
On the basis of the above embodiments, the DTC list of vehicle trouble code is being read, after determining fault message related column,
Can also include:
The malfunctioning interface signal of each fault message and the error code of each fault message are read according to line number.
Malfunctioning interface signal and error code are corresponded, define each fault message, in a manner of macrodefinition to generate UDS
Error code defines table.
In specific implementation, as shown in figure 3, after step S20, further includes:
S30: the attribute of failure definition information related column is as follows:
DTC_Meaning=4
DTC_Number=2
L_Byte=7
HM_Byte=3
Row Initial Value definition ir=0;
S31: line number ir++ (successively each fault message is identified according to line number);
S32: reading malfunctioning interface signal, the high, normal, basic data of failure of each fault message according to line number, by event after identification
Hinder interface signal and vehicle trouble code DT is corresponded, is defined using the mode of macrodefinition and each fault message is defined;
S33: judge whether line number ir is last line;If it is, terminating;If it is not, then return step S31.
The identification to all fault messages to be treated in vehicle trouble code DTC list is realized by above step, from
And it generates UDS error code and defines table.
Fig. 4 is a kind of flow chart of specific embodiment for generating fault-finding function provided in an embodiment of the present invention.
On the basis of the above embodiments, the DTC list of vehicle trouble code is being read, after determining fault message related column,
Can also include:
Fault message is combined according to the call format of fault-finding function, is written in specified file, to generate event
Hinder probe function.
In specific implementation, as shown in figure 4, after step S20, further includes:
S40: the attribute of failure definition information related column is as follows:
DTC_Meaning=4
DTC_Number=2
Fanult_class=6
Row Initial Value definition ir=0;
S41: line number ir++ (successively each fault message is identified according to line number);
S42: the malfunctioning interface signal and corresponding fault level of each fault message are read according to line number, by reading
Malfunctioning interface signal and fault level are combined, and form fault-finding function, and be written in specified * .c file;
S43: judge whether line number ir is last line;If it is, terminating;If it is not, then return step S41.
By above step, realize that the faulty generation flag bit interface of institute that will be given in vehicle trouble code DTC list is believed
Number code is converted to, to generate fault-finding function.
Fig. 5 is a kind of specific implementation for generating the DID list of UDS fault car related data flow provided in an embodiment of the present invention
The flow chart of mode.
On the basis of the above embodiments, step S12 can also include:
The DID list of vehicle-relevant data stream is read, determines vehicle-relevant data stream DID information.
Vehicle-relevant data stream DID information is arranged and defined, to generate UDS fault car related data flow DID
List.
In specific implementation, as shown in figure 5, specifically including:
S50: the DID list of vehicle-relevant data stream is read;
S51: judge whether data are included in freeze frame;If it is, entering step S52;If it is not, then entering step
S53;
S52: the data occupy-place length of traffic flow information is obtained;
S54: judge data occupy-place length whether less than 9;If it is, entering step S55;If it is not, then entering step
S56;
S55: defining data flow byte length is 1;
S56: defining data flow byte length is 2;
S57: obtain traffic flow information interface signal title and corresponding data ID, the information of reading is subjected to group
It closes, each traffic flow information is defined, and be written in specified * .c file;
S58: judge whether line number ir is last line;If it is, terminating;If it is not, then return step S51;
S53: it according to fixed format writes data into specified * .c file.
By above step, realize that all data stream interface signals that will be given in vehicle-relevant data stream DID list turn
It is changed to code, to generate UDS fault car related data flow DID list.
Fig. 6 is a kind of process of specific embodiment for generating the frame list of UDS fail frost provided in an embodiment of the present invention
Figure.
On the basis of the above embodiments, step S12 can also include:
Snapshot and growth data list are read, frame information is freezed in acquisition;
It will freeze frame information to be arranged and defined, to generate UDS fail frost frame list.
In specific implementation, as shown in fig. 6, specifically including:
S60: snapshot and growth data list are read;
S61: the data occupy-place length of traffic flow information is obtained;
S62: judge data occupy-place length whether less than 9;If it is, entering step S63;If it is not, then entering step
S64;
S63: defining data flow byte length is 1;
S64: defining data flow byte length is 2;
S65: obtain traffic flow information interface signal title and corresponding data ID, the information of reading is subjected to group
It closes, each traffic flow information is defined, and be written in specified * .c file;
S66: judge whether line number ir is last line;If it is, terminating;If it is not, then return step S61.
By above step, realizes and be converted to all freeze frame interface signals given in snapshot and growth data list
Code, to generate UDS fail frost frame list.
The corresponding each embodiment of method that UDS diagnostic interface software as detailed above generates, on this basis, the present invention
Also disclose the device that UDS diagnostic interface software corresponding with the above method generates.
Fig. 7 is the device that a kind of battery management controller UDS diagnostic interface software provided in an embodiment of the present invention generates
Structural schematic diagram, comprising:
Loading module 701, for when receiving Software Create order, load UDS to diagnose questionnaire survey list file;
Read module 702 diagnoses interface related list with UDS for reading in UDS diagnosis questionnaire survey list file;
Diagnostic parameters is converted to software for obtaining Diagnostic parameters in lists, and by preset rules by conversion module 703
Source code, to generate UDS diagnostic interface software.
Since the embodiment of device part is corresponded to each other with the embodiment of method part, the embodiment of device part is asked
Referring to the description of the embodiment of method part, wouldn't repeat here.
Fig. 8 is the structural schematic diagram for the equipment that a kind of UDS diagnostic interface software provided in an embodiment of the present invention generates.Such as figure
Shown in 8, the equipment which generates can generate bigger difference because configuration or performance are different, can wrap
One or more processors (central processing units, CPU) 810 is included (for example, at one or more
Manage device) and memory 820, one or more store storage medium 830 (such as one of application programs 833 or data 832
Or more than one mass memory unit).Wherein, memory 820 and storage medium 830 can be of short duration storage or persistent storage.
The program for being stored in storage medium 830 may include one or more modules (diagram does not mark), and each module can wrap
It includes to the series of instructions operation in computing device.Further, processor 810 can be set to logical with storage medium 830
Letter executes the series of instructions operation in storage medium 830 in the equipment 800 that UDS diagnostic interface software generates.
UDS diagnostic interface software generate equipment 800 can also include one or more power supplys 840, one or one
A above wired or wireless network interface 850, one or more input/output interfaces 880, and/or, one or one with
Upper operating system 831, such as Windows ServerTM, Mac OS XTM, UnixTM,LinuxTM, FreeBSDTMEtc..
The step in method that UDS diagnostic interface software described in above-mentioned Fig. 1 to Fig. 6 generates is soft by UDS diagnosis interface
The equipment that part generates is based on the structure shown in Fig. 8 and realizes.
It is apparent to those skilled in the art that for convenience and simplicity of description, the UDS of foregoing description is examined
The equipment of slave interrupt interface Software Create and the specific work process of computer readable storage medium can refer to preceding method embodiment
In corresponding process, details are not described herein.
In several embodiments provided herein, it should be understood that disclosed method, apparatus, equipment and calculating
Machine readable storage medium storing program for executing, may be implemented in other ways.For example, Installation practice described above is only schematic
, for example, the division of module, only a kind of logical function partition, there may be another division manner in actual implementation, such as
Multiple module or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately
A bit, shown or discussed mutual coupling, direct-coupling or communication connection can be through some interfaces, device
Or the indirect coupling or communication connection of module, it can be electrical property, mechanical or other forms.Module as illustrated by the separation member
It may or may not be physically separated, the component shown as module may or may not be physics mould
Block, it can it is in one place, or may be distributed on multiple network modules.It can be selected according to the actual needs
In some or all of the modules achieve the purpose of the solution of this embodiment.
It, can also be in addition, can integrate in a processing module in each functional module in each embodiment of the application
It is that modules physically exist alone, can also be integrated in two or more modules in a module.Above-mentioned integrated mould
Block both can take the form of hardware realization, can also be realized in the form of software function module.
If integrated module is realized and when sold or used as an independent product in the form of software function module, can
To be stored in a computer readable storage medium.Based on this understanding, the technical solution of the application substantially or
Say that all or part of the part that contributes to existing technology or the technical solution can embody in the form of software products
Out, which is stored in a storage medium, including some instructions are used so that a computer equipment
The whole of (can be personal computer, funcall device or the network equipment etc.) execution each embodiment method of the application
Or part steps.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (Read-Only Memory,
ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. are various can store program
The medium of code.
The method, device and equipment generated above to a kind of UDS diagnostic interface software provided by the present invention has carried out in detail
It is thin to introduce.Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities
The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment
Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration
?.It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, also
Can be with several improvements and modifications are made to the present invention, these improvement and modification also fall into the protection scope of the claims in the present invention
It is interior.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that
A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or
The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged
Except there is also other identical elements in the process, method, article or apparatus that includes the element.