[go: up one dir, main page]

CN103514070A - Method combined with XML description for hardware automated testing - Google Patents

Method combined with XML description for hardware automated testing Download PDF

Info

Publication number
CN103514070A
CN103514070A CN201310473196.1A CN201310473196A CN103514070A CN 103514070 A CN103514070 A CN 103514070A CN 201310473196 A CN201310473196 A CN 201310473196A CN 103514070 A CN103514070 A CN 103514070A
Authority
CN
China
Prior art keywords
register
registers
data
slave computer
xml
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
Application number
CN201310473196.1A
Other languages
Chinese (zh)
Other versions
CN103514070B (en
Inventor
蔡春田
俞泓
林先贤
雷文博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHANGHAI FITSCO INTELLIGENT TRAFFIC CONTROL CO Ltd
Original Assignee
SHANGHAI FITSCO INTELLIGENT TRAFFIC CONTROL CO Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by SHANGHAI FITSCO INTELLIGENT TRAFFIC CONTROL CO Ltd filed Critical SHANGHAI FITSCO INTELLIGENT TRAFFIC CONTROL CO Ltd
Priority to CN201310473196.1A priority Critical patent/CN103514070B/en
Publication of CN103514070A publication Critical patent/CN103514070A/en
Application granted granted Critical
Publication of CN103514070B publication Critical patent/CN103514070B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method combined with XML description for hardware automated testing. The method includes the following steps that information of all registers of a CPU is described through XMLs; data are analyzed through an upper computer and a lower computer in the same format on the basis of a UDP; all the registers of the CPU are grouped according to functions, each group comprises registers of different lengths and numbers, and the registers have different definitions and purposes. The method can be applied to a commonly used client/server system and used for obtaining various resources, messages and the like of the opposite side; time cost is saved, steps of repeated modification, compiling and downloading of procedures are avoided, time for system testing is greatly saved, and complexity is reduced; information expressed in a list mode is converted into a tree structure to be expressed, so open-and-shut understandings can be established for internal relations of data.

Description

In conjunction with XML, describe and carry out hardware automated testing method
Technical field
The invention belongs to software test field, specifically refer to that a kind of be applied in industrial control system, safety signal system, to the obtaining of the hardware asset information of safe CPU, arranges and automated diagnostic method of testing.
Background technology
In industrial control system and safety signal system (being applied to the industries such as aviation electronics, railway signal, nuclear power), the operation information of Dynamic Acquisition program, is vital in real time, according to the information of obtaining, can accomplish to prevent trouble before it happens.
Based on existing technology, at VxWorks, (vxworks operating system is a kind of embedded real-time operating system (RTOS) that U.S. WindRiver company designed and developed in nineteen eighty-three, the key components of embedded-development environment) in Dynamic Acquisition information be very difficult thing, this generally need to remodify the information that code adds debugging code and prints needs, this method is simple and easy to use, but shortcoming is just need to revise code in the time of will obtaining different information, recompilate, download.
Other method is to use log information, and the good content of chosen in advance (being generally alarm, error message) is saved in log file temporarily, takes log file in the time of needs away, and to log file analysis.This method needs to specify the log information of wanting in advance, once the content that will check is not in selected scope, generally need to remodify code.
In addition above 2 kinds of methods do not possess readability, are unfavorable for locating information, and general being applicable to described linear data structure, is inconvenient to for describing complicated data splitting type.
Summary of the invention
Technical matters to be solved by this invention is to provide a kind of combination XML and describes and carry out hardware automated testing method, and it can be applied to general client/server system, for obtaining the other side's various resources and information etc.; The cost that saves time, has avoided repetition update routine, compiling, and the step of download, saves time and the complicacy of system testing greatly.
In order to solve above technical matters, the invention provides a kind of combination XML description and carry out hardware automated testing method; Comprise the following steps: the information of all registers of CPU is described with extendible mark language XML; Use, based on User Datagram Protoco (UDP) UDP, makes host computer and slave computer with same format resolution data; The all registers of CPU are all pressed to function grouping, and every group has different length and number destination register, and each register has different definition and purposes.
Beneficial effect of the present invention is: can be applied to general client/server system, for obtaining the other side's various resources and information etc.; The cost that saves time, has avoided repetition update routine, compiling, and the step of download, has saved time and the complicacy of system testing greatly; By the information that list mode is expressed, be converted to tree structure and express, can set up open-and-shut understanding to the internal relation between data.
Host computer and the pre-defined port numbers of communicating by letter of slave computer; A message comprises an OLV structure, and so-called OLV is skew, and the set of length and three elements of value is used address that offset can location register for slave computer addressing, Length Indication register length, and effective value is 1,2,4 bytes; Value is used for storing the data of the register obtaining from slave computer or mails to the data of slave computer, for arranging.
Accompanying drawing explanation
Below in conjunction with the drawings and specific embodiments, the present invention is described in further detail.
Fig. 1 is that register of the present invention is all by the schematic diagram of function grouping;
Fig. 2 is the protocol format schematic diagram that XML of the present invention is used.
Embodiment
For the real-time operation information of Dynamic Acquisition train system, under the prerequisite of update software not, the various resource informations of Overall Acquisition, the running status of program.The full name of udp protocol is User Datagram Protoco (UDP), in network it the same with Transmission Control Protocol for the treatment of.UDP message bag is a kind of connectionless agreement.In osi model, at the 4th layer (transport layer), the last layer in IP agreement.UDP has the shortcoming that packet grouping, assembling is not provided and can not sorts to packet, that is to say, after message sends, cannot learn whether safe and complete arrives for it.UDP is used for supporting those need between computing machine, transmit the network application of data.
XML language (Extensible Markup Language, extendible markup language) is the rule of a set of definition semantic marker, and these marks are divided into many parts by document and these parts are labelled.It is also meta-tag language, has defined for defining other relevant with specific area, syntax-languages semantic, structurized markup language.
The invention provides a kind of tree form data structure with XML language description, this structure can be for the hardware resource of descriptive system, and such as the skew of register, the information such as length and value, also can be for describing the information of global variable in software etc.
Technical scheme of the present invention is, first the information of register with XML language description out, then designs a kind of agreement based on UDP, makes host computer and the slave computer can same format resolution data.There is the register of a lot of memory-mapped MPC8360 inside as shown in Figure 1, all register Dou Shian functional organization, every group has different length and number destination register, each register has again different definition and purposes, by a kind of rational data structure, describing this hierarchical structure is very, and XML is just in time applicable to describing this structure.The XML language description of Fig. 2 the structure of Fig. 1.
In order to communicate by letter with slave computer, exchange message also needs to define a kind of agreement, makes both sides can identify different requests, and from return messages, extracts useful data.The port numbers that both sides need predefined to communicate by letter well.Concrete protocol format is with reference to shown in figure 2, and a message comprises an OLV(offset length value) structure.So-called OLV is skew, and the set of length and three elements of value is used address that offset can location register for slave computer addressing, Length Indication register length, and effective value is 1,2,4 bytes.Value is used for storing the data (reading) of the register obtaining from slave computer or mails to the data of slave computer, for (writing) is set.OLV is the clean part of carrying of UDP, and certainly can increase new content later.
For data are shown, have intuitive, host computer need to be used Tree control that data are shown.
The design's technique effect is:
1. versatility, the design's method can be applied to general client/server system, for obtaining the other side's various resources and information etc.
2. the cost that saves time, has avoided repetition update routine, compiling, and the step of download, has saved time and the complicacy of system testing greatly.
3. visual and legibility, is converted to tree structure by the information that list mode is expressed and expresses, and can set up open-and-shut understanding to the internal relation between data.
1) construct and generate the inforamtion tree of the register (or global variable) based on PPC plate and output in XML file
2) write host computer procedure, analyzing XML language, forms UDP message the data that parse according to pre-designed communication protocol, and sends in slave computer.
3) write program of lower computer, according to protocol analysis UDP message, according to the content obtaining register of request or the value of data structure, and loopback is to host computer.
4) host computer collection information, and the information of whole register tree is displayed it by tree structure, very strong readability there is.
The present invention is not limited to embodiment discussed above.Above the description of embodiment is intended in order to describe and illustrate the technical scheme the present invention relates to.Apparent conversion based on the present invention enlightenment or substitute and also should be considered to fall into protection scope of the present invention.Above embodiment is used for disclosing best implementation method of the present invention, so that those of ordinary skill in the art can apply numerous embodiments of the present invention and multiple alternative reaches object of the present invention.

