[go: up one dir, main page]

CN101916208A - System and method for calling driver module in multithreading - Google Patents

System and method for calling driver module in multithreading Download PDF

Info

Publication number
CN101916208A
CN101916208A CN 201010265841 CN201010265841A CN101916208A CN 101916208 A CN101916208 A CN 101916208A CN 201010265841 CN201010265841 CN 201010265841 CN 201010265841 A CN201010265841 A CN 201010265841A CN 101916208 A CN101916208 A CN 101916208A
Authority
CN
China
Prior art keywords
product
module
driving
driver
library
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.)
Pending
Application number
CN 201010265841
Other languages
Chinese (zh)
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.)
NTS Technology Chengdu Co Ltd
Original Assignee
NTS Technology Chengdu 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 NTS Technology Chengdu Co Ltd filed Critical NTS Technology Chengdu Co Ltd
Priority to CN 201010265841 priority Critical patent/CN101916208A/en
Publication of CN101916208A publication Critical patent/CN101916208A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to a method for calling a driver module in multithreading, which comprises the following steps of: transferring a product connection character string to a product driving library by a driving method configuration library; separating the connection character string and recognizing the types and names of products by the product driving library; querying the product driving library according to the recognized types and names of the products to seek driving examples of the products; according to the acquired driving examples of the products, increasing a driver module memory resource information record in a product driving container, loading an opening method of the current product driving library, executing an opening function, and establishing communication relation with the products, wherein in the driving examples of the products, multiple products can be driven in parallel. The invention also provides a system for calling the driver module in multithreading.

Description

