CN109614369A - A kind of document transmission method of test equipment - Google Patents

A kind of document transmission method of test equipment Download PDF

Info

Publication number
CN109614369A
CN109614369A CN201811357333.4A CN201811357333A CN109614369A CN 109614369 A CN109614369 A CN 109614369A CN 201811357333 A CN201811357333 A CN 201811357333A CN 109614369 A CN109614369 A CN 109614369A
Authority
CN
China
Prior art keywords
file
test equipment
data
external control
control machine
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
Application number
CN201811357333.4A
Other languages
Chinese (zh)
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.)
China Electronics Technology Instruments Co Ltd CETI
Original Assignee
China Electronics Technology Instruments Co Ltd CETI
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 China Electronics Technology Instruments Co Ltd CETI filed Critical China Electronics Technology Instruments Co Ltd CETI
Priority to CN201811357333.4A priority Critical patent/CN109614369A/en
Publication of CN109614369A publication Critical patent/CN109614369A/en
Pending legal-status Critical Current

Links

Landscapes

  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The invention discloses a kind of document transmission methods of test equipment, are related to the file transmission field of test equipment.Which solve automatic test must be interrupted when external control machine needs to obtain the file data stored in test equipment in the prior art, the deficiency of manual intervention is carried out.This method includes that test equipment is connect by bus with external control machine, creates interface channel;External control machine sends file transmission instruction and arrives test equipment end;It after test equipment termination receives instruction, executes instruction processing and generates demand file data, include actual file information, file header, file size, check code and end-of-file information in file data;Test equipment end sends file data to external control machine;After external control machine receives file data, resolution file head, file size, check code and end-of-file information decomposite actual file information, and stored;External control machine disconnects the connection with test equipment.The problem of transmitting between test equipment and external control machine via program control command file is well solved.

Description

