CN102591810B - Method for sharing hardware devices of multiple applications - Google Patents

Method for sharing hardware devices of multiple applications Download PDF

Info

Publication number
CN102591810B
CN102591810B CN201210010549.XA CN201210010549A CN102591810B CN 102591810 B CN102591810 B CN 102591810B CN 201210010549 A CN201210010549 A CN 201210010549A CN 102591810 B CN102591810 B CN 102591810B
Authority
CN
China
Prior art keywords
layer
hardware
service
application
driving
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
CN201210010549.XA
Other languages
Chinese (zh)
Other versions
CN102591810A (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.)
Yinjie Nico (Fujian) Technology Co.,Ltd.
Original Assignee
Fujian Landi Commercial Equipment 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 Fujian Landi Commercial Equipment Co Ltd filed Critical Fujian Landi Commercial Equipment Co Ltd
Priority to CN201210010549.XA priority Critical patent/CN102591810B/en
Publication of CN102591810A publication Critical patent/CN102591810A/en
Application granted granted Critical
Publication of CN102591810B publication Critical patent/CN102591810B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to a method for sharing hardware devices of multiple applications, which is characterized by comprising an application layer, a driving layer, a service layer and the hardware devices. Hardware driving programs of a plurality of devices are arranged in the driving layer, the application layer independently calls the hardware driving programs of the driving layer respectively, the hardware driving programs send command to the service layer in a local socket communication mode after receiving the command, and the service layer performs different response processing according to the command type and further calls the hardware devices to perform corresponding reaction. The method for sharing hardware devices in multiple applications can achieve sharing of the multiple applications, expansion is convenient, later maintenance is easy, and operation cost of the devices are saved.

Description

The method of many Application share hardware device
Technical field
The present invention relates to a kind of method of many Application share hardware device, be mainly used on self-aided terminal, ensure that multiple utility program can realize sharing to hardware device simultaneously and use.
Background technology
Along with the development of science and technology, self-service product has more and more entered the life of the mankind, and the technology of self-service product is also more and more rationalized and hommization.
Calling of existing hardware equipment is substantially all hardware driving by single, exclusively enjoys taking of equipment.
Cannot realize sharing of many application, equipment can only be used by an application and discharge the application call that exclusive resource just allows other.
Expansion is inconvenient, and later maintenance bothers.The amendment driven all may impact all application, and the result brought needs the carrying out of repeating to test.
Application layer takes to carve notices whether the equipment that will use is in idle condition.
Summary of the invention
The object of the present invention is to provide a kind of method of many Application share hardware device, solve current hardware device effectively and multiple utility program cannot drive the problem shared.
The invention is characterized in: a kind of method of many Application share hardware device, it is characterized in that, comprise application layer, drive layer, service service layer and hardware device, each hardware drive program of some equipment is provided with in described driving layer, it is independently that described application layer calls the hardware drive program driving layer, and each hardware drive program sends to Service service layer by local socket communication mode upon receipt of the instructions, different response process is done according to command type by described Service service layer, and then calls hardware device and make respective reaction.
Advantage of the present invention: the present invention can realize sharing of many application, and expansion is convenient, and later maintenance is easy, can save equipment operating cost.
Accompanying drawing explanation
Fig. 1 is current system architecture diagram.
Fig. 2 is present system structured flowchart.
Fig. 3 is that the present invention sends order and returns results figure.
Fig. 4 is one of Service service processing of the present invention figure.
Fig. 5 is two figure of Service service processing of the present invention.
Embodiment
2 to accompanying drawing 5 by reference to the accompanying drawings, the present invention is a kind of method of many Application share hardware device, comprise application layer, drive layer, service service layer and hardware device, each hardware drive program of some equipment is provided with in described driving layer, it is independently that described application layer calls the hardware drive program driving layer, and each hardware drive program sends to Service service layer by local socket communication mode upon receipt of the instructions, different response process is done according to command type by described Service service layer, and then calls hardware device and make respective reaction.
Above-mentioned driving layer sends to Service service layer by local socket communication mode upon receipt of the instructions, then the result of Service service layer command process is waited for, the work driving layer to do sends hardware operation instruction to Service service layer, and wait for that result returns.
Specific implementation process: as shown in Fig. 1 (original system framework), the upper strata of whole system framework is each application program, is separate, is linked together by master routine between them.Public hardware device is likely called in each application, and original design proposal uses hardware device by calling same driving, but multiple application program cannot use same driving simultaneously.So original driving design to meet the needs that multiprogram calls.Each application is simultaneously all call same driving, if need amendment or expanded function, then must re-start test for original function, have impact to avoid the application of this change on other.Maintenance like that for the later stage is very difficult.
In new system architecture as shown in Fig. 2 (new system architecture), the driving of each application call is independently, and respectively drive and send to Service to serve by local socket communication mode upon receipt of the instructions, Service service does different response process according to command type, wait for printer processes for general instruction as the print command of thermal printer then enters queue, special instruction is as then direct to its operation in order cancellation etc.Order in queue is according to entering order process, and other programs so then can be avoided when invocation facility operates, and another program cannot use equipment to cause fault.Simultaneously also can reduction instruction flow process, it is unnecessary as opened the similar order such as port to send.
Each application program has provides respective hardware driving, and namely Fig. 2 (new system architecture) " hardware driving " illustrated, this avoid the problem that multiple application uses same driving.Simultaneously respectively drive the command interface provided all to remain unchanged, facilitate application layer developer like this, they just can the new driving of compatibility without the need to modifying to program.And each " hardware driving " sends to Service service layer by local socket communication mode upon receipt of the instructions, then wait for the result of Service service layer command process.The work mainly done in " hardware driving " part sends hardware operation instruction to Service service layer, and wait for that result returns, as Fig. 3 (send order and return results).
Service service does different response process according to command type, waits for printer processes for general instruction as the print command of thermal printer then enters queue.Order in queue, according to entering order process, processes, and gets rid of this instruction from queue.Other programs so then can be avoided when invocation facility operates, and another program cannot use equipment to cause fault.Whole flow process as shown in Figure 4 and Figure 5.
The result of Service service processing can reduction instruction flow process, and it is unnecessary as opened the similar order such as port to send.
Present invention employs and be responsible for carrying out alternately with hardware by service end, each stand-alone program sends command request by client to service end, after the service end request of receiving orders, this request is entered queue, service end performs corresponding command request according to queue sequence, directly operates as cancellation operation etc. need not enter queue for special instruction.Would not conflict be produced between each program like this, can hardware device be shared, simplify and call and need not hardware case be concerned about.
The foregoing is only preferred embodiment of the present invention, all equalizations done according to the present patent application the scope of the claims change and modify, and all should belong to covering scope of the present invention.

Claims (1)

1. a method for the hardware device of Application share more than, is characterized in that, comprises application layer in the system architecture is described, drives layer, Service service layer and hardware device; Each application program in described application layer has provides respective hardware drive program, avoids each application program and uses same hardware drive program, and the hardware drive program of each application call described is independently; Described hardware drive program is arranged in described driving layer; Described hardware drive program sends to described Service service layer by local socket communication mode after receiving hardware operation instruction, and waits for that result returns; Different response process is done according to the instruction type of described hardware operation instruction by described Service service layer, and then call described hardware device and make respective reaction, wherein queue etc. then enters for general instruction pending, then direct to its operation for special instruction, the instruction in queue is according to entering order process.
CN201210010549.XA 2012-01-14 2012-01-14 Method for sharing hardware devices of multiple applications Active CN102591810B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210010549.XA CN102591810B (en) 2012-01-14 2012-01-14 Method for sharing hardware devices of multiple applications

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210010549.XA CN102591810B (en) 2012-01-14 2012-01-14 Method for sharing hardware devices of multiple applications

Publications (2)

Publication Number Publication Date
CN102591810A CN102591810A (en) 2012-07-18
CN102591810B true CN102591810B (en) 2015-07-15

