Summary of the invention
Ftp client the object of the present invention is to provide a kind of multidata to stick into the method that capable ftp business is tested wireless network PS performance, so that can specify arbitrary data to stick into capable ftp business.
Another object of the present invention provides the device that a kind of multidata sticks into capable ftp business test wireless network PS performance, so that ftp client can specify arbitrary data to stick into capable ftp business.
According to an aspect of the present invention, provide a kind of multidata to stick into the method for capable ftp business test wireless network PS performance, having comprised:
By the integrated a plurality of data cards of serial ports, each data card is by eating dishes without rice or wine and wireless network communication on computers;
The ftp client of described computer connects with described a plurality of data cards respectively by dialing, and each data card is obtained by the wireless network IP address allocated;
Ftp client is by the I P address of described each data card of binding, sets up being connected of ftp server of each data card and wireless network respectively, makes each data card carry out file download/upload business;
Periodically add up file download/upload that each data card carries out professional pairing descending/upstream rate.
Wherein, being connected of ftp client and each data card is that ftp client is connected realization by carrying out PPP with each data card Modem mouth.
Wherein, the ftp client driver that utilizes the RAS of windows to call each data card modem successively carries out dial-up operation.
Wherein, ftp client is behind the IP address of binding one data card, and by filling in ftp server address, port numbers, foundation is connected with ftp server.
Wherein, being connected of data card and ftp server is that described ftp client sets up the realization that is connected with ftp server by this data card of binding IP address.
Wherein, the data card I P address of ftp client utilization binding is set up with after ftp server is connected, and obtains the listed files on the ftp server, therefrom selects a certain file then, and carries out the download/upload of selected file via the data card of binding IP address.
Wherein, for the data card that carries out ftp business, the RasGetConnectionStatistics function of the RAS that client use windows provides obtains the transmission of each data card Modem port and the data volume of reception.
Wherein, by the transmission data volume of unit of account in the time, obtain the upstream rate value; By the reception data volume of unit of account in the time, obtain downstream data rate.
According to a further aspect of the invention, provide a kind of multidata to stick into the device of capable ftp business test wireless network PS performance, having comprised:
Be integrated in a plurality of data cards on the serial ports of computers, its each data card is by eating dishes without rice or wine and wireless network communication;
Be loaded in ftp client in the described computer, connect with described a plurality of data cards respectively by dialing, make each data card obtain the IP address that wireless network is distributed to, and IP address by described each data card of binding, set up being connected of ftp server of each data card and wireless network respectively, make each data card carry out file download/upload business;
Be loaded in the statistic unit in the described computer, be used for periodically adding up file download/upload that each data card carries out professional pairing descending/upstream rate.
Wherein, the data card IP address of ftp client utilization binding is set up with after ftp server is connected, and obtains the listed files on the ftp server, therefrom selects a certain file, and carries out the download/upload of selected file via the data card of binding IP address.
Compared with prior art, beneficial effect of the present invention is: integrated a plurality of data cards carry out ftp business and carry out under the situation of test network PS performance on an industrial computer, FTP is connected be based upon respectively on the different data cards, realize test the network PS field service feature.
Embodiment
, should be appreciated that following illustrated preferred embodiment only is used for description and interpretation the present invention, and be not used in qualification the present invention a preferred embodiment of the present invention will be described in detail below in conjunction with accompanying drawing.
Fig. 1 has shown environment configurations of the present invention, as shown in Figure 1, go up by the integrated a plurality of data cards of serial ports at a computer or industrial computer (following is example with the industrial computer, and the present invention will be described), each data card is that UU mouth and wireless network (as Node B) carry out communication by eating dishes without rice or wine.
Fig. 2 has shown that multidata of the present invention sticks into the device of capable ftp business test wireless network performance, comprising:
Be integrated in a plurality of data cards on the industrial computer serial ports, its each data card is by eating dishes without rice or wine and wireless network communication;
Be loaded in the ftp client in the industrial computer, connect with each of described a plurality of data cards respectively by dialing, make (getting) each data card obtain the IP address that wireless network is distributed to, and by binding the IP address of described each data card successively, set up being connected of ftp server of each data card and wireless network respectively, make each data card carry out file download/upload business; Specifically, ftp client is connecting with first data card, and after making this data card obtain wireless network IP address allocated by dialing, bind the IP address of this data card, setting up data via this data card with the ftp server of wireless network then is connected, and then beginning is carried out the download of file or is uploaded business via first data card, then ftp client is successively to second data card, the 3rd data card ... the N data card is carried out and the first data card identical operations, makes second data card, the 3rd data card ... the N data card all carries out the download of file or uploads business;
Be loaded in the statistic unit in the industrial computer, be used for periodically adding up file download/upload that each data card carries out professional pairing descending/upstream rate.
The driver that ftp client utilizes the RAS of windows to call each data card modem successively carries out dial-up operation; The Windows system finishes automatically with the PPP of each data card Modem mouth and is connected, and realizes that ftp client is connected with each data card.Data card realizes that automatically PDP activates, thereby obtains the IP address.
In order to set up being connected of ftp client and ftp server, need be after FTP binds the IP address of a data card, fill in ftp server address, port numbers, then by initiating connection request, realize being connected of ftp client and ftp server, and realize thus being connected of this data card and ftp server.
The data card IP address of ftp client utilization binding is set up with after ftp server is connected, and can obtain the listed files on the ftp server, therefrom selects a certain file by the user then, and carries out the download/upload of selected file via the data card of binding IP address.
For the data card that carries out ftp business, client can use the RasGetConnectionStatistics function of the RAS that windows provides to obtain the transmission of each data card Modem port and the data volume of reception.
Statistic unit obtains the upstream rate value by the transmission data volume in the unit of account time, perhaps by the reception data volume in the unit of account time, obtains downstream data rate.
Fig. 3 has shown that multidata of the present invention sticks into the method for capable ftp business test wireless network PS performance, may further comprise the steps:
By the integrated a plurality of data cards of serial ports, each data card is by eating dishes without rice or wine and wireless network communication on an industrial computer;
The ftp client of described industrial computer connects with each of described a plurality of data cards respectively by dialing, and (getting) each data card is obtained by the wireless network IP address allocated;
Ftp client is by binding the IP address of described each data card successively, sets up being connected of ftp server of each data card and wireless network respectively, makes each data card carry out file download/upload business;
Periodically add up file download/upload that each data card carries out professional pairing descending/upstream rate.
Below in conjunction with Fig. 4, Fig. 5 and Fig. 6 apparatus and method of the present invention are specifically described.
Fig. 4 has shown the service structure of the RAS dialing of Windows of the present invention, as can be seen from the figure RAS is in the upper strata of ISO/OSI model, TAPI (the Telephony Application Programming Interface of lower floor, Telephony Application Program Interface) calls Unimodem, Unimodem is general modem driver, and it calls serial ports API and realizes and the communicating by letter of modulation equipment.The present invention uses RAS (the remote access service of windows, Remote Access Service) dials, calling the application program of RAS carries out on client computer usually, the remote access protocol of two kinds of standards is used in this connection: PPP point-to-point protocol and SLIP (serial transmission line Internet agreement, Serial Line InternetProtocol).
Before testing, can use the AT instruction of standard easily the PS territory service rate of needs test to be provided with, as ,+CREGREQ=1,2,64,128.......Wherein " 2 " are network type: interactive class, " 64 " are upstream rate, and " 128 " are downstream rate; Can be provided with the speed of testing easily like this.
In general, the present invention drives the USB port of shining upon out by data card, and the Qos (network quality, Quality of Service) of PS link is set, and the network type in PS territory mainly is set, up-downgoing speed.
Fig. 5 has shown that ftp client of the present invention is via the go forward side by side flow process of row data communication of the ftp server of a data card connection wireless network.
Step S31, the API that the RAS of use Windows provides utilizes function R asSetEntryProperties that the attribute information of dial-up connection is set, and dials with the RasDial function, use call back function RasDialFuncl to obtain dialing procedure, create ftp client and be connected with the PPP of data card;
Step S32, the dialing meeting among step S31 trigger data simultaneously sticks into capable PDP activation, and foundation is connected with network side;
Step S33, AT+CGPADDR=1 obtains the IP address that this data card is assigned to by the AT instruction; The IP address format that for example gets access to is: h1.h2.h3.h4;
Step S34 starts ftp client;
Step S35, set up the control connection between ftp client and the ftp server:
Step S36, ftp server return FTP successful connection message;
Step S37, ftp client bind the IP address of a certain data card, and foundation is connected with the Socket of ftp server with port in the ftp server address of filling in according to the user;
Step S38, ftp client uses File Transfer Protocol word PORT, and (form of PORT agreement word is: PORT h1, h2, h3, h4, p1, p2, wherein h1 is the most-significant byte of IP address, p1 is the most-significant byte of local port) set up and to be connected with the data of ftp server, for example, data are connected the local IP of appointment, prevent that the data connection is based upon on other the data card;
Step S39, ftp client obtain listed files on the ftp server, and a certain file of selecting according to the user carries out download/upload;
After this, set up being connected of other data cards and ftp server respectively according to above flow process and upload/file in download;
Fig. 6 has shown the flow process of statistic unit realization speed statistics of the present invention, and the present invention periodically obtains the data volume D of data card port, and obtains system time T by the API of Windows.
Carrying out the data card of ftp business for each, statistic unit of the present invention can use the RasGetConnectionStatistics function of the RAS that windows provides to obtain the transmission of each data card Modem port and the data volume of reception.Idiographic flow as shown in Figure 6, if set timer → obtain current time T → obtain Modem mouth data volume → by data volume D and time T calculate real time rate → calculating Mean Speed → judge whether into maximum or minimum-rate →, then preserve rate value, and report UI show → if not, then report UI to show.
The speed of statistics comprises real time rate and Mean Speed, and both account forms are identical, and difference only is that real time rate is to obtain data volume by standard time unit, and Mean Speed is then according to obtaining data volume from the statistics time started to current time.For instance, if this data volume that gets access to is D1, the data volume that got access to last time is D2, and this time is t1, and the time of last time is t2, and then rate value R is: R=(D1-D2)/(t1-t2); If the statistics real time rate, then the time interval of t1-t2 is the standard time unit; If statistical average speed, then the t2 corresponding to data volume D2 is the statistics zero hour, is current time corresponding to the t1 of data volume D1.
The present invention can show the rate behavior of each data card respectively, and utilizes a kind of line of color to represent downstream rate, with another kind of color showing upstream rate.
In sum, integrated a plurality of data cards carry out ftp business and carry out under the situation of test network PS performance on an industrial computer, the present invention can make FTP connect and be based upon respectively on the different data cards, realization is to the test of network PS field service feature, solved the situation that common ftp client can not designated terminal; Conveniently carry out effect and show, rate behavior that can each data card of real time inspection also can be checked whole network conditions; And, check that the rate behavior of each data card no longer needs other instrument to finish.
Although above the present invention is had been described in detail, the invention is not restricted to this, those skilled in the art of the present technique can carry out various modifications according to principle of the present invention.Therefore, all modifications of doing according to the principle of the invention all should be understood to fall into protection scope of the present invention.