Skip to content

Commit

Permalink
优化mirror插件
Browse files Browse the repository at this point in the history
  • Loading branch information
smthing committed Jun 3, 2024
1 parent ec8046d commit 8a1f697
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions internal/plugins/mirror/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,19 @@ func (c *connector) Decode(raw interface{}) (res []plugin.DeviceData, err error)
mirrorData.Values = append(mirrorData.Values, point)
continue
}
//创建镜像设备数据
group[mirror.ID] = plugin.DeviceData{
ID: mirror.ID,
Values: []plugin.PointData{
{
PointName: point.PointName,
Value: point.Value,
//通讯设备对应同一镜像设备的多个点
for _, pointData := range mirror.Values {
group[mirror.ID] = plugin.DeviceData{
ID: mirror.ID,
Values: []plugin.PointData{
{
PointName: pointData.PointName,
Value: point.Value,
},
},
},
}
}

}
}
for _, data := range group {
Expand Down

0 comments on commit 8a1f697

Please sign in to comment.