CN103078908B - A kind of data transmission method and device - Google Patents

A kind of data transmission method and device Download PDF

Info

Publication number
CN103078908B
CN103078908B CN201210576547.7A CN201210576547A CN103078908B CN 103078908 B CN103078908 B CN 103078908B CN 201210576547 A CN201210576547 A CN 201210576547A CN 103078908 B CN103078908 B CN 103078908B
Authority
CN
China
Prior art keywords
interface
module
data
sent
control command
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.)
Active
Application number
CN201210576547.7A
Other languages
Chinese (zh)
Other versions
CN103078908A (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.)
Beijing Jingwei Hirain Tech Co Ltd
Original Assignee
Beijing Jingwei Hirain Tech 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 Beijing Jingwei Hirain Tech Co Ltd filed Critical Beijing Jingwei Hirain Tech Co Ltd
Priority to CN201210576547.7A priority Critical patent/CN103078908B/en
Publication of CN103078908A publication Critical patent/CN103078908A/en
Application granted granted Critical
Publication of CN103078908B publication Critical patent/CN103078908B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

This application discloses a kind of data transmission method and device, be applied on the PC that is connected with network, and described PC is provided with multiple I/O interface, the method is by setting up the communication link between the application software in network in other PC, then the I/O interface controlled by this communication link on other PCs in this communication link realizes data sending function, solves the problem of the flexible Application that can not realize transfer of data between application software and bottom hardware in prior art.

Description

