Summary of the invention
First technical matters solved by the invention has provided a kind of vehicle Control Network CAN/LIN network monitor instrument and method of testing, realizes the functions such as dynamic surveillance, data analysis, data statistics, the network optimization, nodal function test to automobile CAN/LIN network system.
Second technical matters solved by the invention is the consistency problem that has solved automobile CAN/LIN networking products and system and CAN/LIN bus application layer standard, for the matching degree of check automobile CAN/LIN networking products and system and CAN/LIN bus application layer standard provides the testing tool of standard, for the devices interconnect between the different agreement realization of a plurality of producers provides technique guarantee.
The 3rd technical matters solved by the invention provided the software interface with other tool software or modeling tool, seamless link by software interface and other tool software, strengthened the compatibility and the expandability of monitor, improved analysis ability network data.Overcome the defective of poor compatibility, maintenance and the upgrading inconvenience of software.
The technical solution adopted for the present invention to solve the technical problems is: the general structure of this monitor is the industrial computer structure, mainly comprises industrial personal computer monitoring part, network transceivers, three parts of automobile electrical apparatus interface.The CAN/LIN network transceivers is responsible for the collection network message information, by serial bus interface or USB (Universal Serial Bus, USB (universal serial bus)) bus information is sent to industrial computer.The monitoring analysis software architecture of industrial computer adopts modular construction, mainly comprises with lower module:
Main control module: control and call other functional parts, from network transceivers read network data flow, send datagram, management data, explicit message analysis result and analysis result, and finish the storage of corresponding data, the processing of analytical documentation;
Network message acquisition module: be responsible for correctly receiving data and being reassembled as the message of finishing by byte, be stored in the clear text buffer zone from serial bus interface;
Network message parsing module: the message in the clear text buffer zone is obtained respective field according to different-format (CAN standard frame format, Extended Superframe Format, LIN message format) decomposition;
Network message memory module: store required data as requested in temporary file;
Network message statistical analysis module: the message in the data acquisition module is carried out statistic of classification according to protocol class and type of message by network message statistical study dynamic link library;
Network message characteristics analysis module: content of message is analyzed and extraction and network node, parameter that offered load is relevant by network message signature analysis dynamic link library;
Network message data analysis module: sample in the message data of database storing by certain frequency, and the message data section that obtains is decomposed into the corresponding signal value by the application layer standard;
The network structure analysis module: importing/reduced model file or data, model is combined with data, set up typical model, and to the network structure analysis under these particular models, for network structure optimization provides foundation;
The procotol message format imports and exports module: at the diversity of CAN/LIN network application-level protocol, finish the replacement of message format in the procotol in the new and old observation process;
Socket display module: call the network message data analysis module and obtain the desired signal value, and show in a different manner, wherein main interface comprises: network flow statistic list window, network flow statistic files window, network message messagewindow, message signals files window and system information window etc.
Adopt loose coupling between above-mentioned all modules, promptly each functions of modules is independent, and packet parsing, statistical study etc. are separate with display module, reduces each other interdependent, and such modular construction helps the transplanting and the modification of software.
The present invention monitors in the automobile network development process, by the network message on the bus is received and dispatched, with Vehicle Electronic Control ECU unit communication, all adopted standard automobile CAN agreement and automobile LIN agreement, realized and the communicating by letter of the ECU Electronic Control ECU unit that possesses automobile CAN/LIN agreement.In analyzing the automobile network performance, a kind of method of network modelling has been proposed, in software package, provided the concrete grammar of setting this model, by this method, can analyze the node work efficiency, network node situation, network structure rationality, offered load performance etc. of current automobile Control Network of monitoring in real time accurately.
Embodiment
As shown in Figure 1, the general structure of this monitor is the industrial computer structure, mainly comprises industrial personal computer monitoring part, network transceivers, three parts of automobile electrical apparatus interface.The CAN/LIN network transceivers is responsible for the collection network message information, by serial bus interface or USB (Universal Serial Bus, USB (universal serial bus)) bus information is sent to industrial computer.The monitoring analysis software architecture of industrial computer adopts modular construction, mainly comprises as shown in Figure 2 with lower module:
Main control module: control and call other functional parts, from network transceivers read network data flow, send datagram, management data, explicit message analysis result and analysis result, and finish the storage of corresponding data, the processing of analytical documentation;
Network message acquisition module: be responsible for correctly receiving data and being reassembled as the message of finishing by byte, be stored in the clear text buffer zone from serial bus interface;
Network message parsing module: the message in the clear text buffer zone is obtained respective field according to different-format (CAN standard frame format, Extended Superframe Format, LIN message format) decomposition;
The network message memory module: store required data as requested in temporary file, under the situation that does not influence real-time analysis speed, the data storage that collects the most at last is to disk;
Network message statistical analysis module: by network message statistical study dynamic link library the message in the data acquisition module is carried out statistic of classification according to protocol class and type of message, for optimization of network performance provides decision references;
Network message characteristics analysis module: content of message is analyzed and extraction and network node, parameter that offered load is relevant by network message signature analysis dynamic link library;
Network message data analysis module: sample in the message data of database storing by certain frequency, and the message data section that obtains is decomposed into the corresponding signal value by the application layer standard;
The network structure analysis module: this module is the core in the software architecture, be divided into two parts, the one, by the seamless link of software interface and other modeling tool software, importing/reduced model file or data, model is combined the phase-split network characteristics with data; The 2nd, by experience accumulation, the support data that rule of thumb data and test (the automobile platform is driven test and drive test test etc.) obtains are set up some typical models, and to the network structure analysis under these particular models, for network structure optimization provides foundation;
The procotol message format imports and exports module: at the diversity of CAN/LIN network application-level protocol, utilization imports and exports module and finishes the replacement of message format in the procotol in the new and old observation process;
Socket display module: call the network message data analysis module and obtain the desired signal value, and show in a different manner, wherein main interface comprises: network flow statistic list window, network flow statistic files window, network message messagewindow, message signals files window and system information window etc.
Adopt loose coupling between above-mentioned all modules, promptly each functions of modules is independent, and packet parsing, statistical study etc. are separate with display module, reduces each other interdependent, and such modular construction helps the transplanting and the modification of software.
The present invention monitors in the automobile network development process, by the network message on the bus is received and dispatched, with Vehicle Electronic Control ECU unit communication, all adopted standard automobile CAN agreement and automobile LIN agreement, realized and the communicating by letter of the ECU Electronic Control ECU unit that possesses automobile CAN/LIN agreement.In analyzing the automobile network performance, a kind of method of network modelling has been proposed, in software package, provided the concrete grammar of setting this model, by this method, can analyze the node work efficiency, network node situation, network structure rationality, offered load performance etc. of current automobile Control Network of monitoring in real time accurately.
Vehicle control system CAN/LIN network monitor instrument monitoring flow process mainly comprises three phases:
(1) works out monitoring plan.Working out monitoring plan is the preceding work of monitoring beginning, comprises the target that monitoring need reach, aspects such as the resource of use, the standard of deferring to and instrument.Main contents have: target; Overall monitoring policy; The integrality demand of monitoring; Concrete rule (as when stopping to test); Resource requirement; Monitoring use-case storehouse; Monitoring standard; Instrument; The foundation of network model, description and analysis; The configuration of monitoring software/hardware.
As shown in Figure 3, monitoring plan is preserved with the form of file, importing/export decomposes the program content of monitoring in main control module, and content comprises in the packet parsing module: the form of the format standard that message is deferred to (protocol type, agreement characteristics), message; Content comprises in analysis module: the choosing of data type, structural model, analytical approach; Content comprises in interface display module: the object of monitoring (individual node, a plurality of node, whole network), the selection of time of Monitoring Data, data monitored mode.
(2) monitoring implementation process.Monitoring plan according to first stage comes into effect observation process, the data of monitoring automobile network C AN/LIN network, dynamic phase-split network system performance.
As shown in Figure 4, by the message data on network transceivers reception automobile CAN/LIN network, data check by after enter the packet parsing module, message is progressively resolved to the message format of drafting in the phase one, carry out statistical study, signature analysis, structure analysis.After analyze finishing, will analyze data and be sent to the interface and show that the mode of demonstration has tabulation, chart, instrument etc.In this course, the parsing of message format and message analysis are cores.
(3) arrangement Monitoring Data.After implementation process finishes, the node of each access network is provided analysis report, the duty of node and network performance analysis evaluation etc. are described.As shown in Figure 5, primary module will guarantee the real-time requirement of system in observation process, all data are just preserved earlier in temporary file in operational process, analysis, arrangement for these data adopt unified step to implement, a kind of mode is that the main control module is connected with external tool by interface module, analyze the result by external tool, the result is turned back in the main control module; Another kind of mode is the methods analyst data by the analysis module in the software architecture, finally provides monitoring result, submits the monitoring report to.
The monitoring analysis display window mainly comprises network flow statistic list window, network flow statistic files window, network message messagewindow, message signals files window and system information window, and its function declaration is as follows:
1, the network flow statistic list window shows the counting messages information of the current all nodes that receive, and is the transmitting-receiving amount that all kinds of messages p.s. listed in lines in index with the network node ID.
2, the network flow statistic files window is horizontal ordinate with the network node ID, is ordinate with per second message total amount, shows the statistical information of each node with graphics mode.
3, the network message messagewindow dynamically demonstrates the message content of each network node that collects, comprising collected time of message, node ID, message name, packet sending and receiving direction, message data length of field and message data territory content.
4, the message signals files window selects to demonstrate in the mode of dynamic curve diagram the variation of signals selected value according to the user.
5, the system information window is used for the display system prompting message.
The virtual meter panel window comprises that panel board selects window, panel board window, emergency warning lamp window, signal lamp window and car light window, shows the corresponding instrument state in mode more intuitively, and the function declaration of each window is as follows:
1, panel board selects window to be used for the management of other windows.
2, the panel board window shows the current state of the speed of a motor vehicle, engine speed, oil level and water temperature.
3, the emergency warning lamp window is used to show that water temperature warning, oil mass warning, oil and water separation warning, oil pressure cross that low warning, danger warning, empty filter are stopped up and reported to the police, engine failure is reported to the police and the state of alarm lamps such as brake fault alarm.
4, the pilot lamp window shows led status such as charging, defrosting, securing band, air drying, charge heating, LPG, exhaust brake, car braking, filament detect, tail brake detection.
5, the car light window shows the current state of dipped headlights, high beam, left steering lamp, right turn lamp, background light, Brake lamp, front fog lamp and Rear Fog Lamp.
The modeling window comprises importing/derivation window, design CAN/LIN network structure window, analysis CAN/LIN network structure window and other facility invokes window etc. of model, and the function declaration of each window is as follows:
1, importing/derivation window mainly is to set up and to debug the form of good network with file, to import/lead other memory devices.
2, the planned network topology window mainly provides CAN/LIN network structure design function, and the tectonic network node is brought the network of monitoring in the typical model into and analyzed, and shortens network monitor and joint behavior analysis time, improves the speed of the network optimization.
3, analyzing CAN/LIN network structure window mainly is according to the network structure that has imported, and the feature of phase-split network provides the performance evaluation index of network, reduces repetitive operation, strengthens software transportability and compatibility.
4, other facility invokes window mainly is a resource of calling other modeling tool, realizes the seamless link with other tool software, the sharing of implementation model data, test figure, Monitoring Data.