A kind of system and method that is used for calling driver module in multithreading
Technical field
The present invention relates to driver module and call and the execution of driver module method, especially relate to the implementation method that is used for calling driver module in multithreading.
Background technology
In the Auto-Test System of product, the test event difference of different product, especially the testing tool that the same test item is used in the radio-frequency module product is also different, some product can be used multiple testing tool, some product only need be used one or both testing tools, this moment, Other Instruments all was in idle condition, and the instrument utilization factor is not high.
Therefore, be necessary to develop a kind of Auto-Test System of concurrent testing, and the Auto-Test System that will develop concurrent testing also just must be developed a kind of system and method that can be used for calling driver module in multithreading, reach in the product automatic testing process, satisfy the concurrent testing demand, provide the unified method interface for Auto-Test System simultaneously.
Summary of the invention
In view of above content, therefore be necessary to provide a kind of system and method that is used for calling driver module in multithreading, reaching can the multithreading call driver.
A kind of system that is used for calling driver module in multithreading, it comprises application server and corresponding driver module, described driver module comprises that driving method repository, product Driver Library, product drive case library, it is characterized in that described system also comprises: separation module, be used for the product connection string that the products of separated Driver Library receives, isolate product type and title; Enquiry module is used for driving case library according to isolated product type and name query product, searches corresponding product and drives example; Open module, be used for driving example, load the deployment method of current production Driver Library, carry out and open function, set up the communication relation with product according to the product that finds; Described product drives example and can a plurality of concurrent product drive.This system also comprises creation module, is used for creating product driving example according to isolated product type and title; Update module, being used for driving container at product increases driver module memory source information record, upgrading products Driver Library; The external interface that also defines the driving method repository simultaneously is unified.
A kind of method that is used for calling driver module in multithreading, this method may further comprise the steps: the driving method repository passes to the product Driver Library with the product connection string, and the product Driver Library separates connection string and identifies product type and title; According to product type that identifies and title, in the product Driver Library, inquire about, search this product and drive example; Drive example according to the product that obtains, in product Driver Library container, increase product Driver Library memory source information record, load the deployment method of current production Driver Library, carry out and open function, set up the communication relation with product, described product drives example and can a plurality of concurrent product drive.This method also comprises according to the product type and the title that identify, create product and drive example, after creating product driving example, in product Driver Library container, increase product Driver Library memory source information record, upgrading products Driver Library, the external interface of unified Definition driving method repository simultaneously.
Compared to prior art, the invention provides a kind of system and method that is used for calling driver module in multithreading, can call product driving example by multithreading; At any time increase product and drive example, improve product driving example in the product Driver Library; Increase, minimizing or modification wherein any one product driving example do not influence other products driving examples; The unified external interface of driver module is provided, and shielding product drives the method divergence of example, and arrival can support a plurality of test terminals multithreading to call use simultaneously, improves instrument utilization factor and production efficiency.
Description of drawings
Fig. 1 is the theory diagram that is used for calling driver module in multithreading;
Fig. 2 is the functional block diagram that is used for calling driver module in multithreading;
Fig. 3 is the process flow diagram that is used for the calling driver module in multithreading preferred embodiment.
Embodiment
Specify the specific embodiment of the present invention below in conjunction with Figure of description.
As shown in Figure 1, a kind ofly be used for the driver module that multithreading calls, it comprises application software 1 and corresponding driving module 2, and driver module comprises that driving method repository 4, product Driver Library 6 and product drive case library 8.Wherein the driving method repository is mainly upper application software the driving method interface is provided, and product Driver Library loading stocks drives example, and product drives the driving code that case library provides product.Wherein driving method repository, product Driver Library, product driving case library all are * .dll files, i.e. dynamic link database D ynamic Link Library file.
As shown in Figure 2, be used for the functional block diagram of the driver module that multithreading calls, driver module 2 comprises judge module 10, separation module 12, enquiry module 14, opens module 16, creation module 18 and update module 20.
Described judge module 10 receives the product connection string that driving method repository 4 transmits, product Driver Library 6 judges whether the product connection string is correct, the form of product connection string is: business men:: model:: interface:: address parameter:: fixed value, if judge that the product connection string is correct, then send to separation module 12 and separate; If judge that the product connection string is incorrect, then return error code, EOP (end of program).
After described separation module 12 receives judicious character string, isolate product type and title according to the form of character string, in the product Driver Library, inquire about whether there is corresponding product driving example by enquiry module 14, exist corresponding product to drive example if judge, then drive corresponding product and drive example by product Driver Library 6, module 16 is opened in execution, be used for driving example according to the product that finds, in product Driver Library container, increase product Driver Library memory source information record, load the deployment method of current production Driver Library, function is opened in execution, sets up the communication relation with product, and described product drives example and can a plurality of concurrent product drive.
Preferably, in the product Driver Library, inquiring about whether there is corresponding product driving example by enquiry module 14, Query Result is not when finding, creation module 18 is created corresponding product driving example according to separation module 12 isolated product types and title, carry out again and open module 16, load the deployment method of current production Driver Library, carry out and open function, set up the communication relation with product.
Preferably, after creation module 18 is finished establishment product driving example, update module 20 is created the product driving example of finishing with creation module 18 and is joined the product Driver Library, in product Driver Library container, increase product Driver Library memory source information record, when needing same product to drive example, directly from the product Driver Library, seek next time and use.
The process flow diagram that shown in Fig. 3, is used for the driver module preferred embodiment that multithreading calls, at first judge module 10 receives driving method repository 4 and transmits the product connection string among the step S10, whether the form of judging the product connection string is correct, if judge that the product connection string is correct, then send to separation module 12 and separate; If judge that the product connection string is incorrect, then return error code, EOP (end of program).
After separation module described in the step S12 12 receives judicious character string, isolate product type and title according to the form of character string, in the product Driver Library, inquire about the product that whether has isolated product type of separation module and title correspondence by enquiry module 14 among the step S14 and drive example, check whether corresponding product Driver Library loads, exist corresponding product to drive example if judge, then drive corresponding product and drive example by product Driver Library 6, carry out among the step S16 and open module 16, increase a product Driver Library memory source information record at the driver module container, load the deployment method of current production Driver Library, function is opened in execution, set up the communication relation with product, described product drives example and can a plurality of concurrent product drive.
Preferably, in the product Driver Library, inquiring about whether there is corresponding product driving example by enquiry module 14, Query Result is not when finding, creation module 18 is created corresponding product driving example according to separation module 12 isolated product types and title among the step S18, load the product Driver Library, carry out again and open module 16, increase a product Driver Library memory source information record at the driver module container, load the deployment method of current production Driver Library, function is opened in execution, sets up the communication relation with product.
Preferably, after creation module 18 is finished establishment product driving example, update module 20 is created the product driving example of finishing with creation module 18 and is joined the product Driver Library among the step S20, increase a product Driver Library memory source information record at the driver module container, when needing same product to drive example, directly from the product Driver Library, find the back to use next time.
Drive in the example procedure at above establishment product, can finish initialization, in driving method repository 4, generate a product container, be used for the product handle product; Generate a product and drive container and a product driving example container in the product Driver Library, the memory source and the product that are respectively applied for the product Driver Library drive example, its driving method entry address.
The driving method repository is for unified driving method interface, adopt the mentality of designing of object factory, mainly comprise: definition driving method base class, definition are from the interface function of the derived class of the derivative driving method of base class, method factory, method generator, external reference driving method.
1. wherein defining the driving method base class mainly comprises;
A) function parameter is provided with structure
{
Parameter name;
Parameter type;
Number of parameters;
Parameter value;
Parameter unit;
}
B) input parameter container<function parameter is provided with structure 〉
C) output parameter container<function parameter is provided with structure 〉
D) input parameter (input parameter container) is set
E) obtain input parameter (input parameter container)
F) output parameter (output parameter container) is set
G) obtain output parameter (output parameter container)
H) operation
I) initialization
2. the external interface function of visit driving method mainly comprises;
A) open (
The instrument module style number,
The instrument module connection string,
The instrument module handle
B) close (instrument module style number, instrument module connection string)
C) obtain all driving method titles (method name, method number)
D) obtain a quasi-instrument module drive method title (instrument module style number, method name, method number)
E) create a method (method name, method handle)
F) discharge a method (method handle)
G) the functional description language (method handle, functional description language) of a method is set
H) obtain the functional description language (method handle, functional description language) of a method
I) obtain the input parameter number (method handle, input parameter number) of a method
J) obtain input parameter details (
The method handle,
The input parameter call number,
The input parameter title,
The input parameter type,
The input parameter number,
The input parameter value,
Input parameter unit
K) input parameter value (method handle, input parameter call number, input parameter value) is set
L) obtain output parameter number (method handle, output parameter number)
M) obtain output parameter details (
The method handle,
The output parameter call number,
The output parameter title,
The output parameter type,
The output parameter number,
Output parameter value,
Output parameter unit
N) an operation method (method handle).
3. method factory adopts the basic design of " scalable factory ", when adding new " an instrument module driving method derived class " at every turn, needn't revise it code.The function division of instrument module driving method factory is clear, and each new " instrument module driving method " all must be registered factory, and " driving method sign " and " pointer of generating function " passed to it.Usually generating function has only delegation
BaseClass*?CreateDeviceMethod()
{
return?new?DeviceMethod
}。
4, driving method repository (ATML method base) is in order to reach the purpose that the instrument module driving method is visible, select configuration: adopt general type design, state that a Map container is used for preserving the instrument module driving method title that all were registered.
5, driver module adopts Object-Oriented Design, connection string according to the input of driving method repository, load libraries LoadLibrary function by the Microsoft of Microsoft comes loading stocks to drive case library, and Registering product driving Map, " product Driver Library title ", " product Driver Library handle " and " product Driver Library call number " are passed to product drive Map.The driving method entry address that utilizes the load libraries GetProcAddress function of the Microsoft of Microsoft to obtain product driven object example.And Registering product driven object example Map.
In driver module, also comprise several public data structure body and methods:
A) dynamic base structure
{
The dynamic base handle
The dynamic base coding
};
B) product driven object exemplary construction body
{
The dynamic base handle
The dynamic base coding
The equipment handle
The driver module title
};
C) driver module Map container key: driver module title
Typedef std::map<std::string, the dynamic base structure〉DllManagerMap;
D) product driven object example Map container key: product driven object instance handle
Typedef std::map<int, the device structure body〉DeviceManagerMap;
E) in product driven object example Map, increase a record function
Newly-increased (product driven object instance handle, product driven object exemplary construction body);
F) in product driven object example Map, revise a record function
Revise (product driven object instance handle, product driven object exemplary construction body);
G) record of deletion function from product driven object example Map
Deletion (product driven object instance handle);
H) from product driven object example Map, find a record function
Search (product driven object instance handle).
The present invention passes through according to product type and title, create corresponding product and drive example, drive product, a plurality of products drive the operation of example, revise and delete and do not disturb mutually, reach the technique effect that multithreading calls, solved the not high problem of testing tool utilization factor in the test products process at present, by the definition unified interface, automatically seek or generate corresponding product according to product and drive example, shielding product drives the method divergence of example, reaching increases the technique effect that product driving example does not disturb other products driving examples, realizes that multithreading calls, and improves the service efficiency of testing tool.
The present invention is not limited to aforesaid embodiment.The present invention expands to any new feature or any new combination that discloses in this manual, and the arbitrary new method that discloses or step or any new combination of process.