A kind of document transmission method of test equipment
Technical field
The present invention relates to the file transmission fields of test equipment, and in particular to a kind of document transmission method of test equipment.
Background technique
With the development of program control technology, user's remote control equipment completes automatic test and has become the main of instrument Usage scenario.After the completion of automation equipment test, magnanimity test data and display information etc. require to save at file, after convenient Continuous access and data analysis.Modernization test equipment possesses diversified file memory format, such as a instrument of Network Analyzer In just have a variety of file formats such as S2P, S3P, CAL, CST, JPEG, PNG and PRN.
Modern testing equipment provides remote control interface (such as GPIB, LAN and USB) mostly, and external control machine can be via these Interface sends instruction control instrument.The instruction for being arranged and reading data is easier to realize, but reads the number of files of instrument storage It is difficult to realize according to the instruction of (such as picture file of JPEG, PNG format).
When external control machine needs to obtain the file data stored in instrument, the automatic test of interruption, artificial USB flash disk or local are mostly used The mode of the shared copy of net.Typical process are as follows:
External control machine sends instruction, controls instrument storing data file;
After instrument receives instruction, by data information memory to locally;
Operator uses USB flash disk or local area network, and file is copied to external control machine from instrument;
Software processing (the parsing or upload etc.) data file run on external control machine.
Prior art has following deficiency:
First, automatic test must be interrupted, manual intervention is carried out.Test software cannot achieve automatic operating, need hand It moves data file copies to locally, the processing of data file could be completed;
Second, execution efficiency is reduced, it can not real-time Transmission input file.
Summary of the invention
The purpose of the present invention is in view of the above deficiencies, propose a kind of document transmission method of test equipment, the transmission side Method realizes the transmission of test equipment file remote auto, and whole process is not necessarily to manual intervention.
The present invention specifically adopts the following technical scheme that
A kind of document transmission method of test equipment, comprising:
1) test equipment is connect by bus with external control machine, creates interface channel;
2) external control machine sends file transmission instruction and arrives test equipment end;
3) it after test equipment termination receives instruction, executes instruction processing and generates demand file data, wrapped in file data Include actual file information, file header, file size, check code and end-of-file information;
4) test equipment end sends file data to external control machine;
5) after external control machine receives file data, resolution file head, file size, check code and end-of-file information are decomposed Actual file information out, and stored;
6) external control machine disconnects the connection with test equipment.
Preferably, the transmission process of file data is realized inside test equipment are as follows:
According to the parameter of instruction, the file data of corresponding format is generated;
It obtains the length of file data and is denoted as Len, before length data is added to file content in the form of ASCII character Face, each decimal digit occupy a byte;
According to length data, obtains byte number shared by length data, be denoted as ByteOFLen, be added into length data Front;
The data step-by-step of above three step is subjected to a set of customized mathematical operation, by calculated result with binary system Form is stored into 8 bytes;
In addition file header and end-of-file, file data building is completed.
Preferably, the file data of generation is returned to external control machine, the process of external control machine resolution file data by test equipment It is the inverse process that instrument internal instruction is realized, is specifically parsed using following steps:
Three bytes are read, whether detection first character section is " # ", if it is not, then illustrate corrupt data, if so, Decimal number ByteOFLen then is converted by latter two byte, transformation rule is step-by-step conversion, each individually switchs to the decimal system Number, second byte are ten, and third byte is a position;
ByteOFLen byte is read, is decimal number Len by its overall conversion;
Continue to read Len byte, keep in into buffer area;
8 bytes are read again, are converted to binary number calculated result, and the data that above three step is read are made by oneself Adopted mathematical operation, by calculated result and binary number comparison of computational results, it is ensured that check code is correct;
The last byte is read, judges whether it is "@", if not then corrupt data, if it is, by buffer area Data store into file, notice that file extension will be consistent with actual file extension name.
Preferably, the bus includes network, GPIB and USB.
The invention has the following beneficial effects:
The transmission method realizes the implementation of file transmission program control command, solves user's remote control equipment for file Store local problem.
File transformat identifies head and tail information, the preposition storage of file byte number and suffix check code using spcial character Function, it is ensured that the completeness and efficiency of data.
Whole process is not necessarily to manual intervention, and a program control command realizes the transmission of automatic remote file;Can real-time Transmission file, mention High file transmission efficiency;Using special file head, end-of-file and check code, the accurate of data file ensure that.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the document transmission method of test equipment;
Fig. 2 is file data exemplary diagram.
Specific embodiment
A specific embodiment of the invention is described further in the following with reference to the drawings and specific embodiments:
As described in Figure 1, a kind of document transmission method of test equipment, comprising:
1) test equipment is connect by bus with external control machine, creates interface channel, bus includes network, GPIB and USB etc.;
2) external control machine sends file transmission instruction and arrives test equipment end;
3) it after test equipment termination receives instruction, executes instruction processing and generates demand file data, wrapped in file data Include actual file information, file header, file size, check code and end-of-file information;
4) test equipment end sends file data to external control machine;
5) after external control machine receives file data, resolution file head, file size, check code and end-of-file information are decomposed Actual file information out, and stored;
6) external control machine disconnects the connection with test equipment.
As described in Figure 2, file data format used in above-mentioned steps is the core that this patent document transmission order is realized Technology is existing, and file data has file header, file size, file content, check code and end-of-file information to constitute, example such as Fig. 2 institute Showing, the file data display format in example is ASCII character, it is as shown in table 1 to respectively represent meaning:
Table 1
In conjunction with the file data in table 1, the transmission process of file data is realized inside test equipment are as follows:
According to the parameter of instruction, the file data of corresponding format is generated;
According to the parameter of instruction, the file content of corresponding format is generated, if parameter is JPEG, then generates the corresponding figure of JPEG Piece file, file content can be binary data, or ASCII character data;
Obtain file content length Len (for convenience of describe, use English mark symbol definition), by length data with ASCII character form is added to before file content, each decimal digit occupies a byte, and such as " 25042 " occupy five altogether Byte.
According to length data, obtains byte number ByteOFLen shared by length data, is added into before length data, ByteOFLen itself occupies two bytes, and value range is 1 to 99, can indicate the file of 10 99 power sizes;
The data step-by-step of above three step is subjected to a set of customized mathematical operation (such as count addition), will be counted Result CheckNum is calculated to be stored in binary form into 8 bytes;
In addition file header (ASCII character character " # ") and end-of-file (ASCII character character "@"), file data building is completed.
The file data of generation is returned to external control machine by instrument, and the process of external control machine resolution file data is that instrument internal refers to The inverse process realized is enabled, is specifically parsed using following steps:
Three bytes are read, whether detection first character section is " # ", if it is not, then illustrate corrupt data, if so, Then convert latter two byte to decimal number ByteOFLen (byte number shared by actual file length), transformation rule be by Position conversion.Each individually switchs to decimal number, and second byte is ten, and third byte is a position;
ByteOFLen byte is read, is decimal number Len (file content length), transformation rule by its overall conversion Still converted for step-by-step;
Continue to read Len byte, keep in into buffer area;
8 bytes are read again, are converted to binary number CheckNum, and the data that above three step is read are made by oneself Adopted mathematical operation (consistent with instrument instructions implementation rule), by calculated result compared with CheckNum, it is ensured that the correct nothing of check code Accidentally.
The last byte is read, judges whether it is "@", if not then corrupt data, if it is, by buffer area Data store into file, notice that file extension will be consistent with actual file extension name.
Certainly, the above description is not a limitation of the present invention, and the present invention is also not limited to the example above, this technology neck The variations, modifications, additions or substitutions that the technical staff in domain is made within the essential scope of the present invention also should belong to of the invention Protection scope.

