Protocol stack configuration method and device
By displaying the protocol stack parameter configuration interface in the upper computer and sending the configuration parameters to the simulated computer, the problems of complexity and error risks of protocol stack configuration in the prior art are solved, and the effect of simplifying the configuration process and improving accuracy is achieved.
Patent Information
- Application Number
- CN202411997168.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
AI Technical Summary
In the prior art, the configuration of the protocol stack requires manual writing of configuration files, which increases configuration complexity and risks inconsistency and writing errors, resulting in configuration errors easily.
A protocol stack configuration method and device are provided. By displaying the parameter configuration interface corresponding to the protocol stack in the upper computer, the user can directly input or select parameters, and the configuration parameters are sent to the simulation computer, and the simulation computer configures the protocol stack according to these parameters.
It simplifies the configuration process of the protocol stack, improves the accuracy and reliability of the configuration, and reduces the occurrence of human errors.
Smart Images

Figure CN119788745A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a protocol stack configuration method and device. Background Art
[0002] In the current field of train Ethernet communication, Time-Sensitive Networking (TSN) is widely used as a series of data link layer protocol specifications. It has the characteristics of low latency, low jitter and deterministic transmission time, and provides important technical support for improving the real-time and reliability of train communication networks. The key components of the TSN protocol include the clock synchronization (Asynchronous Sampling, AS) protocol stack and the flow control (Queueing and Forwarding, Qbv) protocol stack, which are configured by calling the configuration (cfg) file.
[0003] Since the cfg files of the AS and Qbv protocol stacks usually need to be manually written in the prior art, this undoubtedly increases the complexity of the protocol stack configuration process, and manual writing has the risk of inconsistency and writing errors, which makes the configuration of the protocol stack prone to errors. Summary of the invention
[0004] The present application provides a protocol stack configuration method and device, which can simplify the configuration process of the protocol stack and improve the accuracy of the protocol stack configuration.
[0005] In a first aspect, an embodiment of the present application provides a protocol stack configuration method, which is applied to a host computer, and the method includes:
[0006] Display the first parameter configuration interface corresponding to the protocol stack;
[0007] Determine at least one parameter determined by the user in the first parameter configuration interface as a configuration parameter of the protocol stack;
[0008] The configuration parameters of the protocol stack are sent to the simulation computer, so that the simulation computer configures the protocol stack based on the configuration parameters of the protocol stack.
[0009] In a second aspect, the present application provides a protocol stack configuration method, applied to a simulation computer, the method comprising:
[0010] Receive the configuration parameters of the protocol stack sent by the host computer;
[0011] Configure the protocol stack according to its configuration parameters.
[0012] In a third aspect, an embodiment of the present application provides a protocol stack configuration device, which is applied to a host computer, and the device includes:
[0013] A display module, used to display a first parameter configuration interface corresponding to the protocol stack;
[0014] A determination module, used to determine at least one parameter determined by the user in the first parameter configuration interface as a configuration parameter of the protocol stack;
[0015] The sending module is used to send the configuration parameters of the protocol stack to the simulation computer, so that the simulation computer configures the protocol stack based on the configuration parameters of the protocol stack.
[0016] In a fourth aspect, the present application provides a protocol stack configuration device, applied to a simulation computer, the device comprising:
[0017] A receiving module, used for receiving configuration parameters of the protocol stack sent by the host computer, wherein the configuration parameters are determined according to the parameters determined by the user in the first parameter configuration interface displayed in the host computer;
[0018] The configuration module is used to configure the protocol stack according to the configuration parameters of the protocol stack.
[0019] In a fifth aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a processor and a memory storing computer program instructions;
[0020] When the processor executes the computer program instructions, the protocol stack configuration method in any one of the embodiments of the first aspect and the second aspect is implemented.
[0021] In a sixth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, a protocol stack configuration method as in any one of the embodiments of the first aspect and the second aspect is implemented.
[0022] In the seventh aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the protocol stack configuration method in any one of the embodiments of the first and second aspects above.
[0023] In a protocol stack configuration method and device provided in an embodiment of the present application, the method first displays a first parameter configuration interface corresponding to the protocol stack, which provides a user with an entry for configuring protocol stack parameters. Secondly, the user determines at least one parameter in the first parameter configuration interface, and determines these parameters as configuration parameters of the protocol stack. Finally, the protocol stack configuration parameters determined by the user in the first parameter configuration interface are sent to the simulation computer so that the simulation computer can configure the protocol stack based on these parameters. After receiving the configuration parameters, the simulation computer will configure the corresponding protocol stack according to the user's settings. The above method simplifies the configuration process of the protocol stack, so that the user does not need to manually write complex configuration files, thereby improving the accuracy and reliability of the protocol stack configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0025] Figure 1 It is a flowchart of a protocol stack configuration method provided by an embodiment of the present application;
[0026] Figure 2 It is a structural schematic diagram of a host computer and a simulation computer provided by an embodiment of the present application;
[0027] Figure 3 It is a flowchart of another protocol stack configuration provided by an embodiment of the present application;
[0028] Figure 4 It is a flowchart of another protocol stack configuration provided by an embodiment of the present application;
[0029] Figure 5 It is a flowchart of another protocol stack configuration provided by an embodiment of the present application;
[0030] Figure 6 It is a structural diagram of a protocol stack configuration device provided in an embodiment of the present application;
[0031] Figure 7 It is a structural diagram of another protocol stack configuration device provided in an embodiment of the present application;
[0032] Figure 8 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0034] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0035] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0036] TSN is a general term for a series of data link layer protocol specifications developed by the TSN working group, which has the characteristics of low latency, low jitter and deterministic transmission time. The application of TSN's clock synchronization, flow control and priority transmission mechanism in the field of train Ethernet provides strong technical support for improving the real-time and reliability of train communication networks. The AS and Qbv protocol stacks in the TSN protocol implement parameter configuration by calling cfg files. Currently, the commonly used protocol stack configuration methods include API calls and command line interfaces.
[0037] However, the AS and Qbv protocol stacks have their own cfg files, and the content and format of the cfg files related to the AS protocol stack vary with parameters such as node type, clock synchronization level, clock priority, and delay mechanism. Maintaining different types of cfg files is complicated, especially when different versions or devices need to be considered. Once errors or inconsistencies occur, it is difficult to quickly locate the problem.
[0038] In addition, the Virtual Local Area Network Identifier (VLAN ID) and message priority (PRI) in the Qbv protocol stack are not configured through the cfg file, which requires additional development and maintenance, increasing the complexity and cost of the system.
[0039] The manual input method of command line interface requires high coding ability of users and is prone to human errors, especially when frequent configuration changes are required. In addition, for large systems, command line interface requires additional permission management to prevent unauthorized access and modification.
[0040] In order to solve the problems existing in the prior art, the embodiments of the present application provide a protocol stack configuration method and device.
[0041] The present application embodiment provides a protocol stack configuration method and device. The following first introduces the protocol stack configuration method provided by the present application embodiment. Figure 1 As shown, the method is applied to a host computer, and the method specifically includes the following steps:
[0042] S100, displaying a first parameter configuration interface corresponding to the protocol stack.
[0043] Optionally, in an embodiment of the present application, the first parameter configuration interface refers to an interface used by a user to configure initial parameters of a protocol stack. These initial parameters may refer to basic settings for configuring a protocol stack. The first parameter configuration interface is designed to allow a user to easily enter or select the desired parameters and start configuring the protocol stack.
[0044] Optionally, the first parameter configuration interface can have multiple display modes, for example, the parameters can be displayed in the form of a table on the first parameter configuration interface, with each parameter in one row, and the user can enter or select the parameter value in the corresponding cell. This form is suitable for situations where there are fewer parameters and the user needs to set multiple parameters at one time. The parameters can also be presented in the form of a form on the first parameter configuration interface, with each parameter corresponding to a form field, and the user can fill in or select the parameter value one by one. This form is suitable for situations where there are many parameters or they need to be displayed in groups.
[0045] In some implementations, the configuration process can also be broken down into multiple steps, each step corresponds to a page or dialog box, and the user configures the parameters by completing each step in sequence. This form is suitable for situations where the configuration process is relatively complex and the user needs to be guided to complete it step by step.
[0046] Alternatively, the parameters are presented in the form of menus on the interface, and the user selects or enters the parameter value by clicking on the menu items. This form is suitable for situations where there is a hierarchical relationship between parameters or they need to be displayed in categories.
[0047] Users can also set the value of a parameter by dragging it, for example, by dragging the parameter to a corresponding position or area. This form is suitable for situations where users need to freely arrange parameters or perform interactive operations.
[0048] Optionally, in a specific implementation of the present application, a special software application can be developed to configure the parameters of the protocol stack. The application can be run on a host computer, and a user can interact with it through an interface. In the application, a menu or button can be set, and after clicking, the first parameter configuration interface corresponding to the protocol stack can be entered.
[0049] A web-based management interface can also be developed, which can be accessed by a user through a browser. In the web interface, a page or link is set, and after clicking, the first parameter configuration interface corresponding to the protocol stack can be entered.
[0050] Of course, in other implementations, the parameters of the protocol stack can also be configured through a command line tool. In the command line interface, corresponding commands or options are provided, and the user can enter a command to enter the first parameter configuration interface corresponding to the protocol stack.
[0051] S200: Determine at least one parameter determined by a user in a first parameter configuration interface as a configuration parameter of a protocol stack.
[0052] Optionally, in one embodiment of the present application, in the first parameter configuration interface, the user can enter various configuration parameters, such as clock priority, node type, clock synchronization level, delay mechanism, etc. The user confirms the input parameters and can submit the parameters input by clicking a confirmation button or similar operations. Once the user confirms the parameters, the parameters will be passed to the simulation computer, which will process the parameters and use them for the configuration of the protocol stack.
[0053] Specifically, in a parameter configuration interface, the user can submit the input parameters by filling in the parameters and clicking the "Confirm" button on the parameter configuration interface. After clicking the button, the host computer will pass the parameters entered by the user to the corresponding processing module for processing.
[0054] In some text input boxes, users can directly enter parameters in the input box and press the Enter key on the keyboard to submit the input parameters. After detecting that the Enter key is pressed, the host computer passes the input parameters to the corresponding processing module.
[0055] In some graphical interfaces, users can also select parameter values by dragging icons or sliders. When the user completes the dragging operation, the host computer automatically transmits the current parameter value to the corresponding processing module.
[0056] Of course, in some embodiments, the user can also submit parameters by voice input. The user can speak the parameters to be configured, and the host computer will convert the voice into text and pass it as a parameter to the corresponding processing module.
[0057] S300, sending configuration parameters of the protocol stack to the simulation computer, so that the simulation computer configures the protocol stack based on the configuration parameters of the protocol stack.
[0058] Optionally, in a feasible implementation of the present application, firstly, a communication protocol for sending data to the simulation computer can be determined, which can ensure reliable transmission and effective communication of data. Then, the configuration parameters of the protocol stack can be encapsulated into a specific data format to ensure that the selected data format can be correctly parsed and processed by the simulation computer.
[0059] And determine the interface and channel for data transmission, for example, data can be sent to the simulation computer through a network interface, serial port, Universal Serial Bus (USB) interface, etc. Finally, in the software module that implements the sending function, write code to send the packaged configuration parameter data to the simulation computer through the selected communication protocol and interface.
[0060] For the simulation computer, a software module for receiving data can be prepared on the simulation computer to receive the configuration parameter data sent from the host computer, parse the data, and extract the configuration parameters of the protocol stack. Then, according to the received configuration parameters, the processing program on the simulation computer can configure the protocol stack accordingly, which specifically involves operations such as modifying the configuration file, calling the corresponding function or interface, to ensure that the protocol stack is correctly configured according to the specified parameters. After the configuration is completed, a confirmation message can also be sent to the host computer to indicate that the protocol stack has been configured according to the specified parameters. If an error occurs during the configuration process, an error message can also be sent to the host computer for timely adjustment and processing.
[0061] Through the above steps, it is possible to send the configuration parameters of the protocol stack to the simulation computer and ensure that the simulation computer can correctly configure the protocol stack based on these parameters.
[0062] In a protocol stack configuration method provided in an embodiment of the present application, the method first displays a first parameter configuration interface corresponding to the protocol stack, which provides a user with an entry for configuring protocol stack parameters. Secondly, the user determines at least one parameter in the first parameter configuration interface, and determines these parameters as configuration parameters of the protocol stack. Finally, the protocol stack configuration parameters determined by the user in the first parameter configuration interface are sent to the simulation computer so that the simulation computer can configure the protocol stack based on these parameters. After receiving the configuration parameters, the simulation computer will configure the corresponding protocol stack according to the user's settings. The above method simplifies the configuration process of the protocol stack, so that the user does not need to manually write complex configuration files, thereby improving the accuracy and reliability of the protocol stack configuration.
[0063] In one embodiment, the protocol stack is a flow control Qbv protocol stack; before the above step 100, the method may further specifically perform the following steps:
[0064] S101, displaying a second parameter configuration interface corresponding to a clock synchronization AS protocol stack, where the second parameter configuration interface includes a trigger control.
[0065] In one embodiment, the above step 100 may specifically perform the following steps:
[0066] S110, when a touch input to a trigger control is received from the user, a first parameter configuration interface corresponding to the Qbv protocol stack is displayed.
[0067] Optionally, in a feasible implementation of the present application, the second parameter configuration interface corresponding to the AS protocol stack includes a trigger control. This means that the user interface will provide an interface for displaying the second parameter configuration of the AS protocol stack, which may include a text box, a drop-down menu or other input elements, and a trigger control, such as a button or a check box. The function of the trigger control is to trigger the next operation input by the user, that is, to switch to the configuration interface of the Qbv protocol stack.
[0068] Once the user input to the trigger control is received, the host computer will display the first parameter configuration interface corresponding to the Qbv protocol stack. This means that the host computer needs to monitor the user input operation to the trigger control, such as clicking a button, and then call the corresponding function or method to display the parameter configuration interface of the Qbv protocol stack according to the user input. Specifically, it may involve programming work in aspects such as interface management, event processing, and interface switching.
[0069] Optionally, in an embodiment of the present application, when the user opens the protocol stack configuration interface, the configuration interface of the AS protocol stack, i.e., the second parameter configuration interface, will be displayed by default. This interface includes options for setting various parameters of the AS protocol stack. Then, there will be a trigger control in the interface, such as a button, for triggering the operation of switching to the Qbv protocol stack configuration interface.
[0070] When the user is operating, if the trigger control is clicked, the host computer will respond to the user's input and open the configuration interface of the Qbv protocol stack, that is, the first parameter configuration interface. On this interface, the user can configure the parameters of the Qbv protocol stack. After completion, there can be another trigger control to submit the configuration or return to the configuration interface of the AS protocol stack. This design allows users to configure the AS protocol stack first, and then configure the Qbv protocol stack as needed, to achieve a more flexible and user-friendly protocol stack configuration process.
[0071] In these optional embodiments, the configuration interface of the AS protocol stack is first displayed, which meets the needs that users usually pay attention to clock synchronization configuration first. And placing the configuration interface of the Qbv protocol stack behind a trigger control can avoid the interface from being too crowded and complicated, making the user interface clearer and more concise, easy to understand and operate. The user can decide whether to configure the Qbv protocol stack after configuring the AS protocol stack, rather than forcing the user to configure two protocol stacks at the same time at the beginning. This flexibility allows the user to choose which protocol stack to configure according to actual needs, avoiding unnecessary operations and confusion. Placing the Qbv protocol stack configuration interface behind a trigger control can reduce the risk of user misoperation. The user must consciously click the trigger control to enter the Qbv protocol stack configuration interface, avoiding the user from entering an unwanted interface inadvertently, reducing the possibility of erroneous operation.
[0072] In one embodiment, the first parameter configuration interface includes a browsing control and a parameter input interface, and the protocol stack is a Qbv protocol stack; the above step 200 can specifically perform the following steps:
[0073] S210, obtaining a file path of a configuration file of a preset Qbv protocol stack determined by a user in a browsing control;
[0074] S220, obtaining a configuration file of the Qbv protocol stack from the file path;
[0075] S230, obtaining a first parameter corresponding to the Qbv protocol stack determined by the user in the parameter input interface, the first parameter including at least one of a message priority of the Qbv protocol stack and a virtual local area network identifier of the Qbv protocol stack;
[0076] S240: Determine the configuration file of the Qbv protocol stack and the first parameter as configuration parameters of the Qbv protocol stack.
[0077] Optionally, in a feasible implementation of the present application, a browse control is used for the user to select the path of a file or directory. Specifically, a text box and a browse button can be used to allow the user to manually enter the file path, or to browse the file system by clicking the browse button and select the desired configuration file. After clicking the browse button, the host machine will pop up a file selection dialog box, in which the user can browse the file system and select the desired configuration file. After the selection is completed, the file path will be displayed in the text box.
[0078] The parameter input interface is used by the user to input or select the configuration parameters of the protocol stack. In this example, the parameter input interface is used to determine the message priority and virtual LAN identifier of the Qbv protocol stack. The message priority is a number or an optional list, and the user can select or enter the message priority through a drop-down list or input box. The virtual LAN identifier can also be a number or an optional list, and the user can also select or enter the virtual LAN identifier through a drop-down list or input box.
[0079] Optionally, in a specific implementation of the present application, in step 210, the host computer needs to create a browse control, which can be a button, and a file selection dialog box pops up when the user clicks the button. This file selection dialog box allows the user to browse files and select the required configuration file. After the user selects the file, the host computer obtains the file path selected by the user. Subsequently, the host computer reads the content of the configuration file according to the file path selected by the user in step S210.
[0080] In step 230, the host computer needs to design a parameter input interface for the user to input or select the first parameter of the Qbv protocol stack, namely, the message priority and the virtual LAN identifier. This interface may include an input box, a drop-down list or other controls, in which the user can enter or select the corresponding parameters. The host computer obtains the value entered by the user when the user submits the parameter. Finally, in step 240, the host computer determines the configuration file selected by the user and the first parameter (message priority and virtual LAN identifier) obtained from the parameter input interface as the configuration parameters of the Qbv protocol stack. These parameters will be used to configure the Qbv protocol stack for subsequent use.
[0081] In these optional embodiments, the parameter input interface allows the user to intuitively input or select the first parameter of the Qbv protocol stack, such as the message priority and the virtual LAN identifier. This convenient input method can improve the user's operating efficiency and reduce errors in the configuration process. The integration of the browsing control and the parameter input interface makes the configuration process more intuitive and controllable, reduces human errors that may occur during the configuration process, and improves the accuracy and reliability of the configuration.
[0082] In one embodiment, after the above step 100 and after the above step 200, the method may further specifically perform the following steps:
[0083] S201, receiving a first input from a user on a first parameter configuration interface, where the first input is used to input at least one second parameter on the first parameter configuration interface;
[0084] S202, when at least one second parameter matches a preset error rule, outputting an alarm interface, the alarm interface including prompt information and a correct parameter value range, the prompt information being used to prompt the user of an input error.
[0085] Optionally, in an embodiment of the present application, the main function of the alarm interface is to prompt the user of input errors and provide the correct parameter value range. Through the alarm interface, the user can understand which parameter inputs do not meet the requirements, so as to make corrections in time to avoid errors and inconsistencies in the configuration process. The alarm interface can be presented on the user interface in the form of a pop-up window or page overlay. The design of the alarm interface should be as concise and clear as possible so that the user can quickly understand and perform corresponding operations. The alarm interface may include the following content:
[0086] Prompt message: Indicates that the user has entered incorrect parameters. It may remind the user that the parameters entered are incorrect and need to be corrected.
[0087] Correct parameter value range: Displays the correct parameter value range to help users understand the correct input range.
[0088] Optionally, in a feasible implementation of the present application, the host computer checks the second parameter input by the user to ensure that it complies with the preset error rule. If the system finds that at least one second parameter matches the error rule, the system triggers the output of the alarm interface. This alarm interface will clearly display the error prompt information, indicating that the user has entered an incorrect parameter, and provide relevant information about the correct parameter value range. The user can make corresponding corrections based on the prompt information to ensure the accuracy and legality of the parameter input.
[0089] In these optional embodiments, receiving the user's input to the first parameter configuration interface and performing error checking in time can help the user avoid common errors when inputting the second parameter. Through timely error prompts, the user can immediately find and correct input errors, thereby improving the accuracy of the configuration. The output alarm interface can quickly notify the user of input errors and provide the value range of the correct parameter. Such real-time feedback can help the user correct errors quickly, avoiding repeated operations and wasted time costs caused by incorrect parameter configuration. The alarm interface shows the user error information and the correct parameter value range in a clear manner, providing a friendly user experience. The user can get timely help and guidance during the configuration process, reducing the complexity of the configuration operation and improving the user's satisfaction and user experience.
[0090] And timely detection and correction of input errors can avoid possible problems and inconsistencies in the future. By providing error prompts during the configuration process, the risk of subsequent system failures or errors can be reduced, ensuring the consistency and stability of the system configuration.
[0091] In one embodiment, after the above step 200 and before the above step 300, the method may further specifically perform the following steps:
[0092] S301, storing at least one parameter in a database of a host computer;
[0093] In one embodiment, the first parameter configuration interface further includes a selection control, and the above step 100 may specifically perform the following steps:
[0094] S120, when receiving a touch input of the user to the selection control, obtaining from the database the third parameter stored in the database for the last time;
[0095] S130, displaying the third parameter on the first parameter configuration interface.
[0096] Optionally, in one implementation of the present application, a selection control is used to select whether to modify the last configured parameters. The function of the selection control is to allow the user to determine whether to modify the previously saved configuration when configuring the parameters. When the user is configuring the parameters, the first parameter configuration interface can provide a selection control to allow the user to select whether to apply the last saved parameter configuration. If the user selects yes, the host computer will load the last saved parameter configuration and display it on the parameter configuration interface for the user to modify. If the user selects no, the user is allowed to configure the parameters from scratch. The setting method of the selection control can be in the form of buttons, check boxes, switch buttons, etc., depending on the user interface design and application requirements.
[0097] Optionally, in a possible implementation of the present application, a database management system may be first used to store at least one parameter determined by a user. When a user enters or selects a parameter in a configuration interface, the host computer may store these parameters in a corresponding table of a database. Each parameter may have its own field for subsequent retrieval and management.
[0098] When the user clicks the selection control, the host computer will trigger the operation of querying the database. The host computer will retrieve the third parameter stored last time from the database and extract it. This step can be achieved by writing a corresponding database query statement.
[0099] Then, the host computer will display the third parameter retrieved from the database on the first parameter configuration interface. In this way, the user can view the parameters configured last time before a new round of configuration to make necessary modifications and adjustments.
[0100] Optionally, in a specific implementation of the present application, the hardware environment on which the present application depends is as follows: Figure 2As shown in the figure, it mainly consists of a host computer and a simulation computer, where the simulation computer consists of a CPCI-3282 board and a processor board. The Linux system deployed on the CPCI-3282 board runs the TSN daemon, which can automatically start the AS and Qbv protocol stacks after receiving the protocol stack parameters. Each simulation computer supports up to 16 CPCI-3282 boards.
[0101] like Figure 3 and Figure 4 As shown, first, write a Java package that provides a graphical interface method. In the graphical interface of the CPCI_3282_Node_Init module, the user can enter the clock priority of the AS protocol stack, select the node type, clock synchronization level and delay mechanism, and can also choose whether to enable the Qbv protocol stack and import the configuration file of the Qbv protocol stack. In the graphical interface of the CPCI_3282_Send module, the user can set the priority and VLAN ID of the Qbv message. In addition, the graphical interface will also verify the configuration parameters entered by the user. When the user input value is not within the specified range, the graphical interface will pop up an alarm box and prompt the correct range.
[0102] Then, write the OpenGui function. The specific implementation method is as follows:
[0103] OpenGui is an m-script function called by the OpenFcn callback function when the user opens the configuration program or configuration window. This m-script function is used to call the Java package to pop up a graphical interface for configuring the AS and Qbv protocol stacks for the user. In addition, when the user completes the parameter configuration and saves it, OpenGui will save the AS protocol stack parameters, Qbv enable and Qbv configuration file path, Qbv message priority and VLAN ID on the interface to MASK (i.e., database). When the user opens the graphical interface again, OpenGui will take the parameters from MASK and put them back to the graphical interface for the user to view the previously configured parameters.
[0104] In these optional embodiments, storing the parameters in a database can ensure the persistence of the parameters, and the previously configured parameters can be retained even if the host computer is shut down or restarted. When configuring the parameters, the user can choose whether to use the parameter configuration saved last time. If the user chooses yes, the host computer will read the parameters saved last time from the database and display them on the parameter configuration interface, allowing the user to modify them directly, thereby improving the user's convenience. Moreover, if the user chooses to use the parameter configuration saved last time, it can also avoid repeated parameter input, saving the user's time and energy. Providing a selection control and displaying the last saved parameters can enhance the user's satisfaction and experience with the host computer, allowing the user to feel the intelligence and user-friendliness of the host computer.
[0105] In the second aspect, the protocol stack configuration method provided in the embodiment of the present application is introduced below. Figure 5 As shown, the method is applied to a simulation computer, and the method specifically comprises the following steps:
[0106] S400, receiving configuration parameters of a protocol stack sent by a host computer, where the configuration parameters are determined according to parameters determined by a user in a first parameter configuration interface displayed in the host computer.
[0107] Optionally, in a specific implementation of the present application, the CPCI_3282 board driver runs in a processor board on a simulated computer and is called by an S-Function, and can send configuration parameters of the AS and Qbv protocol stacks to related programs on the CPCI_3282 board through a computer bus interconnected computer (CompactPCI Bus, CPCI) bus.
[0108] Specifically, according to the Java package, OpenGui callback function and board driver provided above, after S-Function obtains AS and Qbv protocol stack parameters from MASK, it passes AS and Qbv protocol stack parameters (i.e., configuration parameters of the protocol stack) to related onboard programs by calling CPCI_3282 board driver.
[0109] S500: Configure the protocol stack according to the configuration parameters of the protocol stack.
[0110] Optionally, in the embodiment of the present application, the graphical configuration method of the present application is implemented as follows: Figure 3 As shown, first write a Java package to generate the graphical interface of the AS and Qbv protocol stacks, and then develop an OpenGui callback function to call the Java package to pop up the graphical interface. The graphical interface is divided into the CPCI_3282_Node_Init module and the CPCI_3282_Send module, of which the CPCI_3282_Node_Init module is used to configure the AS protocol stack parameters, and the CPCI_3282_Send module is used to configure the Qbv protocol stack parameters. After the user configures and saves the protocol stack parameters in the interface, the S-Function calls the 3282_CPCI board driver to pass the protocol stack parameters to the TSN daemon on the CPCI_3282 board. Finally, the TSN daemon starts the AS and Qbv protocol stacks. The protocol stack configuration method of this application only requires a small number of parameters to generate a complete AS protocol stack configuration file, which is more concise and friendly than the existing solutions.
[0111] In a protocol stack configuration method provided in an embodiment of the present application, the method avoids errors and inconsistencies that may be introduced by manually inputting parameters by automatically receiving parameters sent by a host computer. This automated process can reduce human errors, thereby improving the accuracy of the configuration. Automatically receiving and configuring parameters can save time and labor costs. Compared with manual configuration, this automated process is more efficient and can complete the configuration of the protocol stack more quickly, thereby improving overall work efficiency. Since the configuration process is automated, problems that occur during the configuration process can be tracked and debugged more easily. If the configuration is incorrect, it is easier to locate the problem and make corrections, thereby improving the stability and reliability of the configuration protocol stack.
[0112] In one embodiment, the protocol stack is an AS protocol stack; the above step 500 may specifically perform the following steps:
[0113] S510, determining the configuration format of the AS protocol stack according to the parameter type of the configuration parameter of the AS protocol stack through a preset first application programming interface API, the simulation computer including the first application programming interface API;
[0114] S520, configuring a configuration file of the AS protocol stack corresponding to the configuration parameter according to the configuration format;
[0115] S530: Configure the AS protocol stack according to the configuration file of the AS protocol stack.
[0116] Optionally, in a possible implementation of the present application, the simulation computer first determines the parameter type of the configuration parameter of the AS protocol stack according to a preset first application programming interface (API). Through the API call, the simulation computer can obtain the data type, range, and other related information of the configuration parameter. According to the obtained parameter type, the simulation computer determines the corresponding configuration format.
[0117] Next, the simulation computer maps the received configuration parameters to the configuration file according to the determined configuration format. For each configuration parameter, the simulation computer fills its corresponding value into the corresponding position of the configuration file. The generation of the configuration file can be achieved through a text processing tool or a programming interface to ensure that the generated configuration file conforms to the predetermined format and specifications.
[0118] The simulation computer then applies the generated configuration file to the configuration of the AS protocol stack. By calling the configuration tool or API of the AS protocol stack, the simulation computer applies the parameters in the configuration file to the AS protocol stack. The configuration process can also start or reload the AS protocol stack to make the configuration effective.
[0119] Specifically, determining the configuration format involves mapping the parameter type and value characteristics to the appropriate configuration file structure, field name, and configuration value format. This process can be achieved through configuration templates and mapping rules. The specific steps are as follows:
[0120] The simulation computer first needs to analyze the type of each configuration parameter. Parameter types can include integers, floating point numbers, strings, etc. For different types, the simulation computer needs to select the appropriate configuration file format and value representation method.
[0121] Design corresponding configuration templates for different parameter types. The configuration template specifies which attribute items are in the configuration file. For example, if the node type is a master node, you need to add a line "inhibit_multicast_service 1" to the configuration file, which means that inhibit_multicast_service (disable multicast service) is set to 1. If the node type is a slave node, it is not necessary to add it.
[0122] Then, based on the parameter type and configuration template, define mapping rules. The mapping rules specify how to map parameter values to the corresponding fields in the configuration file. Then, based on the mapping rules, convert the received parameter values to the values of the corresponding fields in the configuration file. For example, convert a floating point parameter value to a string representation in the configuration file, or convert a string parameter value to an integer value.
[0123] Finally, a configuration file is generated based on the configuration template and the converted parameter values. According to the mapping rules, the parameter values are filled into the corresponding field positions in the configuration file. The generated configuration file should meet the preset structure and format requirements. Through the above steps, the simulation computer can determine the corresponding configuration format according to the parameter type, map the received parameter values to the configuration file, and generate a configuration file that meets the requirements. This ensures that the structure and format of the configuration file match the characteristics of the parameter values, improving the accuracy and reliability of the configuration process.
[0124] In one embodiment, the protocol stack is a Qbv protocol stack, and the configuration parameters include a configuration file of the Qbv protocol stack, a message priority of the Qbv protocol stack, and a virtual local area network identifier of the Qbv protocol stack; the above step 500 may specifically perform the following steps:
[0125] S540, configuring the Qbv protocol stack according to the configuration file of the Qbv protocol stack, the message priority of the Qbv protocol stack, and the virtual LAN identifier of the Qbv protocol stack;
[0126] In one embodiment, after the above step 540, the method may further specifically perform the following steps:
[0127] S541, adding the message priority of the Qbv protocol stack and the virtual LAN identifier of the Qbv protocol stack to the Qbv message processed by the Qbv protocol stack through a preset second API, and the simulation computer also includes the second API.
[0128] Optionally, in an embodiment of the present application, the Qbv protocol stack is first configured according to the received configuration parameters, including the configuration file, message priority and virtual LAN identifier of the Qbv protocol stack. Specifically, operations such as loading the configuration file, setting the message priority and the virtual LAN identifier may be included to ensure the correct configuration of the Qbv protocol stack.
[0129] After the configuration is completed, the configured message priority and virtual LAN identifier are added to the Qbv message processed by the Qbv protocol stack through the preset second API. This step can ensure that when the Qbv protocol stack processes the Qbv message, it can be processed according to the pre-configured priority and identifier to meet communication requirements.
[0130] Overall, this series of steps implements the process of configuring the Qbv protocol stack according to the received configuration parameters, and adding the relevant parameters to the processed Qbv message after the configuration is completed. Through such a process, it can be ensured that the Qbv protocol stack operates normally according to the expected configuration parameters, improving the accuracy and reliability of the protocol stack configuration.
[0131] Optionally, in a specific implementation of the present application, as Figure 4 As shown in the figure, considering that the content and format of the cfg file related to the AS protocol stack vary with the parameters such as node type, clock synchronization level, clock priority and delay mechanism, the daemon running on the CPCI_3282 board receives the AS and Qbv protocol stack parameters, calls the self-encapsulation API, and generates the AS protocol stack configuration file according to the combination of the above four parameters (i.e., node type, clock synchronization level, clock priority and delay mechanism), and then starts the AS protocol stack. If the user enables the Qbv protocol stack, the daemon will continue to call the self-encapsulation API to configure the Qbv protocol stack and then start the Qbv protocol stack. The self-encapsulated TSN protocol stack API module and function description are shown in Table 1.
[0132] Table 1 Self-encapsulation API and function description
[0133]
[0134] QbvDel and QbvFlush are APIs used to manage the Qbv protocol stack. Their functions are as follows:
[0135] QbvDel: This API is used to delete a specific Qbv message processing configuration. By calling QbvDel, you can delete a specific Qbv message processing configuration, thereby canceling the application of the configuration in the system.
[0136] QbvFlush: This API is used to delete all Qbv message processing configurations. Calling QbvFlush can clear all Qbv message processing configurations in the system and restore the system to its initial state.
[0137] Assume that multiple Qbv message processing rules are configured in the system, and one of the rules has a problem, resulting in abnormal communication. To solve this problem, you can use the QbvDel API to delete the problematic rule and then reconfigure a new rule.
[0138] In some cases, it is necessary to clear all Qbv message processing configurations in the system in order to reconfigure the entire system. At this time, you can use the QbvFlush API to clear all Qbv message processing configurations in the system, and then reconfigure the system according to the new requirements. In short, QbvDel and QbvFlush APIs provide flexibility and convenience in managing Qbv protocol stack configurations, which can help users solve configuration problems and reconfigure the system.
[0139] In these optional embodiments, the present application implements a graphical operation method of the TSN protocol stack, which can not only correct the wrong parameters entered by the user during the parameter configuration stage, but also automatically generate configuration files through a self-encapsulated API, avoiding the complex process of maintaining different types of configuration files. These technologies greatly reduce the difficulty of using the AS and Qbv protocol stacks, avoid human operational errors caused by manual configuration, and reduce the complexity and maintenance costs of the system, thereby improving the efficiency of the use of the AS and Qbv protocol stacks and reducing labor costs.
[0140] In order to facilitate understanding of the protocol stack configuration method provided in the above embodiment, the above protocol stack configuration method is described below with reference to several specific scenario embodiments.
[0141] like Figure 4 As shown, in a complete embodiment of the present application, the following operations are first performed in the host computer:
[0142] 1. Create a graphical interface Java package
[0143] Write a Java package that provides a graphical interface method, in which users can enter the configuration parameters of the protocol stack and verify the configuration parameters entered by the user.
[0144] 2. Write OpenGui callback function
[0145] 3. Pop up the graphical interface and save the parameters
[0146] OpenGui can call the Java package to pop up a graphical interface and save the configuration parameters entered by the user into the MASK.
[0147] 4. Encapsulate S-Function
[0148] After the S-Function obtains the protocol stack configuration parameters from the MASK, it passes the protocol stack configuration parameters to the onboard Linux system by calling the CPCI_3282 board driver.
[0149] 5. Write CPCI_3282 driver
[0150] Write a CPCI_3282 board driver that runs in the processor board of the simulation computer. It is called by S-Function and sends protocol stack configuration parameters to the Linux system on the CPCI_3282 board through the CPCI bus.
[0151] 6. Write your own encapsulated API
[0152] Write a self-encapsulated API to generate protocol stack configuration files.
[0153] Complete the following operations on the processor board of the simulation computer:
[0154] 1. Call CPCI_3282 board driver
[0155] The CPCI_3282 board driver is called by S-Function and the protocol stack configuration parameters are sent to the Linux system on the CPCI_3282 board through the CPCI bus.
[0156] Complete the following operations in the TSN daemon deployed on the CPCI_3282 board:
[0157] 1. Calling self-encapsulated API
[0158] After receiving the protocol stack configuration parameters from the board driver, the daemon calls the self-encapsulation API.
[0159] 2. Generate AS configuration file and enable AS protocol stack
[0160] First generate the AS protocol stack configuration file, and then start the AS protocol stack.
[0161] 3. Generate Qbv configuration file and enable Qbv protocol stack
[0162] If the user enables the Qbv protocol stack, the daemon will continue to call the self-encapsulation API to generate the Qbv protocol stack configuration file and then start the Qbv protocol stack.
[0163] The entire process is configured and packaged in the host computer, the driver is called in the processor board of the simulation computer, and finally the protocol stack is generated and enabled in the TSN daemon of the CPCI_3282 board, realizing the complete process from user configuration to protocol stack startup.
[0164] Figure 6 A schematic diagram of the structure of a protocol stack configuration device provided in another embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0165] Reference Figure 6 The protocol stack configuration device is applied to the host computer, and the protocol stack configuration device may include:
[0166] Display module 601, used to display a first parameter configuration interface corresponding to the protocol stack;
[0167] A determination module 602, configured to determine at least one parameter determined by a user in a first parameter configuration interface as a configuration parameter of a protocol stack;
[0168] The sending module 603 is used to send the configuration parameters of the protocol stack to the simulation computer, so that the simulation computer configures the protocol stack based on the configuration parameters of the protocol stack.
[0169] In one embodiment, the protocol stack is a flow control Qbv protocol stack; the protocol stack configuration device may further include:
[0170] A second display module, used to display a second parameter configuration interface corresponding to the clock synchronization AS protocol stack, the second parameter configuration interface including a trigger control;
[0171] In one embodiment, the display module 601 may include:
[0172] The first display submodule is used to display a first parameter configuration interface corresponding to the Qbv protocol stack when receiving a touch input from a user to trigger the control.
[0173] In one embodiment, the first parameter configuration interface includes a browsing control and a parameter input interface, and the protocol stack is a Qbv protocol stack; the determination module 602 may include:
[0174] A first acquisition submodule is used to acquire a file path of a configuration file of a preset Qbv protocol stack determined by a user in a browsing control;
[0175] The second acquisition submodule is used to obtain the configuration file of the Qbv protocol stack from the file path;
[0176] A third acquisition submodule, used to acquire a first parameter corresponding to the Qbv protocol stack determined by the user in the parameter input interface, the first parameter including at least one of a message priority of the Qbv protocol stack and a virtual local area network identifier of the Qbv protocol stack;
[0177] The first determining submodule is used to determine the configuration file of the Qbv protocol stack and the first parameter as the configuration parameters of the Qbv protocol stack.
[0178] In one embodiment, the protocol stack configuration device may further include:
[0179] A first receiving module, used to receive a first input from a user on a first parameter configuration interface, where the first input is used to input at least one second parameter on the first parameter configuration interface;
[0180] The first output module is used to output an alarm interface when at least one second parameter matches a preset error rule. The alarm interface includes prompt information and a correct parameter value range. The prompt information is used to prompt the user that the input is wrong.
[0181] In one embodiment, the protocol stack configuration device may further include:
[0182] A storage module, used to store configuration parameters in a database of a host computer;
[0183] In one embodiment, the display module 601 may further include:
[0184] When receiving a touch input of the user to the selection control, obtaining the third parameter stored in the database for the last time from the database;
[0185] The third parameter is displayed on the first parameter configuration interface.
[0186] Figure 7 A schematic diagram of the structure of a protocol stack configuration device provided in another embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0187] Reference Figure 7 The protocol stack configuration device is applied to the simulation computer, and the protocol stack configuration device may include:
[0188] The receiving module 701 is used to receive the configuration parameters of the protocol stack sent by the host computer, where the configuration parameters are determined according to the parameters determined by the user in the first parameter configuration interface displayed in the host computer;
[0189] The configuration module 702 is used to configure the protocol stack according to the configuration parameters of the protocol stack.
[0190] In one embodiment, the protocol stack is an AS protocol stack; the configuration module 702 may include:
[0191] A second determining submodule is used to determine the configuration format of the AS protocol stack according to the parameter type of the configuration parameter of the AS protocol stack through a preset first application programming interface API, and the simulation computer includes the first application programming interface API;
[0192] A first configuration submodule, configured to configure a configuration file of the AS protocol stack corresponding to the configuration parameters according to a configuration format;
[0193] The second configuration submodule is used to configure the AS protocol stack according to the configuration file of the AS protocol stack.
[0194] In one embodiment, the protocol stack is a Qbv protocol stack, and the configuration parameters include a configuration file of the Qbv protocol stack, a message priority of the Qbv protocol stack, and a virtual local area network identifier of the Qbv protocol stack; the configuration module 702 may also include:
[0195] A third configuration submodule is used to configure the Qbv protocol stack according to the configuration file of the Qbv protocol stack, the message priority of the Qbv protocol stack and the virtual local area network identifier of the Qbv protocol stack;
[0196] In one embodiment, the protocol stack configuration device may further include:
[0197] The adding module is used to add the message priority of the Qbv protocol stack and the virtual local area network identifier of the Qbv protocol stack to the Qbv message processed by the Qbv protocol stack through a preset second API. The simulation computer also includes the second API.
[0198] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application, and are devices corresponding to the above-mentioned methods. All implementation methods in the above-mentioned method embodiment are applicable to the embodiments of the device. Its specific functions and technical effects brought about can be found in the method embodiment part, and will not be repeated here.
[0199] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0200] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0201] The device may include a processor 801 and a memory 802 storing program instructions.
[0202] When the processor 801 executes the program, the steps in any of the above method embodiments are implemented.
[0203] Exemplarily, the program may be divided into one or more modules / units, one or more modules / units are stored in the memory 802 and executed by the processor 801 to complete the present application. One or more modules / units may be a series of program instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the program in the device.
[0204] Specifically, the processor 801 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0205] The memory 802 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 802 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 802 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 802 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 802 is a non-volatile solid-state memory.
[0206] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) readable storage media (e.g., memory devices) encoded with software including computer executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0207] The processor 801 implements any one of the methods in the above embodiments by reading and executing program instructions stored in the memory 802 .
[0208] In one example, the electronic device may further include a communication interface 803 and a bus 810. The processor 801, the memory 802, and the communication interface 803 are connected via the bus 810 and communicate with each other.
[0209] The communication interface 803 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0210] Bus 810 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 810 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0211] In addition, in combination with the method in the above embodiment, the embodiment of the present application can provide a storage medium for implementation. The storage medium stores program instructions; when the program instructions are executed by a processor, any one of the methods in the above embodiment is implemented.
[0212] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0213] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0214] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0215] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0216] The functional modules shown in the above block diagram can be implemented as hardware, software, firmware or their combination. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), suitable firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments can be downloaded via computer grids such as the Internet, intranets, etc.
[0217] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0218] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0219] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A protocol stack configuration method, applied to a host computer, characterized in that: The method comprises: Display the first parameter configuration interface corresponding to the protocol stack; Determine at least one parameter determined by the user in the first parameter configuration interface as a configuration parameter of the protocol stack; The configuration parameters of the protocol stack are sent to a simulation computer, so that the simulation computer configures the protocol stack based on the configuration parameters of the protocol stack.
2. The method according to claim 1, characterized in that The protocol stack is a flow control Qbv protocol stack; Before the first parameter configuration interface corresponding to the display protocol stack, the method further includes: Display a second parameter configuration interface corresponding to the clock synchronization AS protocol stack, wherein the second parameter configuration interface includes a trigger control; The first parameter configuration interface corresponding to the display protocol stack includes: When the user's touch input to the trigger control is received, the first parameter configuration interface corresponding to the Qbv protocol stack is displayed.
3. The method according to claim 1, characterized in that The first parameter configuration interface includes a browsing control and a parameter input interface, and the protocol stack is a Qbv protocol stack; The step of determining at least one parameter determined by the user in the first parameter configuration interface as a configuration parameter of the protocol stack includes: Obtaining the file path of the configuration file of the preset Qbv protocol stack determined by the user in the browsing control; Obtaining a configuration file of the Qbv protocol stack from the file path; Acquire a first parameter corresponding to the Qbv protocol stack determined by the user in the parameter input interface, wherein the first parameter includes at least one of a message priority of the Qbv protocol stack and a virtual local area network identifier of the Qbv protocol stack; The configuration file of the Qbv protocol stack and the first parameter are determined as configuration parameters of the Qbv protocol stack.
4. The method according to claim 1, characterized in that: After displaying a first parameter configuration interface corresponding to the protocol stack, and before determining at least one parameter determined by a user in the first parameter configuration interface as a configuration parameter of the protocol stack, the method further includes: receiving a first input from the user on the first parameter configuration interface, where the first input is used to input at least one second parameter on the first parameter configuration interface; In the case where the at least one second parameter matches the preset error rule, an alarm interface is output, wherein the alarm interface includes prompt information and a correct parameter value range, and the prompt information is used to prompt the user that the input is wrong.
5. The method according to claim 1, characterized in that After determining at least one parameter determined by the user in the first parameter configuration interface as a configuration parameter of the protocol stack, and before sending the configuration parameter of the protocol stack to the simulation computer, the method further includes: Storing the at least one parameter in a database of the host computer; The first parameter configuration interface also includes a selection control, and the first parameter configuration interface corresponding to the display protocol stack includes: When receiving a touch input of the user to the selection control, acquiring from the database the third parameter stored in the database for the last time; The third parameter is displayed on the first parameter configuration interface.
6. A protocol stack configuration method, applied to a simulation computer, characterized in that: The method comprises: Receiving configuration parameters of the protocol stack sent by the host computer, wherein the configuration parameters are determined according to parameters determined by a user in a first parameter configuration interface displayed in the host computer; The protocol stack is configured according to the configuration parameters of the protocol stack.
7. The method according to claim 6, characterized in that The protocol stack is an AS protocol stack; Configuring the protocol stack according to the configuration parameters of the protocol stack includes: Determining the configuration format of the AS protocol stack according to the parameter type of the configuration parameter of the AS protocol stack through a preset first application programming interface API, wherein the simulation computer includes the first application programming interface API; According to the configuration format, configure the configuration file of the AS protocol stack corresponding to the configuration parameters; Configure the AS protocol stack according to the configuration file of the AS protocol stack.
8. The method according to claim 6, characterized in that The protocol stack is a Qbv protocol stack, and the configuration parameters include a configuration file of the Qbv protocol stack, a message priority of the Qbv protocol stack, and a virtual local area network identifier of the Qbv protocol stack; Configuring the protocol stack according to the configuration parameters of the protocol stack further includes: Configure the Qbv protocol stack according to the configuration file of the Qbv protocol stack, the message priority of the Qbv protocol stack and the virtual local area network identifier of the Qbv protocol stack; After configuring the Qbv protocol stack according to the configuration file of the Qbv protocol stack, the message priority of the Qbv protocol stack and the virtual local area network identifier of the Qbv protocol stack, the method further includes: The message priority of the Qbv protocol stack and the virtual local area network identifier of the Qbv protocol stack are added to the Qbv message processed by the Qbv protocol stack through a preset second API, and the simulation computer also includes the second API.
9. A protocol stack configuration device, applied to a host computer, characterized in that: The device comprises: A display module, used to display a first parameter configuration interface corresponding to the protocol stack; A determination module, configured to determine at least one parameter determined by a user in the first parameter configuration interface as a configuration parameter of the protocol stack; The sending module is used to send the configuration parameters of the protocol stack to the simulation computer, so that the simulation computer configures the protocol stack based on the configuration parameters of the protocol stack.
10. A protocol stack configuration device, applied to a simulation computer, characterized in that: The device comprises: A receiving module, used for receiving configuration parameters of the protocol stack sent by the host computer, wherein the configuration parameters are determined according to parameters determined by the user in the first parameter configuration interface displayed in the host computer; A configuration module is used to configure the protocol stack according to the configuration parameters of the protocol stack.