Claims (8)

1. system that is used for calling driver module in multithreading, it comprises application server and corresponding driving module, described driver module comprises that driving method repository, product Driver Library, product drive case library, is characterized in that described driver module also comprises:
Separation module is used for the product connection string that the products of separated Driver Library receives, and isolates product type and title;
Enquiry module is used for driving case library according to isolated product type and name query product, searches corresponding product and drives example;
Open module, be used for driving example, load the deployment method of current production Driver Library, carry out and open function, set up the communication relation with product according to the product that finds;
Described product drives example and can a plurality of concurrent product drive.
2. the system that is used for calling driver module in multithreading according to claim 1 is characterized in that this driver module also comprises:
Creation module is used for creating product driving example according to isolated product type and title.
3. as being used for the system of calling driver module in multithreading as described in the claim 2, it is characterized in that this driver module also comprises:
Update module, being used for driving container at product increases driver module memory source information record, upgrading products Driver Library.
4. as being used for the system of calling driver module in multithreading as described in claim 1 or 3, it is characterized in that the external interface of described driving method repository is unified.
5. a method that is used for calling driver module in multithreading is characterized in that, this method may further comprise the steps:
(1) the driving method repository passes to the product Driver Library with the product connection string, and the product Driver Library separates connection string and identifies product type and title;
(2) product type and the title that identifies according to step (1) inquired about in the product Driver Library, searches this product and drives example;
(3) product that obtains according to step (2) drives example, loads the deployment method of current production Driver Library, carries out and opens function, sets up the communication relation with product, and described product drives example and can a plurality of concurrent product drive.
6. the method that is used for calling driver module in multithreading as claimed in claim 5 is characterized in that according to the product type and the title that identify, creates product and drives example.
7. the method that is used for calling driver module in multithreading as claimed in claim 6 is characterized in that driving example according to current production, and driving container at product increases driver module memory source information record, upgrading products Driver Library.
8. as claim 5 or the 7 described methods that are used for calling driver module in multithreading, it is characterized in that the external interface of unified Definition driving method repository.
CN 201010265841 2010-08-30 2010-08-30 System and method for calling driver module in multithreading Pending CN101916208A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010265841 CN101916208A (en) 2010-08-30 2010-08-30 System and method for calling driver module in multithreading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010265841 CN101916208A (en) 2010-08-30 2010-08-30 System and method for calling driver module in multithreading

