新增变量与全局变量

This commit is contained in:
boyce
2025-09-24 10:26:19 +08:00
parent 2a12d40f7a
commit be0078015f
7 changed files with 122 additions and 27 deletions

View File

@@ -248,6 +248,9 @@ func (em *ExecPool) loadSysExec() error {
return err
}
if err = em.regSetVariables(Config_DataType_Int); err != nil {
return err
}
if err = em.regSetVariables(Config_DataType_Integer); err != nil {
return err
}
@@ -304,11 +307,13 @@ func (em *ExecPool) regSetVariables(typ string) error {
var baseExec innerExecNode
baseExec.Name = genSetVariablesNodeName(typ)
inExecPort := NewPortByType(Config_PortType_Exec)
inPort := NewPortByType(typ)
outExecPort := NewPortByType(Config_PortType_Exec)
outPort := NewPortByType(typ)
baseExec.AppendInPort(inPort)
baseExec.AppendOutPort(outPort)
baseExec.AppendInPort(inExecPort, inPort)
baseExec.AppendOutPort(outExecPort, outPort)
baseExec.IExecNode = &SetVariablesNode{nodeName: baseExec.GetName()}
if !em.loadBaseExec(&baseExec) {