blueprint

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Config_PortType_Exec    = "exec"
	Config_PortType_Data    = "data"
	Config_DataType_Int     = "int"
	Config_DataType_Integer = "integer"
	Config_DataType_Float   = "float"
	Config_DataType_Str     = "string"
	Config_DataType_Boolean = "boolean"
	Config_DataType_Bool    = "bool"
	Config_DataType_Array   = "array"
)
View Source
const (
	EntranceID_IntParam   = 1
	EntranceID_ArrayParam = 2
	EntranceID_Timer      = 3
)

系统入口ID定义,1000以内

View Source
const (
	Entrance = "Entrance_"
)

Entrance 格式:Entrance_XXXX_ID

View Source
const GetVariables = "GetVar"
View Source
const ReturnVarial = "g_Return"
View Source
const SetVariables = "SetVar"

Variables

View Source
var IsDebug = false

Functions

func NewExecNode added in v2.2.0

func NewExecNode[T any, P IExecNodeType[T]]() func() IExecNode

生成一个泛型函数,返回func() IExecNode类型

Types

type AddInt

type AddInt struct {
	BaseExecNode
}

AddInt 加(int)

func (AddInt) CloneInOutPort

func (em AddInt) CloneInOutPort() ([]IPort, []IPort)

func (*AddInt) Exec

func (em *AddInt) Exec() (int, error)

func (AddInt) GetInPortCount

func (em AddInt) GetInPortCount() int

func (*AddInt) GetName

func (em *AddInt) GetName() string

func (AddInt) GetOutPortCount

func (em AddInt) GetOutPortCount() int

func (AddInt) GetOutPortParamStartIndex

func (em AddInt) GetOutPortParamStartIndex() int

func (AddInt) IsInPortExec

func (em AddInt) IsInPortExec(index int) bool

func (AddInt) IsOutPortExec

func (em AddInt) IsOutPortExec(index int) bool

func (AddInt) PrepareMaxInPortId added in v2.1.10

func (em AddInt) PrepareMaxInPortId(maxInPortId int)

func (AddInt) PrepareMaxOutPortId added in v2.1.10

func (em AddInt) PrepareMaxOutPortId(maxOutPortId int)

func (AddInt) SetExec

func (em AddInt) SetExec(exec IExecNode)

func (AddInt) SetInPortById added in v2.1.10

func (em AddInt) SetInPortById(id int, port IPort) bool

func (AddInt) SetOutPortById added in v2.1.10

func (em AddInt) SetOutPortById(id int, port IPort) bool

type AppendIntReturn added in v2.2.0

type AppendIntReturn struct {
	BaseExecNode
}

AppendIntReturn 追加返回结果(Int)

func (AppendIntReturn) CloneInOutPort added in v2.2.0

func (em AppendIntReturn) CloneInOutPort() ([]IPort, []IPort)

func (*AppendIntReturn) Exec added in v2.2.0

func (em *AppendIntReturn) Exec() (int, error)

func (AppendIntReturn) GetInPortCount added in v2.2.0

func (em AppendIntReturn) GetInPortCount() int

func (*AppendIntReturn) GetName added in v2.2.0

func (em *AppendIntReturn) GetName() string

func (AppendIntReturn) GetOutPortCount added in v2.2.0

func (em AppendIntReturn) GetOutPortCount() int

func (AppendIntReturn) GetOutPortParamStartIndex added in v2.2.0

func (em AppendIntReturn) GetOutPortParamStartIndex() int

func (AppendIntReturn) IsInPortExec added in v2.2.0

func (em AppendIntReturn) IsInPortExec(index int) bool

func (AppendIntReturn) IsOutPortExec added in v2.2.0

func (em AppendIntReturn) IsOutPortExec(index int) bool

func (AppendIntReturn) PrepareMaxInPortId added in v2.2.0

func (em AppendIntReturn) PrepareMaxInPortId(maxInPortId int)

func (AppendIntReturn) PrepareMaxOutPortId added in v2.2.0

func (em AppendIntReturn) PrepareMaxOutPortId(maxOutPortId int)

func (AppendIntReturn) SetExec added in v2.2.0

func (em AppendIntReturn) SetExec(exec IExecNode)

func (AppendIntReturn) SetInPortById added in v2.2.0

func (em AppendIntReturn) SetInPortById(id int, port IPort) bool

func (AppendIntReturn) SetOutPortById added in v2.2.0

func (em AppendIntReturn) SetOutPortById(id int, port IPort) bool

type AppendIntegerToArray

type AppendIntegerToArray struct {
	BaseExecNode
}

AppendIntegerToArray 数组追加整型

func (AppendIntegerToArray) CloneInOutPort

func (em AppendIntegerToArray) CloneInOutPort() ([]IPort, []IPort)

func (*AppendIntegerToArray) Exec

func (em *AppendIntegerToArray) Exec() (int, error)

func (AppendIntegerToArray) GetInPortCount

func (em AppendIntegerToArray) GetInPortCount() int

func (*AppendIntegerToArray) GetName

func (em *AppendIntegerToArray) GetName() string

func (AppendIntegerToArray) GetOutPortCount

func (em AppendIntegerToArray) GetOutPortCount() int

func (AppendIntegerToArray) GetOutPortParamStartIndex

func (em AppendIntegerToArray) GetOutPortParamStartIndex() int

func (AppendIntegerToArray) IsInPortExec

func (em AppendIntegerToArray) IsInPortExec(index int) bool

func (AppendIntegerToArray) IsOutPortExec

func (em AppendIntegerToArray) IsOutPortExec(index int) bool

func (AppendIntegerToArray) PrepareMaxInPortId added in v2.1.10

func (em AppendIntegerToArray) PrepareMaxInPortId(maxInPortId int)

func (AppendIntegerToArray) PrepareMaxOutPortId added in v2.1.10

func (em AppendIntegerToArray) PrepareMaxOutPortId(maxOutPortId int)

func (AppendIntegerToArray) SetExec

func (em AppendIntegerToArray) SetExec(exec IExecNode)

func (AppendIntegerToArray) SetInPortById added in v2.1.10

func (em AppendIntegerToArray) SetInPortById(id int, port IPort) bool

func (AppendIntegerToArray) SetOutPortById added in v2.1.10

func (em AppendIntegerToArray) SetOutPortById(id int, port IPort) bool

type AppendStringReturn added in v2.2.0

type AppendStringReturn struct {
	BaseExecNode
}

AppendStringReturn 追加返回结果(String)

func (AppendStringReturn) CloneInOutPort added in v2.2.0

func (em AppendStringReturn) CloneInOutPort() ([]IPort, []IPort)

func (*AppendStringReturn) Exec added in v2.2.0

func (em *AppendStringReturn) Exec() (int, error)

func (AppendStringReturn) GetInPortCount added in v2.2.0

func (em AppendStringReturn) GetInPortCount() int

func (*AppendStringReturn) GetName added in v2.2.0

func (em *AppendStringReturn) GetName() string

func (AppendStringReturn) GetOutPortCount added in v2.2.0

func (em AppendStringReturn) GetOutPortCount() int

func (AppendStringReturn) GetOutPortParamStartIndex added in v2.2.0

func (em AppendStringReturn) GetOutPortParamStartIndex() int

func (AppendStringReturn) IsInPortExec added in v2.2.0

func (em AppendStringReturn) IsInPortExec(index int) bool

func (AppendStringReturn) IsOutPortExec added in v2.2.0

func (em AppendStringReturn) IsOutPortExec(index int) bool

func (AppendStringReturn) PrepareMaxInPortId added in v2.2.0

func (em AppendStringReturn) PrepareMaxInPortId(maxInPortId int)

func (AppendStringReturn) PrepareMaxOutPortId added in v2.2.0

func (em AppendStringReturn) PrepareMaxOutPortId(maxOutPortId int)

func (AppendStringReturn) SetExec added in v2.2.0

func (em AppendStringReturn) SetExec(exec IExecNode)

func (AppendStringReturn) SetInPortById added in v2.2.0

func (em AppendStringReturn) SetInPortById(id int, port IPort) bool

func (AppendStringReturn) SetOutPortById added in v2.2.0

func (em AppendStringReturn) SetOutPortById(id int, port IPort) bool

type AppendStringToArray

type AppendStringToArray struct {
	BaseExecNode
}

AppendStringToArray 数组追加字符串

func (AppendStringToArray) CloneInOutPort

func (em AppendStringToArray) CloneInOutPort() ([]IPort, []IPort)

func (*AppendStringToArray) Exec

func (em *AppendStringToArray) Exec() (int, error)

func (AppendStringToArray) GetInPortCount

func (em AppendStringToArray) GetInPortCount() int

func (*AppendStringToArray) GetName

func (em *AppendStringToArray) GetName() string

func (AppendStringToArray) GetOutPortCount

func (em AppendStringToArray) GetOutPortCount() int

func (AppendStringToArray) GetOutPortParamStartIndex

func (em AppendStringToArray) GetOutPortParamStartIndex() int

func (AppendStringToArray) IsInPortExec

func (em AppendStringToArray) IsInPortExec(index int) bool

func (AppendStringToArray) IsOutPortExec

func (em AppendStringToArray) IsOutPortExec(index int) bool

func (AppendStringToArray) PrepareMaxInPortId added in v2.1.10

func (em AppendStringToArray) PrepareMaxInPortId(maxInPortId int)

func (AppendStringToArray) PrepareMaxOutPortId added in v2.1.10

func (em AppendStringToArray) PrepareMaxOutPortId(maxOutPortId int)

func (AppendStringToArray) SetExec

func (em AppendStringToArray) SetExec(exec IExecNode)

func (AppendStringToArray) SetInPortById added in v2.1.10

func (em AppendStringToArray) SetInPortById(id int, port IPort) bool

func (AppendStringToArray) SetOutPortById added in v2.1.10

func (em AppendStringToArray) SetOutPortById(id int, port IPort) bool

type ArrayData

type ArrayData struct {
	IntVal int64
	StrVal string
}

type ArrayElement

type ArrayElement struct {
	IntVal int64
	StrVal string
}

type BaseExecConfig

type BaseExecConfig struct {
	Name        string         `json:"name"`
	Title       string         `json:"title"`
	Package     string         `json:"package"`
	Description string         `json:"description"`
	IsPure      bool           `json:"is_pure"`
	Inputs      []InputConfig  `json:"inputs"`
	Outputs     []OutputConfig `json:"outputs"`
}

func (*BaseExecConfig) GetMaxInPortId added in v2.1.10

func (bc *BaseExecConfig) GetMaxInPortId() int

func (*BaseExecConfig) GetMaxOutPortId added in v2.1.10

func (bc *BaseExecConfig) GetMaxOutPortId() int

type BaseExecNode

type BaseExecNode struct {

	// 执行时初始化的数据
	*ExecContext
	// contains filtered or unexported fields
}

func (*BaseExecNode) AppendInPortArrayValInt

func (en *BaseExecNode) AppendInPortArrayValInt(index int, val Port_Int) bool

func (*BaseExecNode) AppendInPortArrayValStr

func (en *BaseExecNode) AppendInPortArrayValStr(index int, val Port_Str) bool

func (*BaseExecNode) AppendOutPortArrayValInt

func (en *BaseExecNode) AppendOutPortArrayValInt(index int, val Port_Int) bool

func (*BaseExecNode) AppendOutPortArrayValStr

func (en *BaseExecNode) AppendOutPortArrayValStr(index int, val Port_Str) bool

func (BaseExecNode) CloneInOutPort

func (em BaseExecNode) CloneInOutPort() ([]IPort, []IPort)

func (*BaseExecNode) DoNext

func (en *BaseExecNode) DoNext(index int) error

func (*BaseExecNode) GetBluePrintModule

func (en *BaseExecNode) GetBluePrintModule() IBlueprintModule

func (*BaseExecNode) GetBlueprintModule

func (en *BaseExecNode) GetBlueprintModule() IBlueprintModule

func (*BaseExecNode) GetInPort

func (en *BaseExecNode) GetInPort(index int) IPort

func (*BaseExecNode) GetInPortArray

func (en *BaseExecNode) GetInPortArray(index int) (Port_Array, bool)

func (*BaseExecNode) GetInPortArrayLen

func (en *BaseExecNode) GetInPortArrayLen(index int) Port_Int

func (*BaseExecNode) GetInPortArrayValInt

func (en *BaseExecNode) GetInPortArrayValInt(index int, idx int) (Port_Int, bool)

func (*BaseExecNode) GetInPortArrayValStr

func (en *BaseExecNode) GetInPortArrayValStr(idx int) (Port_Str, bool)

func (*BaseExecNode) GetInPortBool

func (en *BaseExecNode) GetInPortBool(index int) (Port_Bool, bool)

func (BaseExecNode) GetInPortCount

func (em BaseExecNode) GetInPortCount() int

func (*BaseExecNode) GetInPortFloat

func (en *BaseExecNode) GetInPortFloat(index int) (Port_Float, bool)

func (*BaseExecNode) GetInPortInt

func (en *BaseExecNode) GetInPortInt(index int) (Port_Int, bool)

func (*BaseExecNode) GetInPortStr

func (en *BaseExecNode) GetInPortStr(index int) (Port_Str, bool)

func (BaseExecNode) GetName

func (em BaseExecNode) GetName() string

func (*BaseExecNode) GetNextExecLen

func (en *BaseExecNode) GetNextExecLen() int

func (*BaseExecNode) GetOutPort

func (en *BaseExecNode) GetOutPort(index int) IPort

func (*BaseExecNode) GetOutPortArrayLen

func (en *BaseExecNode) GetOutPortArrayLen(index int) Port_Int

func (*BaseExecNode) GetOutPortArrayValInt

func (en *BaseExecNode) GetOutPortArrayValInt(index int, idx int) (Port_Int, bool)

func (*BaseExecNode) GetOutPortArrayValStr

func (en *BaseExecNode) GetOutPortArrayValStr(index int, idx int) (Port_Str, bool)

func (*BaseExecNode) GetOutPortBool

func (en *BaseExecNode) GetOutPortBool(index int) (Port_Bool, bool)

func (BaseExecNode) GetOutPortCount

func (em BaseExecNode) GetOutPortCount() int

func (*BaseExecNode) GetOutPortFloat

func (en *BaseExecNode) GetOutPortFloat(index int) (Port_Float, bool)

func (*BaseExecNode) GetOutPortInt

func (en *BaseExecNode) GetOutPortInt(index int) (Port_Int, bool)

func (BaseExecNode) GetOutPortParamStartIndex

func (em BaseExecNode) GetOutPortParamStartIndex() int

func (*BaseExecNode) GetOutPortStr

func (en *BaseExecNode) GetOutPortStr(index int) (Port_Str, bool)

func (*BaseExecNode) GetPorts

func (en *BaseExecNode) GetPorts() ([]IPort, []IPort)

func (*BaseExecNode) GetVariableName added in v2.2.0

func (en *BaseExecNode) GetVariableName() string

func (BaseExecNode) IsInPortExec

func (em BaseExecNode) IsInPortExec(index int) bool

func (BaseExecNode) IsOutPortExec

func (em BaseExecNode) IsOutPortExec(index int) bool

func (BaseExecNode) PrepareMaxInPortId added in v2.1.10

func (em BaseExecNode) PrepareMaxInPortId(maxInPortId int)

func (BaseExecNode) PrepareMaxOutPortId added in v2.1.10

func (em BaseExecNode) PrepareMaxOutPortId(maxOutPortId int)

func (BaseExecNode) SetExec

func (em BaseExecNode) SetExec(exec IExecNode)

func (*BaseExecNode) SetInBool

func (en *BaseExecNode) SetInBool(index int, val Port_Bool) bool

func (*BaseExecNode) SetInPortArrayValInt

func (en *BaseExecNode) SetInPortArrayValInt(index int, idx int, val Port_Int) bool

func (*BaseExecNode) SetInPortArrayValStr

func (en *BaseExecNode) SetInPortArrayValStr(index int, idx int, val Port_Str) bool

func (BaseExecNode) SetInPortById added in v2.1.10

func (em BaseExecNode) SetInPortById(id int, port IPort) bool

func (*BaseExecNode) SetInPortFloat

func (en *BaseExecNode) SetInPortFloat(index int, val Port_Float) bool

func (*BaseExecNode) SetInPortInt

func (en *BaseExecNode) SetInPortInt(index int, val Port_Int) bool

func (*BaseExecNode) SetInPortStr

func (en *BaseExecNode) SetInPortStr(index int, val Port_Str) bool

func (*BaseExecNode) SetOutPort

func (en *BaseExecNode) SetOutPort(index int, val IPort) bool

func (*BaseExecNode) SetOutPortArrayValInt

func (en *BaseExecNode) SetOutPortArrayValInt(index int, idx int, val Port_Int) bool

func (*BaseExecNode) SetOutPortArrayValStr

func (en *BaseExecNode) SetOutPortArrayValStr(index int, idx int, val Port_Str) bool

func (*BaseExecNode) SetOutPortBool

func (en *BaseExecNode) SetOutPortBool(index int, val Port_Bool) bool

func (BaseExecNode) SetOutPortById added in v2.1.10

func (em BaseExecNode) SetOutPortById(id int, port IPort) bool

func (*BaseExecNode) SetOutPortFloat

func (en *BaseExecNode) SetOutPortFloat(index int, val Port_Float) bool

func (*BaseExecNode) SetOutPortInt

func (en *BaseExecNode) SetOutPortInt(index int, val Port_Int) bool

func (*BaseExecNode) SetOutPortStr

func (en *BaseExecNode) SetOutPortStr(index int, val Port_Str) bool

type Blueprint

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

func (*Blueprint) CancelTimerId

func (bm *Blueprint) CancelTimerId(graphID int64, timerId *uint64) bool

func (*Blueprint) Create

func (bm *Blueprint) Create(graphName string) int64

func (*Blueprint) Do

func (bm *Blueprint) Do(graphID int64, entranceID int64, args ...any) (Port_Array, error)

func (*Blueprint) Init

func (bm *Blueprint) Init(execDefFilePath string, graphFilePath string, blueprintModule IBlueprintModule, cancelTimer func(*uint64) bool) error

func (*Blueprint) RegisterExecNode added in v2.2.0

func (bm *Blueprint) RegisterExecNode(execNodeFunc func() IExecNode)

func (*Blueprint) ReleaseGraph

func (bm *Blueprint) ReleaseGraph(graphID int64)

func (*Blueprint) StartHotReload added in v2.2.0

func (bm *Blueprint) StartHotReload() (func(), error)

func (*Blueprint) TriggerEvent

func (bm *Blueprint) TriggerEvent(graphID int64, eventID int64, args ...any) error

type BoolIf

type BoolIf struct {
	BaseExecNode
}

BoolIf 布尔判断

func (BoolIf) CloneInOutPort

func (em BoolIf) CloneInOutPort() ([]IPort, []IPort)

func (*BoolIf) Exec

func (em *BoolIf) Exec() (int, error)

func (BoolIf) GetInPortCount

func (em BoolIf) GetInPortCount() int

func (*BoolIf) GetName

func (em *BoolIf) GetName() string

func (BoolIf) GetOutPortCount

func (em BoolIf) GetOutPortCount() int

func (BoolIf) GetOutPortParamStartIndex

func (em BoolIf) GetOutPortParamStartIndex() int

func (BoolIf) IsInPortExec

func (em BoolIf) IsInPortExec(index int) bool

func (BoolIf) IsOutPortExec

func (em BoolIf) IsOutPortExec(index int) bool

func (BoolIf) PrepareMaxInPortId added in v2.1.10

func (em BoolIf) PrepareMaxInPortId(maxInPortId int)

func (BoolIf) PrepareMaxOutPortId added in v2.1.10

func (em BoolIf) PrepareMaxOutPortId(maxOutPortId int)

func (BoolIf) SetExec

func (em BoolIf) SetExec(exec IExecNode)

func (BoolIf) SetInPortById added in v2.1.10

func (em BoolIf) SetInPortById(id int, port IPort) bool

func (BoolIf) SetOutPortById added in v2.1.10

func (em BoolIf) SetOutPortById(id int, port IPort) bool

type CloseTimer

type CloseTimer struct {
	BaseExecNode
}

CloseTimer 关闭定时器

func (CloseTimer) CloneInOutPort

func (em CloseTimer) CloneInOutPort() ([]IPort, []IPort)

func (*CloseTimer) Exec

func (em *CloseTimer) Exec() (int, error)

func (CloseTimer) GetInPortCount

func (em CloseTimer) GetInPortCount() int

func (*CloseTimer) GetName

func (em *CloseTimer) GetName() string

func (CloseTimer) GetOutPortCount

func (em CloseTimer) GetOutPortCount() int

func (CloseTimer) GetOutPortParamStartIndex

func (em CloseTimer) GetOutPortParamStartIndex() int

func (CloseTimer) IsInPortExec

func (em CloseTimer) IsInPortExec(index int) bool

func (CloseTimer) IsOutPortExec

func (em CloseTimer) IsOutPortExec(index int) bool

func (CloseTimer) PrepareMaxInPortId added in v2.1.10

func (em CloseTimer) PrepareMaxInPortId(maxInPortId int)

func (CloseTimer) PrepareMaxOutPortId added in v2.1.10

func (em CloseTimer) PrepareMaxOutPortId(maxOutPortId int)

func (CloseTimer) SetExec

func (em CloseTimer) SetExec(exec IExecNode)

func (CloseTimer) SetInPortById added in v2.1.10

func (em CloseTimer) SetInPortById(id int, port IPort) bool

func (CloseTimer) SetOutPortById added in v2.1.10

func (em CloseTimer) SetOutPortById(id int, port IPort) bool

type CreateIntArray

type CreateIntArray struct {
	BaseExecNode
}

CreateIntArray 创建整型数组

func (CreateIntArray) CloneInOutPort

func (em CreateIntArray) CloneInOutPort() ([]IPort, []IPort)

func (*CreateIntArray) Exec

func (em *CreateIntArray) Exec() (int, error)

func (CreateIntArray) GetInPortCount

func (em CreateIntArray) GetInPortCount() int

func (*CreateIntArray) GetName

func (em *CreateIntArray) GetName() string

func (CreateIntArray) GetOutPortCount

func (em CreateIntArray) GetOutPortCount() int

func (CreateIntArray) GetOutPortParamStartIndex

func (em CreateIntArray) GetOutPortParamStartIndex() int

func (CreateIntArray) IsInPortExec

func (em CreateIntArray) IsInPortExec(index int) bool

func (CreateIntArray) IsOutPortExec

func (em CreateIntArray) IsOutPortExec(index int) bool

func (CreateIntArray) PrepareMaxInPortId added in v2.1.10

func (em CreateIntArray) PrepareMaxInPortId(maxInPortId int)

func (CreateIntArray) PrepareMaxOutPortId added in v2.1.10

func (em CreateIntArray) PrepareMaxOutPortId(maxOutPortId int)

func (CreateIntArray) SetExec

func (em CreateIntArray) SetExec(exec IExecNode)

func (CreateIntArray) SetInPortById added in v2.1.10

func (em CreateIntArray) SetInPortById(id int, port IPort) bool

func (CreateIntArray) SetOutPortById added in v2.1.10

func (em CreateIntArray) SetOutPortById(id int, port IPort) bool

type CreateStringArray

type CreateStringArray struct {
	BaseExecNode
}

CreateStringArray 创建字符串数组

func (CreateStringArray) CloneInOutPort

func (em CreateStringArray) CloneInOutPort() ([]IPort, []IPort)

func (*CreateStringArray) Exec

func (em *CreateStringArray) Exec() (int, error)

func (CreateStringArray) GetInPortCount

func (em CreateStringArray) GetInPortCount() int

func (*CreateStringArray) GetName

func (em *CreateStringArray) GetName() string

func (CreateStringArray) GetOutPortCount

func (em CreateStringArray) GetOutPortCount() int

func (CreateStringArray) GetOutPortParamStartIndex

func (em CreateStringArray) GetOutPortParamStartIndex() int

func (CreateStringArray) IsInPortExec

func (em CreateStringArray) IsInPortExec(index int) bool

func (CreateStringArray) IsOutPortExec

func (em CreateStringArray) IsOutPortExec(index int) bool

func (CreateStringArray) PrepareMaxInPortId added in v2.1.10

func (em CreateStringArray) PrepareMaxInPortId(maxInPortId int)

func (CreateStringArray) PrepareMaxOutPortId added in v2.1.10

func (em CreateStringArray) PrepareMaxOutPortId(maxOutPortId int)

func (CreateStringArray) SetExec

func (em CreateStringArray) SetExec(exec IExecNode)

func (CreateStringArray) SetInPortById added in v2.1.10

func (em CreateStringArray) SetInPortById(id int, port IPort) bool

func (CreateStringArray) SetOutPortById added in v2.1.10

func (em CreateStringArray) SetOutPortById(id int, port IPort) bool

type CreateTimer

type CreateTimer struct {
	BaseExecNode
}

CreateTimer 创建定时器

func (CreateTimer) CloneInOutPort

func (em CreateTimer) CloneInOutPort() ([]IPort, []IPort)

func (*CreateTimer) Exec

func (em *CreateTimer) Exec() (int, error)

func (CreateTimer) GetInPortCount

func (em CreateTimer) GetInPortCount() int

func (*CreateTimer) GetName

func (em *CreateTimer) GetName() string

func (CreateTimer) GetOutPortCount

func (em CreateTimer) GetOutPortCount() int

func (CreateTimer) GetOutPortParamStartIndex

func (em CreateTimer) GetOutPortParamStartIndex() int

func (CreateTimer) IsInPortExec

func (em CreateTimer) IsInPortExec(index int) bool

func (CreateTimer) IsOutPortExec

func (em CreateTimer) IsOutPortExec(index int) bool

func (CreateTimer) PrepareMaxInPortId added in v2.1.10

func (em CreateTimer) PrepareMaxInPortId(maxInPortId int)

func (CreateTimer) PrepareMaxOutPortId added in v2.1.10

func (em CreateTimer) PrepareMaxOutPortId(maxOutPortId int)

func (CreateTimer) SetExec

func (em CreateTimer) SetExec(exec IExecNode)

func (CreateTimer) SetInPortById added in v2.1.10

func (em CreateTimer) SetInPortById(id int, port IPort) bool

func (CreateTimer) SetOutPortById added in v2.1.10

func (em CreateTimer) SetOutPortById(id int, port IPort) bool

type DebugOutput added in v2.2.0

type DebugOutput struct {
	BaseExecNode
}

func (DebugOutput) CloneInOutPort added in v2.2.0

func (em DebugOutput) CloneInOutPort() ([]IPort, []IPort)

func (*DebugOutput) Exec added in v2.2.0

func (em *DebugOutput) Exec() (int, error)

func (DebugOutput) GetInPortCount added in v2.2.0

func (em DebugOutput) GetInPortCount() int

func (*DebugOutput) GetName added in v2.2.0

func (em *DebugOutput) GetName() string

func (DebugOutput) GetOutPortCount added in v2.2.0

func (em DebugOutput) GetOutPortCount() int

func (DebugOutput) GetOutPortParamStartIndex added in v2.2.0

func (em DebugOutput) GetOutPortParamStartIndex() int

func (DebugOutput) IsInPortExec added in v2.2.0

func (em DebugOutput) IsInPortExec(index int) bool

func (DebugOutput) IsOutPortExec added in v2.2.0

func (em DebugOutput) IsOutPortExec(index int) bool

func (DebugOutput) PrepareMaxInPortId added in v2.2.0

func (em DebugOutput) PrepareMaxInPortId(maxInPortId int)

func (DebugOutput) PrepareMaxOutPortId added in v2.2.0

func (em DebugOutput) PrepareMaxOutPortId(maxOutPortId int)

func (DebugOutput) SetExec added in v2.2.0

func (em DebugOutput) SetExec(exec IExecNode)

func (DebugOutput) SetInPortById added in v2.2.0

func (em DebugOutput) SetInPortById(id int, port IPort) bool

func (DebugOutput) SetOutPortById added in v2.2.0

func (em DebugOutput) SetOutPortById(id int, port IPort) bool

type DivInt

type DivInt struct {
	BaseExecNode
}

DivInt 除(int)

func (DivInt) CloneInOutPort

func (em DivInt) CloneInOutPort() ([]IPort, []IPort)

func (*DivInt) Exec

func (em *DivInt) Exec() (int, error)

func (DivInt) GetInPortCount

func (em DivInt) GetInPortCount() int

func (*DivInt) GetName

func (em *DivInt) GetName() string

func (DivInt) GetOutPortCount

func (em DivInt) GetOutPortCount() int

func (DivInt) GetOutPortParamStartIndex

func (em DivInt) GetOutPortParamStartIndex() int

func (DivInt) IsInPortExec

func (em DivInt) IsInPortExec(index int) bool

func (DivInt) IsOutPortExec

func (em DivInt) IsOutPortExec(index int) bool

func (DivInt) PrepareMaxInPortId added in v2.1.10

func (em DivInt) PrepareMaxInPortId(maxInPortId int)

func (DivInt) PrepareMaxOutPortId added in v2.1.10

func (em DivInt) PrepareMaxOutPortId(maxOutPortId int)

func (DivInt) SetExec

func (em DivInt) SetExec(exec IExecNode)

func (DivInt) SetInPortById added in v2.1.10

func (em DivInt) SetInPortById(id int, port IPort) bool

func (DivInt) SetOutPortById added in v2.1.10

func (em DivInt) SetOutPortById(id int, port IPort) bool

type Entrance_ArrayParam

type Entrance_ArrayParam struct {
	BaseExecNode
}

func (Entrance_ArrayParam) CloneInOutPort

func (em Entrance_ArrayParam) CloneInOutPort() ([]IPort, []IPort)

func (*Entrance_ArrayParam) Exec

func (em *Entrance_ArrayParam) Exec() (int, error)

func (Entrance_ArrayParam) GetInPortCount

func (em Entrance_ArrayParam) GetInPortCount() int

func (*Entrance_ArrayParam) GetName

func (em *Entrance_ArrayParam) GetName() string

func (Entrance_ArrayParam) GetOutPortCount

func (em Entrance_ArrayParam) GetOutPortCount() int

func (Entrance_ArrayParam) GetOutPortParamStartIndex

func (em Entrance_ArrayParam) GetOutPortParamStartIndex() int

func (Entrance_ArrayParam) IsInPortExec

func (em Entrance_ArrayParam) IsInPortExec(index int) bool

func (Entrance_ArrayParam) IsOutPortExec

func (em Entrance_ArrayParam) IsOutPortExec(index int) bool

func (Entrance_ArrayParam) PrepareMaxInPortId added in v2.1.10

func (em Entrance_ArrayParam) PrepareMaxInPortId(maxInPortId int)

func (Entrance_ArrayParam) PrepareMaxOutPortId added in v2.1.10

func (em Entrance_ArrayParam) PrepareMaxOutPortId(maxOutPortId int)

func (Entrance_ArrayParam) SetExec

func (em Entrance_ArrayParam) SetExec(exec IExecNode)

func (Entrance_ArrayParam) SetInPortById added in v2.1.10

func (em Entrance_ArrayParam) SetInPortById(id int, port IPort) bool

func (Entrance_ArrayParam) SetOutPortById added in v2.1.10

func (em Entrance_ArrayParam) SetOutPortById(id int, port IPort) bool

type Entrance_IntParam

type Entrance_IntParam struct {
	BaseExecNode
}

func (Entrance_IntParam) CloneInOutPort

func (em Entrance_IntParam) CloneInOutPort() ([]IPort, []IPort)

func (*Entrance_IntParam) Exec

func (em *Entrance_IntParam) Exec() (int, error)

func (Entrance_IntParam) GetInPortCount

func (em Entrance_IntParam) GetInPortCount() int

func (*Entrance_IntParam) GetName

func (em *Entrance_IntParam) GetName() string

func (Entrance_IntParam) GetOutPortCount

func (em Entrance_IntParam) GetOutPortCount() int

func (Entrance_IntParam) GetOutPortParamStartIndex

func (em Entrance_IntParam) GetOutPortParamStartIndex() int

func (Entrance_IntParam) IsInPortExec

func (em Entrance_IntParam) IsInPortExec(index int) bool

func (Entrance_IntParam) IsOutPortExec

func (em Entrance_IntParam) IsOutPortExec(index int) bool

func (Entrance_IntParam) PrepareMaxInPortId added in v2.1.10

func (em Entrance_IntParam) PrepareMaxInPortId(maxInPortId int)

func (Entrance_IntParam) PrepareMaxOutPortId added in v2.1.10

func (em Entrance_IntParam) PrepareMaxOutPortId(maxOutPortId int)

func (Entrance_IntParam) SetExec

func (em Entrance_IntParam) SetExec(exec IExecNode)

func (Entrance_IntParam) SetInPortById added in v2.1.10

func (em Entrance_IntParam) SetInPortById(id int, port IPort) bool

func (Entrance_IntParam) SetOutPortById added in v2.1.10

func (em Entrance_IntParam) SetOutPortById(id int, port IPort) bool

type Entrance_Timer

type Entrance_Timer struct {
	BaseExecNode
}

func (Entrance_Timer) CloneInOutPort

func (em Entrance_Timer) CloneInOutPort() ([]IPort, []IPort)

func (*Entrance_Timer) Exec

func (em *Entrance_Timer) Exec() (int, error)

func (Entrance_Timer) GetInPortCount

func (em Entrance_Timer) GetInPortCount() int

func (*Entrance_Timer) GetName

func (em *Entrance_Timer) GetName() string

func (Entrance_Timer) GetOutPortCount

func (em Entrance_Timer) GetOutPortCount() int

func (Entrance_Timer) GetOutPortParamStartIndex

func (em Entrance_Timer) GetOutPortParamStartIndex() int

func (Entrance_Timer) IsInPortExec

func (em Entrance_Timer) IsInPortExec(index int) bool

func (Entrance_Timer) IsOutPortExec

func (em Entrance_Timer) IsOutPortExec(index int) bool

func (Entrance_Timer) PrepareMaxInPortId added in v2.1.10

func (em Entrance_Timer) PrepareMaxInPortId(maxInPortId int)

func (Entrance_Timer) PrepareMaxOutPortId added in v2.1.10

func (em Entrance_Timer) PrepareMaxOutPortId(maxOutPortId int)

func (Entrance_Timer) SetExec

func (em Entrance_Timer) SetExec(exec IExecNode)

func (Entrance_Timer) SetInPortById added in v2.1.10

func (em Entrance_Timer) SetInPortById(id int, port IPort) bool

func (Entrance_Timer) SetOutPortById added in v2.1.10

func (em Entrance_Timer) SetOutPortById(id int, port IPort) bool

type EqualInteger

type EqualInteger struct {
	BaseExecNode
}

EqualInteger 等于(整型)==

func (EqualInteger) CloneInOutPort

func (em EqualInteger) CloneInOutPort() ([]IPort, []IPort)

func (*EqualInteger) Exec

func (em *EqualInteger) Exec() (int, error)

func (EqualInteger) GetInPortCount

func (em EqualInteger) GetInPortCount() int

func (*EqualInteger) GetName

func (em *EqualInteger) GetName() string

func (EqualInteger) GetOutPortCount

func (em EqualInteger) GetOutPortCount() int

func (EqualInteger) GetOutPortParamStartIndex

func (em EqualInteger) GetOutPortParamStartIndex() int

func (EqualInteger) IsInPortExec

func (em EqualInteger) IsInPortExec(index int) bool

func (EqualInteger) IsOutPortExec

func (em EqualInteger) IsOutPortExec(index int) bool

func (EqualInteger) PrepareMaxInPortId added in v2.1.10

func (em EqualInteger) PrepareMaxInPortId(maxInPortId int)

func (EqualInteger) PrepareMaxOutPortId added in v2.1.10

func (em EqualInteger) PrepareMaxOutPortId(maxOutPortId int)

func (EqualInteger) SetExec

func (em EqualInteger) SetExec(exec IExecNode)

func (EqualInteger) SetInPortById added in v2.1.10

func (em EqualInteger) SetInPortById(id int, port IPort) bool

func (EqualInteger) SetOutPortById added in v2.1.10

func (em EqualInteger) SetOutPortById(id int, port IPort) bool

type EqualSwitch added in v2.2.0

type EqualSwitch struct {
	BaseExecNode
}

EqualSwitch 等于分支==

func (EqualSwitch) CloneInOutPort added in v2.2.0

func (em EqualSwitch) CloneInOutPort() ([]IPort, []IPort)

func (*EqualSwitch) Exec added in v2.2.0

func (em *EqualSwitch) Exec() (int, error)

func (EqualSwitch) GetInPortCount added in v2.2.0

func (em EqualSwitch) GetInPortCount() int

func (*EqualSwitch) GetName added in v2.2.0

func (em *EqualSwitch) GetName() string

func (EqualSwitch) GetOutPortCount added in v2.2.0

func (em EqualSwitch) GetOutPortCount() int

func (EqualSwitch) GetOutPortParamStartIndex added in v2.2.0

func (em EqualSwitch) GetOutPortParamStartIndex() int

func (EqualSwitch) IsInPortExec added in v2.2.0

func (em EqualSwitch) IsInPortExec(index int) bool

func (EqualSwitch) IsOutPortExec added in v2.2.0

func (em EqualSwitch) IsOutPortExec(index int) bool

func (EqualSwitch) PrepareMaxInPortId added in v2.2.0

func (em EqualSwitch) PrepareMaxInPortId(maxInPortId int)

func (EqualSwitch) PrepareMaxOutPortId added in v2.2.0

func (em EqualSwitch) PrepareMaxOutPortId(maxOutPortId int)

func (EqualSwitch) SetExec added in v2.2.0

func (em EqualSwitch) SetExec(exec IExecNode)

func (EqualSwitch) SetInPortById added in v2.2.0

func (em EqualSwitch) SetInPortById(id int, port IPort) bool

func (EqualSwitch) SetOutPortById added in v2.2.0

func (em EqualSwitch) SetOutPortById(id int, port IPort) bool

type ExecContext

type ExecContext struct {
	InputPorts  []IPort
	OutputPorts []IPort
}

func (*ExecContext) Reset

func (ec *ExecContext) Reset()

type ExecPool

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

func (*ExecPool) GetExec

func (em *ExecPool) GetExec(name string) IInnerExecNode

func (*ExecPool) Load

func (em *ExecPool) Load(execDefFilePath string) error

func (*ExecPool) Register

func (em *ExecPool) Register(exec IExecNode) bool

type Foreach

type Foreach struct {
	BaseExecNode
}

func (Foreach) CloneInOutPort

func (em Foreach) CloneInOutPort() ([]IPort, []IPort)

func (*Foreach) Exec

func (em *Foreach) Exec() (int, error)

func (Foreach) GetInPortCount

func (em Foreach) GetInPortCount() int

func (*Foreach) GetName

func (em *Foreach) GetName() string

func (Foreach) GetOutPortCount

func (em Foreach) GetOutPortCount() int

func (Foreach) GetOutPortParamStartIndex

func (em Foreach) GetOutPortParamStartIndex() int

func (Foreach) IsInPortExec

func (em Foreach) IsInPortExec(index int) bool

func (Foreach) IsOutPortExec

func (em Foreach) IsOutPortExec(index int) bool

func (Foreach) PrepareMaxInPortId added in v2.1.10

func (em Foreach) PrepareMaxInPortId(maxInPortId int)

func (Foreach) PrepareMaxOutPortId added in v2.1.10

func (em Foreach) PrepareMaxOutPortId(maxOutPortId int)

func (Foreach) SetExec

func (em Foreach) SetExec(exec IExecNode)

func (Foreach) SetInPortById added in v2.1.10

func (em Foreach) SetInPortById(id int, port IPort) bool

func (Foreach) SetOutPortById added in v2.1.10

func (em Foreach) SetOutPortById(id int, port IPort) bool

type ForeachIntArray added in v2.1.10

type ForeachIntArray struct {
	BaseExecNode
}

func (ForeachIntArray) CloneInOutPort added in v2.1.10

func (em ForeachIntArray) CloneInOutPort() ([]IPort, []IPort)

func (*ForeachIntArray) Exec added in v2.1.10

func (em *ForeachIntArray) Exec() (int, error)

func (ForeachIntArray) GetInPortCount added in v2.1.10

func (em ForeachIntArray) GetInPortCount() int

func (*ForeachIntArray) GetName added in v2.1.10

func (em *ForeachIntArray) GetName() string

func (ForeachIntArray) GetOutPortCount added in v2.1.10

func (em ForeachIntArray) GetOutPortCount() int

func (ForeachIntArray) GetOutPortParamStartIndex added in v2.1.10

func (em ForeachIntArray) GetOutPortParamStartIndex() int

func (ForeachIntArray) IsInPortExec added in v2.1.10

func (em ForeachIntArray) IsInPortExec(index int) bool

func (ForeachIntArray) IsOutPortExec added in v2.1.10

func (em ForeachIntArray) IsOutPortExec(index int) bool

func (ForeachIntArray) PrepareMaxInPortId added in v2.1.10

func (em ForeachIntArray) PrepareMaxInPortId(maxInPortId int)

func (ForeachIntArray) PrepareMaxOutPortId added in v2.1.10

func (em ForeachIntArray) PrepareMaxOutPortId(maxOutPortId int)

func (ForeachIntArray) SetExec added in v2.1.10

func (em ForeachIntArray) SetExec(exec IExecNode)

func (ForeachIntArray) SetInPortById added in v2.1.10

func (em ForeachIntArray) SetInPortById(id int, port IPort) bool

func (ForeachIntArray) SetOutPortById added in v2.1.10

func (em ForeachIntArray) SetOutPortById(id int, port IPort) bool

type GetArrayInt

type GetArrayInt struct {
	BaseExecNode
}

func (GetArrayInt) CloneInOutPort

func (em GetArrayInt) CloneInOutPort() ([]IPort, []IPort)

func (*GetArrayInt) Exec

func (em *GetArrayInt) Exec() (int, error)

func (GetArrayInt) GetInPortCount

func (em GetArrayInt) GetInPortCount() int

func (*GetArrayInt) GetName

func (em *GetArrayInt) GetName() string

func (GetArrayInt) GetOutPortCount

func (em GetArrayInt) GetOutPortCount() int

func (GetArrayInt) GetOutPortParamStartIndex

func (em GetArrayInt) GetOutPortParamStartIndex() int

func (GetArrayInt) IsInPortExec

func (em GetArrayInt) IsInPortExec(index int) bool

func (GetArrayInt) IsOutPortExec

func (em GetArrayInt) IsOutPortExec(index int) bool

func (GetArrayInt) PrepareMaxInPortId added in v2.1.10

func (em GetArrayInt) PrepareMaxInPortId(maxInPortId int)

func (GetArrayInt) PrepareMaxOutPortId added in v2.1.10

func (em GetArrayInt) PrepareMaxOutPortId(maxOutPortId int)

func (GetArrayInt) SetExec

func (em GetArrayInt) SetExec(exec IExecNode)

func (GetArrayInt) SetInPortById added in v2.1.10

func (em GetArrayInt) SetInPortById(id int, port IPort) bool

func (GetArrayInt) SetOutPortById added in v2.1.10

func (em GetArrayInt) SetOutPortById(id int, port IPort) bool

type GetArrayLen

type GetArrayLen struct {
	BaseExecNode
}

func (GetArrayLen) CloneInOutPort

func (em GetArrayLen) CloneInOutPort() ([]IPort, []IPort)

func (*GetArrayLen) Exec

func (em *GetArrayLen) Exec() (int, error)

func (GetArrayLen) GetInPortCount

func (em GetArrayLen) GetInPortCount() int

func (*GetArrayLen) GetName

func (em *GetArrayLen) GetName() string

func (GetArrayLen) GetOutPortCount

func (em GetArrayLen) GetOutPortCount() int

func (GetArrayLen) GetOutPortParamStartIndex

func (em GetArrayLen) GetOutPortParamStartIndex() int

func (GetArrayLen) IsInPortExec

func (em GetArrayLen) IsInPortExec(index int) bool

func (GetArrayLen) IsOutPortExec

func (em GetArrayLen) IsOutPortExec(index int) bool

func (GetArrayLen) PrepareMaxInPortId added in v2.1.10

func (em GetArrayLen) PrepareMaxInPortId(maxInPortId int)

func (GetArrayLen) PrepareMaxOutPortId added in v2.1.10

func (em GetArrayLen) PrepareMaxOutPortId(maxOutPortId int)

func (GetArrayLen) SetExec

func (em GetArrayLen) SetExec(exec IExecNode)

func (GetArrayLen) SetInPortById added in v2.1.10

func (em GetArrayLen) SetInPortById(id int, port IPort) bool

func (GetArrayLen) SetOutPortById added in v2.1.10

func (em GetArrayLen) SetOutPortById(id int, port IPort) bool

type GetArrayString

type GetArrayString struct {
	BaseExecNode
}

func (GetArrayString) CloneInOutPort

func (em GetArrayString) CloneInOutPort() ([]IPort, []IPort)

func (*GetArrayString) Exec

func (em *GetArrayString) Exec() (int, error)

func (GetArrayString) GetInPortCount

func (em GetArrayString) GetInPortCount() int

func (*GetArrayString) GetName

func (em *GetArrayString) GetName() string

func (GetArrayString) GetOutPortCount

func (em GetArrayString) GetOutPortCount() int

func (GetArrayString) GetOutPortParamStartIndex

func (em GetArrayString) GetOutPortParamStartIndex() int

func (GetArrayString) IsInPortExec

func (em GetArrayString) IsInPortExec(index int) bool

func (GetArrayString) IsOutPortExec

func (em GetArrayString) IsOutPortExec(index int) bool

func (GetArrayString) PrepareMaxInPortId added in v2.1.10

func (em GetArrayString) PrepareMaxInPortId(maxInPortId int)

func (GetArrayString) PrepareMaxOutPortId added in v2.1.10

func (em GetArrayString) PrepareMaxOutPortId(maxOutPortId int)

func (GetArrayString) SetExec

func (em GetArrayString) SetExec(exec IExecNode)

func (GetArrayString) SetInPortById added in v2.1.10

func (em GetArrayString) SetInPortById(id int, port IPort) bool

func (GetArrayString) SetOutPortById added in v2.1.10

func (em GetArrayString) SetOutPortById(id int, port IPort) bool

type GetVariablesNode

type GetVariablesNode struct {
	BaseExecNode
	// contains filtered or unexported fields
}

func (GetVariablesNode) CloneInOutPort

func (em GetVariablesNode) CloneInOutPort() ([]IPort, []IPort)

func (*GetVariablesNode) Exec

func (g *GetVariablesNode) Exec() (int, error)

func (GetVariablesNode) GetInPortCount

func (em GetVariablesNode) GetInPortCount() int

func (*GetVariablesNode) GetName

func (g *GetVariablesNode) GetName() string

func (GetVariablesNode) GetOutPortCount

func (em GetVariablesNode) GetOutPortCount() int

func (GetVariablesNode) GetOutPortParamStartIndex

func (em GetVariablesNode) GetOutPortParamStartIndex() int

func (GetVariablesNode) IsInPortExec

func (em GetVariablesNode) IsInPortExec(index int) bool

func (GetVariablesNode) IsOutPortExec

func (em GetVariablesNode) IsOutPortExec(index int) bool

func (GetVariablesNode) PrepareMaxInPortId added in v2.1.10

func (em GetVariablesNode) PrepareMaxInPortId(maxInPortId int)

func (GetVariablesNode) PrepareMaxOutPortId added in v2.1.10

func (em GetVariablesNode) PrepareMaxOutPortId(maxOutPortId int)

func (GetVariablesNode) SetExec

func (em GetVariablesNode) SetExec(exec IExecNode)

func (GetVariablesNode) SetInPortById added in v2.1.10

func (em GetVariablesNode) SetInPortById(id int, port IPort) bool

func (GetVariablesNode) SetOutPortById added in v2.1.10

func (em GetVariablesNode) SetOutPortById(id int, port IPort) bool

type Graph

type Graph struct {
	IBlueprintModule
	// contains filtered or unexported fields
}

func (*Graph) Do

func (gr *Graph) Do(entranceID int64, args ...any) (Port_Array, error)

func (*Graph) GetAndCreateReturnPort added in v2.2.0

func (gr *Graph) GetAndCreateReturnPort() IPort

func (*Graph) GetGraphFileName added in v2.2.0

func (gr *Graph) GetGraphFileName() string

func (*Graph) GetNodeInPortValue

func (gr *Graph) GetNodeInPortValue(nodeID string, inPortIndex int) IPort

func (*Graph) GetNodeOutPortValue

func (gr *Graph) GetNodeOutPortValue(nodeID string, outPortIndex int) IPort

func (*Graph) HotReload added in v2.2.0

func (gr *Graph) HotReload(newBaseGraph *baseGraph)

func (*Graph) Release

func (gr *Graph) Release()

type GraphPool

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

func (*GraphPool) Create

func (gp *GraphPool) Create(graphName string, graphID int64) IGraph

func (*GraphPool) GetBaseGraph added in v2.2.0

func (gp *GraphPool) GetBaseGraph(graphName string) *baseGraph

func (*GraphPool) Load

func (gp *GraphPool) Load(execPool *ExecPool, graphFilePath string, blueprintModule IBlueprintModule) error

type GreaterThanInteger

type GreaterThanInteger struct {
	BaseExecNode
}

GreaterThanInteger 大于(整型) >

func (GreaterThanInteger) CloneInOutPort

func (em GreaterThanInteger) CloneInOutPort() ([]IPort, []IPort)

func (*GreaterThanInteger) Exec

func (em *GreaterThanInteger) Exec() (int, error)

func (GreaterThanInteger) GetInPortCount

func (em GreaterThanInteger) GetInPortCount() int

func (*GreaterThanInteger) GetName

func (em *GreaterThanInteger) GetName() string

func (GreaterThanInteger) GetOutPortCount

func (em GreaterThanInteger) GetOutPortCount() int

func (GreaterThanInteger) GetOutPortParamStartIndex

func (em GreaterThanInteger) GetOutPortParamStartIndex() int

func (GreaterThanInteger) IsInPortExec

func (em GreaterThanInteger) IsInPortExec(index int) bool

func (GreaterThanInteger) IsOutPortExec

func (em GreaterThanInteger) IsOutPortExec(index int) bool

func (GreaterThanInteger) PrepareMaxInPortId added in v2.1.10

func (em GreaterThanInteger) PrepareMaxInPortId(maxInPortId int)

func (GreaterThanInteger) PrepareMaxOutPortId added in v2.1.10

func (em GreaterThanInteger) PrepareMaxOutPortId(maxOutPortId int)

func (GreaterThanInteger) SetExec

func (em GreaterThanInteger) SetExec(exec IExecNode)

func (GreaterThanInteger) SetInPortById added in v2.1.10

func (em GreaterThanInteger) SetInPortById(id int, port IPort) bool

func (GreaterThanInteger) SetOutPortById added in v2.1.10

func (em GreaterThanInteger) SetOutPortById(id int, port IPort) bool

type IBaseExecNode

type IBaseExecNode interface {
	GetPorts() ([]IPort, []IPort)

	GetBlueprintModule() IBlueprintModule
	// contains filtered or unexported methods
}

IBaseExecNode 实际注册的执行结点的基础结构体

type IBlueprintModule

type IBlueprintModule interface {
	SafeAfterFunc(timerId *uint64, d time.Duration, AdditionData interface{}, cb func(uint64, interface{}))
	TriggerEvent(graphID int64, eventID int64, args ...any) error
	CancelTimerId(graphID int64, timerId *uint64) bool
	GetGameService() service.IService
	GetBattleService() service.IService
}

type IExecNode

type IExecNode interface {
	IBaseExecNode
	GetName() string
	DoNext(index int) error
	Exec() (int, error) // 返回后续执行的Node的Index
	GetNextExecLen() int
	// contains filtered or unexported methods
}

IExecNode 实际注册的执行结点

type IExecNodeType added in v2.2.0

type IExecNodeType[T any] interface {
	*T
	IExecNode
}

type IGraph

type IGraph interface {
	Do(entranceID int64, args ...any) (Port_Array, error)
	Release()
	GetGraphFileName() string
	HotReload(newBaseGraph *baseGraph)
}

type IInnerExecNode

type IInnerExecNode interface {
	GetName() string
	SetExec(exec IExecNode)
	IsInPortExec(index int) bool
	IsOutPortExec(index int) bool
	GetInPortCount() int
	GetOutPortCount() int
	CloneInOutPort() ([]IPort, []IPort)

	GetInPort(index int) IPort
	GetOutPort(index int) IPort

	GetOutPortParamStartIndex() int
}

IInnerExecNode 配置生成的结点

type IPort