A kind of data transmission method and device
Technical field
The application relates to Computer Simulation, field tests, particularly relates to a kind of data transmission method and device.
Background technology
In existing emulation, field tests, for hardware I/O interface application widely.Such as: switching value, analog quantity, discrete magnitude and bus amount interface etc., be mainly used to send or receive the signal of telecommunication relevant to testing equipment.
Data transmission method of the prior art mainly adopts centralized system, after hardware I/O interface and application software are bound, install on the same device, make application software directly can call bottom layer driving, thus realize user application software can direct control hardware PCI interface.
By the research to prior art, inventor to find in prior art data transmission method, and there are the following problems.On the one hand, because the applied logic of user and the Hardware I/O of bottom operate directly corresponding by a lot of application software, the fault that goes wrong is difficult to location, easily causes coupling fault.On the other hand, because user's applied logic is complicated and changeable, thus also and then can change the access of I/O interface, be unfavorable for modular multiplexing like this.Moreover, because every platform computer can the restriction of IO resource of load and the restriction of backboard message transmission rate, make data transmission applications underaction, and easily because the restriction of computer resource produces performance bottleneck.
Comprehensive above several respects can be found out, prior art still can not realize the flexible Application to transfer of data between application software and bottom hardware.
Summary of the invention
In view of this, the embodiment of the present application provides a kind of data transmission method, to solve the problem of the flexible Application that can not realize transfer of data between application software and bottom hardware in prior art.
To achieve these goals, the technical scheme that provides of the embodiment of the present application is as follows:
A kind of data transmission method, is applied on the PC that is connected with network, and described PC is provided with multiple I/O interface, comprising:
Set up the communication link between the application software in network in other PC;
The control command of described application software transmission and the data to be sent of described application software are received by described communication link;
Described control command is sent to command buffer, and the data to be sent of described application software are sent to data buffer zone;
Described control command is read from described command buffer;
Described control command is resolved, obtains data transfer instruction;
Corresponding I/O interface is selected according to described data transfer instruction;
By selected I/O interface, the data described to be sent in described data buffer zone are sent.
Preferably, resolve described control command and also obtain initialization directive, the method also comprises:
Control described selected I/O interface according to described initialization directive and carry out initialization operation.
Preferably, resolve described control command and also obtain operational order, the method also comprises:
Control described selected I/O interface according to described operational order to open or close.
Preferably, by selected I/O interface, the data described to be sent in described data buffer zone are sent, specifically comprise:
Obtain the described selected state at I/O interface;
Judge whether described selected I/O interface is opening;
When the state of described selected I/O interface is opening, by described selected I/O interface, the data described to be sent in described data buffer zone are sent.
Preferably, described method also comprises:
Collect state information and/or the fault message of described selected I/O interface;
Collected described state information and/or fault message are sent in the described application software corresponding with described state information and/or fault message by described communication link.
A kind of data transmission device, be applied on the PC that is connected with network, and described PC is provided with multiple I/O interface, comprise: communication link module, instruction/data receiver module, instruction/data sending module, instruction fetch module, command analysis module, I/O interface select module and data transmission blocks, wherein:
Described communication link module is for setting up the communication link between the application software in network in other PC;
Described instruction/data receiver module is used for receiving the control command of described application software transmission and the data to be sent of described application software by described communication link;
Described instruction/data sending module is connected with described command reception module, for described control command is sent to command buffer, and the data to be sent of described application software is sent to data buffer zone;
Described instruction fetch module is connected with described command buffer, for reading described control command from described command buffer;
Described command analysis module is connected with described instruction fetch module, for resolving described control command, obtains data transfer instruction;
Described I/O interface selects module to be connected with described command analysis module, for selecting corresponding I/O interface according to described data transfer instruction;
Described data transmission blocks one end and described I/O interface select module to be connected, and the other end is connected with described data buffer zone, for the data described to be sent in described data buffer zone being sent by selected I/O interface.
Preferably, described command analysis module is connected with described instruction fetch module, for resolving described control command, obtains initialization directive, and this device also comprises: initialization directive module,
Described initialization directive module one end is connected with described command analysis module, and the other end and described I/O interface select module to be connected, and carries out initialization operation for controlling described selected I/O interface according to described initialization directive.
Preferably, described command analysis module is connected with described instruction fetch module, for resolving described control command, obtains operational order, and this device also comprises: operational order module,
Described operational order module one end is connected with described command analysis module, and the other end and described I/O interface select module to be connected, and opens for controlling described selected I/O interface or closes.
Preferably, described data transmission blocks comprises: I/O interface state acquisition module, I/O interface condition judgment module and data send submodule, wherein:
Described I/O interface state acquisition module and described I/O interface select module to be connected, for obtaining the state at described selected I/O interface;
Described I/O interface condition judgment module is connected with described I/O interface state acquisition module, for judging whether described selected I/O interface is opening;
Described data send submodule one end and are connected with described I/O interface condition judgment module, the other end is connected with described data buffer zone, for when the state of described selected I/O interface is opening, by described selected I/O interface, the data described to be sent in described data buffer zone are sent.
Preferably, described device also comprises state and returns module and feedback information sending module, wherein:
Described state returns module and sends submodule with described data and be connected, for collecting state information and/or the fault message of described selected I/O interface;
Described feedback information sending module returns module with described state and is connected, for collected described state information and/or fault message are sent to the described application software corresponding with described state information and/or fault message by described communication link.
As can be seen from the above technical solutions, the data transmission method that the embodiment of the present application provides, be applied on the PC that is connected with network, and described PC is provided with multiple I/O interface, the method is by setting up the communication link between the application software in network in other PC, then the I/O interface controlled by this communication link on other PCs in this communication link realizes data sending function, solves the problem of the flexible Application that can not realize transfer of data between application software and bottom hardware in prior art.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present application or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, the accompanying drawing that the following describes is only some embodiments recorded in the application, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
A kind of data transmission method flow chart that Fig. 1 provides for the embodiment of the present application one;
Fig. 2 obtains initialization directive and the flow chart carrying out corresponding operating for resolving control command of providing of the embodiment of the present application two;
The particular flow sheet data to be sent in data buffer zone sent by selected I/O interface that Fig. 3 provides for the embodiment of the present application three;
The method flow diagram information of selected I/O interface being turned back to application software that Fig. 4 provides for the embodiment of the present application four;
The structure chart of a kind of data transmission device that Fig. 5 provides for the embodiment of the present application five;
The structure chart of a kind of data transmission device that Fig. 6 provides for the embodiment of the present application six;
The detailed construction schematic diagram of the data transmission blocks that Fig. 7 provides for the embodiment of the present application seven;
The structure chart information of selected I/O interface being turned back to application software that Fig. 8 provides for the embodiment of the present application eight;
The network topological diagram of the application data transmitting device that Fig. 9 provides for the application.
Embodiment
Technical scheme in the application is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only some embodiments of the present application, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all should belong to the scope of the application's protection.
The data transmission method that the embodiment of the present application provides, be applied on the PC that is connected with network, and described PC is provided with multiple I/O interface, the method is by setting up the communication link between the application software in network in other PC, and the I/O interface then controlled by this communication link on other PCs in this communication link realizes data sending function.
Embodiment one:
The embodiment of the present application one provides a kind of data transmission method, and the method is applied on multiple PCs of being connected by network, and each PC is provided with multiple I/O interface.
A kind of data transmission method flow chart that Fig. 1 provides for the embodiment of the present application one.
As shown in Figure 1, a kind of step of data transmission method that provides of the embodiment of the present application one is as follows:
Communication link between application software in S101, foundation and network in other PC.
The data transmission method that the embodiment of the present application provides, is applied on multiple PCs of being connected by network, and each PC may be provided with multiple I/O interface.First the method sets up the communication link between the application software on other PCs.Application software on each PC can control corresponding I/O interface on this PC.Meanwhile, after the application software on PC is connected by communication link, between each application software on PC, just can carry out communication by this communication link.Application software on such PC just can be connected with the application software on other PCs by communication link, thus realizes controlling the I/O interface on other PCs.
S102, to be received control command and the data to be sent of application software that application software sends by communication link.
The data transmission method that the embodiment of the present application provides is in actual application, and first PC receives the control command and data to be sent that are sent by other PCs that communication link is connected with it.
S103, control command is sent to command buffer, and the data to be sent of application software are sent to data buffer zone.
The control command received is sent to command buffer, data to be sent is sent to data buffer zone simultaneously after receiving by communication link the control command and data to be sent that other PCs send by PC.
S104, from command buffer read control command.
Control command is medium to be performed at command buffer, when retrieving this control command and needing to be performed, this control command is read out from command buffer.
S105, control command to be resolved, obtain data transfer instruction.
The control command read out is resolved, obtains the instruction that computer can identify.Resolve by control command, obtain data transfer instruction.
S106, select corresponding I/O interface according to data transfer instruction.
According to data transfer instruction, corresponding I/O interface selected by this PC.
S107, by selected I/O interface, the data to be sent in data buffer zone to be sent.
After have selected corresponding I/O interface, the data to be sent in data buffer zone are sent by the I/O interface of this selection.
Embodiment two:
Conveniently control I/O interface, a kind of data transmission method that above-described embodiment provides, carrying out parsing to control command can also obtain initialization directive.
Fig. 2 obtains initialization directive and the flow chart carrying out corresponding operating for resolving control command of providing of the embodiment of the present application two.
As shown in Figure 2, resolving control command that the embodiment of the present application two provides obtains initialization directive and to carry out the step of corresponding operating as follows:
Communication link between application software in S201, foundation and network in other PC.
S202, to be received control command and the data to be sent of application software that application software sends by communication link.
S203, control command is sent to command buffer.
S204, from command buffer read control command.
S205, control command to be resolved, obtain initialization directive.
The control command read out is resolved, obtains the instruction that computer can identify.Also comprise, control command is resolved, obtain initialization directive.
S206, select corresponding I/O interface according to initialization directive.
According to initialization directive, corresponding I/O interface selected by this PC.
S207, according to initialization directive, the I/O interface selected by control carries out initialization operation.
According to resolving the initialization directive obtained, I/O interface selected on this PC carries out initialization operation.The initialization operation that the embodiment of the present application provides or can be that enough needs verify when receiving data for the transmission rate of setting I/O interface when sending data.
In the embodiment of the present application, step S101 ~ S104 one_to_one corresponding in step S201 ~ S204 and embodiment one, the application implement the step S201 ~ S204 provided detailed description can with reference in above-described embodiment about the description of step S201 ~ S204, do not repeat them here.
As shown in Figure 2, in the embodiment of the present application, after step s 204, can also comprise step S208, concrete steps are as follows:
S208, control command to be resolved, obtain operational order.
The control command read out is resolved, obtains the instruction that computer can identify.Also comprise, control command is resolved, obtain operational order.
S209, select corresponding I/O interface according to operational order.
According to operational order, corresponding I/O interface selected by this PC.
S210, according to operational order, I/O interface selected by control is opened or is closed.
I/O interface selected by controlling according to this operational order is opened or is closed.When I/O interface is in opening, this I/O interface can carry out reception and the transmission of data.When I/O interface is in closed condition, this I/O interface can not carry out reception and the transmission of data.
As can be seen here, a kind of data transmission method that the embodiment of the present application provides, can also initialization directive be obtained after control command is resolved, select corresponding I/O interface according to initialization directive, and initialization operation can be carried out according to initialization directive to selected I/O interface.In addition, carrying out parsing to control command can also obtain operational order, after selecting corresponding I/O interface according to operational order, and the operation selected I/O interface can also opened or be closed according to operational order.By the above-mentioned initialization operation to selected I/O interface and On/Off operation, facilitate and selected I/O interface is controlled.
Embodiment three:
In the above-described embodiments, can open selected I/O interface or shutoff operation, so send success rate to improve data, selected I/O interface can be detected before data to be sent are sent and whether be in opening, and then judge whether data to be sent to be sent.
The particular flow sheet data to be sent in data buffer zone sent by selected I/O interface that Fig. 3 provides for the embodiment of the present application three.
As shown in Figure 3, the concrete steps data to be sent in data buffer zone sent by selected I/O interface that provide of the embodiment of the present application three are as follows:
S301, obtain the described selected state at I/O interface.
The current present state of I/O interface selected by acquisition, the current present state of this selected I/O interface has two kinds of situations, the first situation is the selected current present state of I/O interface is opening, and another kind of situation is the selected current present state of I/O interface is closed condition.
S302, judge whether described selected I/O interface is opening.
S303, when the state of described selected I/O interface is opening, by described selected I/O interface, the data described to be sent in described data buffer zone to be sent.
When the state of selected I/O interface is opening, the I/O interface selected by explanation can carry out the transmission of data, and then the data to be sent in data buffer zone can be sent by selected I/O interface.Otherwise when the state of selected I/O interface is closed condition, selected I/O interface can not the transmission of data.
In addition, when selected I/O interface is closed condition, can adopt step S210, the I/O interface selected by control is opened, and then data to be sent is sent.
As can be seen here, the idiographic flow of " data to be sent in data buffer zone being sent by selected I/O interface " in above-described embodiment one that the embodiment of the present application provides in step S107, first the state at selected I/O interface is obtained, whether the I/O interface selected by then judging according to the opening of selected I/O interface or closed condition can send data, when the state of selected I/O interface is opening, by selected I/O interface, the data to be sent in data buffer zone are sent.The idiographic flow of the more detailed step S107 described in above-described embodiment one of the embodiment of the present application " data to be sent in data buffer zone being sent by selected I/O interface ", specifically understands the transmission condition data to be sent in data buffer zone sent by selected I/O interface.
Embodiment four:
In the above-described embodiments, have selected I/O interface, conveniently make the situation of the corresponding I/O interface selected by application software understanding, some problems can be avoided in operation later.The embodiment of the present application with the addition of the step information of selected I/O interface being turned back to application software on the basis of above-described embodiment.
The method flow diagram information of selected I/O interface being turned back to application software that Fig. 4 provides for the embodiment of the present application four.
As shown in Figure 4, the method step information of selected I/O interface being turned back to application software that provides of the embodiment of the present application four is as follows:
S401, the state information of collecting described selected I/O interface and/or fault message.
By selected I/O interface the data to be sent of data buffer zone are being carried out in the process that the I/O interface of carrying out in the process sent, to selected I/O interface in initialized process and selected by controlling opens or close, this selected I/O interface has corresponding executing state, also may produce corresponding fault message in the process of implementation, this step mainly collects the state information of selected I/O interface in aforesaid operations process and/or fault message.
S402, collected described state information and/or fault message to be sent in the described application software corresponding with described state information and/or fault message by described communication link.
The state information collected and/or fault message are transmitted by communication link, is sent in the corresponding application software of transmitting terminal institute of initial control command.
As can be seen here, the method information of selected I/O interface being turned back to application software that the embodiment of the present application provides, by collecting state information and/or the fault message of selected I/O interface, then collected state information and/or fault message are sent in the application software corresponding with state information and/or fault message by communication link, application software is made more to understand the situation of selected I/O interface, some problems can be avoided in operation afterwards.
Embodiment five:
Describe a kind of flow process of data transmission method in above-described embodiment, corresponding the embodiment of the present application five provides a kind of data transmission device.This data transmission device is applied on multiple PCs of being connected by network, and each PC is provided with multiple I/O interface.
The structure chart of a kind of data transmission device that Fig. 5 provides for the embodiment of the present application five.
As shown in Figure 5, a kind of data transmission device that the embodiment of the present application five provides comprises: communication link module 1, instruction/data receiver module 2, instruction/data sending module 3, instruction fetch module 4, command analysis module 5, I/O interface select module 6, data transmission blocks 7, command buffer 8, data buffer zone 9 and I/O interface 10.
Wherein, the multiple PCs be connected by network, can also be connected by communication link module 1; Instruction/data receiver module 2 receives the instruction or data to be sent that are sent by other PCs that communication link is connected with it by communication link module 1; Instruction/data sending module 3 and instructions/data reception module 2 is connected; Instruction/data sending module 3 is connected with data buffer zone 9 with command buffer 8 respectively; Instruction fetch module 4 is connected with command buffer 8; Command analysis module 5 is connected with command buffer 8; I/O interface selects module 6 and instruction parsing module 5 to be connected; Data transmission blocks 7 one end and I/O interface select module 6 to be connected, and the other end is connected with data buffer zone 9; I/O interface 10 is connected with data transmission blocks.
A kind of data transmission device that the embodiment of the present application provides, is applied on multiple PCs of being connected by network, and each PC may be provided with multiple I/O interface.The multiple PCs be connected by network can also install communication link module 1 respectively, the communication link belonging to the multiple PC being provided with communication link module 1 can be set up by the communication link module 1 on each PC.
All receive by the instruction/data receiver module 2 on it control command and data to be sent that other PCs that communication link is connected send by each PC of communication link 1.
Instruction/data sending module 3 and instructions/data reception module 2 is connected, instruction/data sending module 3 receives the control command or data to be sent that instruction/data receiver module 2 sends, and the control command received is sent to command buffer 8, the data to be sent received are sent to data buffer zone 9.
Instruction fetch module 4 is connected with command buffer 8, the control command in instruction fetch module 4 reading order buffering area 8.
Being connected with instruction fetch module 4 of command analysis module 5, command analysis module 5 receives the control command that instruction fetch module 4 sends, and resolves this control command, obtains the discernible instruction of PC.That is, control command is carried out parsing and obtain data transfer instruction.
I/O interface selects module 6 to be connected with command analysis module 5, and I/O interface selection module 6 receives the data transfer instruction that command analysis module 5 sends, and selects corresponding I/O interface 10 according to this data transfer instruction.
Data transmission blocks 7 one end and I/O interface select module 6 to be connected, and the other end is connected with data buffer zone 9, and data transmission blocks 7 receives data transfer instruction that I/O interface selects module 6 to send and the data to be sent that data buffer zone sends.Meanwhile, data transmission blocks 7 is also connected with I/O interface 10, and data to be sent are sent by I/O interface 10 according to data transfer instruction by data transmission blocks 7.
As can be seen here, the data transmission device that the embodiment of the present application provides, be applied on the PC that is connected with network, and described PC is provided with multiple I/O interface, comprises: communication link module, instruction/data receiver module, instruction/data sending module, instruction fetch module, command analysis module, I/O interface select module, data transmission blocks, command buffer, data buffer zone and I/O interface.This data transmission device is by setting up the communication link between the application software in network in other PC, then the I/O interface controlled by this communication link on other PCs in this communication link realizes data sending function, solves the problem of the flexible Application that can not realize transfer of data between application software and bottom hardware in prior art.
Embodiment six:
Conveniently control I/O interface, the parsing module in a kind of data transmission device that above-described embodiment provides carries out parsing to control command and can also obtain initialization directive.Therefore, the embodiment of the present application also comprises initialization directive module on the basis of above-described embodiment five.
The structure chart of a kind of data transmission device that Fig. 6 provides for the embodiment of the present application six.
As shown in Figure 6, what the embodiment of the present application six provided arrange a kind of data transmission device also comprises initialization directive module 11.
Wherein, a kind of data transmission device that the embodiment of the present application provides be the data transmission device provided at above-described embodiment five basis on provide.
Command analysis module 5 pairs of control commands in a kind of data transmission device that above-described embodiment five provides are carried out parsing and can also be obtained initialization directive.When command analysis module 5 pairs of control commands carry out parsing obtain initialization directive time, I/O interface selects module 6 to be connected with command analysis module 5, I/O interface selection module 6 receives the initialization directive that command analysis module 5 sends, and selects corresponding I/O interface 10 according to initialization directive.
One end and the I/O interface of initialization directive module 11 select module 6 to be connected, the other end is connected with I/O interface 10, initialization directive module 11 receives the initialization directive that I/O interface selects module 6 to send, and carries out initialization operation according to initialization directive to selected I/O interface 10.
As shown in Figure 6, what the embodiment of the present application provided arrange a kind of data transmission device can also comprise operational order module 12.
In the embodiment of the present application, command analysis module 5 pairs of control commands are carried out parsing and can also be obtained operational order.When command analysis module 5 pairs of control commands carry out parsing obtain operational order time, I/O interface selects module 6 to be connected with command analysis module 5, I/O interface selection module 6 receives the operational order that command analysis module 5 sends, and selects corresponding I/O interface 10 according to operational order.
One end and the I/O interface of operational order module 12 select module 6 to be connected, the other end is connected with I/O interface 10, operational order module 12 receives the operational order that I/O interface selects module to send, and according to the operation that operational order is opened selected I/O interface 10 or closed.
As can be seen here, a kind of data transmission device that the embodiment of the present application provides can also comprise initialization directive module, and the I/O interface selected by this initialization directive module can control according to initialization directive carries out initialization operation.In addition, parsing is carried out to control command and can also obtain operational order.At this moment the data transmission device that the embodiment of the present application provides also comprises operational order module.The operation that this operational order module can be opened selected I/O interface or close according to operational order.By adding initialization directive module and/or operational order module in data transmission device, facilitating and selected I/O interface is controlled.
Embodiment seven
In the above-described embodiments, can open selected I/O interface or shutoff operation, so send success rate to improve data, selected I/O interface can be detected before data to be sent are sent and whether be in opening, and then judge whether data to be sent to be sent.
The detailed construction schematic diagram of the data transmission blocks that Fig. 7 provides for the embodiment of the present application seven.
The data transmission blocks detailed construction schematic diagram that theres is provided of the embodiment of the present application seven as shown in Figure 7.
As shown in Figure 7, the data transmission blocks that the embodiment of the present application seven provides comprises: I/O interface state acquisition module 71, I/O interface condition judgment module 72 and and data transmission submodule 73.
Wherein, I/O interface state acquisition module 71 and I/O interface select module 6 to be connected, I/O interface state acquisition module 71 primary recipient I/O interface selects the information of I/O interface selected by module, and the state information of I/O interface selected by the acquisition of information of selected I/O interface.
I/O interface judge module 72 is connected with I/O interface acquisition module 71, I/O interface judge module 72 receives the state information of the selected I/O interface that IO acquisition module 71 sends, and whether the I/O interface selected by then judging according to the state information of I/O interface can send data.
When selected I/O interface is opening, this I/O interface judge module 72 judges that selected I/O interface can send data.Otherwise when selected I/O interface is closed condition, this I/O interface judge module 72 judges that selected I/O interface cannot send data.
Data send submodule 73 and are connected with I/O interface judge module 72, when I/O interface judge module 72 judges that selected I/O interface can send data, these data send the data to be sent that submodule reception I/O interface reception data buffer sends, and then the data to be sent received are sent by selected I/O interface.
As can be seen here, the detailed construction of data transmission blocks that the embodiment of the present application provides comprises: I/O interface state acquisition module, I/O interface condition judgment module and and data send submodule.The state information of the I/O interface selected by being obtained by I/O interface state acquisition module, then according to the state information of obtained I/O interface, whether the I/O interface selected by judgement can send data, when selected I/O interface can send data, send submodule by data and the data to be sent in data buffer zone are sent.The embodiment of the present application describes the detailed construction of data transmission blocks, and the scheme that the embodiment of the present application is provided is more clear, easy understand.
Embodiment eight
In above-described embodiment five, select module 6 to have selected I/O interface by I/O interface, conveniently make the situation of the corresponding I/O interface selected by application software understanding, some problems can be avoided in operation later.The embodiment of the present application also comprises state and returns module and feedback information sending module on the basis of above-described embodiment five.
The structure chart information of selected I/O interface being turned back to application software that Fig. 8 provides for the embodiment of the present application eight.
As shown in Figure 8, the structure information of selected I/O interface being turned back to application software that the embodiment of the present application eight provides comprises: state returns module 13 and feedback information sending module 14.
Wherein, one end that state returns module 13 is connected with data transmission blocks 7, and the other end is connected with feedback information sending module 14.
The data to be sent in data buffer zone being carried out in the process sent by selected I/O interface, or in the medium situation of process that the selected I/O interface I/O interface of carrying out in initialized process and selected by controlling is opened or closed, I/O interface needs the state information produced in implementation and/or fault message to send to state to return module 13, then returns module 13 by state and the state information collected and/or fault message is sent on feedback information sending module 14.The execution state information received and/or fault message are transmitted by communication link by this feedback information sending module 14, are sent in the corresponding application software of transmitting terminal institute of initial control command.
As can be seen here, the structure information of selected I/O interface being turned back to application software that the embodiment of the present application provides comprises state and returns module and feedback information sending module.Wherein, state returns state information and/or the fault message of I/O interface selected described in module collection; Feedback information sending module and state return module and are connected, accepting state returns state information and/or the fault message of module transmission, then be sent in the application software corresponding with state information and/or fault message by communication link, application software is made more to understand the situation of selected I/O interface, some problems can be avoided in operation afterwards.
A kind of data transmission method provided the embodiment of the present application below in conjunction with concrete case and device are described in detail:
Conveniently to the understanding of the data transmission device that above-described embodiment provides, it is how to be controlled the I/O interface on other PCs by communication link that the application describes data transmission device in detail.
The network topological diagram of the application data transmitting device that Fig. 9 provides for the application.
As shown in Figure 9, the network topological diagram of application data transmitting device that the application provides comprises: Ethernet (TCP/IP) A, PC B, PC C and PC D.Wherein, each PC is provided with application module and I/O interface.As, PC B is provided with application module B1 and I/O interface B2.
PC B, PC C are connected by Ethernet with PC D; Application module on PC B, PC C and PC D is interconnected; Application module on every platform PC is connected with I/O interface.
PC B, PC C are connected by the ICP/IP protocol on Ethernet with PC D, and PC B, PC C and PC D are in identical network.
On the basis of the PC B be connected by Ethernet, PC C and PC D, can be interconnected by the application module on PC B, PC C and PC D, make to set up a communication link between the application module on PC B, PC C and PC D.
When the application module B1 on PC B needs data to be sent to be sent by the interface C1 on PC C time, application module C1 on PC C receives by communication link between the application module B1 on PC B the data to be sent and control command that the application module B1 on PC B sends, after application module C1 on PC C receives data to be sent and control command, select corresponding I/O interface B2 according to control command, then control I/O interface B2 by application module B1 and data to be sent are sent.
As shown in Figure 9, the network topological diagram of application data transmitting device that the application provides can realize PC B, PC C and PC D and control mutually I/O interface by application module and carry out data transmission.Further, the network topological diagram of the application data transmitting device that the application provides is not limited to just to control corresponding I/O interface and sends data, can also carry out other operations.As: the I/O interface selected by control carries out opening or closedown etc.
As can be seen here, the network topological diagram of application data transmitting device that the application provides describes and how to realize PC B, PC C and PC D and control mutually I/O interface by application module and carry out data transmission or other operation etc.Making the application describe data transmission device clearly, is in detail how to be controlled the I/O interface on other PCs by communication link.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.
Below be only the preferred implementation of the application, those skilled in the art understood or realizes the application.To be apparent to one skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein when not departing from the spirit or scope of the application, can realize in other embodiments.Therefore, the application can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (10)

1. a data transmission method, is applied on the PC that is connected with network, and described PC is provided with multiple I/O interface, it is characterized in that, comprising:
Set up the communication link between the application software in network in other PC;
The control command of described application software transmission and the data to be sent of described application software are received by described communication link;
Described control command is sent to command buffer, and the data to be sent of described application software are sent to data buffer zone;
Described control command is read from described command buffer;
Described control command is resolved, obtains data transfer instruction;
Corresponding I/O interface is selected according to described data transfer instruction;
By selected I/O interface, the data described to be sent in described data buffer zone are sent.
2. method according to claim 1, is characterized in that, resolve described control command and also obtain initialization directive, the method also comprises:
Control described selected I/O interface according to described initialization directive and carry out initialization operation.
3. method according to claim 1, is characterized in that, resolve described control command and also obtain operational order, the method also comprises:
Control described selected I/O interface according to described operational order to open or close.
4. method according to claim 1, is characterized in that, the data described to be sent in described data buffer zone is sent, specifically comprise by selected I/O interface:
Obtain the described selected state at I/O interface;
Judge whether described selected I/O interface is opening;
When the state of described selected I/O interface is opening, by described selected I/O interface, the data described to be sent in described data buffer zone are sent.
5. method according to claim 4, is characterized in that, also comprises:
Collect state information and/or the fault message of described selected I/O interface;
Collected described state information and/or fault message are sent in the described application software corresponding with described state information and/or fault message by described communication link.
6. a data transmission device, be applied on the PC that is connected with network, and described PC is provided with multiple I/O interface, it is characterized in that, comprise: communication link module, instruction/data receiver module, instruction/data sending module, instruction fetch module, command analysis module, I/O interface select module and data transmission blocks, wherein:
Described communication link module is for setting up the communication link between the application software in network in other PC;
Described instruction/data receiver module is used for receiving the control command of described application software transmission and the data to be sent of described application software by described communication link;
Described instruction/data sending module is connected with described command reception module, for described control command is sent to command buffer, and the data to be sent of described application software is sent to data buffer zone;
Described instruction fetch module is connected with described command buffer, for reading described control command from described command buffer;
Described command analysis module is connected with described instruction fetch module, for resolving described control command, obtains data transfer instruction;
Described I/O interface selects module to be connected with described command analysis module, for selecting corresponding I/O interface according to described data transfer instruction;
Described data transmission blocks one end and described I/O interface select module to be connected, and the other end is connected with described data buffer zone, for the data described to be sent in described data buffer zone being sent by selected I/O interface.
7. device according to claim 6, is characterized in that, described command analysis module is connected with described instruction fetch module, for resolving described control command, obtains initialization directive, and this device also comprises: initialization directive module,
Described initialization directive module one end is connected with described command analysis module, and the other end and described I/O interface select module to be connected, and carries out initialization operation for controlling described selected I/O interface according to described initialization directive.
8. device according to claim 6, is characterized in that, described command analysis module is connected with described instruction fetch module, for resolving described control command, obtains operational order, and this device also comprises: operational order module,
Described operational order module one end is connected with described command analysis module, and the other end and described I/O interface select module to be connected, and opens for controlling described selected I/O interface or closes.
9. device according to claim 8, is characterized in that, described data transmission blocks comprises: I/O interface state acquisition module, I/O interface condition judgment module and data send submodule, wherein:
Described I/O interface state acquisition module and described I/O interface select module to be connected, for obtaining the state at described selected I/O interface;
Described I/O interface condition judgment module is connected with described I/O interface state acquisition module, for judging whether described selected I/O interface is opening;
Described data send submodule one end and are connected with described I/O interface condition judgment module, the other end is connected with described data buffer zone, for when the state of described selected I/O interface is opening, by described selected I/O interface, the data described to be sent in described data buffer zone are sent.
10. device according to claim 9, is characterized in that, also comprises state and returns module and feedback information sending module, wherein:
Described state returns module and sends submodule with described data and be connected, for collecting state information and/or the fault message of described selected I/O interface;
Described feedback information sending module returns module with described state and is connected, for collected described state information and/or fault message are sent to the described application software corresponding with described state information and/or fault message by described communication link.
CN201210576547.7A 2012-12-26 2012-12-26 A kind of data transmission method and device Active CN103078908B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210576547.7A CN103078908B (en) 2012-12-26 2012-12-26 A kind of data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210576547.7A CN103078908B (en) 2012-12-26 2012-12-26 A kind of data transmission method and device

