CN117873607A - Processing method and device for target operation corresponding to custom function - Google Patents

Processing method and device for target operation corresponding to custom function Download PDF

Info

Publication number
CN117873607A
CN117873607A CN202311843800.5A CN202311843800A CN117873607A CN 117873607 A CN117873607 A CN 117873607A CN 202311843800 A CN202311843800 A CN 202311843800A CN 117873607 A CN117873607 A CN 117873607A
Authority
CN
China
Prior art keywords
function
file
self
custom
target
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
CN202311843800.5A
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.)
Beijing Aerospace Measurement and Control Technology Co Ltd
Original Assignee
Beijing Aerospace Measurement and Control Technology 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 Beijing Aerospace Measurement and Control Technology Co Ltd filed Critical Beijing Aerospace Measurement and Control Technology Co Ltd
Priority to CN202311843800.5A priority Critical patent/CN117873607A/en
Publication of CN117873607A publication Critical patent/CN117873607A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The application relates to a processing method and a processing device for target operation corresponding to a custom function, wherein a target file corresponding to a control command in a tester execution library is obtained in response to the control command corresponding to the custom function; acquiring a functional component corresponding to the custom function in the target file; and calling the functional component and executing the target operation corresponding to the self-defined function. The method solves the problems that the execution efficiency of the fixed SCPI command is lower and the bus resources are occupied, can directly issue a large number of test flows to the bus test instrument, and then execute the whole work flow through one command, so that the upper computer and the lower computer are reduced to the lowest, the execution efficiency can be obviously improved, the network overhead is reduced, and the network blocking caused by a large number of interactions is prevented.

Description

Processing method and device for target operation corresponding to custom function
Technical Field
The present disclosure relates to the field of test equipment, and in particular, to a method and an apparatus for processing a target operation corresponding to a custom function.
Background
The test instrument such as a desk oscilloscope, a digital meter and the like can be remotely controlled through various buses such as GPIB, serial ports, networks and the like. In practical application, the computer as the upper computer sends the SCPI command to the instrument and equipment as the lower computer, and the service program in the lower computer controller analyzes the SCPI command and performs corresponding operation.
However, the test instrument can only analyze a series of SCPI commands which are more general as a product, the upper computer with a complex test flow can send a large number of commands to the lower computer for interaction, a great deal of resources and time can be wasted in the interaction process, and if the business flow is directly solidified to the lower computer, the activity is very low.
Accordingly, there is a need to develop a method and apparatus for processing a target operation corresponding to a custom function, which solve one or more of the above problems.
Disclosure of Invention
In view of this, in order to solve the above technical problems or some technical problems, an embodiment of the present invention provides a method and an apparatus for processing a target operation corresponding to a custom function.
In a first aspect, the present application provides a method for processing a target operation corresponding to a custom function, which is applied to a tester, where the method includes:
responding to a control command corresponding to a self-defining function, and acquiring a target file corresponding to the control command in a tester execution library;
acquiring a functional component corresponding to the custom function in the target file;
and calling the functional component and executing the target operation corresponding to the self-defined function.
In one possible implementation manner, before the target file corresponding to the control command in the tester execution library is acquired in response to the control command corresponding to the custom function, the method further includes:
acquiring a function number of a custom function;
cross compiling the self-defined functions into dynamic library files, or generating script files according to the self-defined functions;
and adding the custom function and the corresponding dynamic library file or script file to an execution library according to the corresponding function number.
In one possible implementation manner, the cross-compiling the custom function into a dynamic library file includes:
acquiring a function source code corresponding to the custom function;
converting the functional source code into corresponding executable code by a compiler;
and generating a dynamic library file according to the executable codes, wherein the dynamic library file is used for searching the executable codes corresponding to the self-defined functions.
In one possible implementation manner, the generating a script file according to the custom function includes:
acquiring a function source code corresponding to the custom function;
and generating a script file according to the function source code, wherein the script file is used for searching the function source code corresponding to the self-defined function.
In one possible implementation, the custom function issuing command is in a programmable instrument standard command SCPI command format;
wherein the SCPI command format comprises:
*FUNdl{<num>,<type>,<auto>}
the num is the function number of the custom function, the type is the type parameter of the custom function, and the auto is the control parameter for automatically starting the custom function.
In one possible implementation manner, the obtaining the target file corresponding to the control command in the tester execution library includes:
acquiring a function number of a custom function corresponding to the control command;
under the condition that the function number exists in the execution library, acquiring a dynamic library file or a script file corresponding to the self-defined function from the execution library by utilizing the function number;
and taking the dynamic library file or the script file as a target file corresponding to the control command.
In one possible embodiment, the method further comprises:
determining the function number of the custom function under the condition that the function number does not exist in the execution library;
cross compiling the self-defined functions into dynamic library files, or generating script files according to the self-defined functions;
and taking the dynamic library file or the script file as a target file corresponding to the control command, and adding the custom function and the corresponding dynamic library file or script file to an execution library according to the corresponding function number.
In one possible implementation manner, the obtaining the function component corresponding to the custom function in the target file includes:
acquiring a dynamic library file or a script file corresponding to the user-defined function in the target file;
searching executable codes corresponding to the self-defining function in the dynamic library file under the condition that the target file is the dynamic library file;
if the target file is a script file, searching a function source code corresponding to the user-defined function in the script file;
and determining the functional component corresponding to the custom function according to the executable code or the function source code.
In one possible implementation manner, the calling the functional component to execute the target operation corresponding to the custom function includes:
when the target file is a dynamic library file, calling the functional component to execute executable codes corresponding to the self-defined functions, and completing execution of target operation;
and under the condition that the target file is a script file, calling the functional component to execute the function source code corresponding to the self-defined function, and completing the execution of the target operation.
In a second aspect, the present application provides a processing apparatus for performing a target operation corresponding to a custom function, where the processing apparatus includes:
a first acquisition module: the method comprises the steps of responding to a control command corresponding to a self-defining function, and obtaining a target file corresponding to the control command in a tester execution library;
and a second acquisition module: the function component corresponding to the self-defined function in the target file is obtained;
the execution module: and the function module is used for calling the function module and executing the target operation corresponding to the self-defined function.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: the method solves the problems that the execution efficiency of the fixed SCPI command is low and the bus resources are occupied, can directly issue a large number of test flows to the bus test instrument, and then executes the whole work flow through one command, so that the upper computer and the lower computer are reduced to the minimum, the execution efficiency can be obviously improved, the network overhead is reduced, and the network blocking caused by a large number of interactions is prevented.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures of the drawings are not to be taken in a limiting sense, unless otherwise indicated.
Fig. 1 is a flow chart of a processing method of a target operation corresponding to a custom function provided in an embodiment of the present application;
FIG. 2 is an operation flowchart of a method for processing a target operation corresponding to a custom function according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a processing device with a custom function corresponding to a target operation according to an embodiment of the present application;
fig. 4 is a connection schematic diagram of a processing device with a custom function corresponding to a target operation according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
The following disclosure provides many different embodiments, or examples, for implementing different structures of the invention. In order to simplify the present disclosure, components and arrangements of specific examples are described below. They are, of course, merely examples and are not intended to limit the invention. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed.
In order to solve the technical problems that in the prior art, a test instrument can only analyze a series of SCPI commands which are common as a product, a test flow is complex, a great amount of commands are sent to a lower computer for interaction by an upper opportunity, a great amount of resources and time are wasted in the interaction process, and the activity of the service flow is low when the service flow is directly solidified to the lower computer. The added test flow can be stored in the test instrument and set to be started up for automatic operation, so that full-automatic operation after starting up is realized.
The invention is based on the existing network bus test instrument, and a service program capable of analyzing the SCPI command can be operated in an embedded controller system of the instrument. The invention dynamically increases instrument functionality by adding a series of SCPI command and response processing. The added command is mainly divided into two parts, namely a custom function issuing command and a user custom command. The basic flow is to cross-compile the whole flow of the self-defined function into a dynamic library or script which can be operated in the embedded controller system, issue the dynamic library or script file to the embedded controller by the self-defined function issuing command, and then control the lower computer to directly execute the dynamic library or script file by using the user self-defined command.
Fig. 1 is a flow chart of a processing method of a target operation corresponding to a custom function according to an embodiment of the present application, as shown in fig. 1, where the processing method includes:
s101, responding to a control command corresponding to a self-defining function, and acquiring a target file corresponding to the control command in a tester execution library;
the tester receives a control command corresponding to the self-defining function, acquires a target file corresponding to the control command from an execution library formed by the target files executable in history, and can complete execution of the self-defining function according to the target file.
In this embodiment, the upper computer cross-compiles the whole process of the custom function to be added into a dynamic library file executable by the lower computer, or generates a shell script file executable by the lower computer as a target file.
S102, acquiring a function component corresponding to the self-defined function in the target file;
the object file contains function codes of function components corresponding to the execution custom functions.
In this embodiment, the upper computer sends a "custom function issuing command" to the lower computer, informs the number, dynamic library mode and whether to self-start the custom function issued by the lower computer, and the lower computer prepares to receive and store a function library or script file according to the command, obtains a function component corresponding to the custom function in the target file, and if the received command is to delete the custom function, controls the custom function component corresponding to the number to complete deletion by executing a function code.
S103, calling the functional component, and executing target operation corresponding to the self-defined function.
The tester is provided with a functional component, and target operation corresponding to the self-defined function can be executed by calling the functional component to execute the functional code.
In this embodiment, the upper computer sends the dynamic library or script file generated in the first step to the lower computer through protocols such as TC PIP and VXI-11, and the lower computer receives the file and stores the file according to the user-defined function number received in the second step (if the number is 1, the dynamic library is 1.So, and the shell script is 1. Sh) so as to be associated with the user-defined command.
If the file is needed to be automatically executed, a soft connection is added in a folder storing the self-starting file, the folder is scanned first when a service program in a lower computer starting controller is started, and if the file exists, the file is automatically executed.
It should be noted that, the "custom function" according to the embodiment of the present application may be a single operation function or a combination of multiple single operation functions, for example, a single operation function such as addition, deletion, query, or a combination function such as query-deletion, and when the combination function is processed, an execution sequence of each single function in the custom function is first determined, a target file is obtained according to the execution sequence, and a target operation corresponding to the custom function is sequentially executed by invoking the functional component according to a mapping relationship between the target file and the functional component.
According to the processing method for the target operation corresponding to the custom function, the target file corresponding to the control command corresponding to the custom function in the preset tester execution library is obtained, the function component corresponding to the custom function is further called through the target file, and the function source code is executed through the function component, so that the target operation corresponding to the custom function is executed. The method solves the problems that the execution efficiency of the fixed SCPI command is lower and the bus resources are occupied. The method can directly issue a large number of test flows to the bus test instrument, then execute the whole work flow through one command, reduce the upper computer and the lower computer to the minimum, obviously improve the execution efficiency, reduce the network overhead and prevent network blocking caused by a large number of interactions in a large-scale test system with a plurality of network bus test instruments. The function can be customized to be set into an automatic mode in the functional flow of only carrying out a large number of repeated steps without too much intervention of an upper computer, and then the automatic operation can be carried out after the automatic operation is started, and no interaction with the upper computer is needed.
In an alternative aspect of the embodiment of the present invention, before responding to a control command corresponding to a custom function, and acquiring a target file corresponding to the control command in a tester execution library, the method further includes:
acquiring a function number of a custom function;
cross compiling the self-defined functions into dynamic library files, or generating script files according to the self-defined functions;
and adding the custom function and the corresponding dynamic library file or script file to an execution library according to the corresponding function number.
In this embodiment, numbering is performed on the custom function or the basic conventional function, and the whole process is cross compiled into a dynamic library file, or the whole process of the custom function to be added generates a script file which can be executed in a lower computer; the functions and the corresponding dynamic library files or script files are sequentially added to the execution library according to different function numbers, the corresponding dynamic library files or script files can be directly obtained from the execution library in the follow-up self-defined function or the existing function execution process, and the execution of the functions is completed according to the dynamic library files or script files.
In an alternative aspect of the embodiment of the present invention, the cross-compiling the custom function into a dynamic library file includes:
acquiring a function source code corresponding to the custom function;
converting the functional source code into corresponding executable code by a compiler;
and generating a dynamic library file according to the executable codes, wherein the dynamic library file is used for searching the executable codes corresponding to the self-defined functions.
Code written in a high-level language is referred to as source code, such as a file with a suffix name of. C written in the C language, or a file with a suffix name of. Cpp written in c++. The source code cannot be executed by the machine and must be converted into binary machine code (instruction + data) to be executed by the CPU. The process of converting source code into machine code is known as compilation (compilation), the work of which requires a compiler to complete.
In this embodiment, the function source code corresponding to the custom function is obtained first, then the function source code is converted into an executable code that can be directly executed by the detector by using a compiler, and then the executable code is packaged into a dynamic library file, and the detector realizes the execution of the custom function by using the dynamic library file.
The whole flow of the self-defining function can be written into an executable function in the upper computer, wherein the function name is dynamically loaded when the self-defining function is conveniently executed by using a fixed name. The function may be written in the following format, and the entire flow of the custom function is written in the function body:
and then translated into a dynamic library for use in the system underlying the target using a cross-compilation tool chain or the like. When an arm architecture controller is used in a lower computer, the target dynamic library file is cross-compiled by using aarch64-linux-gnu-gcc corresponding to the lower computer system.
Specifically, the process of compiling codes by the compiler firstly performs grammar checking on the source codes, and only the source codes without grammar errors can be compiled. After compiling the source code does not generate the final executable File, but an intermediate File called Object File (Object File). For example, visual C++ has an object file suffix name of.obj, and GCC has an object file suffix name of.o, the source code may include a plurality of source files, such as main.c/fun1.c/fun2.c, etc., and the source files may be compiled one by a compiler. Thus, with several source files, several destination files are created, and all destination files are aggregated into a complete, executable file dynamic library file.
In an optional implementation manner of the embodiment of the present invention, the generating a script file according to the custom function includes:
acquiring a function source code corresponding to the custom function;
and generating a script file according to the function source code, wherein the script file is used for searching the function source code corresponding to the self-defined function.
In this embodiment, the custom function script is a shell script file that can be executed in the lower computer controller, and is written according to a script format that can be executed in the lower computer system.
In an alternative aspect of the embodiment of the present invention, the custom function issuing command is a programmable instrument standard command SCPI command format;
wherein the SCPI command format comprises:
*FUNdl{<num>,<type>,<auto>}
the num is the function number of the custom function, the type is the type parameter of the custom function, and the auto is the control parameter for automatically starting the custom function.
In this embodiment, the custom function issues a command using the SCPI command format, and adds the command format to the SCPI command tree of the lower computer, where the command format is as follows:
*FUNdl{<num>,<type>,<auto>}
the first parameter num is used for determining the issued self-defined function numbers, 0,1, 2, 3 and the like; the second parameter type is a specific type of a custom function or clears the function, such as deleting the issued dynamic library file (1), script file (2) and the like; the third parameter auto is used to indicate whether the function is started up automatically, 0 is not started up automatically, and 1 is started up automatically. For example, to add custom function number 0, dynamic library mode, and not automatically start, command ". Fundl 0,1,0" is sent to the lower computer. And transmitting a command of 'FUNdl 1,0 and 0' to the lower computer to delete the issued number 1 custom function.
In an alternative aspect of the embodiment of the present invention, the obtaining the target file corresponding to the control command in the tester execution library includes:
acquiring a function number of a custom function corresponding to the control command;
under the condition that the function number exists in the execution library, acquiring a dynamic library file or a script file corresponding to the self-defined function from the execution library by utilizing the function number;
and taking the dynamic library file or the script file as a target file corresponding to the control command.
In an alternative aspect of the embodiment of the present invention, the method further includes:
determining the function number of the custom function under the condition that the function number does not exist in the execution library;
cross compiling the self-defined functions into dynamic library files, or generating script files according to the self-defined functions;
and taking the dynamic library file or the script file as a target file corresponding to the control command, and adding the custom function and the corresponding dynamic library file or script file to an execution library according to the corresponding function number.
For example, executing custom commands uses the SCPI command format, added to the lower computer SCPI command tree. The command format is as follows:
*FUN{<num>}
wherein the parameter num is used for determining the number of the user-defined function to be executed, 0,1, 2, 3 and the like;
the dynamic library workflow used as user-defined commands is as follows:
firstly, the upper computer sends a user-defined command to the lower computer according to the self-defined function number to be executed, and informs the lower computer of the function number to be executed, such as 'FUN 1';
and secondly, searching a corresponding file according to the number after the lower computer service program obtains the function number, dynamically loading the library by using a function dlopen if the corresponding file is a 1.So dynamic library file, acquiring the address of a custom function func in the dynamic library by using a dlsym function, and finally executing the function.
In an alternative aspect of the embodiment of the present invention, the obtaining the functional component corresponding to the custom function in the target file includes:
acquiring a dynamic library file or a script file corresponding to the user-defined function in the target file;
searching executable codes corresponding to the self-defining function in the dynamic library file under the condition that the target file is the dynamic library file;
if the target file is a script file, searching a function source code corresponding to the user-defined function in the script file;
and determining the functional component corresponding to the custom function according to the executable code or the function source code.
In this embodiment, the corresponding functional components of the custom function on the tester are determined according to the dynamic library file or the script file, when the target file is the dynamic library file, executable codes are obtained from the dynamic library file, the corresponding functional components are determined according to the executable codes, and when the target file is the script file, the custom function operation can be completed by executing the functional components according to the function source code.
In an alternative aspect of the embodiment of the present invention, the calling the functional component, executing the target operation corresponding to the custom function, includes:
when the target file is a dynamic library file, calling the functional component to execute executable codes corresponding to the self-defined functions, and completing execution of target operation;
and under the condition that the target file is a script file, calling the functional component to execute the function source code corresponding to the self-defined function, and completing the execution of the target operation.
In this embodiment, the workflow for the dynamic library as used by the user-defined command is as follows:
firstly, the upper computer sends a user-defined command to the lower computer according to the self-defined function number to be executed, and informs the lower computer of the function number to be executed, such as 'FUN 1';
step two, the lower computer service program searches the corresponding file according to the number after obtaining the function number, if the file is found to be a 1.So dynamic library file, the library is dynamically loaded by using a function dlopen, then the address of a custom function func in the dynamic library is obtained by using a dlsym function, and finally a function component is called to execute the function;
in this embodiment, the script workflow used by the user-defined command is as follows:
firstly, the upper computer sends a user-defined command to the lower computer according to the self-defined function number to be executed, and informs the lower computer of the function number to be executed, such as 'FUN 1';
secondly, after the lower computer service program obtains the function number, searching the corresponding file according to the number, if the corresponding file is the 1.Sh script file, using the corresponding function, and calling the function component to execute the script, such as ' system (' 1.Sh '); ".
Fig. 2 is an operation flowchart of a processing method of a target operation corresponding to a custom function provided in an embodiment of the present application, as shown in fig. 2,
in this embodiment, the custom function is taken as an example of an add or delete function:
firstly, generating a dynamic library file or a script file according to an adding or deleting function, then sending a custom function issuing command to a lower computer, and calling a function component to execute the custom function command by the lower computer according to the dynamic library or the script file.
For example: writing a functional flow as a functional function
The above functions are compiled into a dynamic library 1.So by a cross compiler.
The upper computer sends a command "FUNdl 1,0" to the lower computer and then writes 1.So to the lower computer also via the network.
The upper computer sends a command 'FUN 1' to the lower computer, and the lower computer automatically executes the self-defining function 1.
Fig. 3 is a schematic structural diagram of a processing device with a custom function corresponding to a target operation according to an embodiment of the present application, and as shown in fig. 3, the processing device includes:
the first acquisition module 301: the method comprises the steps of responding to a control command corresponding to a self-defining function, and obtaining a target file corresponding to the control command in a tester execution library;
the second acquisition module 302: the function component corresponding to the self-defined function in the target file is obtained;
execution module 303: and the function module is used for calling the function module and executing the target operation corresponding to the self-defined function.
In a possible embodiment, the processing device further includes an adding module 304 (not shown in the figure) for obtaining a function number of the custom function; cross compiling the self-defined functions into dynamic library files, or generating script files according to the self-defined functions; and adding the custom function and the corresponding dynamic library file or script file to an execution library according to the corresponding function number.
In a possible implementation manner, the adding module 304 is further configured to obtain a function source code corresponding to the custom function; converting the functional source code into corresponding executable code by a compiler; and generating a dynamic library file according to the executable codes, wherein the dynamic library file is used for searching the executable codes corresponding to the self-defined functions.
In a possible implementation manner, the adding module 304 is further configured to obtain a function source code corresponding to the custom function;
and generating a script file according to the function source code, wherein the script file is used for searching the function source code corresponding to the self-defined function.
In a possible implementation manner, the first obtaining module 301 is further configured to obtain a function number of the custom function corresponding to the control command; under the condition that the function number exists in the execution library, acquiring a dynamic library file or a script file corresponding to the self-defined function from the execution library by utilizing the function number; and taking the dynamic library file or the script file as a target file corresponding to the control command.
In a possible implementation manner, the first obtaining module 301 is further configured to determine a function number of the custom function in a case where the function number does not exist in the execution library; cross compiling the self-defined functions into dynamic library files, or generating script files according to the self-defined functions; and taking the dynamic library file or the script file as a target file corresponding to the control command, and adding the custom function and the corresponding dynamic library file or script file to an execution library according to the corresponding function number.
In a possible implementation manner, the second obtaining module 302 is further configured to obtain a dynamic library file or a script file corresponding to the custom function in the target file; searching executable codes corresponding to the self-defining function in the dynamic library file under the condition that the target file is the dynamic library file; if the target file is a script file, searching a function source code corresponding to the user-defined function in the script file; and determining the functional component corresponding to the custom function according to the executable code or the function source code.
In a possible implementation manner, the executing module 303 is further configured to, when the target file is a dynamic library file, invoke the functional component to execute executable code corresponding to the custom function, so as to complete execution of the target operation; and under the condition that the target file is a script file, calling the functional component to execute the function source code corresponding to the self-defined function, and completing the execution of the target operation.
The processing device provided in this embodiment may be a processing device with a custom function corresponding to a target operation as shown in fig. 3, and may execute all steps of the processing method with a custom function corresponding to a target operation as shown in fig. 1-2, so as to achieve the technical effects of the processing method with a custom function corresponding to a target operation as shown in fig. 1-2, and the detailed description is omitted herein for brevity.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Fig. 4 is a connection schematic diagram of a processing device with a custom function corresponding to a target operation according to an embodiment of the present application, as shown in fig. 4, where the processing device connects a controller with a computer through a network cable, and the controller is connected with a function board card, which may be used to control functional components of the function board card.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, or may be implemented by hardware. Based on such understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the related art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the method described in the respective embodiments or some parts of the embodiments.
It is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only, and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises," "comprising," "includes," "including," and "having" are inclusive and therefore specify the presence of stated features, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and/or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order described or illustrated, unless an order of performance is explicitly stated. It should also be appreciated that additional or alternative steps may be used.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A processing method of a target operation corresponding to a self-defined function is applied to a tester and is characterized by comprising the following steps:
responding to a control command corresponding to a self-defining function, and acquiring a target file corresponding to the control command in a tester execution library;
acquiring a functional component corresponding to the custom function in the target file;
and calling the functional component and executing the target operation corresponding to the self-defined function.
2. The method of claim 1, wherein before obtaining the target file corresponding to the control command in the tester execution library in response to the control command corresponding to the custom function, the method further comprises:
acquiring a function number of a custom function;
cross compiling the self-defined functions into dynamic library files, or generating script files according to the self-defined functions;
and adding the custom function and the corresponding dynamic library file or script file to an execution library according to the corresponding function number.
3. The method of claim 2, wherein cross-compiling the custom function into a dynamic library file comprises:
acquiring a function source code corresponding to the custom function;
converting the functional source code into corresponding executable code by a compiler;
and generating a dynamic library file according to the executable codes, wherein the dynamic library file is used for searching the executable codes corresponding to the self-defined functions.
4. The method of claim 2, wherein generating a script file from the custom function comprises:
acquiring a function source code corresponding to the custom function;
and generating a script file according to the function source code, wherein the script file is used for searching the function source code corresponding to the self-defined function.
5. The method of claim 1, wherein the custom function issuing command is in a programmable instrument standard command SCPI command format;
wherein the SCPI command format comprises:
*FUNdl{<num>,<type>,<auto>}
the num is the function number of the custom function, the type is the type parameter of the custom function, and the auto is the control parameter for automatically starting the custom function.
6. The method of claim 1, wherein the obtaining the target file in the tester execution library corresponding to the control command comprises:
acquiring a function number of a custom function corresponding to the control command;
under the condition that the function number exists in the execution library, acquiring a dynamic library file or a script file corresponding to the self-defined function from the execution library by utilizing the function number;
and taking the dynamic library file or the script file as a target file corresponding to the control command.
7. The method of claim 6, wherein the method further comprises:
determining the function number of the custom function under the condition that the function number does not exist in the execution library;
cross compiling the self-defined functions into dynamic library files, or generating script files according to the self-defined functions;
and taking the dynamic library file or the script file as a target file corresponding to the control command, and adding the custom function and the corresponding dynamic library file or script file to an execution library according to the corresponding function number.
8. The method of claim 1, wherein the obtaining the function component in the target file corresponding to the custom function includes:
acquiring a dynamic library file or a script file corresponding to the user-defined function in the target file;
searching executable codes corresponding to the self-defining function in the dynamic library file under the condition that the target file is the dynamic library file;
if the target file is a script file, searching a function source code corresponding to the user-defined function in the script file;
and determining the functional component corresponding to the custom function according to the executable code or the function source code.
9. The method of claim 1, wherein the invoking the functional component to perform the target operation corresponding to the custom function comprises:
when the target file is a dynamic library file, calling the functional component to execute executable codes corresponding to the self-defined functions, and completing execution of target operation;
and under the condition that the target file is a script file, calling the functional component to execute the function source code corresponding to the self-defined function, and completing the execution of the target operation.
10. A processing apparatus for a target operation corresponding to a custom function, comprising:
a first acquisition module: the method comprises the steps of responding to a control command corresponding to a self-defining function, and obtaining a target file corresponding to the control command in a tester execution library;
and a second acquisition module: the function component corresponding to the self-defined function in the target file is obtained;
the execution module: and the function module is used for calling the function module and executing the target operation corresponding to the self-defined function.
CN202311843800.5A 2023-12-28 2023-12-28 Processing method and device for target operation corresponding to custom function Pending CN117873607A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311843800.5A CN117873607A (en) 2023-12-28 2023-12-28 Processing method and device for target operation corresponding to custom function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311843800.5A CN117873607A (en) 2023-12-28 2023-12-28 Processing method and device for target operation corresponding to custom function

