diff --git a/internal/plugins/mirror/adapter.go b/internal/plugins/mirror/adapter.go index ae39330..19e1573 100644 --- a/internal/plugins/mirror/adapter.go +++ b/internal/plugins/mirror/adapter.go @@ -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 {