A state machine diagram integration method supporting parameter passing
By adding parameter interfaces and events to the state machine diagram, parameter transmission was realized, the state transition problem in the state machine diagram integration process of complex systems was solved, and the effectiveness of simulation verification was improved.
Patent Information
- Application Number
- CN202111348277.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-15
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-11-15
AI Technical Summary
In existing technologies, state machine diagrams cannot effectively transmit parameters during distributed integration, resulting in some state transition conditions not being triggered, which affects the simulation and verification of complex systems.
By adding parameter interfaces to the state machine diagram, the parameter transmission path and events are clarified. The Rhapsody software tool is used to integrate the state machine diagram, including the specific modeling steps of the receiver, sender and forwarder, to realize the transmission and setting of parameters.
This solves the problem that traditional event interfaces cannot trigger state transitions, and provides a new method for integrated simulation of state machine diagrams for complex systems, thereby improving the effectiveness of simulation verification.
Smart Images

Figure CN114154307B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of demand analysis, and in particular, relates to a state machine diagram integration method that supports parameter transmission. Background Art
[0002] In the design of complex systems such as aviation, aerospace, automobiles, and ships, the model-based system engineering method (MBSE method) has been widely adopted. In the model-based system engineering method, the state machine diagram is a means of requirement analysis and simulation verification. For simple systems, one or a small number of state machine diagrams can complete the analysis and simulation; but in engineering practice, for complex systems, there are multiple or even dozens of subsystems / subsystems, which requires each subsystem / subsystem to carry out state machine diagram modeling separately, and then conduct distributed integrated simulation. The state diagrams are on different computers and rely on soft bus cross-linking, see Figure 1 .
[0003] There is no method for transferring parameters between various state machine diagrams in the distributed integration process in the prior art. In distributed integration, according to the existing method, the interface between state machine diagrams is an event interface, which is a statement, such as "interface = speed is 100km / h". The problem is that in engineering simulation, many state jump conditions are statements that cannot be triggered, such as "when the speed v is greater than 90km / h, the control system jumps from the large gain state to the small gain state", because the event interface does not assign a value to v, so the state jump cannot be completed.
[0004] Therefore, it is desired to have a technical solution to overcome or at least alleviate at least one of the above-mentioned defects of the prior art. Summary of the invention
[0005] The purpose of the present application is to provide a state machine diagram integration method that supports parameter transmission, so as to solve at least one problem existing in the prior art.
[0006] The technical solution of this application is:
[0007] A state machine diagram integration method supporting parameter passing, comprising:
[0008] When the system is used as a parameter receiver:
[0009] Find the event with parameters under InterfacesPkg and turn on the event feature;
[0010] Added new parameters;
[0011] Draw and set the parameters of the receiver's state machine;
[0012] When the system acts as the parameter sender:
[0013] Find the event with parameters under InterfacesPkg and turn on the event feature;
[0014] Added new parameters;
[0015] Draw and set the parameters of the sender state machine;
[0016] When the system is used as a parameter forwarder:
[0017] Add attribute A under the corresponding module;
[0018] Assign a value to attribute A;
[0019] To forward parameters, add a send operation in the state diagram to send the event and parameter values to the selected target.
[0020] In at least one embodiment of the present application, the received parameters and the events carrying the parameters are determined before the parameter passing drawing of the receiving state machine is performed.
[0021] In at least one embodiment of the present application, the parameters to be sent and the events carrying the parameters are determined before the parameter passing drawing of the sender state machine is performed.
[0022] The invention has at least the following beneficial technical effects:
[0023] The state machine diagram integration method of this application supports parameter passing and proposes interface parameter passing, which solves the problem that traditional event interfaces cannot trigger some state jumps during the state machine diagram integration process. Through practice, it deeply explores and innovates the model-based system engineering method, and provides a new solution for how to carry out state machine diagram integration simulation for complex systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is an example of a state machine diagram distributed integrated simulation project of the prior art;
[0025] Figure 2 is a characteristic schematic diagram of an opening event when a system in one embodiment of the present application acts as a parameter receiver;
[0026] Figure 3 It is a schematic diagram of adding parameters when the system of one embodiment of the present application acts as a parameter receiver;
[0027] Figure 4 It is a schematic diagram of triggering events and parameters when the system of one embodiment of the present application acts as a parameter receiver;
[0028] Figure 5 It is a schematic diagram of the location of triggering events and guarding when the system of one embodiment of the present application acts as a parameter receiver;
[0029] Figure 6 It is a characteristic schematic diagram of opening an event when the system of one embodiment of the present application acts as a parameter sender;
[0030] Figure 7 It is a schematic diagram of adding parameters when the system of one embodiment of the present application acts as a parameter sender;
[0031] Figure 8 It is a schematic diagram of parameters displayed in a sending operation when a system in one embodiment of the present application acts as a parameter sender;
[0032] Fig. 9 It is a schematic diagram of setting parameter values when a system in one embodiment of the present application acts as a parameter sender and opens a sending operation;
[0033] Fig.10 It is a schematic diagram of adding attributes when the system of one embodiment of the present application acts as a parameter forwarding party;
[0034] Fig.11 It is a code schematic diagram of the conversion operation when the system of one embodiment of the present application acts as a parameter forwarding party;
[0035] Fig.12 It is a schematic diagram showing the triggering event and the operation code converted when the system of one embodiment of the present application is used as a parameter forwarding party;
[0036] Fig.13 It is a schematic diagram of sending targets, events and parameters when the system of one embodiment of the present application acts as a parameter forwarder;
[0037] Fig.14 It is a schematic diagram of the values of targets, events and parameters in operation features sent by the system of one embodiment of the present application as a parameter forwarder. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical scheme and advantages of the implementation of this application clearer, the technical scheme in the embodiment of this application will be described in more detail below in conjunction with the drawings in the embodiment of this application. In the drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of this application, not all of them. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain this application, and should not be construed as limitations on this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. The embodiments of this application are described in detail below in conjunction with the drawings.
[0039] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the scope of protection of the present application.
[0040] The following is combined with Figures 2 to 14 This application is described in further detail.
[0041] The present application provides a state machine diagram integration method supporting parameter passing, including:
[0042] When the system is used as a parameter receiver:
[0043] Find the event with parameters under InterfacesPkg and turn on the event feature;
[0044] Added new parameters;
[0045] Draw and set the parameters of the receiver's state machine;
[0046] When the system acts as the parameter sender:
[0047] Find the event with parameters under InterfacesPkg and turn on the event feature;
[0048] Added new parameters;
[0049] Draw and set the parameters of the sender state machine;
[0050] When the system is used as a parameter forwarder:
[0051] Add attribute A under the corresponding module;
[0052] Assign a value to attribute A;
[0053] To forward parameters, add a send operation in the state diagram to send the event and parameter values to the selected target.
[0054] Specifically, the state machine diagram integration method supporting parameter transfer is introduced in detail by taking the Rhapsody software tool as an example.
[0055] It mainly includes three parts: how to model the system as a receiver, how to model the system as a sender, and how to model the system as a forwarder.
[0056] Before drawing the parameter state machine, you need to clarify: the parameters that need to be passed, the events that carry the parameters, the sender, and the receiver.
[0057] The state machine diagram integration method supporting parameter transmission in this application, when the system acts as a parameter receiver:
[0058] When drawing the receiving system state machine that receives event parameters, it is necessary to clarify: the received parameters and the events that carry the parameters.
[0059] 1) Find the event with parameters under InterfacesPkg, right-click to open the event characteristics, such as Figure 2 As shown;
[0060] 2) Add new parameters, such as Figure 3 As shown;
[0061] The name is a1 (Note: in label mode, it is displayed as label, in non-label mode, it is displayed as name. Label can be defined as Chinese, but name cannot be defined as Chinese). The type is selected according to the needs. Common types include bool and int (where bool is subsequently assigned true / false, and int is subsequently assigned an integer such as 1, 2...). The value is not filled in here.
[0062] 3) Draw and set the parameters of the receiving state machine;
[0063] It is necessary to place the receiving event and parameter value / judgment on the same trigger line, such as Figure 4 As shown in the figure, the state state_0 receives the event message_1 and judges the parameter a1 passed by it as true, and then jumps to the state state_1.
[0064] Double-click to expand the conversion line. Figure 5 This is where event triggering and guard judgment are added.
[0065] The state machine diagram integration method of the present application that supports parameter transmission, when the system acts as the parameter sender:
[0066] When drawing the state machine of the sender system that sends event parameters, it is necessary to clarify: the parameters sent and the events that carry the parameters.
[0067] 1) Find the event with parameters under InterfacesPkg, right-click to open the event feature, see Figure 6 ;
[0068] 2) Add new parameters;
[0069] The label is a (Note: in label mode, it is displayed as a label, in non-label mode, it is displayed as a name. The label can be defined as Chinese, but the name cannot be defined as Chinese). The type is selected according to the needs. Common types include bool and int (where bool is subsequently assigned true / false, and int is subsequently assigned an integer such as 1, 2...). The value is not filled in here, such as Figure 7 shown.
[0070] 3) Draw and set the parameters of the sender state machine;
[0071] Fill in the event parameter value to be sent under the send operation under the sender state machine, such as 3. When the state machine is executed, the send operation can send the parameter with the value 3 to the receiver, such as Figure 8 shown.
[0072] Fig. 9 After the WaitingForEvents state is reached, the event message_2 and the parameter a it carries are sent to the its_Usecase_0 port.
[0073] The state machine diagram integration method supporting parameter transmission in this application, when the system acts as a parameter forwarder:
[0074] In the state machine model, forwarding is a common expression and is often used in engineering. The forwarding system is both the receiver and the sender. Forwarding is generally divided into two steps: receiving and forwarding.
[0075] The events carrying the forwarded parameters can be the same or different. The sending value needs to be manually filled in when sending. If the forwarded parameter value changes, the value in the forwarding state needs to be changed accordingly, which is troublesome and does not meet actual needs.
[0076] Therefore, we introduce an intermediate attribute to carry the forwarded parameters. The specific steps are as follows:
[0077] 1) Add attribute A to the corresponding module, such as Fig.10 As shown;
[0078] 2) Assign a value to attribute A:
[0079] You can write the assignment code A=params->a0 in the transition and state operations, which means assigning the value of event parameter a0 to A. Fig.11 .
[0080] In the state diagram, the triggering events of the transitions and the display of the code in the operation, see Fig.12 ;
[0081] 3) Perform parameter forwarding. Add a send operation in the state diagram to send the event and parameter value to the selected target. For example, send the value of A to the target block_8 through event meessage_1. Fig.13 and 14 shown.
[0082] The state machine diagram integration method of this application supports parameter passing and proposes interface parameter passing, which solves the problem that traditional event interfaces cannot trigger some state jumps during the state machine diagram integration process. Through practice, it deeply explores and innovates the model-based system engineering method, and provides a new solution for how to carry out state machine diagram integration simulation for complex systems.
[0083] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A state machine diagram integration method supporting parameter transfer, characterized in that: include: When the system is used as a parameter receiver: Find the event with parameters under InterfacesPkg and turn on the event feature; Added new parameters; Draw and set the parameters of the receiver's state machine; When the system acts as the parameter sender: Find the event with parameters under InterfacesPkg and turn on the event feature; Added new parameters; Draw and set the parameters of the sender state machine; When the system is used as a parameter forwarder: Add attribute A under the corresponding module; Assign a value to attribute A; To forward parameters, add a send operation in the state diagram to send the event and parameter values to the selected target.
2. The state machine diagram integration method supporting parameter transfer according to claim 1, characterized in that: Before drawing the parameters of the receiving state machine, the received parameters and the events carrying the parameters are determined.
3. The state machine diagram integration method supporting parameter transfer according to claim 1, characterized in that: Before drawing the parameters of the sender state machine, determine the parameters to be sent and the event that carries the parameters.