Family

ID=46480495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210010549.XA Active CN102591810B (en) 2012-01-14 2012-01-14 Method for sharing hardware devices of multiple applications

Country Status (1)

Country Link
CN (1) CN102591810B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664273A (en) * 2018-05-09 2018-10-16 歌尔股份有限公司 A kind of method and apparatus solving multiple softward interview hardware resource conflicts

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851662A (en) * 2006-06-01 2006-10-25 中山大学 Data back-up system
CN101266582A (en) * 2008-05-09 2008-09-17 中兴通讯股份有限公司 Embedded equipment audio frequency controller and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5915131A (en) * 1995-05-05 1999-06-22 Apple Computer, Inc. Method and apparatus for handling I/O requests utilizing separate programming interfaces to access separate I/O services
CN101236631A (en) * 2007-12-14 2008-08-06 福建联迪商用设备有限公司 Electronic payment unified platform accomplishing method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851662A (en) * 2006-06-01 2006-10-25 中山大学 Data back-up system
CN101266582A (en) * 2008-05-09 2008-09-17 中兴通讯股份有限公司 Embedded equipment audio frequency controller and method

Also Published As

Publication number Publication date
CN102591810A (en) 2012-07-18

Similar Documents

Publication Publication Date Title
CN104850491B (en) A kind of method for testing software, equipment and system
CN106406905B (en) Configuration method and system for SETUP option of BIOS of server
CN110891094A (en) Terminal software supporting platform based on middle platform
CN101206582B (en) Virtual machine system and processing method thereof
CN101808427A (en) Internet of things-based wireless communication terminal and application method thereof
CN104123265A (en) Method and system for communication among multiple kernels
CN105183554A (en) Hybrid computing system of high-performance computing and cloud computing, and resource management method therefor
CN101414270A (en) Method for implementing assist nuclear task dynamic PRI scheduling with hardware assistant
CN203135901U (en) Encryption equipment management device
CN111124927A (en) Test method of multi-partition airborne software
CN102591810B (en) Method for sharing hardware devices of multiple applications
CN100468342C (en) Multiple-core multi-CPU threading dispatch execution method based on hardware resource
CN109800094A (en) A method of realizing individually application and the communication of multiple common applications
CN100583021C (en) Display chip shared method
CN103514036A (en) Scheduling system and method for event trigger and batch processing
CN101908025A (en) Serial use-right control device and method
CN104951346A (en) Process management method for embedded system as well as system
CN103910256B (en) Interconnected elevator device and progress control method thereof
CN113723931B (en) Workflow modeling method suitable for multi-scale high-flux material calculation
CN101859249B (en) Method, device and system for realizing automatic flow with manual tasks
CN1529254A (en) Guide method of master-slave multi-processor in embedding system
CN101739236A (en) Information processing method of information equipment
CN110519390A (en) A kind of low-power consumption bluetooth controller link layer implementation method
CN109634749B (en) Distributed unified scheduling method and device
CN210270592U (en) Distributed cluster architecture monitoring system based on WinCC

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221101

Address after: Floor 3-4, Building 3A, Area A, Fuzhou Software Park, No. 89, Software Avenue, Gulou District, Fuzhou City, Fujian Province 350003

Patentee after: Fujian Liandi Commercial Technology Co.,Ltd.

Address before: Shida Technology City Gulou District of Fuzhou city of Fujian Province, Hongshan Road No. 68 350003

Patentee before: FUJIAN LANDI COMMERCIAL EQUIPMENT Co.,Ltd.

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Floor 3-4, Building 3A, Area A, Fuzhou Software Park, No. 89, Software Avenue, Gulou District, Fuzhou City, Fujian Province 350003

Patentee after: Yinjie Nico (Fujian) Technology Co.,Ltd.

Address before: Floor 3-4, Building 3A, Area A, Fuzhou Software Park, No. 89, Software Avenue, Gulou District, Fuzhou City, Fujian Province 350003

Patentee before: Fujian Liandi Commercial Technology Co.,Ltd.