You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my code
use ModbusTcpClient\Network\BinaryStreamConnection;
use ModbusTcpClient\Packet\ModbusFunction\WriteSingleRegisterRequest;
use ModbusTcpClient\Packet\ModbusFunction\WriteSingleRegisterResponse;
use ModbusTcpClient\Packet\RtuConverter;
use ModbusTcpClient\Utils\Packet;
require DIR . '/../vendor/autoload.php';
require DIR . '/logger.php';
my code
use ModbusTcpClient\Network\BinaryStreamConnection;
use ModbusTcpClient\Packet\ModbusFunction\WriteSingleRegisterRequest;
use ModbusTcpClient\Packet\ModbusFunction\WriteSingleRegisterResponse;
use ModbusTcpClient\Packet\RtuConverter;
use ModbusTcpClient\Utils\Packet;
require DIR . '/../vendor/autoload.php';
require DIR . '/logger.php';
$connection = BinaryStreamConnection::getBuilder()
->setUri('/dev/ttyUSB0')
->setProtocol('serial')
->setIsCompleteCallback(static function ($binaryData, $streamIndex): bool {
return Packet::isCompleteLengthRTU($binaryData);
})
->setLogger(new EchoLogger())
->build();
The text was updated successfully, but these errors were encountered: