statechart

package
v0.72.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructXstate

func ConstructXstate(xstateFile string)

func GenerateKeywordFile

func GenerateKeywordFile(strVar string, filePath string)

func InitFullScTcSlice

func InitFullScTcSlice(scfilePathSlice []string) []*testcase.TestCaseDataInfo

func KWSettingsStr

func KWSettingsStr()

func KWTestCasesStr

func KWTestCasesStr()

func XmlDecode

func XmlDecode(data []byte)

Types

type State

type State struct {
	Id         string                            `json:"id"`
	Type       string                            `json:"type"` // optional: atomic, compound. mandatory: parallel, final, history
	Initial    string                            `json:"initial"`
	Entry      []string                          `json:"entry"`  // entry actions
	Exit       []string                          `json:"exit"`   // exit actions
	On         map[string]map[string]*TargetAttr `json:"on"`     // map[event]map[targetName]attr
	States     States                            `json:"states"` // map["states"]...
	Activities []string                          `json:"activities"`
}

func (*State) GetStateEvents

func (st *State) GetStateEvents()

get state - event (json node: On)

func (*State) GetStateIds

func (st *State) GetStateIds()

get

func (*State) GetStateTransitions

func (st *State) GetStateTransitions(ch chan *Transition, wg *sync.WaitGroup)

func (*State) GetTransitionInfos

func (st *State) GetTransitionInfos()

get Transition event - target names

func (*State) SetStateIds

func (st *State) SetStateIds()

set

type States

type States map[string]*State // map[stateName]state

type TargetAttr

type TargetAttr struct {
	Cond    string   `json:"cond"`
	Actions []string `json:"actions"` // Executable Content
}

type Transition

type Transition struct {
	FromState string
	Event     string
	ToState   string
	Cond      string
	Actions   []string
}

Jump to

Keyboard shortcuts

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