Publications (1)

Publication Number Publication Date
CN101916208A true CN101916208A (en) 2010-12-15

Family

ID=43323725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010265841 Pending CN101916208A (en) 2010-08-30 2010-08-30 System and method for calling driver module in multithreading

Country Status (1)

Country Link
CN (1) CN101916208A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360889A (en) * 2014-12-08 2015-02-18 中科创达软件股份有限公司 Driving program loading method and device
CN106228680A (en) * 2016-07-27 2016-12-14 浪潮(苏州)金融技术服务有限公司 A kind of based on bill module multithreading driving method
CN106951266A (en) * 2017-03-30 2017-07-14 焦点科技股份有限公司 A kind of application system dissemination method based on driver
WO2018045926A1 (en) * 2016-09-07 2018-03-15 华为技术有限公司 Method and device for use in accessing container
CN109669886A (en) * 2018-12-27 2019-04-23 广州致远电子有限公司 Peripheral hardware control system based on embedded system
CN109766131A (en) * 2017-11-06 2019-05-17 上海宝信软件股份有限公司 The system and method for the intelligent automatic upgrading of software is realized based on multithreading
CN110557194A (en) * 2019-07-31 2019-12-10 中电科仪器仪表有限公司 Multithreading-based modular light wave parameter testing system and method
CN110943968A (en) * 2018-09-25 2020-03-31 杭州海康威视系统技术有限公司 Equipment access control method and equipment access assembly

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6205465B1 (en) * 1998-07-22 2001-03-20 Cisco Technology, Inc. Component extensible parallel execution of multiple threads assembled from program components specified with partial inter-component sequence information
CN101206566A (en) * 2006-12-21 2008-06-25 中兴通讯股份有限公司 An Embedded Software Driver Management Method
CN101799764A (en) * 2009-12-31 2010-08-11 芯通科技(成都)有限公司 Realization method of instrument module common port

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6205465B1 (en) * 1998-07-22 2001-03-20 Cisco Technology, Inc. Component extensible parallel execution of multiple threads assembled from program components specified with partial inter-component sequence information
CN101206566A (en) * 2006-12-21 2008-06-25 中兴通讯股份有限公司 An Embedded Software Driver Management Method
CN101799764A (en) * 2009-12-31 2010-08-11 芯通科技(成都)有限公司 Realization method of instrument module common port

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360889A (en) * 2014-12-08 2015-02-18 中科创达软件股份有限公司 Driving program loading method and device
CN104360889B (en) * 2014-12-08 2017-11-10 中科创达软件股份有限公司 A kind of driver loading method and device
CN106228680A (en) * 2016-07-27 2016-12-14 浪潮(苏州)金融技术服务有限公司 A kind of based on bill module multithreading driving method
WO2018045926A1 (en) * 2016-09-07 2018-03-15 华为技术有限公司 Method and device for use in accessing container
US11321109B2 (en) * 2016-09-07 2022-05-03 Huawei Technologies Co., Ltd. Container engine for selecting driver based on container metadata
CN106951266A (en) * 2017-03-30 2017-07-14 焦点科技股份有限公司 A kind of application system dissemination method based on driver
CN109766131A (en) * 2017-11-06 2019-05-17 上海宝信软件股份有限公司 The system and method for the intelligent automatic upgrading of software is realized based on multithreading
CN109766131B (en) * 2017-11-06 2022-04-01 上海宝信软件股份有限公司 System and method for realizing intelligent automatic software upgrading based on multithreading technology
CN110943968A (en) * 2018-09-25 2020-03-31 杭州海康威视系统技术有限公司 Equipment access control method and equipment access assembly
CN110943968B (en) * 2018-09-25 2022-04-26 杭州海康威视系统技术有限公司 Equipment access control method and equipment access assembly
CN109669886A (en) * 2018-12-27 2019-04-23 广州致远电子有限公司 Peripheral hardware control system based on embedded system
CN110557194A (en) * 2019-07-31 2019-12-10 中电科仪器仪表有限公司 Multithreading-based modular light wave parameter testing system and method

