CN1975701A - Master machine driving external equipment method and system - Google Patents

Master machine driving external equipment method and system Download PDF

Info

Publication number
CN1975701A
CN1975701A CN 200610170647 CN200610170647A CN1975701A CN 1975701 A CN1975701 A CN 1975701A CN 200610170647 CN200610170647 CN 200610170647 CN 200610170647 A CN200610170647 A CN 200610170647A CN 1975701 A CN1975701 A CN 1975701A
Authority
CN
China
Prior art keywords
peripheral hardware
configuration
peripheral
machine driving
master machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200610170647
Other languages
Chinese (zh)
Other versions
CN1975701B (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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN2006101706474A priority Critical patent/CN1975701B/en
Publication of CN1975701A publication Critical patent/CN1975701A/en
Application granted granted Critical
Publication of CN1975701B publication Critical patent/CN1975701B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a method for host machine to drive peripherals, which includes below steps: configure instruction set of peripherals, generate configuration option files; receive requests from peripherals, call configuration option files to find the instruction corresponding to the request; Send to peripherals the control statement with the instruction as a parameter; the peripheral executes the instruction in the control statement. The invention also opens a system that host machines drive peripherals.

Description

The method and system of master machine driving external equipment
Technical field
The present invention relates to field of computer technology, relate in particular to a kind of method and system of master machine driving external equipment.
Background technology
In computer system as shown in Figure 1, main frame communicates by network and various peripheral hardware, in the time will operating certain peripheral hardware, by host application program peripheral hardware is driven.Peripheral hardware comprises various terminal devices such as notebook computer, printer, camera and scanner.
Master machine driving external equipment generally realizes that by the read-write serial paralled interface this mode directly drives peripheral hardware by host application program at present.For example, when will carrying out " closing " when operation to certain peripheral hardware, host application program is handed down to peripheral hardware with " out code " of this peripheral hardware parameter as control statement with control statement, peripheral hardware is carried out the instruction that control statement carries after receiving control statement, just carries out " closing " operation.As seen, main frame in this mode and peripheral hardware instruction binding are too tight, and often the change of peripheral hardware brand even model just causes the frequent change of application program, are unfavorable for the expansion of peripheral hardware and stablizing of application version.For example, when increasing a kind of peripheral hardware, just need in host application program, increase the instruction set of this kind peripheral hardware, and make adaptations, could newly-increased peripheral hardware be driven.
Another kind of mode is the physics instruction by the corresponding peripheral hardware of configuration in host data base, application program must increase logic determines, the instruction of searching corresponding peripheral hardware in the database drives peripheral hardware, this mode is still not too flexible, when increasing new peripheral hardware, need the configuration database table, and can cause the change of application version, and the peripheral hardware operational order is positioned in the database also not proper on safety.
As seen, above-mentioned two kinds of method disadvantage are that host application program and peripheral bundling are too tight, and the trickle change of peripheral hardware will cause the change of application program or the change of corresponding configuration table, are unfavorable for the expansion of peripheral hardware and stablizing of application program.
Summary of the invention
The method and system that the purpose of this invention is to provide a kind of master machine driving external equipment, with solve host application program too tight with peripheral bundling, be unfavorable for that peripheral hardware expands and the stable problem of application program.
For this reason, the present invention adopts following technical scheme:
A kind of method of master machine driving external equipment comprises step: configuration peripheral hardware instruction set generates the configuration parameter file; Receive the peripheral hardware operation requests, call described configuration parameter file, find the operation requests instruction corresponding; Sending with described instruction to peripheral hardware is the parameter control statement; Peripheral hardware is carried out the instruction that control statement carries.
Described method also comprises: peripheral hardware is to application program return result.
The process that peripheral hardware is configured is: the physical connection relation of configure host and peripheral hardware; The peripheral hardware tabulation that configure host is supported; The steering order that the configuration peripheral hardware is supported.
Configuration to peripheral hardware is to be finished by the peripheral configuration instrument that the ACE that is installed in main frame provides.
Described peripheral hardware operation requests comprises the peripheral hardware identifier, or/and, at the content of operation of this peripheral hardware.
A kind of system of master machine driving external equipment comprises main frame and peripheral hardware, and described main frame comprises peripheral configuration instrument, application program and configuration parameter file; Described peripheral configuration instrument is used for according to the peripheral hardware steering order collection of collecting peripheral hardware being configured, and generates the configuration parameter file; Described application program is used to receive the operation peripheral hardware request that the user sends, and call configuration option files finds the instruction of operation requests correspondence, will be handed down to peripheral hardware as the parameter control statement with instruction; Described peripheral hardware is used to carry out the instruction that control statement carries.
Described peripheral hardware also is used for to application program return result.
Described peripheral configuration instrument comprises that connecting configuration subelement, list configuration subelement and steering order disposes subelement; Described connection configuration subelement, the physical connection that is used for configure host and peripheral hardware concerns; Described list configuration subelement is used for the peripheral hardware tabulation that configure host is supported; Described steering order disposes subelement, is used to dispose the steering order of specific peripheral hardware.
Described peripheral hardware comprises: terminal, voucher printer, magnetic stripe read write line, code keypad, IC-card read write line or bar-code scanner.
The present invention adopts technique scheme, brings a lot of useful technique effects, such as:
(1) utilizes the peripheral configuration instrument that peripheral hardware is configured and generate the configuration parameter file, the host application program call configuration option files drives peripheral hardware, thereby shielded application program and directly called peripheral hardware, make the binding of application program and peripheral hardware no longer as so tight in the prior art, be beneficial to the expansion of peripheral hardware;
(2) in the time will driving newly-increased peripheral hardware, only need generate the configuration parameter file by easy configuration, can drive peripheral hardware, application program does not need to do any change, thereby has protected hardware resource, has strengthened the extensibility of system.
Description of drawings
Fig. 1 is prior art main frame and peripheral system synoptic diagram;
Fig. 2 is an ACE application model synoptic diagram;
Fig. 3 is a system schematic of the present invention;
Fig. 4 is the inventive method realization flow figure.
Embodiment
The present invention carries out command configuration by the peripheral configuration instrument to peripheral hardware, generate the configuration parameter file, the host application program call configuration option files, thus peripheral hardware is driven, avoid application program directly to drive peripheral hardware, be of value to the expansion of system hardware and stablizing of application version.
The peripheral configuration instrument is provided by the product A CE of Digital China Corporation.ACE is the operation platform of a cover at the host computer system development, and it can realize functions such as the required human-computer interaction interface control of foreground system, device drives, communication conveyer database manipulation.Referring to Fig. 2 is that the ACE typical case uses synoptic diagram.Main frame can communicate with terminal by ace server and client that ACE provides; Also can adopt site server and terminal to communicate.Can adopt the parametrization command driven for peripheral hardware, distinguish peripheral hardware by device number, but the Dynamic Selection peripheral hardware kind that is in operation, and same sales counter is supported the different model peripheral hardware simultaneously.When increasing new kind peripheral hardware, need to increase the configuration parameter file of new peripheral hardware, this configuration parameter file is finished by the peripheral configuration instrument.
The present invention collects the logical order collection of typical peripheral hardware, and by application call peripheral configuration instrument, the peripheral configuration instrument is configured peripheral hardware according to the peripheral hardware instruction set of collecting, and generates the configuration parameter file of peripheral hardware; When application program receives the user to the operation requests of peripheral hardware, call configuration option files then, the operational order that will obtain from call configuration option files is handed down to peripheral hardware as the parameter of control statement, and peripheral hardware is driven.
Fig. 3 is the system of master machine driving external equipment provided by the invention, comprise main frame 301 and peripheral hardware 302, main frame 301 comprises application program 310 and peripheral configuration instrument 311, and disposes the configuration parameter file 312 that generates by the logical order collection of 311 pairs of collections of peripheral configuration instrument.The value volume and range of product of peripheral hardware 302 is not limit, and can be terminal (PC), voucher printer, magnetic stripe read write line, code keypad, IC-card read write line and bar-code scanner etc., all kinds of peripheral hardware 302 corresponding configuration parameter files 312.
Unified control statement to peripheral hardware 302 comprises OPEN, CLOSE, READ and WRITE etc., when application program 310 receive user input to certain peripheral hardware 302 operational order the time, search configuration parameter file 312, obtain the instruction of operational order corresponding physical, utilize the parameter of this physics instruction as control statement, be handed down to peripheral hardware 302, realize its driving; And can receive the information that peripheral hardware 302 returns.
In realizing method provided by the invention, be the comparison critical step to peripheral configuration.311 pairs of peripheral hardware orders are configured, generate the process of configuration parameter file 312 for the peripheral configuration instrument, mainly comprise following three aspects:
1. main frame 301 disposes with peripheral hardware 302 physical relations: configure host 301 concerns with the physical connection of peripheral hardware 302; Peripheral hardware 302 can directly be connected with main frame 301, also can be articulated on the PC (terminal) that main frame 301 connects, and which kind of mode no matter, some or certain some peripheral hardware 302 all are a certain interface communications with main frame 301;
2. peripheral hardware 302 list configuration: the tabulation of configure host 301 supported peripheral hardware 302 types, just dispose pregenerated configuration parameter file 312 configuration names, be convenient to search configuration parameter file 312 by tabulation;
3. peripheral hardware 302 steering orders configuration: disposing the instruction that certain type of peripheral hardware 302 is finished specific function, is the core configuration part.
Therefore, peripheral configuration instrument 311 can be further divided into connection configuration subelement, list configuration subelement and steering order configuration subelement; Connect the configuration subelement and be used for configure host and peripheral hardware physical connection relation, promptly 1.; The list configuration subelement is used for the peripheral hardware tabulation that configure host is supported, promptly 2.; Steering order configuration subelement is used to dispose the steering order of specific peripheral hardware, promptly 3..
For example, be configured, determine that at first main frame 301 and its physical connection concern for code keypad; Dispose the code keypad title then, for example keyboard; At last, logical order and the physics instruction corresponding relation with code keypad commonly used is configured.The logical order of code keypad and physics instruction corresponding relation are shown in Table 1:
Table 1
Logical order The physics instruction
Open code keypad keyboard_open
Close code keypad keyboard_close
Detected state
Detect return code
The reseting cipher keyboard
The read data head
The read data tail
The bright order of red light
The bright order of green light
Wherein, physics instruction can be set arbitrarily, if satisfy can be employed program 310 unified control statement as parameter call and do not cause and obscure.After above-mentioned configuration, can generate the configuration parameter file 312 of keyboard by name.
When main frame 301 receives the operational order of code keypad, for example, the user will close code keypad, after then application program 310 receives this solicited message, call keyboard configuration parameter file 312 by name, find the instruction keyboard_close that closes the code keypad correspondence, with the parameter of keyboard_close as unified control statement, be handed down to code keypad, after code keypad receives order, carry out the operation of closing.
For other peripheral hardwares 302 such as PC terminal, voucher printer, magnetic stripe read write lines, its configuration and type of drive and code keypad are similar, do not repeat them here.
So far, can draw the flow process that realizes master machine driving external equipment,, may further comprise the steps referring to shown in Figure 4:
Step 401: utilize 311 pairs of peripheral hardwares 302 of peripheral configuration instrument to be configured, generate configuration parameter file 312;
Wherein, the configuration of peripheral hardware 302 is comprised that main frame 301 connects peripheral hardwares 302 type configuration, peripheral hardware 302 list configuration, and the configuration of peripheral hardware 302 steering orders.
Step 402: main frame 301 receives the operation requests of user to peripheral hardware 302;
Peripheral hardware 302 operation requests comprise peripheral hardware 302 identifiers and at the content of operation of this peripheral hardware 302, also promptly show at information such as 302 operations of which peripheral hardware and concrete operations contents.For example, request is to carrying out " closing " operation with " the j extra that the i interface is connected establishes 302 " of main frame 301.
Perhaps, the peripheral hardware operation requests includes only peripheral hardware 302 identifiers, and adopts the mode of default action content.
Step 403: main frame 301 application programs 310 are according to user's operation requests, call request configuration parameter corresponding file 312;
Step 404: find corresponding peripheral hardware 302 operational orders with operation requests in the configuration parameter file 312,, control statement is handed down to peripheral hardware 302 as the parameter of control statement;
Step 405: peripheral hardware 302 is carried out corresponding operating according to control statement, perhaps can also be simultaneously to application program return result.
With the embodiment of front end host driven code keypad in the banking system, the present invention is set forth at last.
This embodiment specifically may further comprise the steps:
Step 501: the front end main frame is installed the ACE product, by the peripheral configuration instrument among the host application program operation A CE; Utilize the peripheral configuration instrument that code keypad is configured, generate code keypad configuration parameter file, comprise all instruction set in this file the code keypad operation;
Step 502: the front end host application program receives the operation requests to code keypad, requires code keypad is carried out " detected state " operation;
Step 503: application program finds the code keypad configuration parameter file of code keypad correspondence therewith according to the information that operation requests provides, and finds instruction corresponding with " detected state " operation in the file and is " check ";
Step 504: application program is the parameter of this instruction " check " as control statement WRITE, and control statement WRITE is handed down to code keypad;
Step 505: after code keypad received and is parameter control statement WRITE with " check ", the operation of detected state was just carried out in the indicated operation of execution parameter " check ".
As seen, among the present invention, application program 310 does not directly drive peripheral hardware 302, but by call configuration option files 312, and mode that operational order is handed down to peripheral hardware 302 is finished and driven peripheral hardware 302.When increasing new peripheral hardware 302, only need utilize peripheral configuration instrument 311 that it is carried out easy configuration, generating configuration parameter file 312 gets final product, and do not need application programs 310 to do change, realized application program 310 " separation " with peripheral hardware 302, can make things convenient for the hardware device in the expanding system, and not need frequent the change or upgrading, just can finish driving all kinds of peripheral hardwares 302 for application program 310.In a word, the present invention has protected the hardware resource of system, has strengthened the extendability of system.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1, a kind of method of master machine driving external equipment is characterized in that comprising:
Configuration peripheral hardware instruction set generates the configuration parameter file;
Receive the peripheral hardware operation requests, call described configuration parameter file, find the operation requests instruction corresponding;
Sending with described operational order to peripheral hardware is the parameter control statement;
Peripheral hardware is carried out the operational order that control statement carries.
2, the method for master machine driving external equipment according to claim 1 is characterized in that, described method also comprises:
Peripheral hardware is to application program return result.
3, the method for master machine driving external equipment according to claim 1 and 2 is characterized in that, the process that peripheral hardware is configured is:
The physical connection relation of configure host and peripheral hardware; The peripheral hardware tabulation that configure host is supported; The configuration peripheral hardware support steering order.
4, the method for master machine driving external equipment according to claim 3 is characterized in that, peripheral configuration is to be finished by the peripheral configuration instrument that the ACE that is installed in main frame provides.
5, the method for front end master machine driving external equipment according to claim 3 is characterized in that, described peripheral hardware operation requests comprises the peripheral hardware identifier, or/and, at the content of operation of this peripheral hardware.
6, a kind of system of master machine driving external equipment, described system comprises main frame and peripheral hardware, it is characterized in that, described main frame comprises peripheral configuration instrument, application program and configuration parameter file;
Described peripheral configuration instrument is used for according to the peripheral hardware steering order collection of collecting peripheral hardware being configured, and generates the configuration parameter file;
Described application program is used to receive the operation peripheral hardware request that the user sends, and call configuration option files finds the instruction of operation requests correspondence, will be handed down to peripheral hardware as the parameter control statement with instruction;
Described peripheral hardware is used to carry out the instruction that control statement carries.
7, the system of master machine driving external equipment according to claim 6 is characterized in that, described peripheral hardware also is used for to application program return result.
According to the system of claim 6 or 7 described master machine driving external equipments, it is characterized in that 8, described peripheral configuration instrument comprises that connecting configuration subelement, list configuration subelement and steering order disposes subelement;
Described connection configuration subelement, the physical connection that is used for configure host and peripheral hardware concerns; Described list configuration subelement is used for the peripheral hardware tabulation that configure host is supported; Described steering order disposes subelement, is used to dispose the steering order of specific peripheral hardware.
9, the method for master machine driving external equipment according to claim 8 is characterized in that, described peripheral hardware comprises:
Terminal, voucher printer, magnetic stripe read write line, code keypad, IC-card read write line or bar-code scanner.
10, the method for master machine driving external equipment according to claim 8 is characterized in that, described peripheral configuration instrument is to be provided by the ACE that is installed in main frame.
CN2006101706474A 2006-12-22 2006-12-22 Master machine driving external equipment method and system Active CN1975701B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2006101706474A CN1975701B (en) 2006-12-22 2006-12-22 Master machine driving external equipment method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2006101706474A CN1975701B (en) 2006-12-22 2006-12-22 Master machine driving external equipment method and system

Publications (2)

Publication Number Publication Date
CN1975701A true CN1975701A (en) 2007-06-06
CN1975701B CN1975701B (en) 2012-02-15

Family

ID=38125777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2006101706474A Active CN1975701B (en) 2006-12-22 2006-12-22 Master machine driving external equipment method and system

Country Status (1)

Country Link
CN (1) CN1975701B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831707A (en) * 2012-08-09 2012-12-19 北京南天软件有限公司 Universal peripheral driving interface
CN103345454A (en) * 2013-07-05 2013-10-09 上海斐讯数据通信技术有限公司 Peripheral device connection method of mobile terminal
CN105808479A (en) * 2014-12-29 2016-07-27 希姆通信息技术(上海)有限公司 Compatibility configuration method and dynamic configuration method of peripheral port, and electronic device
CN108255757A (en) * 2018-01-02 2018-07-06 中国工商银行股份有限公司 Concentration call method, device and the system of peripheral hardware
CN112486429A (en) * 2020-11-26 2021-03-12 四川长虹电器股份有限公司 Method for automatically configuring printer by terminal

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831707A (en) * 2012-08-09 2012-12-19 北京南天软件有限公司 Universal peripheral driving interface
CN102831707B (en) * 2012-08-09 2015-04-22 北京南天软件有限公司 Universal peripheral driving interface
CN103345454A (en) * 2013-07-05 2013-10-09 上海斐讯数据通信技术有限公司 Peripheral device connection method of mobile terminal
CN103345454B (en) * 2013-07-05 2018-04-06 上海斐讯数据通信技术有限公司 A kind of peripheral device connection method of mobile terminal
CN105808479A (en) * 2014-12-29 2016-07-27 希姆通信息技术(上海)有限公司 Compatibility configuration method and dynamic configuration method of peripheral port, and electronic device
CN108255757A (en) * 2018-01-02 2018-07-06 中国工商银行股份有限公司 Concentration call method, device and the system of peripheral hardware
CN112486429A (en) * 2020-11-26 2021-03-12 四川长虹电器股份有限公司 Method for automatically configuring printer by terminal

Also Published As

Publication number Publication date
CN1975701B (en) 2012-02-15

Similar Documents

Publication Publication Date Title
CN1303542C (en) Plug-and-play method for USB equipment under linux operation system
CN1822004A (en) System and method for using a file system to automatically backup a file as a generational file
CN1746872A (en) Communication setup method and program, startup method and program, and application startup method and system
CN1967539A (en) Apparatus and method for monitoring and debugging query execution objects
CN1975701A (en) Master machine driving external equipment method and system
US20090327295A1 (en) Maintenance of exo-file system metadata on removable storage device
CN101477498A (en) Port switching method and equipment of USB equipment
CN105760289A (en) Debugging method and device of embedded system
CN101246440B (en) Java card system rubbish recovering method
CN1317846C (en) Method of realizing internal external network physical partition and its device
CN101256498A (en) Method and device for unloading terminal drive
CN1889459A (en) Journal formatting unit and method in safety management center system
CN1955890A (en) Method for raising communication speed of HID equipment
CN1892627A (en) Apparatus and method for calling driver of peripheral using shortcut
CN1178130C (en) Control method and electronic device thereof
CN107357853B (en) Method and device for operating REDIS console and computer system
CN1294506C (en) Remote operation device for controlling several remote computer units via network
CN1741462A (en) Method for controlling and managing telecommunication equipment in network management system
CN101059758A (en) Screen transition program generating method and device
CN1242324C (en) Method of large capacity movable memory for mobile telephone
CN1851679A (en) USB device automatic initialization method and device
CN1684043A (en) Real time monitoring system and method for computer files
CN1691000A (en) Testing device and method
CN1904863A (en) Method for data processing by establishing arithmetic path in computer peripheral device
CN101334757B (en) Computer memory apparatus configuration method and computer equipment

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