修改:1、节点模版增加了通信次数和通信成功率
This commit is contained in:
parent
c6238dc3f2
commit
c0d7c6e035
|
@ -258,6 +258,9 @@ func (d *CollectInterfaceTemplate) NewDeviceNode(dName string,dType string, dAdd
|
|||
node.Type = dType
|
||||
node.Addr = dAddr
|
||||
node.Index = len(d.DeviceNodeMap)
|
||||
node.CommTotalCnt = 0
|
||||
node.CommSuccessCnt = 0
|
||||
node.CommStatus = "onLine"
|
||||
node.VariableMap = make([]api.VariableTemplate, 0)
|
||||
variables := node.NewVariables()
|
||||
node.VariableMap = append(node.VariableMap, variables...)
|
||||
|
@ -272,6 +275,9 @@ func (d *CollectInterfaceTemplate) AddDeviceNode(dName string,dType string, dAdd
|
|||
node.Type = dType
|
||||
node.Addr = dAddr
|
||||
node.Index = len(d.DeviceNodeMap)
|
||||
node.CommTotalCnt = 0
|
||||
node.CommSuccessCnt = 0
|
||||
node.CommStatus = "online"
|
||||
node.VariableMap = make([]api.VariableTemplate, 0)
|
||||
variables := node.NewVariables()
|
||||
node.VariableMap = append(node.VariableMap, variables...)
|
||||
|
|
Loading…
Reference in New Issue