Similar Documents

Publication Publication Date Title
CN107861870B (en) Interface test and test data generation method, device, terminal and storage medium
CN101916208A (en) System and method for calling driver module in multithreading
CN110569298B (en) Data docking and visualization method and system
US8271609B2 (en) Dynamic service invocation and service adaptation in BPEL SOA process
CN114064213B (en) Quick arranging service method and system based on Kubernets container environment
US20030084203A1 (en) Program control method, computer system, control program, and storage medium storing the control program
US8627274B2 (en) Software tool and method for generating a virtual appliance
CN103473076B (en) The dissemination method of a kind of code release and system
CN111061733A (en) Data processing method, apparatus, electronic device and computer-readable storage medium
CN108345691B (en) Data source general processing framework construction method, data source processing method and device
CN109871289A (en) A kind of remote procedure call service creation method and device
US20110258620A1 (en) Method and Apparatus for Making a BPM Application Available to Multiple Tenants
CN111124892B (en) Automatic testing method and system based on command line
CN114465937A (en) Network card testing method, device, server, medium, and computer program product
CN109165170A (en) A kind of method and system automating request for test
CN117370203B (en) Automatic test method, system, electronic equipment and storage medium
CN110232028A (en) A kind of test exemple automation operation method and system
CN102681867A (en) Video analysis task processing method and device
CN115543546A (en) Spring-based module heat deployment method and system
CN102262540A (en) Basic software parameter definition extension method applied to AUTOSAR (AUTomotive Open System Architecture) ECU (Electric Control Unit) configuration
CN100596139C (en) System and method for building component applications using metadata definition mappings
CN111506305B (en) Toolkit generation method, device, computer equipment and readable storage medium
JP4852834B2 (en) Application requirement design support system and method
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN108427599A (en) Method, apparatus and storage medium is uniformly processed in asynchronous task

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 610041, Sichuan high tech Zone, Chengdu Tianfu Road, South extension line, high-tech incubator Park, building 3, 6

Applicant after: Chengdu NTS Technology Co., Ltd.

Address before: 610041, Sichuan, Chengdu Tianfu Road, South extension line, high-tech incubator Park, building 3, 6

Applicant before: NTS Technology (Chengdu) Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: NTS TECHNOLOGY (CHENGDU) CO., LTD. TO: CHENGDU NTS TECHNOLOGY CO., LTD.

C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20101215