CN103559023B - Interface conversion method and device - Google Patents
Interface conversion method and device Download PDFInfo
- Publication number
- CN103559023B CN103559023B CN201310374060.5A CN201310374060A CN103559023B CN 103559023 B CN103559023 B CN 103559023B CN 201310374060 A CN201310374060 A CN 201310374060A CN 103559023 B CN103559023 B CN 103559023B
- Authority
- CN
- China
- Prior art keywords
- interface
- input
- function
- board
- cstring
- 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
Links
Landscapes
- Bus Control (AREA)
- Automatic Analysis And Handling Materials Therefor (AREA)
Abstract
The invention discloses a kind of interface conversion method and device, it is related to TT&C system technical field, the unification of interface can be realized.This method includes:Receive the interface message of user's input;According to the interface message preset interface function, the input/output end port of interface is set;Default interface function and the input/output end port set are added to processed functional module, the interface function of addition is used to control the functional module, and the input/output end port of addition is used for the input/output for realizing the function module data.It is mainly used in TT&C system interface conversion.
Description
Technical field
The present invention relates to TT&C system technical field, more particularly to a kind of interface conversion method and device.
Background technology
Many technical fields are directed to TT&C system, and TT&C system generally comprises multiple functional modules, with guided missile inertial navigation system
Exemplified by TT&C system in system, including:The hardware board functional modules such as AD analog input cards, Communication Card, counter board and its
His functional module, inventor has found that in the prior art, the ununified interface standard of each functional module causes observing and controlling function
The standardization level of module is relatively low, is unfavorable for the reuse of observing and controlling functional module.
The content of the invention
It is an object of the invention to overcome prior art deficiency, there is provided a kind of interface conversion method and device, Neng Goushi
The unification of existing interface.
In a first aspect, the embodiments of the invention provide a kind of interface conversion method, including:
Receive the interface message of user's input;
According to the interface message preset interface function, the input/output end port of interface is set;
Default interface function and the input/output end port set be added to processed functional module, addition connects
Mouthful function is used to controlling the functional module, the input/output end port of addition be used to realizing the input of the function module data/
Output.
Second aspect, with reference to the possible implementation of first aspect, in addition to:
User, to the functional module input test data, has handled user defeated by input port in the functional module
After the test data entered, the test data after the functional module is handled by output port transmission is received, for the work(
Energy module is tested and verified.
The third aspect, with reference to first aspect or the possible implementation of second aspect, the interface message includes:Interface name
Title, interface type, interface features, the input/output end port quantity of interface and interface port attribute.
Fourth aspect, with reference to the possible implementation of the third aspect, the interface type includes board class interface, control class
Interface, storage class interface, display class interface and class of algorithms interface;
The interface features include only configuration characteristic, only interfacial characteristics and have configuration and interfacial characteristics concurrently;
The port attribute includes port type, port position and data flow.
5th aspect, with reference to the possible implementation of fourth aspect, the interface function includes Init (), Step (int
NPortNo), in Draw (CDC*dc, intnNo), Notify (CString &strXML) and PopPropertyDlg () extremely
Few one kind, for board class interface, the interface function also includes OpenCard (CString &strXML), CloseCard
(CString &strXML)、ResetCard(CString &strXML)、InitCard(CString &strXML)、
ResetCardChannel (int nChannel) and InitCardChannel (int nChannel), wherein, Init () is used
In the initialization of corresponding function module, Step (int nPortNo) is used to circulate the concrete function for performing corresponding function module,
Draw (CDC*dc, int nNo) is used for the drawing function for completing corresponding function module, and Notify (CString &strXML) is used
In the reception and sending function that complete corresponding function module message, PopPropertyDlg () is used to customize corresponding function module
Properties dialog, OpenCard (CString &strXML) be used for open board, CloseCard (CString &strXML)
For closing board, ResetCard (CString) is used to reset board, InitCard (CString)
For initializing board, ResetCardChannel (int nChannel) is used for some passage for resetting board,
InitCardChannel (int nChannel) is used for some passage for initializing board.
6th aspect, a kind of interface switching device, including:
Receiving unit, the interface message for receiving user's input preserves the interface message, and by the interface message
Sent to function converting unit;
Function converting unit, for receiving the interface message that the receiving unit is sent, according to the interface message
Preset interface function, sets the input/output end port of interface, and sends described interface function and defeated to function add module
Enter/output port;
Function add module, for receiving interface function and input/output described in the function converting unit transmission
Port, processed functional module is added to by described interface function and input/output end port, and the interface function of addition is used for
The functional module is controlled, the input/output end port of addition is used for the input/output for realizing the function module data.
7th aspect, with reference to the 6th possible implementation of aspect, in addition to:
Test cell, for after the test data that the functional module has handled user's input, receiving the function mould
Block is tested and verified to the functional module by the test data after output port transmission processing.
Eighth aspect, with reference to the 6th aspect or the 7th possible implementation of aspect, the interface message includes:Interface name
Title, interface type, interface features, the input/output end port quantity of interface and interface port attribute.
9th aspect, with reference to the possible implementation of eighth aspect, the interface type includes board class interface, control class
Interface, storage class interface, display class interface and class of algorithms interface;
The interface features include only configuration characteristic, only interfacial characteristics and have configuration and interfacial characteristics concurrently;
The port attribute includes port type, port position and data flow.
Tenth aspect, with reference to the 9th possible implementation of aspect, the interface function includes Init (), Step (int
NPortNo), in Draw (CDC*dc, int nNo), Notify (CString & strXML) and PopPropertyDlg ()
At least one, for board class interface, the interface function also includes OpenCard (CString &strXML), CloseCard
(CString &strXML)、ResetCard(CString &strXML)、InitCard(CString &strXML)、
ResetCardChannel (int nChannel) and InitCardChannel (int nChannel), wherein, Init () is used
In the initialization of corresponding function module, Step (int nPortNo) is used to circulate the concrete function for performing corresponding function module,
Draw (CDC*dc, int nNo) is used for the drawing function for completing corresponding function module, and Notify (CString &strXML) is used
In the reception and sending function that complete corresponding function module message, PopPropertyDlg () is used to customize corresponding function module
Properties dialog, OpenCard (CString &strXML) be used for open board, CloseCard (CString &
StrXML) it is used to close board, ResetCard (CString & strXML) is used to reset board, InitCard (CString
& strXML) it is used to initialize board, ResetCardChannel (int nChanne1) is used for some passage for resetting board,
InitCardChannel (int nChannel) is used for some passage for initializing board.
Interface conversion method and device that the present invention is provided:By receiving the interface message that user inputs;Connect according to described
Message ceases preset interface function, sets the input/output end port of interface;By default interface function and the input/output set
Port is added to processed functional module, and the interface function of addition is used to control the functional module, the input/output of addition
Port is used for the input/output for realizing the function module data, and the functional module after conversion, which can be used as, has standard interface
Functional unit, the functional module changed is used identical standard interface function, realize the unification of interface.
Brief description of the drawings
Included accompanying drawing is used for providing being further understood from the embodiment of the present invention, which constitutes one of specification
Point, for illustrating embodiments of the invention, and the principle for the explaination present invention that comes together with word description.It should be evident that below
Accompanying drawing in description is only some embodiments of the present invention, for those of ordinary skill in the art, is not paying creation
Property work on the premise of, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of flow chart of interface conversion method in the embodiment of the present invention;
Fig. 2 is the flow chart of another interface conversion method in the embodiment of the present invention;
Fig. 3 is a kind of structure chart of interface switching device in the embodiment of the present invention;
Fig. 4 is the structure chart of another interface switching device in the embodiment of the present invention;
Fig. 5 is the interface switching device structure chart applied in inertial navigation system in the embodiment of the present invention;
Fig. 6 is AD analog input card theory of constitution figures in Fig. 5;
Fig. 7 is serial communication board theory of constitution figure in Fig. 5;
Fig. 8 is CAN Communication Card theory of constitution figure in Fig. 5;
Fig. 9 is Fig. 5 Counter board theory of constitution figures.
Embodiment
The specific embodiment of the present invention is described in detail below in conjunction with accompanying drawing.In the following description, for solution
Release and nonrestrictive purpose, elaborate detail, to help to be apparent from the present invention.However, to people in the art
It is readily apparent that the present invention can also be put into practice in the other embodiments departing from these details for member.
Herein it should be noted that in order to avoid having obscured the present invention because of unnecessary details, only showing in the accompanying drawings
Gone out with according to the closely related device structure of the solution of the present invention and/or process step, and eliminate with relation of the present invention not
Big other details.
The embodiments of the invention provide a kind of interface conversion method, turned for the skimble-scamble functional module of docking port
Change, the functional module after conversion can be as the functional unit with standard interface, and the standardization level of functional unit is higher, has
Beneficial to the reuse of functional unit.This method is realized by interface switching device, as shown in figure 1, this method includes:
101st, the interface message of user's input is received;
Interface switching device can be provided with input dialogue frame, and operating personnel (i.e. user) are according to the work(of Implement of Function Module
Can, the interface message of the functional module corresponding interface is determined, and by dialog box input interface information, the interface message is used for
Preset interface function and the input/output end port that interface is set.
102nd, according to the interface message preset interface function, the input/output end port of interface is set;
Preset interface function can use various existing interface functions as needed, and it is defeated that interface switching device collects user
The interface message entered, port is set according to the input/output end port quantity of interface.
The 103rd, the input/output end port of default interface function and setting is added to processed functional module, is added
Interface function be used to control the functional module, the input/output end port of addition is used to realize the function module data
Input/output.
Functional module after above-mentioned interface switching device processing, is all controlled, Ke Yizuo using unified preset interface function
Used for One function component.
The interface conversion method that the present embodiment is provided:By receiving the interface message that user inputs;Believed according to the interface
Preset interface function is ceased, the input/output end port of interface is set;By default interface function and the input/output end port set
It is added to processed functional module, the interface function of addition is used to control the functional module, the input/output end port of addition
Input/output for realizing the function module data, the functional module after conversion can be used as the work(with standard interface
Energy component, makes the functional module changed use identical standard interface function, realizes the unification of interface.
As a kind of the improving to Fig. 1 correspondence embodiments, the embodiments of the invention provide another interface conversion method, use
In the skimble-scamble functional module of interface is converted into the functional unit with standard interface, as shown in Fig. 2 this method includes:
201st, the interface message of user's input is received;
Interface switching device can be provided with input dialogue frame, and operating personnel (i.e. user) are according to the work(of Implement of Function Module
Can, the interface message of the functional module corresponding interface is determined, and by dialog box input interface information, the interface message is used for
Preset interface function and the input/output end port that interface is set.
Specifically, the interface message can include:Interface name, interface type, interface features, the input/defeated of interface
Exit port quantity and interface port attribute.
Wherein it is possible to function and type the setting interface name completed according to functional module, such as serial communication board component,
CAN Communication Card component etc..
The interface type includes but is not limited to:Board class interface, control class interface, storage class interface, display class interface
With class of algorithms interface;
The interface features include only configuration characteristic, only interfacial characteristics and have configuration and interfacial characteristics concurrently;
The port attribute includes:Port type, port position and data flow.
Below by the specific operation process of example in detail step 201:
First, user sets observing and controlling component Name to be " serial communication board component ", and its corresponding class name is set to
CComCard。
Then, the type for setting interface is " board class interface ".
Afterwards, it is " only configuration characteristic " to set the characteristic of interface.
Finally, the input/output port of interface is set, two ports are set for the component, the type of a port is
" floating type ", port position are that " left side ", data flow are " input ";The type of second port is " floating type ", port position
It is " output " for " right side ", data flow.
The embodiment of the present invention sets the concrete mode of above-mentioned interface message not limit user, can be art technology
Any-mode known to personnel, such as can be by way of drop-down menu carries out selection, can also be by the side that directly inputs
Formula.
202nd, according to the interface message preset interface function, the input/output end port of interface is set;
Preset interface function can use various existing interface functions as needed, and it is defeated that interface switching device collects user
The interface message entered, port is set according to the input/output end port quantity of interface.
Specifically, the interface function include Init (), Step (int nPortNo), Draw (CDC*dc, intnNo),
At least one of Notify (CString &strXML) and PopPropertyDlg (), it is described to connect for board class interface
Mouth function also includes OpenCard (CString &strXML), CloseCard (CString &strXML), ResetCard
(CString &strXML), InitCard (CString &strXML), ResetCardChannel (int nChannel) and
InitCardChannel (int nChannel), wherein, Init () is used for the initialization of corresponding function module, Step (int
NPortNo) circulation performs the concrete function of corresponding function module, and Draw (CDC*dc, int nNo) is used to complete corresponding function mould
The drawing function of block, Notify (CString & strXML) is used for the reception for completing corresponding function module message and sends work(
Can, PopPropertyDlg () is used for the properties dialog for customizing corresponding function module, OpenCard (CString &
StrXML) it is used to open board, CloseCard (CString &strXML) is used to close board, ResetCard (CString
&strXML) it is used to reset board, InitCard (CString) is used to initialize board, ResetCardChannel
(int nChannel) is used for some passage for resetting board, and InitCardChannel (int nChannel) is used to initialize
Some passage of board.
Specifically, 2 ports set are, input port PORT_IN, PORT_TYPE_FLOAT, LEFT_BORDER),
Output port PORT_OUT, PORT_TYPE_FLOAT, RIGHT_BORDER).
The 203rd, the input/output end port of default interface function and setting is added to processed functional module, is added
Interface function be used to control the functional module, the input/output end port of addition is used to realize the function module data
Input/output.
Functional module after above-mentioned interface switching device processing, is all controlled, Ke Yizuo using unified preset interface function
Used for One function component.
Using the default processed module of interface function control in step 202 example, the input/output end port of addition is used
Realize the input/output of processed module data.
204th, user by input port to the functional module input test data after conversion;
In order to which above-mentioned functions module is tested and verified, judge whether the function of interface is normal, if satisfaction is used
It is required that, interface switching device can receive the test data that user inputs by input port, and test data can be set in advance
What put or user was set temporarily as needed.
205th, after the test data that the functional module has handled user's input, receive the functional module after conversion and pass through
Test data after output port transmission processing, for the functional module to be tested and verified.
If hardware board interface, then directly apply input signal in hardware board port.For AD collection plate clampings
Mouthful, it is necessary to board input apply analog signalses, for example AD boards 0 passage apply a 3V voltage signal, see
Whether the magnitude of voltage for examining input port is 3V, if it is shows that AD analog input cards interface function is normal, otherwise shows that function is different
Often.
For Communication Card interface, apply the communication data signal of byte type in board input channel, can choose here
Serial communication board or CAN Communication Card.For example apply communication data 0X11,0X12,0X13,0X14 of 5 bytes
And 0X15, whether the data that observation Communication Card input port is received are 0X11,0X12,0X13,0X14 and 0X15;In communication
Board output port sends the communication data signal of byte type, for example send 3 bytes communication data 0XAA, 0XBB and
0XCC, observes whether the data received in board output channel are 0XAA, 0XBB and 0XCC, so as to judge Communication Card interface
Whether function is normal.
For counter board, it is necessary to apply pulse signal in board input, apply in board input within such as 1 second
1000 pulse signals, whether the observation counter board input port count value of 1 second is 1000, is to show counter plate
Card interface function is normal, otherwise shows dysfunction.
If not hardware board interface, then input signal is applied by interface port, the input signal needs and interface
The type matching of input port.Such as adder interface, input/output port type is shaping, the two of adder interface
Individual input port sets input value to be respectively 1 and 2, and whether the value of observation interface output port is 3, if it is shows adder
Interface function is normal, otherwise shows dysfunction.
If test and the result show that interface function is normal, terminate test and verification process, interface can be normal
Use;If test and the result show that interface function is abnormal, the interface switching device using the present invention is needed, modification is simultaneously
Again change, repeat above-mentioned test and verification process, docking port is tested and verified again, until interface function is normal, knot
Beam is tested and verification process.
The interface conversion method that the present embodiment is provided:By receiving the interface message that user inputs;Believed according to the interface
Preset interface function is ceased, the input/output end port of interface is set;By default interface function and the input/output end port set
It is added to processed functional module, the interface function of addition is used to control the functional module, the input/output end port of addition
Input/output for realizing the function module data, the functional module after conversion can be used as the work(with standard interface
Energy component, makes the functional module changed use identical standard interface function, realizes the unification of interface.
In order to coordinate the implementation of the above method, the embodiments of the invention provide a kind of interface switching device, as shown in figure 3,
Including:Receiving unit 31, function converting unit 32, function add module 33.
Receiving unit 31, the interface message for receiving user's input, preserves the interface message, and the interface is believed
Cease and sent to function converting unit;
Function converting unit 32, for receiving the interface message that the receiving unit is sent, believes according to the interface
Preset interface function is ceased, the input/output end port of interface is set, and described interface function is sent and defeated to function add module
Enter/output port;
Function add module 33, for receive the function converting unit send described in interface function and input/defeated
Exit port, processed functional module is added to by described interface function and input/output end port, and the interface function of addition is used
In controlling the functional module, the input/output end port of addition is used for the input/output for realizing the function module data;
Functional module after conversion can be used as the functional unit with standard interface.
The interface switching device that the present embodiment is provided:By receiving the interface message that user inputs;Believed according to the interface
Preset interface function is ceased, the input/output end port of interface is set;By default interface function and the input/output end port set
It is added to processed functional module, the interface function of addition is used to control the functional module, the input/output end port of addition
Input/output for realizing the function module data, the functional module after conversion can be used as the work(with standard interface
Energy component, makes the functional module changed use identical standard interface function, realizes the unification of interface.
As a kind of the improving of Fig. 3 correspondence embodiments, the embodiment of the present invention provides another interface switching device, such as Fig. 4
It is shown, including:Receiving unit 41, function converting unit 42, function add module 43, test cell 44.
Receiving unit 41, the interface message for receiving user's input, preserves the interface message, and the interface is believed
Cease and sent to function converting unit;
Specifically, the interface message can include:Interface name, interface type, interface features, the input/defeated of interface
Exit port quantity and interface port attribute.
Further, the interface type includes board class interface, control class interface, storage class interface, display class interface
With class of algorithms interface;
The interface features include only configuration characteristic, only interfacial characteristics and have configuration and interfacial characteristics concurrently;
The port attribute includes port type, port position and data flow.
Function converting unit 42, for receiving the interface message that the receiving unit is sent, believes according to the interface
Preset interface function is ceased, the input/output end port of interface is set, and described interface function is sent and defeated to function add module
Enter/output port;
Specifically, the interface function include Init (), Step (intnPortNo), Draw (CDC*dc, intnNo),
At least one of Notify (CString &strXML) and PopPropertyDlg (), it is described to connect for board class interface
Mouth function also includes OpenCard (CString &strXML), CloseCard (CString &strXML), ResetCard
(CString &strXML), InitCard (CString &strXML), ResetCardChannel (int nChannel) and
InitCardChannel (int nChannel), wherein, Init () is used for the initialization of corresponding function module, Step (int
NPortNo) circulation performs the concrete function of corresponding function module, and Draw (CDC*dc, intnNo) is used to complete corresponding function mould
The drawing function of block, Notify (CString &strXML) is used for reception and the sending function for completing corresponding function module message,
PopPropertyDlg () is used for the properties dialog for customizing corresponding function module, and OpenCard (CString &strXML) is used
In opening board, CloseCard (CString &strXML) is used to close board, ResetCard (CString & strXML)
For resetting board, InitCard (CString) is used to initialize board, ResetCardChannel (int
NChannel) it is used for some passage for resetting board, InitCardChannel (int nChannel) is used to initialize board
Some passage.
Function add module 43, for receive the function converting unit send described in interface function and input/defeated
Exit port, processed functional module is added to by described interface function and input/output end port, and the interface function of addition is used
In controlling the functional module, the input/output end port of addition is used for the input/output for realizing the function module data.
Test cell 44, for the functional module handled user input test data after, after interface conversion
Functional module is tested and verified to the functional module by the test data after output port transmission processing.
The interface switching device that the present embodiment is provided:By receiving the interface message that user inputs;Believed according to the interface
Preset interface function is ceased, the input/output end port of interface is set;By default interface function and the input/output end port set
It is added to processed functional module, the interface function of addition is used to control the functional module, the input/output end port of addition
Input/output for realizing the function module data, the functional module after conversion can be used as the work(with standard interface
Energy component, makes the functional module changed use identical standard interface function, realizes the unification of interface.
The inertial navigation observing and controlling system it should be noted that interface conversion method provided in an embodiment of the present invention and device are particularly suitable for use in
The observing and controlling functional module used in system, the below application to said apparatus in inertial navigation system is illustrated:
As shown in figure 5, the interface switching device applied in inertial navigation system includes:1st, computer bus, 2, AD collection plates
Block for realizing analog acquisition function, 3, serial communication board be used to realizing the communication function with inertial navigation system, 4, CAN
Communication Card be used to realizing with the communication function of inertial navigation system, 5, counter board be used to realizing tally function, 6, receiving unit,
7th, function converting unit, 8, function add module, 9, test cell.
Wherein, AD analog input cards theory of constitution is as shown in fig. 6, including bus interface controller, by control data based on
Transmission in calculation machine bus, FPGA control modules, the logic control for realizing AD collections, gathered data cache module is used for
The data collected are stored, AD collection modular converters, for the analog quantity collected to be converted into digital quantity, analog quantity
Input module, the analog signalses for receiving input;AD analog input cards are used for the collection for realizing analog signalses.
Serial communication board theory of constitution is as shown in fig. 7, comprises bus interface controller, for control data in computer
Transmission in bus, FPGA control modules, the logic control for realizing serial communication, data memory module, for communication
Data are preserved, electromagnetic isolation module, the isolation for realizing input/output signal, data collector, for realizing data
Reception and transmission, serial ports input/output module, for realize communication data input/output control;Serial communication board is used
Communicated in realizing with inertial navigation system.
CAN Communication Card theory of constitution is as shown in figure 8, including bus interface controller, by control data based on
Transmission in calculation machine bus, FPGA control modules, the logic control for realizing CAN communication, data memory module is used for
Communication data is preserved, CAN controller, realize the coding and decoding of data, photoelectric isolation module realizes input/output
The isolation of signal, CAN driver, for transmission of the control data in CAN, CAN, for realizing that data are passed
It is defeated;CAN Communication Card is used to realize to be communicated with inertial navigation system.
Counter board theory of constitution is total in computer for control data as shown in figure 9, including bus interface controller
Transmission on line, FPGA control modules, the logic control for realizing counter, data memory module, for being carried out to data
Preserve, photoelectric isolation module, the isolation for realizing input signal, pulse input driver, for entering to pulse input signal
Row control;Counter board is used to realize tally function.
In order to gather the analog signalses of inertial navigation system, the arteries and veins of inertial navigation system is communicated, gathered with inertial navigation system
Signal is rushed, therefore, AD analog input cards, Communication Card and counter plate are with the addition of in the interface switching device of the embodiment of the present invention
Card, equally,, can also basis during using interface switching device provided in an embodiment of the present invention in order to adapt to other TT&C systems
Need to add corresponding soft and hardware module.
Described as described above for a kind of embodiment and/or the feature that shows can be in same or similar mode at one or more
Used in a number of other embodiments, and/or the feature in other embodiments is combined or substitutes with the feature in other embodiments
Use.
It should be emphasized that term "comprises/comprising" refers to the presence of feature, one integral piece, step or component when being used herein, but simultaneously
It is not excluded for one or more further features, one integral piece, step, component or the presence of its combination or additional.
Apparatus and method more than of the invention can be realized by hardware, can also be realized by combination of hardware software.The present invention
It is related to such computer-readable program, when the program is performed by logical block, the logical block can be made to realize above
Described device or component parts, or the logical block is realized various methods or step described above.The invention further relates to
Storage medium for storing procedure above, such as hard disk, disk, CD, DVD, flash memory.
The many features and advantage of these embodiments are clear according to the detailed description, therefore appended claims are intended to
Cover all these feature and advantage fallen into its true spirit and scope of these embodiments.Further, since this area
Technical staff is readily apparent that many modifications and changes, therefore is not meant to embodiments of the invention being limited to illustrated and description essence
Really structurally and operationally, but all suitable modifications and the equivalent fallen into the range of it can be covered.
Unspecified part of the present invention is known to the skilled person technology.
Claims (4)
1. a kind of interface conversion method, it is characterised in that including:
The interface message of user's input is received, the interface message includes:Interface name, interface type, interface features, interface
Input/output end port quantity and interface port attribute, the interface type include:Board class interface, control class interface, storage class
Interface, display class interface and class of algorithms interface, the interface features include only configuration characteristic, only interfacial characteristics and have group concurrently
State and interfacial characteristics;
According to the interface message preset interface function, the input/output port of interface is set;
Default interface function and the input/output port set are added to processed functional module, the interface function of addition
For controlling the functional module, the input/output port of addition is used for the input and output for realizing the function module data;
User, to the functional module input test data, user's input has been handled in the functional module by input port
After test data, the test data after the functional module is handled by output port transmission is received, for the function mould
Block is tested and verified, if hardware board interface, then directly applies input signal in hardware board port, adopted for AD
Collect board interface, analog signalses are applied in board input, for Communication Card interface, byte is applied in board input channel
The communication data signal of type, the communication data signal of byte type is sent in Communication Card output port, for counter board,
Board input applies pulse signal, if not hardware board interface, then applies input signal, the input by interface port
Signal needs the type matching with Interface input port.
2. according to the method described in claim 1, it is characterised in that the interface function includes Init (), Step (int
NPortNo), in Draw (CDC * dc, int nNo), Notify (CString &strXML) and PopPropertyDlg ()
At least one, for board class interface, the interface function also includes OpenCard (CString &strXML), CloseCard
(CString &strXML)、ResetCard(CString &strXML)、InitCard(CString &strXML)、
ResetCardChannel (int nChannel) and InitCardChannel (int nChannel), wherein, Init () is used
In the initialization of corresponding function module, Step (int nPortNo) is used to circulate the concrete function for performing corresponding function module,
Draw (CDC * dc, int nNo) is used for the drawing function for completing corresponding function module, and Notify (CString &strXML) is used
In the reception and sending function that complete corresponding function module message, PopPropertyDlg () is used to customize corresponding function module
Properties dialog, OpenCard (CString &strXML) be used for open board, CloseCard (CString &strXML)
For closing board, ResetCard (CString) is used to reset board, InitCard (CString)
For initializing board, ResetCardChannel (int nChannel) is used for some passage for resetting board,
InitCardChannel (int nChannel) is used for some passage for initializing board.
3. a kind of interface switching device, it is characterised in that including:
Receiving unit, the interface message for receiving user's input preserves the interface message, and by the interface message to letter
Number converting unit is sent, and the interface message includes:Interface name, interface type, interface features, the input/output terminal of interface
Mouth quantity and interface port attribute, the interface type include:Board class interface, control class interface, storage class interface, display class
Interface and class of algorithms interface, the interface features include only configuration characteristic, only interfacial characteristics and to have configuration and interface concurrently special
Property;
Function converting unit, it is default according to the interface message for receiving the interface message that the receiving unit is sent
Interface function, sets the input/output port of interface, and the interface function described in the transmission of function add module and input and output
Port;
Function add module, for receiving interface function and input/output port described in the function converting unit transmission,
Described interface function and input/output port are added to processed functional module, the interface function of addition is used to control institute
Functional module is stated, the input/output port of addition is used for the input and output for realizing the function module data;
Test cell, leads to for after the test data that the functional module has handled user's input, receiving the functional module
The test data crossed after output port transmission processing, for the functional module to be tested and verified, if hardware plate
Card interface, then directly apply input signal in hardware board port, and for AD analog input card interfaces, mould is applied in board input
Analog quantity signal, for Communication Card interface, the communication data signal of byte type is applied in board input channel, defeated in Communication Card
Exit port sends the communication data signal of byte type, for counter board, applies pulse signal in board input, if not
It is hardware board interface, then input signal is applied by interface port, the input signal needs the type with Interface input port
Match.
4. device according to claim 3, it is characterised in that the interface function includes Init (), Step (int
NPortNo), in Draw (CDC*dc, int nNo), Notify (CString &strXML) and PopPropertyDlg ()
At least one, for board class interface, the interface function also includes OpenCard (CString &strXML), CloseCard
(CString &strXML)、ResetCard(CString &strXML)、InitCard(CString &strXML)、
ResetCardChannel (int nChannel) and InitCardChannel (int nChannel), wherein, Init () is used
In the initialization of corresponding function module, Step (int nPortNo) is used to circulate the concrete function for performing corresponding function module,
Draw (CDC*dc, int nNo) is used for the drawing function for completing corresponding function module, and Notify (CString &strXML) is used
In the reception and sending function that complete corresponding function module message, PopPropertyDlg () is used to customize corresponding function module
Properties dialog, OpenCard (CString &strXML) be used for open board, CloseCard (CString &strXML)
For closing board, ResetCard (CString) is used to reset board, InitCard (CString)
For initializing board, ResetCardChannel (int nChannel) is used for some passage for resetting board,
InitCardChannel (int nChannel) is used for some passage for initializing board.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310374060.5A CN103559023B (en) | 2013-08-23 | 2013-08-23 | Interface conversion method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310374060.5A CN103559023B (en) | 2013-08-23 | 2013-08-23 | Interface conversion method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103559023A CN103559023A (en) | 2014-02-05 |
CN103559023B true CN103559023B (en) | 2017-09-22 |
Family
ID=50013279
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310374060.5A Active CN103559023B (en) | 2013-08-23 | 2013-08-23 | Interface conversion method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103559023B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104572117A (en) * | 2015-01-26 | 2015-04-29 | 浪潮通用软件有限公司 | Reserved interface implementation method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6904373B2 (en) * | 2002-09-30 | 2005-06-07 | Intel Corporation | USB-controllable power supply |
CN101833498A (en) * | 2009-07-31 | 2010-09-15 | 北京伟晨豪嘉科技有限责任公司 | Automatic detection system of embedded type system based on testing script technique |
CN101944026A (en) * | 2010-09-21 | 2011-01-12 | 中国人民解放军63961部队 | Implementation method of universal virtual instrument interface |
CN202394222U (en) * | 2011-09-22 | 2012-08-22 | 航天科工惯性技术有限公司 | 1553B communication interface detector |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040002832A1 (en) * | 2002-05-20 | 2004-01-01 | Chan Patrick P. | Method and apparatus for boundary scan of serial interfaces |
-
2013
- 2013-08-23 CN CN201310374060.5A patent/CN103559023B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6904373B2 (en) * | 2002-09-30 | 2005-06-07 | Intel Corporation | USB-controllable power supply |
CN101833498A (en) * | 2009-07-31 | 2010-09-15 | 北京伟晨豪嘉科技有限责任公司 | Automatic detection system of embedded type system based on testing script technique |
CN101944026A (en) * | 2010-09-21 | 2011-01-12 | 中国人民解放军63961部队 | Implementation method of universal virtual instrument interface |
CN202394222U (en) * | 2011-09-22 | 2012-08-22 | 航天科工惯性技术有限公司 | 1553B communication interface detector |
Non-Patent Citations (1)
Title |
---|
通用电子测量仪器多种通信接口转换模块的设计与实现;董锦;《万方数据库》;20120731;第67-71页 * |
Also Published As
Publication number | Publication date |
---|---|
CN103559023A (en) | 2014-02-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103986931B (en) | Method for transmitting video data on FPGA and DSP structure on basis of SRIO bus | |
CN207267773U (en) | Elevator for intelligent building | |
CN103559023B (en) | Interface conversion method and device | |
CN106100939A (en) | The network equipment starts time test method and test console | |
CN103577294A (en) | Methods and apparatuses for interconnect tracing | |
CN107678984A (en) | USB port mapping method and computer-readable recording medium | |
CN110069827A (en) | Placement-and-routing's method and apparatus of the online logic analyser of FPGA | |
CN109034114A (en) | A kind of ear examines method, equipment, system and computer-readable medium | |
CN109358927A (en) | The method, apparatus and terminal device that application program is shown | |
CN109583318A (en) | Medicinal plant recognition methods, device and computer equipment | |
CN205195871U (en) | Examination hall monitored control system | |
CN104897990A (en) | Method and apparatus for automatic occurrence of passing behavior for ticket checker | |
Guo et al. | Design of high speed pulse data acquisition system based on FPGA and USB | |
CN104378574A (en) | SoPC-based VGA (video graphics array) image collecting, compressing and storing device | |
CN203658991U (en) | Computer evidence obtaining system | |
CN106796505B (en) | The method and processor of instruction execution | |
CN208255909U (en) | One kind being based on embedded deep learning face identification device | |
CN110347639A (en) | System on chip and its operating method | |
CN104700208A (en) | Method for treatment and intelligent triage for outpatient treatment room and system thereof | |
CN208538086U (en) | Multi-way contral component and Medical Devices | |
CN107894869A (en) | A kind of method, terminal device and the computer-readable medium of split screen processing | |
CN107643965A (en) | A kind of server diagnostic method, system, equipment and computer storage medium | |
CN103876836A (en) | Method and device for controlling checking queues | |
CN110113494A (en) | The way of recording and relevant apparatus | |
CN205721895U (en) | A kind of microprocessor and the embedded Control circuit of SD card |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |