Skip to content

Commit

Permalink
补充关键操作日志
Browse files Browse the repository at this point in the history
  • Loading branch information
smthing committed Jun 3, 2024
1 parent 9c342be commit 9badf66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/core/batch_send.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func SendBatchWrite(deviceId string, points []plugin.PointData) (err error) {

// 批量读取多个点位值
func SendBatchRead(deviceId string, points []plugin.PointData) (err error) {
logger.Logger.Info("send batch read", zap.String("deviceId", deviceId), zap.Any("points", points))
readPoints := make([]plugin.PointData, 0)
for _, p := range points {
point, ok := helper.CoreCache.GetPointByDevice(deviceId, p.PointName)
Expand Down
2 changes: 2 additions & 0 deletions internal/core/single_send.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import (
"github.com/ibuilding-x/driver-box/driverbox/config"
"github.com/ibuilding-x/driver-box/driverbox/helper"
"github.com/ibuilding-x/driver-box/driverbox/plugin"
"github.com/ibuilding-x/driver-box/internal/logger"
"go.uber.org/zap"
"time"
)

// 单点操作
func SendSinglePoint(deviceId string, mode plugin.EncodeMode, pointData plugin.PointData) error {
logger.Logger.Info("send single point", zap.String("deviceId", deviceId), zap.Any("mode", mode), zap.Any("pointData", pointData))
if !checkMode(mode) {
return errors.New("invalid mode")
}
Expand Down

0 comments on commit 9badf66

Please sign in to comment.