fix: 取消debug,很烦

main v1.0.4
NoahLan 1 year ago
parent 042f763a0c
commit 2eb42c0c88

@ -6,7 +6,6 @@ import (
"fmt" "fmt"
"git.noahlan.cn/noahlan/nnet/packet" "git.noahlan.cn/noahlan/nnet/packet"
"git.noahlan.cn/noahlan/ntool-biz/nmodbus/util" "git.noahlan.cn/noahlan/ntool-biz/nmodbus/util"
"git.noahlan.cn/noahlan/ntool/nlog"
) )
type RTUPacker struct { type RTUPacker struct {
@ -44,7 +43,7 @@ func (d *RTUPacker) Pack(header interface{}, data []byte) ([]byte, error) {
func (d *RTUPacker) Unpack(data []byte) ([]packet.IPacket, error) { func (d *RTUPacker) Unpack(data []byte) ([]packet.IPacket, error) {
d.buf.Write(data) d.buf.Write(data)
nlog.Debugf("接收RTU数据: %x", data) //nlog.Debugf("接收RTU数据: %x", data)
var ( var (
packets []packet.IPacket packets []packet.IPacket

@ -5,7 +5,6 @@ import (
"encoding/binary" "encoding/binary"
"fmt" "fmt"
"git.noahlan.cn/noahlan/nnet/packet" "git.noahlan.cn/noahlan/nnet/packet"
"git.noahlan.cn/noahlan/ntool/nlog"
) )
type TCPPackerOption func(*TCPPacker) type TCPPackerOption func(*TCPPacker)
@ -56,7 +55,7 @@ func (d *TCPPacker) Pack(header interface{}, data []byte) ([]byte, error) {
func (d *TCPPacker) Unpack(data []byte) ([]packet.IPacket, error) { func (d *TCPPacker) Unpack(data []byte) ([]packet.IPacket, error) {
d.buf.Write(data) d.buf.Write(data)
nlog.Debugf("接收TCP数据: %x", data) //nlog.Debugf("接收TCP数据: %x", data)
var ( var (
packets []packet.IPacket packets []packet.IPacket
err error err error

Loading…
Cancel
Save