Method, device and equipment for configuring link library files of new energy controllers on different platforms
By extracting the function symbol table of the new energy controller and configuring the interface code for the different platform call, the problem of difficulty in calling each other between the RTLAB and the ADPSS platforms is solved, the interoperability of the cross-platform link library is realized, and the operation experience and maintenance efficiency is improved. .
Patent Information
- Application Number
- CN202311534873.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2043-11-16
AI Technical Summary
There are limitations on the maintenance and use of the link library platform of the existing new energy simulator, which leads to poor experience for operators and makes it difficult for users to call link library files between the RTLAB and the ADPSS platform.
By extracting the function symbol table of the new energy controller, determining the link library type, and configuring the different platform to call the interface code based on this type, packaging it into the static link library file, generating the updated static link library file, and realizing the RTLAB and ADPSS platforms between the RTLAB and the ADPSS platform call each other.
It simplifies the maintenance and use of link libraries, allows users to call link library files of another platform on one platform, reduces the maintenance workload and improves the operating experience.
Smart Images

Figure CN117573193B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of link library technology, and in particular to a method, device and equipment for configuring a link library file of a new energy controller on a different platform. Background Art
[0002] Currently, there are many mainstream real-time simulators for new energy simulation, including RTDS, RTLAB, HyperSi m and ADPSS. In power grid systems, mainstream real-time simulators are often used to simulate primary power grid equipment of new energy. New energy manufacturers develop digital packaging models for specific real-time simulators to simulate new energy controllers in real time. The current mainstream new energy link library platforms are mainly RTLAB and ADPSS.
[0003] However, new energy manufacturers need to provide link libraries of both RTLAB and ADPSS real-time simulation platforms, which requires a lot of maintenance work. Moreover, users usually only have RTLAB or ADPSS real-time simulation platforms, and rarely have both platforms. This means that users with RTLAB platforms cannot use link library files of ADPSS platforms, and vice versa. Therefore, the maintenance and use experience of link libraries of existing real-time simulation platforms is still poor and cannot meet application requirements. Summary of the invention
[0004] The present application provides a method, device and equipment for configuring a link library file of a new energy controller on a different platform, which is used to solve the technical problem that the prior art has limitations on the maintenance and use of link libraries of different real-time simulation platforms, resulting in a poor operator experience.
[0005] In view of this, the first aspect of the present application provides a method for configuring a link library file of a new energy controller of a different platform, including:
[0006] Extracting a function symbol table from a current static link library file of the new energy controller by presetting a call instruction, wherein the function symbol table includes a plurality of function characters;
[0007] Determine the link library type of the new energy controller according to the function symbol table, the link library type includes an RTLAB link library and an ADPSS link library;
[0008] Based on the link library type, configuring different platform call interface codes for link libraries of different categories;
[0009] The cross-platform call interface code is packaged into the current static link library file through a function compilation operation to generate an updated static link library file.
[0010] Preferably, the link library type of the new energy controller is determined according to the function symbol table, and the link library type includes an RTLAB link library and an ADPSS link library, including:
[0011] The function characters in the function symbol table are compared and matched with the preset platform function library, and the link library type of the new energy controller is determined, and the link library type includes the RTLAB link library and the ADPSS link library.
[0012] Preferably, configuring different platform call interface codes for different types of link libraries based on the link library type includes:
[0013] If the link library type is an RTLAB link library, then configuring an ADP SS platform call interface code for the RTLAB link library;
[0014] If the link library type is an ADPSS link library, configuring an RTL AB platform call interface code for the ADPSS link library;
[0015] The different platform calling interface code includes the ADPSS platform calling interface code and the RTL AB platform calling interface code.
[0016] Preferably, the step of packaging the different platform call interface code into the current static link library file through a function compilation operation to generate an updated static link library file includes:
[0017] Compile the different platform call interface code into a target compiled file through a first compile instruction;
[0018] The target compiled file is packaged into the current static link library file through a second compilation instruction to generate an updated static link library file.
[0019] Preferably, the process of packaging the different platform call interface code into the current static link library file through a function compilation operation to generate an updated static link library file further includes:
[0020] The updated static link library file is run on different real-time simulation platforms to implement the calling of link library files on different platforms.
[0021] The second aspect of the present application provides a device for configuring a link library file of a new energy controller on a different platform, including:
[0022] A symbol extraction unit, used for extracting a function symbol table in a current static link library file of the new energy controller by presetting a call instruction, wherein the function symbol table includes a plurality of function characters;
[0023] A type identification unit, used for determining the link library type of the new energy controller according to the function symbol table, wherein the link library type includes an RTLAB link library and an ADPSS link library;
[0024] An interface configuration unit, used for configuring different-platform call interface codes for different types of link libraries based on the link library type;
[0025] The file generation unit is used to package the different platform call interface code into the current static link library file through a function compilation operation to generate an updated static link library file.
[0026] Preferably, the type identification unit is specifically used for:
[0027] The function characters in the function symbol table are compared and matched with the preset platform function library, and the link library type of the new energy controller is determined, and the link library type includes the RTLAB link library and the ADPSS link library.
[0028] Preferably, the interface configuration unit is specifically used to:
[0029] If the link library type is an RTLAB link library, then configuring an ADP SS platform call interface code for the RTLAB link library;
[0030] If the link library type is an ADPSS link library, configuring an RTL AB platform call interface code for the ADPSS link library;
[0031] The different platform calling interface code includes the ADPSS platform calling interface code and the RTL AB platform calling interface code.
[0032] Preferably, the file generating unit is specifically used for:
[0033] Compile the different platform call interface code into a target compiled file through a first compile instruction;
[0034] The target compiled file is packaged into the current static link library file through a second compilation instruction to generate an updated static link library file.
[0035] A third aspect of the present application provides a device for configuring a link library file of a new energy controller of a different platform, characterized in that the device includes a processor and a memory;
[0036] The memory is used to store program code and transmit the program code to the processor;
[0037] The processor is used to execute the cross-platform new energy controller link library file configuration method described in the first aspect according to the instructions in the program code.
[0038] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0039] In the present application, a method for configuring a link library file of a new energy controller on a different platform is provided, including: extracting a function symbol table in a current static link library file of the new energy controller by presetting a call instruction, the function symbol table including multiple function characters; determining a link library type of the new energy controller according to the function symbol table, the link library types including an RTLAB link library and an ADPSS link library; configuring a different-platform call interface code for different categories of link libraries based on the link library type; packaging the different-platform call interface code into the current static link library file through a function compilation operation, and generating an updated static link library file.
[0040] The method for configuring the link library file of a new energy controller on a different platform provided by the present application accurately identifies the link library type of the new energy controller, and then configures the corresponding cross-platform call interface code based on different types of link libraries, and writes it into the current static link library file; for platform maintenance, the manufacturer only needs to maintain the link library of one platform, and for users, the link libraries of different platforms can be called based on the cross-platform call interface code in the updated static link library file. Therefore, the present application can solve the technical problem that the prior art has limitations on the maintenance and use of link libraries of different real-time simulation platforms, resulting in a poor operator experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of a flow chart of a method for configuring a link library file of a new energy controller on a different platform provided in an embodiment of the present application;
[0042] Figure 2 A schematic diagram of the structure of a cross-platform new energy controller link library file configuration device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] For easier understanding, see Figure 1 , the embodiment of the method for configuring the link library file of the new energy controller of different platforms provided by the present application includes:
[0045] Step 101: extract a function symbol table from a current static link library file of a new energy controller by presetting a call instruction, wherein the function symbol table includes a plurality of function characters.
[0046] It should be noted that this embodiment can be executed in a Linux system, and the preset call instruction can be the command objdump-txxxx.a under the Linux system, where xxxx.a is the current static link library file of the new energy controller to be called. The preset call instruction can extract the function symbol by calling and running the current static link library file to generate a function symbol table; in essence, the preset call instruction is to print the function symbol of the static link library. The format of the function symbol table can be expressed as Xxx.a(xxxx.o):file format elf64-x86-64; the specific example is expressed as:
[0047] SYMBOL TABLE:
[0048] 00000000l F.text 000021f0_ZL18mdlInitializeSizesP13SimStruct_tag
[0049] 0000224e l F.text 00000035_ZL24mdlInitializeSampleTimesP13SimStruct_tag
[0050] 00002283l F.text 0000004c_ZL8mdlStartP13SimStruct_tag
[0051] 000022cf l F.text 00000021_ZL23mdlSetInputPortDataTypeP13SimStruct_tagii
[0052] 000022f0 l F.text 00000021_ZL24mdlSetOutputPortDataTypeP13SimStr uct_tagii
[0053] 00002311l F.text 0000002e_ZL26mdlSetDefaultPortDataTypesP13SimStruct_tag
[0054] 0000233f l F.text 0000102e_ZL10mdlOutputsP13SimStruct_tagi
[0055] 0000336d l F.text 0000002c_ZL12mdlTerminateP13SimStruct_ta
[0056] The format of the function symbol table can also be expressed as xxxxx.o:file format elf64-x86-64; the specific example is expressed as:
[0057] SYMBOL TABLE:
[0058] 00000000l df*ABS*00000000PLL_interface.cpp
[0059] 00000000l d.text 00000000.text
[0060] 00000000l d.data 00000000.data
[0061] 00000000l d.bss 00000000.bss
[0062] 00000000g F.text 000000e2 InitPLLTEST
[0063] 000000e2 g F.text 000000ae StepPLLTEST
[0064] 00000190g F.text 00000041TerminatePLLTEST
[0065] The above format and data examples of the function symbol table are only examples and are not intended to be the only limitation. It is sufficient that a function symbol table can be formed.
[0066] Step 102: Determine the link library type of the new energy controller according to the function symbol table. The link library types include RTLAB link library and ADPSS link library.
[0067] Further, step 102 includes:
[0068] The function characters in the function symbol table are compared and matched with the preset platform function library, and the link library type of the new energy controller is determined. The link library types include RTLAB link library and ADPSS link library.
[0069] The above-mentioned function symbol table contains a variety of function characters, and the link library type of the new energy controller can be identified based on these function characters; in this embodiment, if the function symbol table contains any of the functions mdlInitializeSizes, mdlInitializeSampleTimes, mdlStart, mdlOutputs, mdlTerminat e, mdlInitializeConditions, mdlDerivatives, and mdlUpdate, then the link library of the current new energy controller is determined to be a link library under the RTLAB platform, that is, the RTLAB link library.
[0070] If the function symbol table contains the three functions Init$ModelName, Step$ModelName, and Terminate$ModelName, the link library of the current new energy controller is judged to be the link library under the ADPSS real-time simulation platform, that is, the ADPSS link library. The $ModelName of different link libraries may be different. The preset platform function library setting can be performed according to the actual situation. The function characters in the function symbol table are compared and matched with the preset platform function library to determine the link library type.
[0071] Step 103: configuring different-platform call interface codes for different types of link libraries based on the link library type.
[0072] Further, step 103 includes:
[0073] If the link library type is RTLAB link library, configure the ADPSS platform call interface code for the RTLAB link library;
[0074] If the link library type is ADPSS link library, configure the RTLAB platform call interface code for the ADPSS link library;
[0075] The different platform call interface codes include ADPSS platform call interface codes and RTLAB platform call interface codes.
[0076] It should be noted that, in order to enable each user to call the link library files of other platforms based on his own platform, this embodiment configures different platform calling interface codes for different types of link libraries, that is, if the link library type is RTLAB link library, the ADPSS platform calling interface code is configured for the RTLAB link library; if the link library type is ADPSS link library, the RTLAB platform calling interface code is configured for the ADPSS link library.
[0077] The specific process is as follows: For the RTLAB link library of the RTLAB platform, configure the C language interface calling code of the ADPSS platform, that is, the ADPSS platform calling interface code. In the interface function Init@ModelName of the ADPSS platform, call the mdlInitializeSizes, mdlIn itializeSampleTimes, mdlInitializeConditions and mdlStart functions of the RTLAB platform link library. In the interface function Step$ModelName of the ADPSS platform, call the mdlDerivatives, mdlUpdate and mdlOutputs functions of the RTLAB platform link library. In the interface function Terminate$Model Name of the ADPSS platform, call the mdlTerminate function of the RTLAB platform link library. Through the ADPSS platform calling interface code, the ADPSS platform can call the static link library file of the RTLAB platform.
[0078] For the ADPSS link library of the ADPSS platform, configure the C language interface calling code of the RTLAB platform, that is, the RTLAB platform calling interface code. Call the Init@ModelName function of the RTLAB platform link library in the interface function mdlInitializeSizes of the RTLAB platform. Call the Step$ModelName function of the RTLAB platform link library in the interface function mdlOutputs of the RTLAB platform. Call the Terminate$ModelName function of the RTLAB platform link library in the interface function mdlTerminate of the RTLAB platform. Through the RTLAB platform calling interface code, the RTLAB platform can call the static link library file of the ADPSS platform.
[0079] Step 104: Pack the different platform call interface code into the current static link library file through function compilation operation to generate an updated static link library file.
[0080] Furthermore, step 104 includes:
[0081] Compile the different platform call interface code into a target compilation file through a first compilation instruction;
[0082] The target compiled file is packaged into the current static link library file through the second compilation instruction to generate an updated static link library file.
[0083] Furthermore, step 104 further includes:
[0084] Run and update static link library files on different real-time simulation platforms to implement cross-platform link library file calls.
[0085] In order to facilitate the calling, running and maintenance of the new energy controller, the cross-platform calling interface code needs to be compiled into a file of a suitable format. The first compilation instruction is used to compile the code into a compilation file, and the general compilation file format is .o; and the second compilation instruction is used to package the target compilation file into the current static link library file, and the format is .a. The updated static link library file can run on both the ADPS S platform and the RTLAB platform at the same time, and is compatible with the link libraries of the two platforms, which is convenient for manufacturers to maintain the link library, and can also enhance the user's experience of calling static link library files on different platforms, and the operation process is simple and easy to execute.
[0086] The method for configuring the link library file of a new energy controller on a different platform provided in the embodiment of the present application accurately identifies the link library type of the new energy controller, and then configures the corresponding cross-platform call interface code based on different types of link libraries, and writes it into the current static link library file; for platform maintenance, the manufacturer only needs to maintain the link library of one platform, and for users, the link libraries of different platforms can be called based on the cross-platform call interface code in the updated static link library file. Therefore, the embodiment of the present application can solve the technical problem that the prior art has limitations on the maintenance and use of link libraries of different real-time simulation platforms, resulting in a poor operator experience.
[0087] For easier understanding, see Figure 2 The present application provides an embodiment of a device for configuring a link library file of a new energy controller of a different platform, including:
[0088] A symbol extraction unit 201 is used to extract a function symbol table from a current static link library file of the new energy controller by presetting a call instruction, wherein the function symbol table includes a plurality of function characters;
[0089] A type identification unit 202 is used to determine the link library type of the new energy controller according to the function symbol table, and the link library type includes an RTLAB link library and an ADPSS link library;
[0090] The interface configuration unit 203 is used to configure different platform calling interface codes for different types of link libraries based on the link library type;
[0091] The file generating unit 204 is used to package the different platform call interface code into the current static link library file through a function compiling operation, and generate an updated static link library file.
[0092] Further, the type identification unit 202 is specifically configured to:
[0093] The function characters in the function symbol table are compared and matched with the preset platform function library, and the link library type of the new energy controller is determined. The link library types include RTLAB link library and ADPSS link library.
[0094] Further, the interface configuration unit 203 is specifically configured to:
[0095] If the link library type is RTLAB link library, configure the ADPSS platform call interface code for the RTLAB link library;
[0096] If the link library type is ADPSS link library, configure the RTLAB platform call interface code for the ADPSS link library;
[0097] The different platform call interface codes include ADPSS platform call interface codes and RTLAB platform call interface codes.
[0098] Furthermore, the file generating unit 204 is specifically configured to:
[0099] Compile the different platform call interface code into a target compilation file through a first compilation instruction;
[0100] The target compiled file is packaged into the current static link library file through the second compilation instruction to generate an updated static link library file.
[0101] The present application also provides a device for configuring a link library file of a new energy controller of a different platform, characterized in that the device includes a processor and a memory;
[0102] The memory is used to store the program code and transmit the program code to the processor;
[0103] The processor is used to execute the method for configuring the link library file of the new energy controller of a different platform in the above method embodiment according to the instructions in the program code.
[0104] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0105] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0106] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0107] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for executing all or part of the steps of the method described in each embodiment of the present application through a computer device (which can be a personal computer, a server, or a network device, etc.). The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (full name in English: Read-Only Memory, English abbreviation: ROM), random access memory (full name in English: Random Access Memory, English abbreviation: RAM), disk or optical disk and other media that can store program codes.
[0108] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for configuring a link library file of a new energy controller on a different platform, characterized in that: include: Extracting a function symbol table from a current static link library file of the new energy controller by presetting a call instruction, wherein the function symbol table includes a plurality of function characters; Determine the link library type of the new energy controller according to the function symbol table, the link library type includes an RTLAB link library and an ADPSS link library; Based on the link library type, different platform call interface codes are configured for different types of link libraries, and the configuration process is as follows: If the link library type is an RTLAB link library, then configuring an ADP SS platform call interface code for the RTLAB link library; If the link library type is an ADPSS link library, configuring an RTL AB platform call interface code for the ADPSS link library; The different platform calling interface code includes the ADPSS platform calling interface code and the RTL AB platform calling interface code; The cross-platform call interface code is packaged into the current static link library file through a function compilation operation to generate an updated static link library file. The specific process is as follows: Compile the different platform call interface code into a target compiled file through a first compile instruction; The target compiled file is packaged into the current static link library file through a second compilation instruction to generate an updated static link library file.
2. The method for configuring link library files of new energy controllers of different platforms according to claim 1, characterized in that: The link library type of the new energy controller is determined according to the function symbol table, and the link library type includes an RTLAB link library and an ADPSS link library, including: The function characters in the function symbol table are compared and matched with the preset platform function library, and the link library type of the new energy controller is determined, and the link library type includes the RTLAB link library and the ADPSS link library.
3. The method for configuring link library files of new energy controllers of different platforms according to claim 1, characterized in that: The function compiling operation is used to package the different platform call interface code into the current static link library file to generate an updated static link library file, and then the following steps are further included: The updated static link library file is run on different real-time simulation platforms to implement the calling of link library files on different platforms.
4. A device for configuring link library files of new energy controllers on different platforms, characterized in that: include: A symbol extraction unit, used for extracting a function symbol table in a current static link library file of the new energy controller by presetting a call instruction, wherein the function symbol table includes a plurality of function characters; A type identification unit, used for determining the link library type of the new energy controller according to the function symbol table, wherein the link library type includes an RTLAB link library and an ADPSS link library; The interface configuration unit is used to configure different platform call interface codes for different types of link libraries based on the link library type. The interface configuration unit is specifically used to: If the link library type is an RTLAB link library, then configuring an ADP SS platform call interface code for the RTLAB link library; If the link library type is an ADPSS link library, configuring an RTL AB platform call interface code for the ADPSS link library; The different platform calling interface code includes the ADPSS platform calling interface code and the RTL AB platform calling interface code; The file generation unit is used to package the different platform call interface code into the current static link library file through a function compilation operation to generate an updated static link library file. The file generation unit is specifically used to: Compile the different platform call interface code into a target compiled file through a first compile instruction; The target compiled file is packaged into the current static link library file through a second compilation instruction to generate an updated static link library file.
5. The device for configuring link library files of new energy controllers of different platforms according to claim 4, characterized in that: The type identification unit is specifically used for: The function characters in the function symbol table are compared and matched with the preset platform function library, and the link library type of the new energy controller is determined, and the link library type includes the RTLAB link library and the ADPSS link library.
6. A device for configuring link library files of new energy controllers on different platforms, characterized in that: The device comprises a processor and a memory; The memory is used to store program codes and transmit the program codes to the processor; The processor is used to execute the cross-platform new energy controller link library file configuration method described in any one of claims 1-3 according to the instructions in the program code.
Citation Information
Patent Citations
Universal system of link library and control method and device of universal system of link library
CN116756945A