1 Star 0 Fork 2

tonyang / modbus-tcp-client

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ReadInputRegistersResponse.php 691 Bytes
一键复制 编辑 原始数据 按行查看 历史
toimtoimtoim 提交于 2020-08-30 11:05 . * document packet structure
<?php
declare(strict_types=1);
namespace ModbusTcpClient\Packet\ModbusFunction;
use ModbusTcpClient\Packet\ModbusPacket;
/**
* Request for Read Input Registers (FC=04)
*
* Example packet: \x81\x80\x00\x00\x00\x05\x01\x04\x02\xCD\x6B
* \x81\x80 - transaction id
* \x00\x00 - protocol id
* \x00\x05 - number of bytes in the message (PDU = ProtocolDataUnit) to follow
* \x01 - unit id
* \x04 - function code
* \x02 - returned registers byte count
* \xCD\x6B - input registers data (1 register)
*
*/
class ReadInputRegistersResponse extends ReadHoldingRegistersResponse
{
public function getFunctionCode(): int
{
return ModbusPacket::READ_INPUT_REGISTERS;
}
}
1
https://gitee.com/xuxiaowu/modbus-tcp-client.git
git@gitee.com:xuxiaowu/modbus-tcp-client.git
xuxiaowu
modbus-tcp-client
modbus-tcp-client
master

搜索帮助