Publications (2)

Publication Number Publication Date
CN103078908A CN103078908A (en) 2013-05-01
CN103078908B true CN103078908B (en) 2015-09-09

Family

ID=48155310

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210576547.7A Active CN103078908B (en) 2012-12-26 2012-12-26 A kind of data transmission method and device

Country Status (1)

Country Link
CN (1) CN103078908B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110543436B (en) * 2019-09-06 2021-09-24 北京云迹科技有限公司 Robot data acquisition method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067794A (en) * 2007-06-14 2007-11-07 中兴通讯股份有限公司 Multi-nuclear processor and serial port multiplexing method
CN101127992A (en) * 2007-09-20 2008-02-20 中兴通讯股份有限公司 Implementation method for concurrent execution of multiple services and mobile terminal using this method
CN101751291A (en) * 2009-12-30 2010-06-23 广东威创视讯科技股份有限公司 Method of sharing one serial port by application programs and device
CN102388583A (en) * 2011-09-19 2012-03-21 华为技术有限公司 Series rate allocation method, relative device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020016868A1 (en) * 1998-05-13 2002-02-07 Palm, Inc. Method and apparatus for serial port sharing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067794A (en) * 2007-06-14 2007-11-07 中兴通讯股份有限公司 Multi-nuclear processor and serial port multiplexing method
CN101127992A (en) * 2007-09-20 2008-02-20 中兴通讯股份有限公司 Implementation method for concurrent execution of multiple services and mobile terminal using this method
CN101751291A (en) * 2009-12-30 2010-06-23 广东威创视讯科技股份有限公司 Method of sharing one serial port by application programs and device
CN102388583A (en) * 2011-09-19 2012-03-21 华为技术有限公司 Series rate allocation method, relative device and system