type IPort interface {
	GetInt() (Port_Int, bool)
	GetFloat() (Port_Float, bool)
	GetStr() (Port_Str, bool)
	GetArrayValInt(idx int) (Port_Int, bool)
	GetArrayValStr(idx int) (Port_Str, bool)
	GetBool() (Port_Bool, bool)
	GetArray() (Port_Array, bool)

	SetInt(val Port_Int) bool
	SetFloat(val Port_Float) bool
	SetStr(val Port_Str) bool
	SetBool(val Port_Bool) bool
	SetArrayValInt(idx int, val Port_Int) bool
	SetArrayValStr(idx int, val Port_Str) bool
	AppendArrayValInt(val Port_Int) bool
	AppendArrayValStr(val Port_Str) bool
	GetArrayLen() Port_Int
	Clone() IPort
	Reset()

	IsPortExec() bool

	SetValue(val IPort) bool
	// contains filtered or unexported methods
}

func NewPortArray

func NewPortArray() IPort

func NewPortBool

func NewPortBool() IPort

func NewPortByType

func NewPortByType(typ string) IPort

func NewPortExec

func NewPortExec() IPort

func NewPortFloat

func NewPortFloat() IPort

func NewPortInt

func NewPortInt() IPort

func NewPortStr

func NewPortStr() IPort

type InputConfig

type InputConfig struct {
	Name      string `json:"name"`
	PortType  string `json:"type"`
	DataType  string `json:"data_type"`
	HasInput  bool   `json:"has_input"`
	PinWidget string `json:"pin_widget"`
	PortId    int    `json:"port_id"`
}

type LessThanInteger

type LessThanInteger struct {
	BaseExecNode
}

LessThanInteger 小于(整型) <

func (LessThanInteger) CloneInOutPort

func (em LessThanInteger) CloneInOutPort() ([]IPort, []IPort)

func (*LessThanInteger) Exec

func (em *LessThanInteger) Exec() (int, error)

func (LessThanInteger) GetInPortCount

func (em LessThanInteger) GetInPortCount() int

func (*LessThanInteger) GetName

func (em *LessThanInteger) GetName() string

func (LessThanInteger) GetOutPortCount

func (em LessThanInteger) GetOutPortCount() int

func (LessThanInteger) GetOutPortParamStartIndex

func (em LessThanInteger) GetOutPortParamStartIndex() int

func (LessThanInteger) IsInPortExec

func (em LessThanInteger) IsInPortExec(index int) bool

func (LessThanInteger) IsOutPortExec

func (em LessThanInteger) IsOutPortExec(index int) bool

func (LessThanInteger) PrepareMaxInPortId added in v2.1.10

func (em LessThanInteger) PrepareMaxInPortId(maxInPortId int)

func (LessThanInteger) PrepareMaxOutPortId added in v2.1.10

func (em LessThanInteger) PrepareMaxOutPortId(maxOutPortId int)

func (LessThanInteger) SetExec

func (em LessThanInteger) SetExec(exec IExecNode)

func (LessThanInteger) SetInPortById added in v2.1.10

func (em LessThanInteger) SetInPortById(id int, port IPort) bool

func (LessThanInteger) SetOutPortById added in v2.1.10

func (em LessThanInteger) SetOutPortById(id int, port IPort) bool

type ModInt

type ModInt struct {
	BaseExecNode
}

ModInt 取模(int)

func (ModInt) CloneInOutPort

func (em ModInt) CloneInOutPort() ([]IPort, []IPort)

func (*ModInt) Exec

func (em *ModInt) Exec() (int, error)

func (ModInt) GetInPortCount

func (em ModInt) GetInPortCount() int

func (*ModInt) GetName

func (em *ModInt) GetName() string

func (ModInt) GetOutPortCount

func (em ModInt) GetOutPortCount() int

func (ModInt) GetOutPortParamStartIndex

func (em ModInt) GetOutPortParamStartIndex() int

func (ModInt) IsInPortExec

func (em ModInt) IsInPortExec(index int) bool

func (ModInt) IsOutPortExec

func (em ModInt) IsOutPortExec(index int) bool

func (ModInt) PrepareMaxInPortId added in v2.1.10

func (em ModInt) PrepareMaxInPortId(maxInPortId int)

func (ModInt) PrepareMaxOutPortId added in v2.1.10

func (em ModInt) PrepareMaxOutPortId(maxOutPortId int)

func (ModInt) SetExec

func (em ModInt) SetExec(exec IExecNode)

func (ModInt) SetInPortById added in v2.1.10

func (em ModInt) SetInPortById(id int, port IPort) bool

func (ModInt) SetOutPortById added in v2.1.10

func (em ModInt) SetOutPortById(id int, port IPort) bool

type MulInt

type MulInt struct {
	BaseExecNode
}

MulInt 乘(int)

func (MulInt) CloneInOutPort

func (em MulInt) CloneInOutPort() ([]IPort, []IPort)

func (*MulInt) Exec

func (em *MulInt) Exec() (int, error)

func (MulInt) GetInPortCount

func (em MulInt) GetInPortCount() int

func (*MulInt) GetName

func (em *MulInt) GetName() string

func (MulInt) GetOutPortCount

func (em MulInt) GetOutPortCount() int

func (MulInt) GetOutPortParamStartIndex

func (em MulInt) GetOutPortParamStartIndex() int

func (MulInt) IsInPortExec

func (em MulInt) IsInPortExec(index int) bool

func (MulInt) IsOutPortExec

func (em MulInt) IsOutPortExec(index int) bool

func (MulInt) PrepareMaxInPortId added in v2.1.10

func (em MulInt) PrepareMaxInPortId(maxInPortId int)

func (MulInt) PrepareMaxOutPortId added in v2.1.10

func (em MulInt) PrepareMaxOutPortId(maxOutPortId int)

func (MulInt) SetExec

func (em MulInt) SetExec(exec IExecNode)

func (MulInt) SetInPortById added in v2.1.10

func (em MulInt) SetInPortById(id int, port IPort) bool

func (MulInt) SetOutPortById added in v2.1.10

func (em MulInt) SetOutPortById(id int, port IPort) bool

type MultiTypeValue

type MultiTypeValue struct {
	Value any
}

func (*MultiTypeValue) UnmarshalJSON

func (v *MultiTypeValue) UnmarshalJSON(data []byte) error

实现json.Unmarshaler接口,自定义解码逻辑

type OutputConfig added in v2.1.10

type OutputConfig struct {
	Name     string `json:"name"`
	PortType string `json:"type"`
	DataType string `json:"data_type"`
	HasInput bool   `json:"has_input"`
	PortId   int    `json:"port_id"`
}

type Port

type Port[T iPortType] struct {
	PortVal T
}

func (*Port[T]) AppendArrayData

func (em *Port[T]) AppendArrayData(val ArrayData) bool

func (*Port[T]) AppendArrayValInt

func (em *Port[T]) AppendArrayValInt(val Port_Int) bool

func (*Port[T]) AppendArrayValStr

func (em *Port[T]) AppendArrayValStr(val Port_Str) bool

func (*Port[T]) Clone

func (em *Port[T]) Clone() IPort

func (*Port[T]) GetArray

func (em *Port[T]) GetArray() (Port_Array, bool)

func (*Port[T]) GetArrayLen

func (em *Port[T]) GetArrayLen() Port_Int

func (*Port[T]) GetArrayValInt

func (em *Port[T]) GetArrayValInt(idx int) (Port_Int, bool)

func (*Port[T]) GetArrayValStr

func (em *Port[T]) GetArrayValStr(idx int) (string, bool)

func (*Port[T]) GetBool

func (em *Port[T]) GetBool() (Port_Bool, bool)

func (*Port[T]) GetFloat

func (em *Port[T]) GetFloat() (Port_Float, bool)

func (*Port[T]) GetInt

func (em *Port[T]) GetInt() (Port_Int, bool)

func (*Port[T]) GetStr

func (em *Port[T]) GetStr() (Port_Str, bool)

func (*Port[T]) IsPortExec

func (em *Port[T]) IsPortExec() bool

func (*Port[T]) Reset

func (em *Port[T]) Reset()

func (*Port[T]) SetArrayValInt

func (em *Port[T]) SetArrayValInt(idx int, val Port_Int) bool

func (*Port[T]) SetArrayValStr

func (em *Port[T]) SetArrayValStr(idx int, val Port_Str) bool

func (*Port[T]) SetBool

func (em *Port[T]) SetBool(val Port_Bool) bool

func (*Port[T]) SetFloat

func (em *Port[T]) SetFloat(val Port_Float) bool

func (*Port[T]) SetInt

func (em *Port[T]) SetInt(val Port_Int) bool

func (*Port[T]) SetStr

func (em *Port[T]) SetStr(val Port_Str) bool

func (*Port[T]) SetValue

func (em *Port[T]) SetValue(val IPort) bool

type PortExec

type PortExec struct {
}

type Port_Array

type Port_Array []ArrayData

type Port_Bool

type Port_Bool = bool

type Port_Exec

type Port_Exec = PortExec

type Port_Float

type Port_Float = float64

type Port_Int

type Port_Int = int64

type Port_Str

type Port_Str = string

type Probability

type Probability struct {
	BaseExecNode
}

Probability 概率判断(万分比)

func (Probability) CloneInOutPort

func (em Probability) CloneInOutPort() ([]IPort, []IPort)

func (*Probability) Exec

func (em *Probability) Exec() (int, error)

func (Probability) GetInPortCount

func (em Probability) GetInPortCount() int

func (*Probability) GetName

func (em *Probability) GetName() string

func (Probability) GetOutPortCount

func (em Probability) GetOutPortCount() int

func (Probability) GetOutPortParamStartIndex

func (em Probability) GetOutPortParamStartIndex() int

func (Probability) IsInPortExec

func (em Probability) IsInPortExec(index int) bool

func (Probability) IsOutPortExec

func (em Probability) IsOutPortExec(index int) bool

func (Probability) PrepareMaxInPortId added in v2.1.10

func (em Probability) PrepareMaxInPortId(maxInPortId int)

func (Probability) PrepareMaxOutPortId added in v2.1.10

func (em Probability) PrepareMaxOutPortId(maxOutPortId int)

func (Probability) SetExec

func (em Probability) SetExec(exec IExecNode)

func (Probability) SetInPortById added in v2.1.10

func (em Probability) SetInPortById(id int, port IPort) bool

func (Probability) SetOutPortById added in v2.1.10

func (em Probability) SetOutPortById(id int, port IPort) bool

type RandNumber

type RandNumber struct {
	BaseExecNode
}

RandNumber 范围随机[0,99]

func (RandNumber) CloneInOutPort

func (em RandNumber) CloneInOutPort() ([]IPort, []IPort)

func (*RandNumber) Exec

func (em *RandNumber) Exec() (int, error)

func (RandNumber) GetInPortCount

func (em RandNumber) GetInPortCount() int

func (*RandNumber) GetName

func (em *RandNumber) GetName() string

func (RandNumber) GetOutPortCount

func (em RandNumber) GetOutPortCount() int

func (RandNumber) GetOutPortParamStartIndex

func (em RandNumber) GetOutPortParamStartIndex() int

func (RandNumber) IsInPortExec

func (em RandNumber) IsInPortExec(index int) bool

func (RandNumber) IsOutPortExec

func (em RandNumber) IsOutPortExec(index int) bool

func (RandNumber) PrepareMaxInPortId added in v2.1.10

func (em RandNumber) PrepareMaxInPortId(maxInPortId int)

func (RandNumber) PrepareMaxOutPortId added in v2.1.10

func (em RandNumber) PrepareMaxOutPortId(maxOutPortId int)

func (RandNumber) SetExec

func (em RandNumber) SetExec(exec IExecNode)

func (RandNumber) SetInPortById added in v2.1.10

func (em RandNumber) SetInPortById(id int, port IPort) bool

func (RandNumber) SetOutPortById added in v2.1.10

func (em RandNumber) SetOutPortById(id int, port IPort) bool

type RangeCompare

type RangeCompare struct {
	BaseExecNode
}

RangeCompare 范围比较<=

func (RangeCompare) CloneInOutPort

func (em RangeCompare) CloneInOutPort() ([]IPort, []IPort)

func (*RangeCompare) Exec

func (em *RangeCompare) Exec() (int, error)

func (RangeCompare) GetInPortCount

func (em RangeCompare) GetInPortCount() int

func (*RangeCompare) GetName

func (em *RangeCompare) GetName() string

func (RangeCompare) GetOutPortCount

func (em RangeCompare) GetOutPortCount() int

func (RangeCompare) GetOutPortParamStartIndex

func (em RangeCompare) GetOutPortParamStartIndex() int

func (RangeCompare) IsInPortExec

func (em RangeCompare) IsInPortExec(index int) bool

func (RangeCompare) IsOutPortExec

func (em RangeCompare) IsOutPortExec(index int) bool

func (RangeCompare) PrepareMaxInPortId added in v2.1.10

func (em RangeCompare) PrepareMaxInPortId(maxInPortId int)

func (RangeCompare) PrepareMaxOutPortId added in v2.1.10

func (em RangeCompare) PrepareMaxOutPortId(maxOutPortId int)

func (RangeCompare) SetExec

func (em RangeCompare) SetExec(exec IExecNode)

func (RangeCompare) SetInPortById added in v2.1.10

func (em RangeCompare) SetInPortById(id int, port IPort) bool

func (RangeCompare) SetOutPortById added in v2.1.10

func (em RangeCompare) SetOutPortById(id int, port IPort) bool

type Sequence

type Sequence struct {
	BaseExecNode
}

func (Sequence) CloneInOutPort

func (em Sequence) CloneInOutPort() ([]IPort, []IPort)

func (*Sequence) Exec

func (em *Sequence) Exec() (int, error)

func (Sequence) GetInPortCount

func (em Sequence) GetInPortCount() int

func (*Sequence) GetName

func (em *Sequence) GetName() string

func (Sequence) GetOutPortCount

func (em Sequence) GetOutPortCount() int

func (Sequence) GetOutPortParamStartIndex

func (em Sequence) GetOutPortParamStartIndex() int

func (Sequence) IsInPortExec

func (em Sequence) IsInPortExec(index int) bool

func (Sequence) IsOutPortExec

func (em Sequence) IsOutPortExec(index int) bool

func (Sequence) PrepareMaxInPortId added in v2.1.10

func (em Sequence) PrepareMaxInPortId(maxInPortId int)

func (Sequence) PrepareMaxOutPortId added in v2.1.10

func (em Sequence) PrepareMaxOutPortId(maxOutPortId int)

func (Sequence) SetExec

func (em Sequence) SetExec(exec IExecNode)

func (Sequence) SetInPortById added in v2.1.10

func (em Sequence) SetInPortById(id int, port IPort) bool

func (Sequence) SetOutPortById added in v2.1.10

func (em Sequence) SetOutPortById(id int, port IPort) bool

type SetVariablesNode

type SetVariablesNode struct {
	BaseExecNode
	// contains filtered or unexported fields
}

func (SetVariablesNode) CloneInOutPort

func (em SetVariablesNode) CloneInOutPort() ([]IPort, []IPort)

func (*SetVariablesNode) Exec

func (g *SetVariablesNode) Exec() (int, error)

func (SetVariablesNode) GetInPortCount

func (em SetVariablesNode) GetInPortCount() int

func (*SetVariablesNode) GetName

func (g *SetVariablesNode) GetName() string

func (SetVariablesNode) GetOutPortCount

func (em SetVariablesNode) GetOutPortCount() int

func (SetVariablesNode) GetOutPortParamStartIndex

func (em SetVariablesNode) GetOutPortParamStartIndex() int

func (SetVariablesNode) IsInPortExec

func (em SetVariablesNode) IsInPortExec(index int) bool

func (SetVariablesNode) IsOutPortExec

func (em SetVariablesNode) IsOutPortExec(index int) bool

func (SetVariablesNode) PrepareMaxInPortId added in v2.1.10

func (em SetVariablesNode) PrepareMaxInPortId(maxInPortId int)

func (SetVariablesNode) PrepareMaxOutPortId added in v2.1.10

func (em SetVariablesNode) PrepareMaxOutPortId(maxOutPortId int)

func (SetVariablesNode) SetExec

func (em SetVariablesNode) SetExec(exec IExecNode)

func (SetVariablesNode) SetInPortById added in v2.1.10

func (em SetVariablesNode) SetInPortById(id int, port IPort) bool

func (SetVariablesNode) SetOutPortById added in v2.1.10

func (em SetVariablesNode) SetOutPortById(id int, port IPort) bool

type SubInt

type SubInt struct {
	BaseExecNode
}

SubInt 减(int)

func (SubInt) CloneInOutPort

func (em SubInt) CloneInOutPort() ([]IPort, []IPort)

func (*SubInt) Exec

func (em *SubInt) Exec() (int, error)

func (SubInt) GetInPortCount

func (em SubInt) GetInPortCount() int

func (*SubInt) GetName

func (em *SubInt) GetName() string

func (SubInt) GetOutPortCount

func (em SubInt) GetOutPortCount() int

func (SubInt) GetOutPortParamStartIndex

func (em SubInt) GetOutPortParamStartIndex() int

func (SubInt) IsInPortExec

func (em SubInt) IsInPortExec(index int) bool

func (SubInt) IsOutPortExec

func (em SubInt) IsOutPortExec(index int) bool

func (SubInt) PrepareMaxInPortId added in v2.1.10

func (em SubInt) PrepareMaxInPortId(maxInPortId int)

func (SubInt) PrepareMaxOutPortId added in v2.1.10

func (em SubInt) PrepareMaxOutPortId(maxOutPortId int)

func (SubInt) SetExec

func (em SubInt) SetExec(exec IExecNode)

func (SubInt) SetInPortById added in v2.1.10

func (em SubInt) SetInPortById(id int, port IPort) bool

func (SubInt) SetOutPortById added in v2.1.10

func (em SubInt) SetOutPortById(id int, port IPort) bool

Jump to

Keyboard shortcuts

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