Unlock instant, AI-driven research and patent intelligence for your innovation.

Finite-state machine control method and finite-state machine

A finite state machine and control method technology, applied in the direction of program control design, program control devices, instruments, etc., can solve problems such as inability to program

Active Publication Date: 2020-04-17
HEFEI CSG SMART ROBOT TECH CO LTD
View PDF9 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004]Although the function of the QT state machine is powerful, the use of the state machine needs to be programmed with QT, and some libraries of QT must be included, which cannot be used in pure C / C++ code programming

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Finite-state machine control method and finite-state machine
  • Finite-state machine control method and finite-state machine
  • Finite-state machine control method and finite-state machine

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] In order to further explain the features of the present invention, please refer to the following detailed description and drawings of the present invention. The attached drawings are for reference and explanation purposes only, and are not used to limit the protection scope of the present invention.

[0028] Such as figure 2 As shown, this embodiment discloses a finite state machine control method, which includes the following steps S1 to S4:

[0029] S1. Create each state of the state machine according to the name and memory address of each state of the state machine. The state includes two parent states and a final state, and each parent state includes three child states;

[0030] S2. After the current state of the state machine is executed, the next state to be jumped to is specified by the postEvent function, where the first parameter of the postEvent function is the name of the next state to be jumped to, and the second parameter is to be passed Parameters for the next ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a finite-state machine control method and a finite-state machine, and belongs to the technical field of computer application, and the method comprises the steps: creating eachstate of the state machine according to the name and memory address of each state of the state machine, wherein the state comprises two father states and a final state, and each father state comprisesthree child states; after the current state of the state machine is executed, specifying the next state to be skipped through a postEvent function, wherein the first parameter of the postEvent function is the name of the next state to be skipped, and the second parameter of the postEvent function is the parameter to be transmitted to the next state; searching a corresponding memory address from the registered state list according to the name of the next state by the father state or the StateMachine, and executing an interface function of the next state, wherein each sub-state comprises threeexecution functions, namely an onEntry function, a handleTimeout function and an onExit function. According to the method, rich state machine functions are provided by adopting a simple language, andthe portability is high.

Description

Technical field [0001] The present invention relates to the technical field of computer applications, in particular to a control method of a finite state machine and a finite state machine. Background technique [0002] The function realized by the finite state machine is very simple, that is, it realizes the mutual conversion between various states. But the actual application of the state machine may require more functions, such as passing parameters when the state is switched, and the containment relationship between the parent state and the child state. [0003] The current mature state machine is the finite state machine algorithm implemented in QT. figure 1 Shows a typical QT state machine process. It can switch between states through a signal-driven mechanism, supports state machine start, stop, and pause functions. It also supports parent states including child states, switching between child states, Switch between parent states and other functions. figure 1 In, the S1 stat...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/448G06F8/30
CPCG06F9/4498G06F8/30
Inventor 宋强白俊锋王庆祥许志瑜
Owner HEFEI CSG SMART ROBOT TECH CO LTD