Also Published As

Publication number Publication date
CN103078908A (en) 2013-05-01

Similar Documents

Publication Publication Date Title
CN104079492B (en) The methods, devices and systems that flow table is configured in a kind of OpenFlow networks
CN101494602B (en) Energy-saving method and apparatus for communication equipment
CN203136178U (en) Wireless ad hoc network test platform
CN101345629A (en) Double on-site bus interface converter
CN103248526A (en) Communication equipment and method for achieving out-of-band monitoring and management, and master-slave switching method
CN101447915A (en) Method for realizing automatic and smooth switch among different network topology structures and network device thereof
Koumpis et al. Wireless industrial control and monitoring beyond cable replacement
CN102427417A (en) System and method for remotely controlling Internet of things access equipment
RU2005102405A (en) REMOTE INTERACTION THROUGH A WIRELESS NETWORK WITH A DIAGNOSTIC INTERFACE PLACED ON A WIRELESS DEVICE
CN105848235A (en) Communication control method and device
CN203167301U (en) Gatewayconverting WiFi to ZigBee
CN103078908B (en) A kind of data transmission method and device
CN101262371A (en) Configuration method and device of network devices
CN102195821B (en) Method for configuring network equipment
CN100396031C (en) System and method for testing function of communication apparatus
CN206977445U (en) Extensive mimo wireless communication analog platform based on server architecture
CN202424722U (en) Remote control optical switch equipment for Ethernet passive optical network (EPON) system simulation experiment
CN202231737U (en) A multi-state information interaction system based on a plurality of networks
CN201323593Y (en) Network device for automatic smooth switching between various network topology structures
CN103066458A (en) Multi-node socket system and control method thereof
CN100359971C (en) Reglation testing axiliary interface device of radio base station and testing system using it
CN101420373B (en) Method for switching between two types of network packets and network apparatus therefor
CN201285536Y (en) Remote management system for server
CN209000000U (en) A kind of serial ports switching network transmitting device
CN104508632B (en) A kind of data forwarding method, apparatus and system

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 4 / F, building 1, No.14 Jiuxianqiao Road, Chaoyang District, Beijing 100020

Patentee after: Beijing Jingwei Hirain Technologies Co.,Inc.

Address before: 100101 Beijing city Chaoyang District Anxiang Beili 11 B block 8 layer

Patentee before: Beijing Jingwei HiRain Technologies Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230605

Address after: 100192 5th floor, Zhizhen building, 7 Zhichun Road, Haidian District, Beijing

Patentee after: BEIJING RUNKE GENERAL TECHNOLOGY Co.,Ltd.

Address before: 4 / F, building 1, No.14 Jiuxianqiao Road, Chaoyang District, Beijing 100020

Patentee before: Beijing Jingwei Hirain Technologies Co.,Inc.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240207

Address after: 4 / F, building 1, No.14 Jiuxianqiao Road, Chaoyang District, Beijing 100020

Patentee after: Beijing Jingwei Hirain Technologies Co.,Inc.

Country or region after: China

Address before: 100192 5th floor, Zhizhen building, 7 Zhichun Road, Haidian District, Beijing

Patentee before: BEIJING RUNKE GENERAL TECHNOLOGY Co.,Ltd.

Country or region before: China