CN115473943A - Interface extension method, extension interface using method, system and storage medium - Google Patents

Interface extension method, extension interface using method, system and storage medium Download PDF

Info

Publication number
CN115473943A
CN115473943A CN202210973482.3A CN202210973482A CN115473943A CN 115473943 A CN115473943 A CN 115473943A CN 202210973482 A CN202210973482 A CN 202210973482A CN 115473943 A CN115473943 A CN 115473943A
Authority
CN
China
Prior art keywords
communication protocol
interface
target open
open communication
simulation system
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
CN202210973482.3A
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.)
Siemens Ltd China
Original Assignee
Siemens Ltd China
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 Siemens Ltd China filed Critical Siemens Ltd China
Priority to CN202210973482.3A priority Critical patent/CN115473943A/en
Publication of CN115473943A publication Critical patent/CN115473943A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/03Protocol definition or specification 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/306User profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/164Adaptation or special uses of UDP protocol
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses an interface extension method, an extension interface use system and a storage medium. The interface extension method comprises the following steps: three types of files are created in advance, which include: the resource type file is used for defining a user interface of the target open communication protocol; a configuration file for configuring various information defined in the user interface; the communication class file is used for carrying out target open type communication protocol data transmission; compiling the three types of files and generating an executable file, so that when the executable file is executed, the data of the target open communication protocol can be transmitted between the virtual simulation system and a target open communication protocol device, and the interface extension of the target open communication protocol of the virtual simulation system is realized. The technical scheme in the embodiment of the invention can realize the interface expansion of the virtual simulation system.

Description

Interface extension method, extension interface using method, system and storage medium
Technical Field
The invention relates to the technical field of industry, in particular to an interface extension method, an extension interface using system and a computer readable storage medium of a virtual simulation system.
Background
Currently, some virtual simulation systems exist for performing virtual debugging or virtual training. Some virtual simulation systems, such as the SIMIT software system of siemens, may support software and hardware connection manners such as PLCSIM Advanced, PLCSIM, SIMIT Unit, NX MCD, and the like, and support standard communication manners such as OPC DA, OPC UA, and the like, but do not support open communication protocols such as Transmission Control Protocol (TCP), user Datagram Protocol (UDP), and the like, and are not convenient for some products, such as an ohm dragon Programmable Logic Controller (PLC), to be accessed into the virtual simulation system.
At present, for a virtual simulation system which does not support open communication protocols such as TCP and UDP, if a device which needs to be accessed through the open communication protocols such as TCP and UDP needs to be accessed, a gateway device needs to be set first. For example, for the SIMIT software system of siemens, a siemens PLC may be employed as the gateway. Then, the device which needs to be accessed through an open communication protocol such as TCP, UDP, or the like can exchange data with the gateway, and then the gateway exchanges data with the virtual simulation system. It can be seen that the hardware cost of the gateway needs to be increased in the current method, and the communication delay is caused because the gateway needs to consume the communication time.
Accordingly, those skilled in the art are also working to find other interface extension implementations of virtual simulation systems.
Disclosure of Invention
In view of this, the embodiments of the present invention provide an interface extension method and an extended interface using method for a virtual simulation system on the one hand, and provide an interface extension system, an extended interface using system, a computer system, and a computer-readable storage medium for a virtual simulation system on the other hand, so as to add a communication function of a target open communication protocol to the virtual simulation system, thereby implementing interface extension of the virtual simulation system.
The interface extension method for the virtual simulation system provided by the embodiment of the invention comprises the following steps: three types of files are created in advance, which comprise: the resource type file is used for defining a user interface of the target open communication protocol; a configuration file for configuring various information defined in the user interface; the communication type file is used for carrying out target open type communication protocol data transmission; compiling the three types of files and generating an executable file, so that when the executable file is executed, the data of the target open communication protocol can be transmitted between the virtual simulation system and a target open communication protocol device, and the interface extension of the target open communication protocol of the virtual simulation system is realized.
The method for using the expansion interface of the virtual simulation system provided by the embodiment of the invention comprises the following steps: providing a target open type communication protocol connection option of a user, generating a target open type communication protocol connection interface after receiving an operation that the user clicks the target open type communication protocol connection option, and receiving the configuration of the user on the target open type communication protocol connection based on the target open type communication protocol connection interface; and transmitting target open communication protocol data between the virtual simulation system and a target open communication protocol device based on the configuration of the target open communication protocol connection.
The interface extension system of the virtual simulation system provided in the embodiment of the invention comprises: the storage module is used for storing three types of files which are created in advance and comprises: the resource type file is used for defining a user interface of the target open type communication protocol; a configuration file for configuring various information defined in the user interface; the communication type file is used for carrying out target open type communication protocol data transmission; and the compiling module is used for compiling the three types of files and generating an executable file, so that when the executable file is executed, the data of the target open communication protocol can be transmitted between the virtual simulation system and a target open communication protocol device, and the interface extension of the target open communication protocol of the virtual simulation system is realized.
The system for using the expansion interface of the virtual simulation system provided by the embodiment of the invention comprises: the user interface module is used for providing a target open type communication protocol connection option for a user, generating a target open type communication protocol connection interface after receiving the operation that the user clicks the target open type communication protocol connection option, and receiving the configuration of the user on the target open type communication protocol connection based on the target open type communication protocol connection interface; and the data transmission module is used for transmitting the target open type communication protocol data between the virtual simulation system and a target open type communication protocol device based on the configuration of the target open type communication protocol connection.
Another interface extension system of a virtual simulation system provided in an embodiment of the present invention includes: at least one memory and at least one processor, wherein: the at least one memory is for storing a computer program; the at least one processor is configured to invoke the computer program stored in the at least one memory, to perform the interface extension method of the virtual simulation system as described in any of the above and/or to perform the extension interface usage method of the virtual simulation system as described in any of the above.
A computer-readable storage medium provided in an embodiment of the present invention, on which a computer program is stored; the computer program is capable of being executed by a processor and of implementing an interface extension method for a virtual simulation system as described in any one of the above and/or of performing an extended interface usage method for a virtual simulation system as described in any one of the above.
It can be seen from the foregoing solution that, in the embodiment of the present invention, by setting a resource class file for defining a user interface of a target open communication protocol, a configuration class file for configuring various information defined in the user interface, and a communication class file for performing data transmission of the target open communication protocol, and compiling the three classes of files and generating an executable file, an interface extension of the target open communication protocol of the virtual simulation system is implemented by executing the executable file.
Drawings
The foregoing and other features and advantages of the invention will become more apparent to those skilled in the art to which the invention relates upon consideration of the following detailed description of a preferred embodiment of the invention with reference to the accompanying drawings, in which:
fig. 1 is an exemplary flowchart of an interface expansion method of a virtual simulation system according to an embodiment of the present invention.
FIG. 2 is a flowchart illustrating a method for using an extended interface of a virtual simulation system according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of a portion of a UDP connection interface in accordance with an example of the present invention.
FIG. 4 is a diagram of input variables and output variables created in one example of the invention.
Fig. 5 is an exemplary structural diagram of an interface extension system of the virtual simulation system in the embodiment of the present invention.
Fig. 6 is an exemplary structural diagram of an extended interface usage system of the virtual simulation system in the embodiment of the present invention.
FIG. 7 is an exemplary block diagram of a computer system in an embodiment of the invention.
Wherein the reference numbers are as follows:
reference numerals Means of
101、102、201、202 Step (ii) of
501 Memory module
502 Compiling module
601 User interface module
602 Data transmission module
71 Memory device
72 Processor with a memory for storing a plurality of data
73 Bus line
Detailed Description
In the embodiment of the present invention, a console module, such as a Visual Studio console module, for generating an executable file of an open communication protocol such as TCP or UDP is considered to be created.
In order to make the objects, technical solutions and effects of the present invention more clearly understood, embodiments of the present invention will now be described with reference to the accompanying drawings, in which like reference numerals refer to components having the same structure or similar structure but having the same function.
"exemplary," "exemplary," means "serving as an example, instance, or illustration," and any illustrations, implementations, or descriptions herein described as "exemplary," "exemplary," should not be construed as a more preferred or advantageous solution.
For the sake of simplicity, the drawings only schematically show the parts relevant to the present invention, and they do not represent the actual structure as a product.
In this document, "one" means not only "only one" but also a case of "more than one". In this document, "first", "second", and the like are used only for distinguishing one from another, and do not indicate their degree of importance, order, and the like.
Fig. 1 is an exemplary flowchart of an interface expansion method of a virtual simulation system according to an embodiment of the present invention. As shown in fig. 1, the method may include the steps of:
step 101, three types of files are created in advance, namely: the system comprises a resource class file used for defining a user interface of a target open communication protocol, a configuration class file used for configuring various information defined in the user interface, and a communication class file used for transmitting data of the target open communication protocol. In this embodiment, the target open communication protocol may be an open communication protocol such as TCP or UDP.
In this embodiment, in a specific implementation, the user interface of the target open communication protocol may include: connection attributes, actions to create input-output variables, and input-output signal attributes of the target open communication protocol. Accordingly, the resource class file may include: a first resource class file for defining the connection attribute; a second resource class file for defining the create input output variable action; and a third resource class file for defining said input output signal attributes.
In one embodiment, the connection attributes of the target open communication protocol include: some or all of remote IP address, remote communication port, local communication port, input data type, input data length, output data type, output data length, data exchange, debug, author, version.
The act of creating an input-output variable may comprise: some or all of create variables, add variables, import variables, export variables, and delete variables.
The signal attributes may include: input-output address and signal data type.
For example, in one example, for a SIMIT software system, the resource class file may include:
1) The node property resource (node properties. Resx) is a first resource class file, and is used to define connection properties of a target open communication protocol, such as a remote IP address, a communication port, and the like.
In one example, in order to arrange the attributes in a certain order in the connection attributes, the name names of the attributes may be arranged in a set order, for example, in a manner of "Configuration _ PA _", "Configuration _ PB _", or "Configuration _ PC _". For example, in an example, taking UDP connection as an example, the name of its connection attribute and its corresponding value may include:
"Configuration _ Caption", and its corresponding value may be "UDP Communication";
"Configuration _ PA _ RemoteIP", which may correspond to a value of "Remote IP Address";
"Configuration _ PB _ RemotePort", which may have a corresponding value of "Remote Port";
"Configuration _ PC _ Local Port", whose corresponding value may be "Local Port";
"Configuration _ PD _ InputDataType", and its corresponding value may be "Input Data Type";
"Configuration _ PE _ InputDataLength", which may have a corresponding value of "Input Data Length";
"Configuration _ PF _ OutputDataType", and its corresponding value may be "Output Data Type";
"Configuration _ PG _ OutputDataLength", which may have a corresponding value "Output Data Length";
"Configuration _ PH _ datastap", and its corresponding value may be "Data tap" (Data exchange) ";
"Configuration _ PI _ Debug", which may correspond to a value of "Debug";
"Configuration _ PJ _ Author", which may correspond to a value of "Author";
"Configuration _ PK _ Version", and its corresponding value may be "Version".
2) Resx, a second resource class file, is used to define actions for input and output variables, such as creating an input or output variable, adding a byte input variable, deleting a Word type output variable, importing a variable, exporting a variable, deleting the last variable, etc. For example, in an example, taking UDP connection as an example, the names of the input and output variables and their corresponding values may include:
"Configuration _ AddDefault", which may correspond to a value of "Generation I/O (create input or output variable)"; this variable will correspond to a "Generate Input or Output variable" button generated on the user interface, and when this button is clicked, the corresponding SIMIT Input or Output variable will be created based on the attributes "Input data length", "Output data length", etc. defined in the UDP connection attribute interface in this embodiment.
"Configuration _ addlnput 1", which may correspond to a value of "+ Input Byte (add Byte Input variable)"; this variable will correspond to an "add Byte input variable" button generated on the user interface, which when clicked, will add a simple input variable of Byte type in this embodiment.
"Configuration _ addlnput 2", which may correspond to a value of "+ Input Word (add font Input variable)"; this variable will correspond to an "add font input variable" button generated on the user interface, which when clicked, will add a SIMIT input variable of the Word type in this embodiment.
"Configuration _ addlnput 3", which may correspond to a value of "+ Input DWord (add bigram Input variable)"; this variable will correspond to an "add double type input variable" button generated on the user interface, which when clicked, will add a SIMIT input variable of DWord (double type) type in this embodiment.
"Configuration _ AddOutput1", which may have a corresponding value of "+ Output Byte (add Byte Output variable)"; this variable will correspond to an "add Byte output variable" button generated on the user interface, which when clicked, will add a simple output variable of Byte type in this embodiment.
"Configuration _ AddOutput2", whose corresponding value may be "+ Output Word (add font Output variable)"; this variable will correspond to an "add font output variable" button generated on the user interface, which when clicked, will add a SIMIT output variable of Word (font) type in this embodiment.
"Configuration _ AddOutput3", whose corresponding value may be "+ Output DWord (add double-type Output variable)"; this variable will correspond to an "add double type output variable" button generated on the user interface, which when clicked, will add a DWord (double type) type SIMIT output variable in this embodiment.
"Configuration _ ExportSignals", which may correspond to a value of "ExportSignals (derived variables)"; this variable will correspond to an "export variables" button generated on the user interface, which when clicked exports the already defined SIMIT input output variables into the CSV file in this embodiment.
"Configuration _ importation Signals", the corresponding value of which may be "importation Signals"; this variable will correspond to an "import variable" button generated on the user interface, and when this button is clicked, the corresponding SIMIT input or output variable will be generated from the imported CSV file in this embodiment.
"Configuration _ importsignalfromppartner", which may correspond to a value of "importsignals From Partner" (negation generating variable) "; the variable corresponds to a button of 'negating generation variable' generated on the user interface, when the button is clicked, the local side SIMIT input and output variable is generated according to the type of the communication partner side SIMIT input and output variable in the embodiment, for example, the partner side SIMIT input and output variable is used as the input variable, and a corresponding output variable is created on the local side.
"Configuration _ removeLastSignal", which may correspond to a value of "Remove Last Signal (delete Last variable)". The variable will correspond to a "delete last variable" button generated on the user interface, which when clicked, will delete the last variable in this embodiment.
3) Signal properties resource (signal properties. Resx), a third resource class file, is used to define the signal properties of SIMIT, such as address, type, etc.
In one example, for the SIMIT software system, a configuration class file (e.g., configuration. Cs) may be used to configure various attributes defined in the UI interface, including initializing connection parameters of a target open communication protocol, such as UDP, and defining types and lengths of SIMIT input and output variables for data exchange between the target open communication protocol, such as UDP, and the external device.
For example, for the connection parameter "PG _ OutputDataLength" defined above, when initializing it, the specific process may include: the "output data length" of the integer data is set to a default value, e.g., 100. Returning a default value of the set output data length, such as 100, according to the current output data length, and checking the effective length of the output variable according to different data types of the variable; for example, when the variable type is Byte (Byte) type, the output variable length is 1460 at maximum, and when the variable type is Word (Word) type, the output variable length is 780 at maximum.
For another example, for "Configuration _ AddDefault" defined in the action resource (actions. Resx), the action event corresponding to the create simple input/output variable is "AddDefault", and the button name assigned to the action event in the UI interface is "generation I/O (create input/output variable)". The specific execution process of the action is as follows: all created SIMIT input and output variables are deleted. Then, a new SIMIT input variable is created according to different types of the input variable, and when the type of the input variable is Byte (Byte), input DataLength (input data length) SIMIT Byte type input variables are continuously created; when the input variable type is a Word type, continuously creating inputDataLength (input data length) SIMIT font input variables; when the input variable type is a doubleword (DWord) type, input datalength (input data length) SIMIT doubleword type input variables are successively created. Meanwhile, a new SIMIT output variable is created according to different types of the output variable, and when the type of the output variable is Byte (Byte), output DataLength (output data length) SIMIT Byte type output variables are continuously created; when the output variable type is a Word type, continuously creating output datalength (output data length) SIMIT font output variables; when the output variable type is a double word (DWord) type, output datalength (output data length) SIMIT double-word output variables are successively created.
In one example, for a SIMIT software system, a communication class file (e.g., communication. Cs) may enable transmission of targeted open communication protocol, such as UDP communication data, by invoking a number of system events provided by the SIMIT API interface.
For example, the Open event provided by the SIMIT API interface is called to traverse the input and output variables, generate byte addresses and bit addresses for the input and output variables, and call a target Open communication protocol Client function, such as a UDP Client function, to create communication of the target Open communication protocol when the virtual simulation system runs. During specific implementation, rich diagnostic information can be further added, so that a user can conveniently find a problem when the UDP communication fails.
The communication class file converts the received target open communication protocol such as UDP data into output data of SIMIT by calling a first cycle interrupt event such as 'Call 1' provided by the SIMIT API interface.
In one example, the specific implementation process may include: judging the length of UDP communication received data, and if the length is greater than 0, converting the UDP received data into a Bool (Bool) type array; traversing all SIMIT output variables of which the data types are integer (Int), acquiring the start bit address of each SIMIT output variable, and performing assignment operation on the SIMIT output variables according to the types of the SIMIT output variables; for example, when the type of the SIMIT output variable is Byte (Byte), reading a Byte of data from a start bit (start bit of the SIMIT output variable) in a Boolean array after receiving data conversion from UDP, and assigning the Byte of data as the SIMIT output variable; traversing all SIMIT output variables of which the data types are Bool (Bool) types, acquiring the addresses of the start bits of the SIMIT output variables, reading one bit of data from the start bit (the start bit of the SIMIT output variable) in a Bool array after receiving data conversion from UDP, and assigning the bit of data as the SIMIT output variables.
The communication class file traverses the input data of the SIMIT by calling a second circular interrupt event such as a 'call 2' event provided by the SIMIT API interface, converts the input data of the SIMIT into a target open communication protocol such as UDP data and transmits the data.
In one example, the specific implementation process may include: traversing all SIMIT input variables of which the data types are integer (Int), acquiring initial Bit addresses of the SIMIT input variables, converting the values of the SIMIT input variables into Byte (Byte) arrays with different lengths according to different data types of the input variables, converting the Byte (Byte) arrays converted from the SIMIT input variables into Bit (Bit) arrays, and uniformly storing the values of the Bit (Bit) arrays after the conversion of each SIMIT input variable in a Bit sending (sendBits) array; traversing all SIMIT input variables with the data type of Bool (Bool), uniformly storing the value of each SIMIT input variable in a Bit sending (sendBits) array, converting the Bit sending (sendBits) array with the Bit (Bit) type into a Byte sending (sendBytes) array with the data type of Byte (Byte), executing a UDP sending task, and sending the SIMIT input variable data to a communication partner through UDP.
102, compiling the three types of files and generating an executable file, so that when the executable file is executed, the data of the target open communication protocol can be transmitted between the virtual simulation system and a target open communication protocol device, and the interface extension of the target open communication protocol of the virtual simulation system is realized.
For example, in one example, for the three types of files in the above example, a simple _ UDP _ client.exe executable file may be generated, and a "UDP" folder may be created under the simple installation path and then created under the folder, and the executable file generated by compiling may be copied into the "UDP" folder.
The interface expansion method based on the virtual simulation system can realize the interface expansion of the virtual simulation system, and after the interface expansion is finished, the data communication of the target open type communication protocol can be carried out based on the expanded interface. The method for using the extended interface of the virtual simulation system will be briefly described below.
FIG. 2 is a flowchart illustrating a method for using an extended interface of a virtual simulation system according to an embodiment of the present invention. As shown in fig. 2, the method may include the operations of:
step 201, providing a target open communication protocol connection option of a user, such as an option of UDP connection, and after receiving an operation that the user clicks the target open communication protocol connection option, generating a target open communication protocol connection interface, and receiving a configuration of the user for the target open communication protocol connection based on the target open communication protocol connection interface.
In this embodiment, the target open communication protocol connection interface may include a configuration interface of a connection attribute set by the target open communication protocol connection and a configuration interface of an action, a type, and a length of an input/output variable. Accordingly, the receiving the configuration of the target open communication protocol connection by the user based on the target open communication protocol connection interface comprises: and receiving the connection attribute set for the target open communication protocol connection by the user through the configuration interface of the connection attribute and the configuration of the action, the type and the length of the input and output variable performed by the configuration interface based on the type and the length of the input and output variable.
A schematic diagram of a portion of the UDP connection interface in one example is shown in fig. 3. As shown in fig. 3, the left side has a logo of the UPD connection, and the right side upper side is provided with buttons corresponding to respective actions of the input/output variables, i.e., "create input/output variable", "add byte input variable", "add font input variable", "add double font input variable", "add byte output variable", and "add byte output variable". The upper middle part of the right side of the figure 3 is provided with an input variable interface and an output variable interface corresponding to the buttons. For example, when clicking the top "create input/output variables" button, the SIMIT input/output variables of the corresponding number and data type are created according to the definition of the second resource file in step 101, and a schematic diagram of the created input variables and output variables is shown in fig. 4. In addition, other buttons can be used for increasing and decreasing the SIMIT IO variable.
The lower part of the right side of fig. 3 is provided with a configuration interface for the connection attribute of the UDP connection and a configuration interface for the type and length of the input/output variables.
Step 202, performing target open communication protocol data transmission between the virtual simulation system and a target open communication protocol device based on the configuration of the target open communication protocol connection.
For example, in one example, a SIMIT simulation may be initiated, and the simulation platform will automatically invoke a SIMIT UDP client exe executable that will automatically create a UDP function, UDP communicate with the communication partner at recurring time intervals, and implement a recurring interaction of the SIMIT input and output signals with UDP data.
The interface extension method of the virtual simulation system and the extension interface using method of the virtual simulation system in the embodiment of the present invention are described in detail above, and the interface extension system of the virtual simulation system and the extension interface using system of the virtual simulation system in the embodiment of the present invention are described in detail below. The system in the embodiment of the present invention may be used to implement the corresponding method in the embodiment of the present invention, and for details that are not disclosed in detail in the embodiment of the system in the present invention, reference may be made to corresponding descriptions in the embodiment of the method in the present invention.
Fig. 5 is an exemplary structural diagram of an interface extension system of the virtual simulation system in the embodiment of the present invention. As shown in fig. 5, the system may include: a storage module 501 and a compiling module 502.
The storage module 501 is configured to store three types of files created in advance, and includes: the resource type file is used for defining a user interface of the target open communication protocol; a configuration file for configuring various information defined in the user interface; and the communication class file is used for carrying out target open type communication protocol data transmission.
The compiling module 502 is configured to compile the three types of files and generate an executable file, so that when executed, the executable file can perform transmission of target open communication protocol data between the virtual simulation system and a target open communication protocol device to implement interface extension of a target open communication protocol of the virtual simulation system.
Fig. 6 is an exemplary structural diagram of an extended interface usage system of the virtual simulation system in the embodiment of the present invention. As shown in fig. 6, the system may include: a user interface module 601 and a data transmission module 602.
The user interface module 601 is configured to provide a target open communication protocol connection option for a user, generate a target open communication protocol connection interface after receiving an operation of the user clicking the target open communication protocol connection option, and receive a configuration of the user on the target open communication protocol connection based on the target open communication protocol connection interface.
The data transmission module 602 is configured to transmit target open communication protocol data between the virtual simulation system and a target open communication protocol device based on the configuration of the target open communication protocol connection.
FIG. 7 is an exemplary block diagram of a computer system in an embodiment of the invention. As shown in fig. 7, the system may include: at least one memory 71 and at least one processor 72. In addition, some other components, such as communication ports and the like, may also be included. These components communicate via a bus 73.
Wherein the at least one memory 71 is adapted to store a computer program. In one embodiment, the computer program may be understood to include the interface extension system of the virtual simulation system shown in FIG. 5 and/or the extension interface of the virtual simulation system shown in FIG. 6 using the various modules in the system. In addition, the at least one memory 71 may also store an operating system and the like. Operating systems include, but are not limited to: an Android operating system, a Symbian operating system, a Windows operating system, a Linux operating system, and the like.
The at least one processor 72 is configured to call the computer program stored in the at least one memory 71, and execute the interface extension method of the virtual simulation system and/or the extension interface using method of the virtual simulation system according to the embodiment of the present invention. The processor 72 may be a CPU, processing unit/module, ASIC, logic module, or programmable gate array, etc. Which can receive and transmit data through the communication port.
It should be noted that not all steps and modules in the above flows and structures are necessary, and some steps or modules may be omitted according to actual needs. The execution sequence of the steps is not fixed and can be adjusted according to the needs. The division of each module is only for convenience of describing adopted functional division, and in actual implementation, one module may be implemented by multiple modules, and the functions of multiple modules may also be implemented by the same module, and these modules may be located in the same device or in different devices.
It is to be understood that the hardware modules in the above embodiments may be implemented mechanically or electronically. For example, a hardware module may include a specially designed permanent circuit or logic device (e.g., a special purpose processor such as an FPGA or ASIC) for performing specific operations. A hardware module may also include programmable logic devices or circuits (e.g., including a general-purpose processor or other programmable processor) that are temporarily configured by software to perform certain operations. The implementation of the hardware module in a mechanical manner, or in a dedicated permanent circuit, or in a temporarily configured circuit (e.g., configured by software), may be determined based on cost and time considerations.
In addition, a computer-readable storage medium is provided in an embodiment of the present invention, and has a computer program stored thereon, where the computer program is capable of being executed by a processor and implementing the interface extension method of a virtual simulation system and/or the extended interface using method of a virtual simulation system described in the embodiment of the present invention. Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the embodiments described above are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium. Further, part or all of the actual operations may be performed by an operating system or the like operating on the computer by instructions based on the program code. The functions of any of the above-described embodiments may also be implemented by writing the program code read out from the storage medium to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then causing a CPU or the like mounted on the expansion board or the expansion unit to perform part or all of the actual operations based on the instructions of the program code. Embodiments of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
It can be seen from the foregoing solutions that, in the embodiment of the present invention, by setting a resource class file for defining a user interface of a target open type communication protocol, a configuration class file for configuring various information defined in the user interface, and a communication class file for performing data transmission of the target open type communication protocol, and compiling the three classes of files to generate an executable file, an interface extension of the target open type communication protocol of the virtual simulation system is implemented by executing the executable file.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.

Claims (13)

1. The interface extension method of the virtual simulation system is characterized by comprising the following steps:
three types of files are created in advance, which comprise: the resource type file is used for defining a user interface of the target open communication protocol; a configuration file for configuring various information defined in the user interface; and a communication class file for performing a target open communication protocol data transfer (101);
compiling the three types of files and generating an executable file, so that when the executable file is executed, the data of the target open communication protocol can be transmitted between the virtual simulation system and a target open communication protocol device, and an interface extension (102) of the target open communication protocol of the virtual simulation system is realized.
2. The interface extension method for a virtual simulation system according to claim 1, wherein the user interface of the target open communication protocol comprises: the connection attribute of the target open communication protocol, the action of creating an input/output variable and the attribute of an input/output signal;
the resource class file includes: a first resource class file for defining the connection attribute; a second resource class file for defining the create input output variable action; and a third resource class file for defining said input output signal properties.
3. The interface extension method for the virtual simulation system according to claim 2, wherein the connection attribute of the target open communication protocol includes: some or all of a remote IP address, a remote communication port, a local communication port, an input data type, an input data length, an output data type, an output data length, a data exchange, a debug, an author, a version;
the act of creating an input-output variable comprises: creating part or all of variables, adding variables, importing variables, exporting variables and deleting variables;
the signal attributes include: input-output addresses and signal data types.
4. The method of claim 3, wherein the configuring of the various information defined in the UI interface comprises: initializing the connection attribute, defining the type and the length of the input and output variable, and creating the input and output variable.
5. The interface expansion method for a virtual simulation system according to claim 2,
the communication class file traverses the input and output variables by calling an opening event of a virtual simulation system, generates byte addresses and bit addresses for the input and output variables, and calls a target open communication protocol client function to create communication of a target open communication protocol when the virtual simulation system runs;
the communication class file converts the received target open type communication protocol data into output data of the virtual simulation system by calling a first cycle interrupt event of the virtual simulation system, traverses the input data of the virtual simulation system by calling a second cycle interrupt event of the virtual simulation system, and converts the input data of the virtual simulation system into sending data of the target open type communication protocol.
6. The interface extension method for a virtual simulation system according to any one of claims 1 to 5, wherein the target open communication protocol is a Transmission Control Protocol (TCP) or a User Datagram Protocol (UDP).
7. The method for using the expansion interface of the virtual simulation system is characterized by comprising the following steps:
providing a target open communication protocol connection option of a user, generating a target open communication protocol connection interface after receiving an operation that the user clicks the target open communication protocol connection option, and receiving the configuration of the user on the target open communication protocol connection based on the target open communication protocol connection interface (201);
transmitting (202) target open communication protocol data between the virtual simulation system and a target open communication protocol device based on the configuration of the target open communication protocol connection.
8. The method for using the extension interface of the virtual simulation system according to claim 7, wherein the configuration interface on the target open communication protocol connection interface comprises a configuration interface of the connection attribute set by the target open communication protocol connection and a configuration interface of the action, type and length of the input and output variable;
the receiving, based on the target open communication protocol connection interface, a configuration of the target open communication protocol connection by a user comprises: and receiving the connection attribute set for the target open communication protocol connection by the user through the configuration interface of the connection attribute and the configuration of the action, the type and the length of the input and output variable performed by the configuration interface based on the type and the length of the input and output variable.
9. The method for using the extended interface of the virtual simulation system according to claim 7 or 8, wherein the target open communication protocol is a transmission control protocol TCP or a user datagram protocol UDP.
10. An interface extension system for a virtual simulation system, comprising:
a storage module (501) for storing three types of files created in advance, comprising: the resource type file is used for defining a user interface of the target open type communication protocol; a configuration file for configuring various information defined in the user interface; the communication class file is used for carrying out target open type communication protocol data transmission; and
a compiling module (502) for compiling the three types of files and generating an executable file, so that when executed, the executable file can transmit target open communication protocol data between the virtual simulation system and a target open communication protocol device to realize interface extension of the target open communication protocol of the virtual simulation system.
11. An extended interface using system of a virtual simulation system, comprising:
the user interface module (601) is used for providing a target open communication protocol connection option for a user, generating a target open communication protocol connection interface after receiving an operation that the user clicks the target open communication protocol connection option, and receiving the configuration of the user on the target open communication protocol connection based on the target open communication protocol connection interface;
a data transmission module (602) configured to transmit target open communication protocol data between the virtual simulation system and a target open communication protocol device based on the configuration of the target open communication protocol connection.
12. A computer system, comprising: at least one memory (71) and at least one processor (72), wherein:
the at least one memory (71) is for storing a computer program;
the at least one processor (72) is configured to invoke a computer program stored in the at least one memory (71), to perform an interface extension method of the virtual simulation system according to any of claims 1 to 6, and/or to perform an extended interface usage method of the virtual simulation system according to any of claims 7 to 9.
13. A computer-readable storage medium having stored thereon a computer program; characterized in that the computer program is executable by a processor and implements the interface extension method of a virtual simulation system according to any one of claims 1 to 6 and/or implements the extended interface usage method of a virtual simulation system according to any one of claims 7 to 9.
CN202210973482.3A 2022-08-15 2022-08-15 Interface extension method, extension interface using method, system and storage medium Pending CN115473943A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210973482.3A CN115473943A (en) 2022-08-15 2022-08-15 Interface extension method, extension interface using method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210973482.3A CN115473943A (en) 2022-08-15 2022-08-15 Interface extension method, extension interface using method, system and storage medium

Publications (1)

Publication Number Publication Date
CN115473943A true CN115473943A (en) 2022-12-13

Family

ID=84365969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210973482.3A Pending CN115473943A (en) 2022-08-15 2022-08-15 Interface extension method, extension interface using method, system and storage medium

Country Status (1)

Country Link
CN (1) CN115473943A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030056018A1 (en) * 2001-09-18 2003-03-20 Pike Melissa J. Communication system
CN101917442A (en) * 2010-08-24 2010-12-15 北京全路通信信号研究设计院 Method and device for realizing communication between ground equipment and simulation test system
CN103019102A (en) * 2012-11-28 2013-04-03 河南科技大学东海硅产业节能技术研究院 Semi-physical computer simulation network experimental apparatus
CN106933568A (en) * 2017-02-07 2017-07-07 南京南瑞继保电气有限公司 A kind of configuration software and a kind of industrial control method
CN109326003A (en) * 2018-11-28 2019-02-12 哈工大机器人(合肥)国际创新研究院 A kind of factory's three-dimension monitoring system based on virtual emulation
CN111478790A (en) * 2020-03-02 2020-07-31 烽火通信科技股份有限公司 Method and system for supporting southbound protocol virtualization verification in SDN network architecture
CN112162494A (en) * 2020-09-21 2021-01-01 安徽捷兴信源信息技术有限公司 Remote virtual control simulation method and device of smart phone system
CN112286073A (en) * 2020-08-04 2021-01-29 中国电力科学研究院有限公司 Communication interface device and method for closed-loop simulation of power system
US20220083027A1 (en) * 2020-09-16 2022-03-17 Rockwell Automation Technologies, Inc. Industrial network emulation

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030056018A1 (en) * 2001-09-18 2003-03-20 Pike Melissa J. Communication system
CN101917442A (en) * 2010-08-24 2010-12-15 北京全路通信信号研究设计院 Method and device for realizing communication between ground equipment and simulation test system
CN103019102A (en) * 2012-11-28 2013-04-03 河南科技大学东海硅产业节能技术研究院 Semi-physical computer simulation network experimental apparatus
CN106933568A (en) * 2017-02-07 2017-07-07 南京南瑞继保电气有限公司 A kind of configuration software and a kind of industrial control method
CN109326003A (en) * 2018-11-28 2019-02-12 哈工大机器人(合肥)国际创新研究院 A kind of factory's three-dimension monitoring system based on virtual emulation
CN111478790A (en) * 2020-03-02 2020-07-31 烽火通信科技股份有限公司 Method and system for supporting southbound protocol virtualization verification in SDN network architecture
CN112286073A (en) * 2020-08-04 2021-01-29 中国电力科学研究院有限公司 Communication interface device and method for closed-loop simulation of power system
US20220083027A1 (en) * 2020-09-16 2022-03-17 Rockwell Automation Technologies, Inc. Industrial network emulation
CN112162494A (en) * 2020-09-21 2021-01-01 安徽捷兴信源信息技术有限公司 Remote virtual control simulation method and device of smart phone system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
L. LEI, G. YING, L. WEIYUAN AND Z. QI: "Design and Realization of Modular Interface for the Master Control Computer in Artillery Training Simulator", 2010 SECOND INTERNATIONAL WORKSHOP ON EDUCATION TECHNOLOGY AND COMPUTER SCIENCE, 6 May 2010 (2010-05-06) *
SIEMENS: "SIMIT Virtual Controller(VC) 虚拟调试", Retrieved from the Internet <URL:https://cache.industry.siemens.com/dl/files/748/109774748/att_1008775/v1/SIMITVirtualControllerVirtualCommissioning.pdf> *
滕嘉斌: "基于Simulink和模块化仪器系统的半实物仿真平台技术研究", 中国优秀硕士学位论文全文数据库, 31 March 2020 (2020-03-31) *

Similar Documents

Publication Publication Date Title
CN109768970B (en) Configurable universal protocol generation method
CN104967585B (en) A kind of method and apparatus of remote debugging mobile terminal
US9348771B1 (en) Cloud-based instrument driver system
CN109614147B (en) PHY register read-write method and device
CN112732572A (en) Service testing method, device and system, storage medium and electronic device
CN113806037A (en) Service calling method and device, storage medium and electronic equipment
CN103634161A (en) Train communication protocol consistency detection device and train communication protocol consistency detection method
CN110471663A (en) A kind of code compiling method, device and electronic equipment
CN114510452A (en) SOC (System on chip) integration method and device and electronic equipment
CN114997101A (en) Signal control method, system, medium and device based on chip verification system
CN110187986B (en) Command management method, system, device and computer readable storage medium
CN111858218B (en) FPGA AMBA bus interface debugging method and device and FPGA
CN109788034B (en) Configuration method for gateway access equipment, electronic equipment and storage medium
CN109388406A (en) Convert method and device, the storage medium, electronic device of java code
CN115473943A (en) Interface extension method, extension interface using method, system and storage medium
CN116915875A (en) General method for analyzing modbus equipment by Internet of things and modbus system
CN109120731B (en) Universal communication method, system and device
Vorapojpisut Model-based design of IoT/WSN nodes: Device driver implementation
CN112054955B (en) Gateway-based device communication method
CN114428702A (en) Information physical test system containing general interface module
CN107819621B (en) Gateway configuration method and device and gateway
CN113645082B (en) AS5643 network dynamic simulation test method and device
CN109068170A (en) A kind of storage method, device, terminal and the storage medium of barrage message
CN115174461B (en) System testing method and device based on network request
CN118069502A (en) Test system, method and device and storage medium

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