|
|
|
@ -42,7 +42,7 @@ func (r *ReadCoils) Function(s *Handler, req protocol.Packet, resp protocol.Pack
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s.HandleLogic(r.fnCode, register, numRegs, coils)
|
|
|
|
|
s.HandleLogic(r.fnCode, req, register, numRegs, coils)
|
|
|
|
|
|
|
|
|
|
resp.SetBody(data)
|
|
|
|
|
return &protocol.Success
|
|
|
|
@ -73,7 +73,7 @@ func (r *WriteSingleCoil) Function(s *Handler, req protocol.Packet, resp protoco
|
|
|
|
|
dataMgr := s.DataManager(req.GetAddress())
|
|
|
|
|
dataMgr.WriteSingleCoil(register, byte(value))
|
|
|
|
|
|
|
|
|
|
s.HandleLogic(r.fnCode, register, 1, value)
|
|
|
|
|
s.HandleLogic(r.fnCode, req, register, 1, value)
|
|
|
|
|
|
|
|
|
|
resp.SetBody(data[0:4])
|
|
|
|
|
|
|
|
|
@ -131,7 +131,7 @@ func (r *WriteMultipleCoils) Function(s *Handler, req protocol.Packet, resp prot
|
|
|
|
|
dataMgr := s.DataManager(req.GetAddress())
|
|
|
|
|
dataMgr.WriteCoils(idxList, values)
|
|
|
|
|
|
|
|
|
|
s.HandleLogic(r.fnCode, register, numRegs, values)
|
|
|
|
|
s.HandleLogic(r.fnCode, req, register, numRegs, values)
|
|
|
|
|
|
|
|
|
|
resp.SetBody(data[0:4])
|
|
|
|
|
|
|
|
|
|