Publications (1)

Publication Number Publication Date
CN117873607A true CN117873607A (en) 2024-04-12

Family

ID=90578605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311843800.5A Pending CN117873607A (en) 2023-12-28 2023-12-28 Processing method and device for target operation corresponding to custom function

Country Status (1)

Country Link
CN (1) CN117873607A (en)

Similar Documents

Publication Publication Date Title
US9274930B2 (en) Debugging system using static analysis
CN101681280A (en) In-process debugging using external debugging infrastructure
US11093226B2 (en) Methods, systems, and apparatus for a generic firmware-based kernel library mechanism
CN111427583A (en) Component compiling method and device, electronic equipment and computer readable storage medium
CN114116134A (en) Intelligent contract deployment and execution method, equipment and storage medium
CN110990001A (en) IVR (Interactive Voice response) process execution method and device
CN114895935A (en) Method and device for flashing vehicle ECU, electronic equipment and storage medium
CN115994085A (en) Code coverage rate test processing method, device, equipment and storage medium
CN108694049B (en) Method and equipment for updating software
CN111240681A (en) Method and device for converting different programming languages
CN117873607A (en) Processing method and device for target operation corresponding to custom function
CN108460276B (en) Processing method and device for SO file of dynamic link library of android installation package
US8108828B2 (en) System for generating optimized computer data field conversion routines
CN111596923B (en) Haxe static link library construction method and device and electronic equipment
CN113254027A (en) Method, system, equipment and storage medium for converting control program of semiconductor equipment
CN111078548A (en) Test case analysis method and device, storage medium and verification platform
CN116126366B (en) Chip input/output interface configuration method, device, medium and electronic equipment
CN115576574A (en) Code packaging method, device, medium and equipment
CN114816407A (en) Component packaging method and device, electronic equipment and storage medium
JP5067705B2 (en) Abnormal test support device, abnormal test support method, and program
CN117667725A (en) Database script generation method, device and equipment and readable storage medium
CN116820970A (en) Program testing method, device, medium and equipment
CN116069302A (en) Extension method, device and equipment of compiler hardware back end and readable storage medium
CN118069513A (en) Method, device, equipment and medium for generating relocation command
CN117492747A (en) Compiler back-end multiplexing method and device, compiler and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication