statemachine

package
v0.0.0-...-7ac3615 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2023 License: BSD-3-Clause-Clear Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NormalSM

type NormalSM struct {
	// contains filtered or unexported fields
}

func (*NormalSM) ChangeState

func (nsm *NormalSM) ChangeState(dststate int)

func (*NormalSM) GetAllState

func (nsm *NormalSM) GetAllState() []int

func (*NormalSM) Init

func (nsm *NormalSM) Init()

type NormalSMNode

type NormalSMNode struct {
	// contains filtered or unexported fields
}

func (*NormalSMNode) Enter

func (nsmn *NormalSMNode) Enter()

func (*NormalSMNode) GetState

func (nsmn *NormalSMNode) GetState() int

func (*NormalSMNode) Leave

func (nsmn *NormalSMNode) Leave()

type StateMachine

type StateMachine interface {
	ChangeState(dststate int)

	GetAllState() []int
}

最简化设计,不提供Init

type StateMachineNode

type StateMachineNode interface {
	GetState() int

	Enter()

	Leave()
}

最简化设计,不提供Execute方法

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL