修改:1、修改忽略文件 2、修改增加设备节点时没有初始化变量表的bug,会导致错误
This commit is contained in:
parent
7009de7d4b
commit
2e1fe355e1
|
@ -1,3 +1,5 @@
|
|||
goAdapter
|
||||
|
||||
plugin/
|
||||
config/
|
||||
selfpara/
|
|
@ -283,6 +283,8 @@ func (d *CollectInterfaceTemplate) AddDeviceNode(dName string,dType string, dAdd
|
|||
node.CurCommFailCnt = 0
|
||||
node.CommStatus = "offLine"
|
||||
node.VariableMap = make([]api.VariableTemplate, 0)
|
||||
variables := node.NewVariables()
|
||||
node.VariableMap = append(node.VariableMap, variables...)
|
||||
|
||||
d.DeviceNodeMap = append(d.DeviceNodeMap, node)
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{"CollectInterfaceParam":[{"CollInterfaceName":"1","CommInterfaceName":"com1","PollPeriod":120,"OfflinePeriod":3,"DeviceNodeCnt":0}],"DeviceNodeNameMap":[],"DeviceNodeAddrMap":[],"DeviceNodeTypeMap":[]}
|
|
@ -1 +0,0 @@
|
|||
[{"Name":"com1","Type":"LocalSerial","Param":{"Name":"/dev/ttyS1","BaudRate":"9600","DataBits":"8","StopBits":"1","Parity":"N","Timeout":"1500","Interval":"300"}}]
|
|
@ -9,4 +9,5 @@ var SerialPortNameTemplateMap = [...]SerialPortNameTemplate{
|
|||
{Name:"/dev/ttyUSB1"},
|
||||
{Name:"/dev/ttyS0"},
|
||||
{Name:"/dev/ttyS1"},
|
||||
{Name:"/dev/tty.SLAB_USBtoUART"},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue