CN116860321B - Automatic compiling and packaging method and system for card reading control, electronic equipment and medium - Google Patents
Automatic compiling and packaging method and system for card reading control, electronic equipment and medium Download PDFInfo
- Publication number
- CN116860321B CN116860321B CN202310882510.5A CN202310882510A CN116860321B CN 116860321 B CN116860321 B CN 116860321B CN 202310882510 A CN202310882510 A CN 202310882510A CN 116860321 B CN116860321 B CN 116860321B
- Authority
- CN
- China
- Prior art keywords
- control
- node
- code
- configuration
- attribute
- 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
- 238000000034 method Methods 0.000 title claims abstract description 230
- 238000004806 packaging method and process Methods 0.000 title claims abstract description 40
- 230000006870 function Effects 0.000 claims description 32
- 238000007430 reference method Methods 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 10
- 239000008186 active pharmaceutical agent Substances 0.000 description 4
- 230000003993 interaction Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000009517 secondary packaging Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses an automatic compiling and packaging method, an automatic compiling and packaging system, electronic equipment and a medium for a card reading control, and relates to the technical field of control packaging. The method comprises the following steps: acquiring a preset function configuration; the preset function configuration includes: configuring a preset main control and configuring a preset method; the main control configuration comprises the following steps: a control name, a main class name of the control and a control unique identification code; the method configuration comprises the following steps: declaring the parameter configuration of the method, outputting the parameter configuration of the method and calling the parameter configuration of the method; storing the preset function configuration into an xml file; generating codes according to the xml file; obtaining a control according to the code; and packaging the control. The invention can reduce the cost of software development and improve the online efficiency of project implementation.
Description
Technical Field
The invention relates to the technical field of control packaging, in particular to an automatic compiling and packaging method, an automatic compiling and packaging system, electronic equipment and a medium for a card reading control.
Background
In hospital systems, most hospitals have a card reading hardware interaction scenario, including card reading operations such as identity cards, medical insurance cards, health cards, electronic certificates, and the like. The card reading APIs provided by different hardware manufacturers are different, and the card reading APIs cannot be directly called by an emergency system of an emergency department, and the card reading APIs are required to be packaged for embedding and using for the second time. The secondary packaging process requires continuous debugging and improvement of developers and on-site implementation personnel, and a great deal of time is consumed, so that the online efficiency of the project is affected. If there is a read API or parameter upgrade variation at a later stage, a great deal of software development cost is also required. Therefore, how to reduce the cost of software development and improve the online efficiency of project implementation becomes a current urgent problem to be solved.
Disclosure of Invention
The invention aims to provide an automatic compiling and packaging method, an automatic compiling and packaging system, electronic equipment and a medium for a card reading control, which can reduce the cost of software development and improve the online efficiency of project implementation.
In order to achieve the above object, the present invention provides the following solutions:
An automatic compiling and packaging method for a card reading control comprises the following steps:
Acquiring a preset function configuration; the preset function configuration includes: configuring a preset main control and configuring a preset method; the main control configuration comprises the following steps: a control name, a main class name of the control and a control unique identification code; the method configuration comprises the following steps: declaring the parameter configuration of the method, outputting the parameter configuration of the method and calling the parameter configuration of the method;
Storing the preset function configuration into an xml file;
generating codes according to the xml file;
Obtaining a control according to the code;
And packaging the control.
Optionally, storing the preset function configuration as an xml file, which specifically includes:
generating a root node of the xml file;
Obtaining the value of the attribute of the root node according to the preset function configuration; the attributes include name, classname and guid;
Adding a declaration method node and a declaration method parameter node under the root node according to the declaration method parameter configuration;
Adding an output method node under the root node according to the output method parameter configuration;
and adding a calling method node under the output method node according to the calling method parameter configuration to obtain an xml file.
Optionally, generating a code according to the xml file specifically includes:
generating an attribute code according to the value of the attribute of the root node;
generating a reference method code according to the declaration method node and the declaration method parameter node;
Generating an output method code according to the output method node;
and obtaining codes of the calling reference method and the output method according to the calling method node.
Optionally, obtaining the control according to the code specifically includes:
and calling a NET component Microsoft.CSharp.CSharpCodProvider class object in the tool, and compiling the code to obtain the control.
An automated compiling packaging system for a card reading control, comprising:
the acquisition module is used for acquiring preset function configuration; the preset function configuration includes: configuring a preset main control and configuring a preset method; the main control configuration comprises the following steps: a control name, a main class name of the control and a control unique identification code; the method configuration comprises the following steps: declaring the parameter configuration of the method, outputting the parameter configuration of the method and calling the parameter configuration of the method;
the xml file generation module is used for storing the preset function configuration into an xml file;
The code generation module is used for generating codes according to the xml file;
the control generation module is used for obtaining a control according to the code;
and the packaging module is used for packaging the control.
Optionally, the xml file generation module specifically includes:
The root node generating unit is used for generating a root node of the xml file;
The attribute value generating unit is used for obtaining the value of the attribute of the root node according to the preset function configuration; the attributes include name, classname and guid;
A declaration method node adding unit, configured to add a declaration method node and a declaration method parameter node under the root node according to the declaration method parameter configuration;
An output method node adding unit, configured to add an output method node under the root node according to the output method parameter configuration;
and the xml file generating unit is used for adding a calling method node under the output method node according to the calling method parameter configuration to obtain an xml file.
Optionally, the code generating module specifically includes:
an attribute code generating unit, configured to generate an attribute code according to a value of an attribute of the root node;
A reference method code generating unit, configured to generate a reference method code according to the declaration method node and the declaration method parameter node;
an output method code generating unit for generating an output method code according to the output method node;
and the calling code generating unit is used for obtaining codes of calling the reference method and the output method according to the calling method node.
Optionally, the control generating module specifically includes:
and the control generation unit is used for calling the Microsoft CSharp odeProvider class object of the NET component in the tool, and compiling the code to obtain the control.
An electronic device, comprising:
The electronic device comprises a memory and a processor, wherein the memory is used for storing a computer program, and the processor runs the computer program to enable the electronic device to execute the automatic compiling and packaging method of the card reading control.
A computer readable storage medium storing a computer program which when executed by a processor implements an automated compilation packaging method for a card-reading control as described above.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
According to the method and the device, a software developer is not needed, the dynamic library dll control which can be cited by the second party can be generated after the preset function configuration which is configured according to the requirement is obtained, and the control compatible with the third party can be quickly generated only by modifying the preset function configuration if the third party is changed later, so that the project implementation online efficiency can be effectively improved, and the cost of software development is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an automatic compiling and packaging method for a card reading control according to an embodiment of the present invention;
Fig. 2 is a flowchart of a method configuration provided in an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
The embodiment of the invention provides an automatic compiling and packaging method for a card reading control, which specifically comprises the following steps:
Acquiring a preset function configuration; the preset function configuration includes: configuring a preset main control and configuring a preset method; the main control configuration comprises the following steps: a control name, a main class name of the control and a control unique identification code; the method configuration comprises the following steps: declaring a method parameter configuration, outputting a method parameter configuration, and calling a method parameter configuration. Invoking the method parameter configuration includes invoking a parameter configuration of the declaration method and the output method.
And storing the preset function configuration into an xml file.
And generating codes according to the xml file.
And obtaining the control according to the code.
And packaging the control.
In practical application, the preset function configuration is stored as an xml file, and the steps are as follows:
s21: the xml file is parsed into document objects.
S22: and generating a main body class code according to the S11 configuration, setting a class name, and identifying the CLSID by the class.
S23: declaration methods and output method codes are generated in the subject class according to the S12 configuration.
S24: and generating codes which are used for alternately calling other methods in the output method according to the associated scheduling configuration.
S25: the above codes are combined into a main class code. Storing the preset function configuration into an xml file, which specifically comprises the following steps:
a root node of the xml file is generated.
Obtaining the value of the attribute of the root node according to the preset function configuration; the attributes include name, classname and guid.
And adding a declaration method node and a declaration method parameter node under the root node according to the declaration method parameter configuration.
And adding an output method node under the root node according to the output method parameter configuration.
And adding a calling method node under the output method node according to the calling method parameter configuration to obtain an xml file.
In practical application, the code generation method according to the xml file specifically includes:
and generating attribute codes according to the values of the attributes of the root nodes, wherein the attribute codes are used for declaring the names and the unique identifiers of the controls, and the unique identifiers are required to be defined when the call controls are developed.
And generating a reference method code according to the declaration method node and the declaration method parameter node.
And generating an output method code according to the output method node.
And obtaining codes of the calling reference method and the output method according to the calling method node.
In practical application, obtaining the control according to the code specifically includes:
and calling a NET component Microsoft.CSharp.CSharpCodProvider class object in the tool, and compiling the code to obtain the control.
The present invention provides a more specific embodiment for describing the above method in detail, which specifically includes:
packaging the third party control by using an automatic compiling packaging control method, as shown in fig. 1, specifically comprises the following steps:
S1: the configuration of the main control, namely, the configuration of the main control is preset:
S11: control name htcslib is set.
S12: the main class name of the control is set to htcs.
S13: and calling a GUID.NewGuid () method, and generating a control unique identification code CLSID of d6cef099-3123-4d8c-a52a-8e2436de7085 according to the current time and the hardware number of the computer, wherein the control unique identification code CLSID is used for registering external references and declaring controls.
S2: the method configuration, that is, the method configuration is preset, and the functions of the control are defined, including declaration methods, output methods and logic relations of the methods, as shown in fig. 2, specifically including:
S21: defining a declaration method, namely performing declaration method parameter configuration, setting names, incoming parameters and return types of reference dll, and specifically: setting the name of a declaration method as Init, setting the name of an introduced dll as test.dll, setting an incoming parameter as a and the type as int; setting an incoming parameter as b and the type as int; setting a return type as int; whether to continue defining the declaration method is set to boolNext, wherein whether to continue defining the declaration method can be judged according to the interface call description provided by the card reader manufacturer, if the declaration method needs to be continued to be defined, the value of boolNext is true, otherwise, false is returned.
S22: and judging whether to continue to define the declaration method according to the boolNext parameters of the S21. If yes, boolNext is needed to be continued, namely, if the result is true, adding a declaration method name of GetValue, setting a name of an introduced dll as test.dll, setting an incoming parameter as result, and setting the type as int; setting a return type as string; continuing to judge whether to continue to define the declaration method according to the interface call description provided by the card reader manufacturer, returning boolNext to be true if necessary, continuing to define the declaration method, continuing to add the declaration method, and repeating the step S22; otherwise, return false.
S23: if boolNext is false, defining the output method, that is, configuring the parameters of the output method, specifically setting the name of the output method as getIDC.
S24: for the output method defined in S23, setting the input parameter of the output method as a1 and the type as int; setting an incoming parameter as b1 and the type as int; the method return type is set as string.
S25: the calling declaration method is added, namely, the parameter configuration of the calling method is called, and the specific process is as follows: adding the method Init stated in the step S21, and setting the incoming parameters as the incoming parameters a1 and b1 set in the step S24; setting a return value variable as value; whether to continue setting the reference declaration method variable boolNext is set. Whether to continue setting the reference declaration method variable boolNext is determined based on the interface call specification document provided by the card reader hardware vendor, and if other methods need to be continuously called in the specification, the reference declaration method needs to be continuously added here.
S26: judging whether to continue adding the reference statement method according to boolNext above, if yes, continuing to add the reference S22 statement method GetValue, and setting the input parameter as the variable value of S25; the return value variable is set to result.
S27: if all the quoted statement methods are added, if boolNext is no, further judging whether to continue defining the output method according to the interface call description provided by the card reader manufacturer, if so, repeating the step S23 to add the output method which is actually required to be defined; if the definition method does not need to be added continuously, the method configuration flow is ended.
S3: storing the preset function configuration into an xml file, which specifically comprises the following steps:
and organizing and generating an xml file containing the configuration information and the configuration corresponding relation according to the configuration of S1 and S2.
The method comprises the following steps:
S31: an xml root node is added. According to the setting of S1, an xml root node is generated, the node name is project, the value of the attribute name of the node project is htcslib set in the step S11, the value of the attribute CL ASSNAME is htcs set in the step S12, and the value of the attribute guid is the identification code d6cef099-3123-4d8c-a52a-8e2436de7085 generated in the step S13.
S32: declaration method nodes are added. According to the configuration of S21, the declaration method node declaremethods is added under the project of the root node S31, further, the node method is added under the declaremethods node, the value of the attribute name of the node method is set to Init, the value of the attribute return is set to int, the value of the attribute returnParam is result, and the value of the attribute dllname is test.
S33: and adding declaration method parameter nodes. According to the configuration of S21, a node param1 is newly added under a method node, the value of an attribute name of the node param1 is set as a, and the value of an attribute type is set as int; continuing to add the node param2 under the method node, setting the value of the attribute name of the node param2 as b and the value of the attribute type as int.
S34: according to the configuration of S22, the operation of step S32 is repeated, adding the node and the parameter named GetValue.
S35: and adding an output method node. According to the configuration of S24, a node methods is added under the project node, and the value of the attribute name of the node methods is set to GetIdc. Adding an attribute node parameter under a methods node, adding a node parameter under a prams node, setting the value of an attribute name of the node parameter as a, and setting the value of an attribute type as int; continuing to add a node param under the prams nodes, setting the value of the attribute name of the node param as b and the value of the attribute type as int;
S36: and adding calling method nodes. Node callmethods is added under the methods directory, according to the configuration of S25, node method is newly added under the callmethods node, the value of the attribute name defining the node method is Init, the value of the attribute returnname is value, and the value of the attribute return is int. Further, adding a node param under the method node, and setting the value of the attribute name of the node param as a; continuing to add the node param under the prams nodes, and setting the value of the attribute name of the node param as b.
S37: and continuing to add calling method nodes according to the configuration of S27. Specifically, a node method is newly added under callmethods nodes, the value of the attribute name of the node method is defined as GetValue, the value of the attribute returnname is result, and the value of the attribute return is string. Further, adding a node param under the met hod nodes, and setting the value of the attribute name of the node param as value.
S4: and generating codes according to the xml file. Analyzing each piece of xml information according to the xml generated in the step S3 to generate codes:
S41: and (3) analyzing the project node according to the node generated in the step (S31), creating a main class pulbicclass htcs, setting a registry of a computer according to the guid attribute, and searching the guid according to the registry, so that an output method defined by the main class htcs can be called. The generated code is as follows: [ ComVisible (true), guid ("d 6cef099-3123-4d8c-a52a-8e2436de 7085"), progId ("htcslib. Htcs") ].
S42: creating a reference method code according to the method declaration node declaremethods added in S32 and S34 and the declaration method parameter node param added in S33:
[DllImport("test.dll")]。
privatestaticexternintInit(inta,intb)。
[DllImport("test.dll")]。
privatestaticexternstringGetValue(intresult)。
s43: generating an output method code according to the added output method node of S35:
pulbicstringgetIdc(stringa,stringb){}。
According to the call nodes added in S36 and S37, the method code of call declaration is added in getIdc methods:
intvalue=Init(Convert.ToInt32(a),Convert.ToInt32(b))。
stringresult=GetValue(Convert.ToInt32(value))。
S5: and obtaining the control according to the code.
The NET component Microsoft. CSharp CodeProvider class object is called in the tool, the code generated by S4 is compiled, and the htcslib. Dll control is exported.
S6: and packaging the control. Card reading in hospitals:
after the doctor installs the encapsulated htcslib.dll control on the computer, defining a control with id htcslib according to the identification code of S31 in the card reading webpage, specifically < objectid = "htcslib" classification= "clsid:d6cef099-3123-4d8c-a52a-8e2436de7085"/>, and loading the card reading control. When the card is read, the htcslib.GetIdc () method defined in the step S23 is called, and the card reading operation can be completed.
The invention also provides an automatic compiling and packaging system of the card reading control, which comprises the following steps:
The acquisition module is used for acquiring preset function configuration; the preset function configuration includes: configuring a preset main control and configuring a preset method; the main control configuration comprises the following steps: a control name, a main class name of the control and a control unique identification code; the method configuration comprises the following steps: declaring a method parameter configuration, outputting a method parameter configuration, and calling a method parameter configuration.
And the xml file generation module is used for storing the preset function configuration into an xml file.
And the code generation module is used for generating codes according to the xml file.
And the control generation module is used for obtaining the control according to the codes.
And the packaging module is used for packaging the control.
As an optional implementation manner, the xml file generation module specifically includes:
And the root node generating unit is used for generating the root node of the xml file.
The attribute value generating unit is used for obtaining the value of the attribute of the root node according to the preset function configuration; the attributes include name, classname and guid.
And the declaration method node adding unit is used for adding a declaration method node and a declaration method parameter node under the root node according to the declaration method parameter configuration.
And the output method node adding unit is used for adding the output method node under the root node according to the output method parameter configuration.
And the xml file generating unit is used for adding a calling method node under the output method node according to the calling method parameter configuration to obtain an xml file.
As an optional implementation manner, the code generating module specifically includes:
and the attribute code generating unit is used for generating an attribute code according to the value of the attribute of the root node.
And the reference method code generating unit is used for generating a reference method code according to the declaration method node and the declaration method parameter node.
And the output method code generating unit is used for generating an output method code according to the output method node.
And the calling code generating unit is used for obtaining codes of calling the reference method and the output method according to the calling method node.
As an optional implementation manner, the control generation module specifically includes:
and the control generation unit is used for calling the Microsoft CSharp odeProvider class object of the NET component in the tool, and compiling the code to obtain the control.
The embodiment of the invention also provides electronic equipment, which comprises:
the electronic device comprises a memory and a processor, wherein the memory is used for storing a computer program, and the processor runs the computer program to enable the electronic device to execute the automatic compiling and packaging method of the card reading control according to the embodiment.
The embodiment of the invention also provides a computer readable storage medium which stores a computer program, and the computer program realizes the automatic compiling and packaging method of the card reading control according to the embodiment when being executed by a processor.
The beneficial effects of the invention are as follows: there are many controls in a hospital system that require interaction with third parties that require secondary packaging. According to the method and the device, a software developer is not needed, the dynamic library dll control which can be cited by the second party can be generated after configuration according to the need, and the control compatible with the third party can be quickly generated after configuration is changed if the third party is changed later, so that the project implementation online efficiency can be effectively improved, and the cost of software development is reduced.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to assist in understanding the methods of the present invention and the core ideas thereof; also, it is within the scope of the present invention to be modified by those of ordinary skill in the art in light of the present teachings. In view of the foregoing, this description should not be construed as limiting the invention.
Claims (8)
1. An automatic compiling and packaging method for a card reading control is characterized by comprising the following steps:
Generating a control unique identification code for registration and control statement of external reference according to the current time of the computer and the hardware number of the computer;
Acquiring a preset function configuration; the preset function configuration includes: configuring a preset main control and configuring a preset method; the main control configuration comprises the following steps: a control name, a main class name of the control and a control unique identification code; the method configuration comprises the following steps: declaring the parameter configuration of the method, outputting the parameter configuration of the method and calling the parameter configuration of the method;
Storing the preset function configuration into an xml file;
generating codes according to the xml file; setting a registry of a computer according to the guid attribute, wherein the guid can be retrieved;
Obtaining a control according to the code; the control is obtained according to the code specifically as follows: compiling the generated code, and exporting an htcslib. Dll control;
Packaging the control; the control is packaged specifically as follows: after the packaged htcslib. Dll control is installed on the computer, loading the card reading control in the card reading webpage according to the identification code;
Storing the preset function configuration into an xml file, which specifically comprises the following steps:
generating a root node of the xml file;
Obtaining the value of the attribute of the root node according to the preset function configuration; the attributes include name, classname and guid; the value of the attribute name of the root node is a control name; the value of the attribute classname of the root node is the main class name of the control; the value of the attribute guid of the root node is a control unique identification code;
Adding a declaration method node and a declaration method parameter node under the root node according to the declaration method parameter configuration;
Adding an output method node under the root node according to the output method parameter configuration;
and adding a calling method node under the output method node according to the calling method parameter configuration to obtain an xml file.
2. The automatic compiling and packaging method of the card reading control according to claim 1, wherein the code is generated according to the xml file, and specifically comprises the following steps:
generating an attribute code according to the value of the attribute of the root node;
generating a reference method code according to the declaration method node and the declaration method parameter node;
Generating an output method code according to the output method node;
and obtaining codes of the calling reference method and the output method according to the calling method node.
3. The automatic compiling and packaging method for the card reading control according to claim 1, wherein the obtaining the control according to the code specifically comprises:
and calling a NET component Microsoft.CSharp.CSharpCodProvider class object in the tool, and compiling the code to obtain the control.
4. An automated compiling packaging system for a card reading control, comprising:
The acquisition module is used for generating a control unique identification code for registration and control statement of external reference according to the current time of the computer and the hardware number of the computer; acquiring a preset function configuration; the preset function configuration includes: configuring a preset main control and configuring a preset method; the main control configuration comprises the following steps: a control name, a main class name of the control and a control unique identification code; the method configuration comprises the following steps: declaring the parameter configuration of the method, outputting the parameter configuration of the method and calling the parameter configuration of the method;
The xml file generation module is used for storing the preset function configuration into an xml file; setting a registry of a computer according to the guid attribute, wherein the guid can be retrieved;
The code generation module is used for generating codes according to the xml file; the control is obtained according to the code specifically as follows: compiling the generated code, and exporting an htcslib. Dll control;
The control generation module is used for obtaining a control according to the code; the control is packaged specifically as follows: after the packaged htcslib. Dll control is installed on the computer, loading the card reading control in the card reading webpage according to the identification code;
the packaging module is used for packaging the control;
The xml file generation module specifically comprises:
The root node generating unit is used for generating a root node of the xml file;
The attribute value generating unit is used for obtaining the value of the attribute of the root node according to the preset function configuration; the attributes include name, classname and guid; the value of the attribute name of the root node is a control name; the value of the attribute classname of the root node is the main class name of the control; the value of the attribute guid of the root node is a control unique identification code;
A declaration method node adding unit, configured to add a declaration method node and a declaration method parameter node under the root node according to the declaration method parameter configuration;
An output method node adding unit, configured to add an output method node under the root node according to the output method parameter configuration;
and the xml file generating unit is used for adding a calling method node under the output method node according to the calling method parameter configuration to obtain an xml file.
5. The automatic compiling and packaging system of the card reading control according to claim 4, wherein the code generating module specifically comprises:
an attribute code generating unit, configured to generate an attribute code according to a value of an attribute of the root node;
A reference method code generating unit, configured to generate a reference method code according to the declaration method node and the declaration method parameter node;
an output method code generating unit for generating an output method code according to the output method node;
and the calling code generating unit is used for obtaining codes of calling the reference method and the output method according to the calling method node.
6. The automatic compiling and packaging system of a card reading control according to claim 4, wherein the control generating module specifically comprises:
And the control generation unit is used for calling the NET component Microsoft.CSharp.CSharp Code provider class object in the tool, and compiling the code to obtain the control.
7. An electronic device, comprising:
A memory for storing a computer program, and a processor that runs the computer program to cause the electronic device to perform the automated compilation packaging method of a card-reading control according to any of claims 1 to 3.
8. A computer readable storage medium, characterized in that it stores a computer program, which when executed by a processor implements an automatic compilation packaging method of card-reading controls according to any of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310882510.5A CN116860321B (en) | 2023-07-18 | 2023-07-18 | Automatic compiling and packaging method and system for card reading control, electronic equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310882510.5A CN116860321B (en) | 2023-07-18 | 2023-07-18 | Automatic compiling and packaging method and system for card reading control, electronic equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116860321A CN116860321A (en) | 2023-10-10 |
CN116860321B true CN116860321B (en) | 2024-08-09 |
Family
ID=88223236
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310882510.5A Active CN116860321B (en) | 2023-07-18 | 2023-07-18 | Automatic compiling and packaging method and system for card reading control, electronic equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116860321B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102262394A (en) * | 2010-05-24 | 2011-11-30 | 通用汽车环球科技运作有限责任公司 | Vehicle system modeling systems and methods |
CN104049974A (en) * | 2014-06-25 | 2014-09-17 | 国家电网公司 | Dynamic control assembly method and system |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101882076A (en) * | 2010-04-06 | 2010-11-10 | 武汉理工大学 | A Control-Based Manufacturing Grid Resource Encapsulation Method |
CN104035754A (en) * | 2013-03-05 | 2014-09-10 | 北大方正集团有限公司 | XML (Extensible Markup Language)-based custom code generation method and generator |
CN112052006B (en) * | 2020-08-12 | 2021-06-15 | 武汉天喻信息产业股份有限公司 | Software code compiling method and system |
CN113688037A (en) * | 2021-08-19 | 2021-11-23 | 上海核工程研究设计院有限公司 | Nuclear power plant instrument control system software configuration debugging and packaging integrated method |
CN115951887A (en) * | 2023-01-03 | 2023-04-11 | 重庆长安汽车股份有限公司 | Control creating method, device, equipment and medium |
-
2023
- 2023-07-18 CN CN202310882510.5A patent/CN116860321B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102262394A (en) * | 2010-05-24 | 2011-11-30 | 通用汽车环球科技运作有限责任公司 | Vehicle system modeling systems and methods |
CN104049974A (en) * | 2014-06-25 | 2014-09-17 | 国家电网公司 | Dynamic control assembly method and system |
Also Published As
Publication number | Publication date |
---|---|
CN116860321A (en) | 2023-10-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7707553B2 (en) | Computer method and system for automatically creating tests for checking software | |
US6901588B1 (en) | Sharing components between programming languages by use of polymorphic proxy | |
Bryant et al. | Challenges and directions in formalizing the semantics of modeling languages | |
US8291375B2 (en) | Attribute-based component programming system and methodology for object-oriented languages | |
US20030200533A1 (en) | Method and apparatus for creating software objects | |
US6457172B1 (en) | Compiler for supporting multiple runtime data representations | |
JP5396979B2 (en) | Software development support device, system, software development support device function expansion method, and program | |
CA2477790A1 (en) | Methods for customizing software abstractions | |
US6378003B1 (en) | Method and system for deriving metaclasses in an object oriented system | |
JP2022545489A (en) | Smart contract client program generation method, system, device, and medium | |
CN115658187A (en) | Class implementation method, device, equipment and medium based on tangent plane-oriented programming | |
EP1452962B1 (en) | System and method for defining and using subclasses declaratively within markup | |
Oberleitner et al. | The Vienna Component Framework enabling composition across component models | |
WO2011042228A1 (en) | Method and system to handle java class versioning | |
Eichberg et al. | Alice: Modularization of middleware using aspect-oriented programming | |
CN116860321B (en) | Automatic compiling and packaging method and system for card reading control, electronic equipment and medium | |
Kramer et al. | Mapping aspect-oriented models to aspect-oriented code | |
CN117742783A (en) | Cross-language automatic log data recording method for software system | |
Gschwind | Adaptation and composition techniques for component-based software engineering | |
CN115586904B (en) | JSON data format description-based dynamic generation method for Java beans | |
Lüders | Use of component-based software architectures in industrial control systems | |
CN114996128B (en) | Script processing method, device and equipment based on ASM framework and storage medium | |
Shen et al. | Using Abstract State Machines to Support UML Model Instantiation Checking. | |
Hammer et al. | Pscs4cpp: A generative pscs implementation for c++ | |
CN115686676A (en) | Dynamic calling method and device of object and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | 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 |