Claims (2)

1. in conjunction with XML, describe and carry out hardware automated testing method for one kind; It is characterized in that, comprise the following steps:
The information of all registers of CPU is described with extendible mark language XML;
Use, based on User Datagram Protoco (UDP) UDP, makes host computer and slave computer with same format resolution data;
The all registers of CPU are all pressed to function grouping, and every group has different length and number destination register, and each register has different definition and purposes.
2. combination XML as claimed in claim 1 describes and carries out hardware automated testing method, it is characterized in that host computer and the pre-defined port numbers of communicating by letter of slave computer;
A message comprises an OLV structure, and so-called OLV is skew, the set of length and three elements of value, and the address of location register is used for slave computer addressing, Length Indication register length, effective value is 1,2,4 bytes;
Value is used for storing the data of the register obtaining from slave computer or mails to the data of slave computer, for arranging.
CN201310473196.1A 2013-10-11 2013-10-11 Describe in conjunction with XML and carry out hardware automated method of testing Active CN103514070B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310473196.1A CN103514070B (en) 2013-10-11 2013-10-11 Describe in conjunction with XML and carry out hardware automated method of testing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310473196.1A CN103514070B (en) 2013-10-11 2013-10-11 Describe in conjunction with XML and carry out hardware automated method of testing

Publications (2)