Claims (4)

1. a kind of document transmission method of test equipment characterized by comprising
1) test equipment is connect by bus with external control machine, creates interface channel;
2) external control machine sends file transmission instruction and arrives test equipment end;
3) it after test equipment termination receives instruction, executes instruction processing and generates demand file data, include real in file data Border the file information, file header, file size, check code and end-of-file information;
4) test equipment end sends file data to external control machine;
5) after external control machine receives file data, resolution file head, file size, check code and end-of-file information decomposite reality Border the file information, and stored;
6) external control machine disconnects the connection with test equipment.
2. a kind of document transmission method of test equipment as described in claim 1, which is characterized in that realized inside test equipment The transmission process of file data are as follows:
According to the parameter of instruction, the file data of corresponding format is generated;
It obtains the length of file data and is denoted as Len, length data is added to before file content in the form of ASCII character, often One decimal digit occupies a byte;
According to length data, obtains byte number shared by length data, be denoted as ByteOFLen, be added into before length data;
The data step-by-step of above three step is subjected to a set of customized mathematical operation, in binary form by calculated result It stores into 8 bytes;
In addition file header and end-of-file, file data building is completed.
3. a kind of document transmission method of test equipment as claimed in claim 2, which is characterized in that test equipment is by generation File data returns to external control machine, and the process of external control machine resolution file data is the inverse process that instrument internal instruction is realized, specifically It is parsed using following steps:
Three bytes are read, whether detection first character section is " # ", if it is not, then illustrating corrupt data, if it is, will Latter two byte is converted into decimal number ByteOFLen, and transformation rule is step-by-step conversion, each individually switchs to decimal number, Second byte is ten, and third byte is a position;
ByteOFLen byte is read, is decimal number Len by its overall conversion;
Continue to read Len byte, keep in into buffer area;
8 bytes are read again, are converted to binary number calculated result, and the data that above three step is read carry out customized number Student movement is calculated, by calculated result and binary number comparison of computational results, it is ensured that check code is correct;
The last byte is read, judges whether it is "@", if not then corrupt data, if it is, by the number in buffer area According to storage into file, notice that file extension will be consistent with actual file extension name.
4. a kind of document transmission method of test equipment as described in claim 1, which is characterized in that the bus includes net Network, GPIB and USB.
CN201811357333.4A 2018-11-15 2018-11-15 A kind of document transmission method of test equipment Pending CN109614369A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811357333.4A CN109614369A (en) 2018-11-15 2018-11-15 A kind of document transmission method of test equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811357333.4A CN109614369A (en) 2018-11-15 2018-11-15 A kind of document transmission method of test equipment

Publications (1)

Publication Number Publication Date
CN109614369A true CN109614369A (en) 2019-04-12

Family

ID=66004485

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811357333.4A Pending CN109614369A (en) 2018-11-15 2018-11-15 A kind of document transmission method of test equipment

Country Status (1)

Country Link
CN (1) CN109614369A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172897A (en) * 2021-12-09 2022-03-11 西安邮电大学 PC (personal computer) end and Android end file transmission method and system
CN115994096A (en) * 2023-03-21 2023-04-21 安徽隼波科技有限公司 Verification method for radar signal processing and simulation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102340538A (en) * 2011-07-20 2012-02-01 杭州创联电子技术有限公司 Handheld device implementation method for data management of GYK (Railcar Running Control Device)
CN106849349A (en) * 2016-12-13 2017-06-13 航天东方红卫星有限公司 A kind of sun square formation simulator developing Of Remote Control Power frame system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102340538A (en) * 2011-07-20 2012-02-01 杭州创联电子技术有限公司 Handheld device implementation method for data management of GYK (Railcar Running Control Device)
CN106849349A (en) * 2016-12-13 2017-06-13 航天东方红卫星有限公司 A kind of sun square formation simulator developing Of Remote Control Power frame system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172897A (en) * 2021-12-09 2022-03-11 西安邮电大学 PC (personal computer) end and Android end file transmission method and system
CN114172897B (en) * 2021-12-09 2023-08-25 西安邮电大学 Method and system for transmitting files of PC (personal computer) end and Android end
CN115994096A (en) * 2023-03-21 2023-04-21 安徽隼波科技有限公司 Verification method for radar signal processing and simulation

Similar Documents

Publication Publication Date Title
CN106030546B (en) The method of computer program
JP3973557B2 (en) Method for compressing / decompressing structured documents
WO2006017944A1 (en) Method and system for bi-directional data conversion between iec 61970 and iec 61850
CN102663094A (en) IEC61970CIM model checking method
CN101882108A (en) Embedded software automatic test system and method thereof
CN107592238A (en) Automatic test approach and system, service terminal, the memory of interface
CN101295332A (en) DICOM file patient information anonymization processing method
CN109298882A (en) Management method, computer readable storage medium and the terminal device of interface
CN109614369A (en) A kind of document transmission method of test equipment
US10042622B2 (en) Methods and systems of generating ease of use interfaces for legacy system management facilities
CN109947431A (en) A kind of code generating method, device, equipment and storage medium
CN108388640A (en) A kind of data transfer device, device and data processing system
CN110769002A (en) LabVIEW-based message analysis method, system, electronic device and medium
CN115914437A (en) Data reading method and system for Modbus protocol, electronic device and storage medium
CN108509396A (en) Pdf document turns method, electronic device and the computer readable storage medium of picture
CN109801342A (en) The method and device of textures appropriate degree when being run in dynamic marks mobile device
CN112417515A (en) Configuration software protocol processing method and system
CN103246503A (en) Application development framework for enterprise management software
CN102270223B (en) The generation method in source codec storehouse, device and source codec method, device
CN110737431A (en) Software development method, development platform, terminal device and storage medium
CN112948194B (en) Communication protocol testing method and device
CN112306472A (en) Program interface parameter transmission method, system and related equipment
CN105793842B (en) Conversion method and device between serialized message
CN106844819A (en) The secondary artwork storehouse design tool database acquisition system of intelligent station
CN109712696B (en) Data processing method, device, equipment 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: 20190412