The content of the invention
Based on this, it is necessary to the problem of quality for being difficult to true reflection communication equipment, there is provided a kind of communication interface spirit
Sensitivity method of testing and system.
A kind of communication interface sensitivity test method, including:
According to the type selecting test packet of equipment under test, and produce an original test letter for carrying the test packet
Number;
The amplitude of the original test signal is adjusted according to the amplitude adjusted parameter of setting, and by after amplitude adjusted
Obtained output test signal is inputted to the communication interface of equipment under test;
Response signal is received by the communication interface, and the response signal is converted into response message;Wherein, it is described
Response signal is the response signal that the equipment under test parsing output test packet content obtains;
The response message is compared with pre- stored messages and judges back code accuracy, is tested according to code accuracy is returned
Obtain communication interface sensitivity.
A kind of communication interface sensitivity test system, including:
Message sending module, for the type selecting test packet according to equipment under test, and produce one and carry the test
The original test signal of message;
Amplitude adjusted module, the amplitude of the original test signal is adjusted for the amplitude adjusted parameter according to setting
Section, and the output test signal obtained after amplitude adjusted is inputted to the communication interface of equipment under test;
Message intercepts module, for receiving response signal by the communication interface, and the response signal is converted to
Response message;Wherein, the response signal is the response signal that the equipment under test parsing output test packet content obtains;
Code judge module is returned, judges back code accuracy for the response message to be compared with pre- stored messages, according to
Return code accuracy and carry out test acquisition communication interface sensitivity.
Above-mentioned communication interface sensitivity test method and system, according to test packet, pass through produce one it is original test letter
Number, corresponding with the type of equipment under test test packet is carried, is inputted after the amplitude of original test signal is adjusted to being tested
The communication interface of equipment;Then the response message of communication interface feedback is obtained;Again by the way that response message and pre- stored messages are carried out
Contrast judgement returns code accuracy, and test acquisition communication interface sensitivity is carried out according to code accuracy is returned.The program need not intervene quilt
Measurement equipment, it is not necessary to disassemble equipment under test and draw test signal, realize the quantitative detection to the receiving sensitivity of equipment under test, have
Beneficial to science objective appraisal equipment quality.
Embodiment
The communication interface sensitivity test method of the present invention and the embodiment of system are illustrated below in conjunction with the accompanying drawings.
With reference to figure 1, Fig. 1 is the communication interface sensitivity test method flow chart of one embodiment, and this method is mainly applicable
In the communication equipment similar to RS-485, such as the detection of RS-485 communication interfaces, the program comprises the following steps:
(1) according to the type selecting test packet of equipment under test, and an original test for carrying the test packet is produced
Signal.
In this step, different test packets is selected according to the difference of equipment under test, generation carries the test packet
Original test signal.
(2) amplitude of the original test signal is adjusted according to the amplitude adjusted parameter of setting, and amplitude is adjusted
The output test signal obtained after section is inputted to the communication interface of equipment under test.
In this step, the amplitude of original test signal is adjusted the amplitude adjusted parameter of setting, produces different amplitudes
Test signal, for test equipment under test receive test signal amplitude response sensitivity;Here the amplitude adjusted ginseng set
Number is the parameter that amplitude adjusted can be carried out according to testing requirement.
(3) response signal is received by the communication interface, and the response signal is converted into response message;Wherein,
The response signal is the response signal that the equipment under test parsing output test packet content obtains.
(4) response message is compared with pre- stored messages and judges back code accuracy, carried out according to code accuracy is returned
Test obtains communication interface sensitivity.
In one embodiment, the process of above-mentioned steps (4), may further include:
The response message is compared with pre- stored messages and judges back whether code is correct;If so, set described in control reduction
Fixed amplitude adjusted parameter, and enter and test next time;If it is not, the amplitude adjusted parameter of the last setting of record, and according to this
The amplitude adjusted parameter of setting determines the receiving sensitivity of the communication interface.
Optionally, enter the step of testing next time for described, can include as follows:When time code is correct, one is produced
Message sends signal, and the original test signal tested next time is produced according to message transmission signal control.
As embodiment, judge back whether code is correct for the described response message is compared with pre- stored messages
Step, it can include as follows:
The content of the response message is compared with the content of pre- stored messages, if the content is consistent, judged back
Code is correct, otherwise judges back that code is incorrect;Wherein, the pre- stored messages are the messages consistent with test packet content.
Furthermore, it is contemplated that equipment under test in testing can not feedback response signal situation, can further set as follows
Testing scheme:If in setting time, response signal is not received by by the communication interface, then records last setting
Amplitude adjusted parameter, and determine according to the amplitude adjusted parameter of the setting receiving sensitivity of the communication interface.
With reference to shown in figure 2, Fig. 2 is the communication interface sensitivity test system structure diagram of one embodiment, including:Report
Literary sending module, amplitude adjusted module, message intercept module and return code judge module;Wherein, message sending module passes through amplitude
Adjustment module is connected to the communication interface of equipment under test;Message intercept module be connected to equipment under test communication interface and return code sentence
Between disconnected module.
The message sending module, for the type selecting test packet according to equipment under test, and produce described in a carrying
The original test signal of test packet;
The amplitude adjusted module, the amplitude of the original test signal is entered for the amplitude adjusted parameter according to setting
Row regulation, and the output test signal obtained after amplitude adjusted is inputted to the communication interface of equipment under test;
The message intercepts module, for receiving response signal by the communication interface, and the response signal is turned
It is changed to response message;Wherein, the response signal is the response letter that the equipment under test parsing output test packet content obtains
Number;
Described time code judge module, judge back code accuracy for the response message to be compared with pre- stored messages,
Test acquisition communication interface sensitivity is carried out according to code accuracy is returned.
In one embodiment, described time code judge module is further used for carrying out the response message and pre- stored messages
Whether contrast judgement returns code correct;
If so, output amplitude Regulate signal, to amplitude adjusted module, control reduces the amplitude adjusted parameter of the setting, and
Into testing next time;
If it is not, the amplitude adjusted parameter of the last setting of record, and according to determining the amplitude adjusted parameter of the setting
The receiving sensitivity of communication interface.
Further, described time code judge module is also connected with message sending module, is further used for when time code is correct, production
A raw message sends signal output to message sending module;The message sending module, it is additionally operable to send signal according to the message
Control produces the original test signal tested next time.
As embodiment, described time code judge module, it is further used for the content of the response message and pre- stored messages
Content be compared, if the content is consistent, judge back that code is correct, otherwise judge back that code is incorrect;Wherein, it is described to prestore
Message is the message consistent with test packet content.
Furthermore, it is contemplated that equipment under test in testing can not feedback response signal situation, if in setting time, it is described
Message intercepts module and is not received by response signal by the communication interface;The described time last setting of code judge module record
Amplitude adjusted parameter, and determine according to the amplitude adjusted parameter of the setting receiving sensitivity of the communication interface.
The communication interface sensitivity test system of above-described embodiment, described time code judge module preset message and institute are compared
Response message is stated, determines the correctness of response message, the test signal that then amplitude adjusted module exports when response message is correct
Amplitude;Message sending module starts test packet and sent again, then terminates to test during response message mistake.Surveyed by gradually reducing
The amplitude of trial signal, decision-feedback message, realize the quantitative detection of communication interface receiving sensitivity.Made using message sending module
For auxiliary equipment, the test signal for meeting metering automation equipment interaction stipulations is produced, test signal amplitude is reduced by amplitude,
Resolution response message, judge equipment under test whether respond normally, as continue reduce test signal amplitude or terminate test
Foundation.
In practical application, different test packets can be selected according to the different type of equipment under test so that equipment under test
Can correct analytic message, produce response action.Test packet is simultaneously converted to the tested communication standard test signal of satisfaction, test letter
Number be sent into amplitude adjusted module, amplitude adjusted module carry out test signal amplitude adjusted, test signal can be gradually reduced
Output amplitude.The amplitude control signal that amplitude adjusted module inputs according to code judge module is returned, test signal amplitude size is adjusted,
The controlled test signal of amplitude adjusted module output amplitude is sent into equipment under test, if equipment under test can be properly received, parse
Message content, then response message is sent according to test packet content, message intercepts module and receives response message, and response signal is turned
Response message is changed to, message is sent into back code judge module.Code judge module is returned, message is intercepted to the response message of module conversion
It is compared with default message, it is determined that feedback correctness, the correct test for then continuing to reduce the output of amplitude adjusted module of feedback
Signal amplitude, while export enabling signal to message sending module, startup and send test packet again, tied if feedback error
Beam is tested, the test signal amplitude that record last time correctly feeds back, the receiving sensitivity index as equipment under test.Entirely tested
Journey is automatically performed, without artificial contrastive test result.Equipment under test need not be intervened, it is not necessary to disassemble equipment under test and draw test letter
Number, the quantitative detection of the receiving sensitivity of communication interface to metering automation equipment is realized, is advantageous to science objective appraisal
Equipment quality, the detection of the communication interface of censorship equipment under test can be applied to.
A pair of the communication interface sensitivity test method 1 of the communication interface sensitivity test system of the present invention and the present invention
Should, the technical characteristic and its advantage illustrated in the embodiment of above-mentioned communication interface sensitivity test method is applied to communication
In the embodiment of interface sensitivity test system, hereby give notice that.
Based on example as described above, a kind of computer equipment is also provided in one embodiment, the computer equipment bag
The computer program that includes memory, processor and storage on a memory and can run on a processor, wherein, computing device
Any one sleep householder method in each embodiment as described above is realized during described program.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with
The hardware of correlation is instructed to complete by computer program, it is non-volatile computer-readable that described program can be stored in one
Take in storage medium, in the embodiment of the present invention, the program can be stored in the storage medium of computer system, and is calculated by this
At least one computing device in machine system, include as described above the respectively flow of the embodiment of sleep householder method to realize.Its
In, described storage medium can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) or random storage
Memory body (Random Access Memory, RAM) etc..
Accordingly, a kind of storage medium is also provided in one embodiment, is stored thereon with computer program, wherein, the journey
Any one communication interface sensitivity test method in each embodiment as described above is realized when sequence is executed by processor.
Each technical characteristic of embodiment described above can be combined arbitrarily, to make description succinct, not to above-mentioned reality
Apply all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, the scope that this specification is recorded all is considered to be.
Embodiment described above only expresses the several embodiments of the present invention, and its description is more specific and detailed, but simultaneously
Can not therefore it be construed as limiting the scope of the patent.It should be pointed out that come for one of ordinary skill in the art
Say, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention
Scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.