Publication Number Publication Date
CN103514070A true CN103514070A (en) 2014-01-15
CN103514070B CN103514070B (en) 2016-11-02

Family

ID=49896833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310473196.1A Active CN103514070B (en) 2013-10-11 2013-10-11 Describe in conjunction with XML and carry out hardware automated method of testing

Country Status (1)

Country Link
CN (1) CN103514070B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339318A (en) * 2016-08-29 2017-01-18 上海斐讯数据通信技术有限公司 Automatic testing device and establishment method thereof
CN108521350A (en) * 2018-03-16 2018-09-11 重庆邮电大学 An XML-driven script-based automated testing method for industrial gateway equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881934A (en) * 2005-06-17 2006-12-20 株式会社日立制作所 Microprocessor, network system, and communication method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881934A (en) * 2005-06-17 2006-12-20 株式会社日立制作所 Microprocessor, network system, and communication method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339318A (en) * 2016-08-29 2017-01-18 上海斐讯数据通信技术有限公司 Automatic testing device and establishment method thereof
CN108521350A (en) * 2018-03-16 2018-09-11 重庆邮电大学 An XML-driven script-based automated testing method for industrial gateway equipment

Also Published As

Publication number Publication date
CN103514070B (en) 2016-11-02

Similar Documents

Publication Publication Date Title
CN101873323B (en) Web service platform based on program slicing technique
CN109032909A (en) Processing method, system, equipment and the storage medium of application crash log
CN106597947A (en) Substation equipment test method and system, server and tester
CN108108288A (en) A kind of daily record data analytic method, device and equipment
CN108038207A (en) A kind of daily record data processing system, method and server
CN104461531B (en) A kind of implementation method of reporting system SQL
CN106980560A (en) One kind is based on ICD database multibus protocol tests and emulation mode and platform
Lebold et al. OSA-CBM architecture development with emphasis on XML implementations
CN102546301A (en) Digital signal logic analyzing system
CN114124878B (en) Market data issuing method, device, system, equipment and medium
CN105204981A (en) Application performance test method and device
CN111181769A (en) Network topological graph drawing method, system, device and computer readable storage medium
CN103514070A (en) Method combined with XML description for hardware automated testing
CN111047733B (en) Unmanned vehicle state monitoring control system
Al-Hazmi et al. Towards semantic monitoring data collection and representation in federated infrastructures
CN114691782A (en) Database table increment synchronization method and device and storage medium
CN102227727A (en) Method and device for distributed configuration of remote data processing services in motor vehicle systems
CN107704567A (en) A kind of analytic method of binary file, device, equipment and storage medium
CN104361121B (en) A kind of batch analytic method of WEB reporting systems formula
CN109408577B (en) ORACLE database JSON analysis method, system, device and storable medium
CN105512102A (en) Data parse method and system
CN113487698B (en) Form generation method and device based on two-channel neural network model
Weixuan et al. A method for the translation from UML into Event-B
CN115865645A (en) Link determination method, device, equipment, medium and product
CN110853327B (en) Ship cabin equipment data field debugging and collecting method and device based on single chip microcomputer

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant