Subject: | RTU.pm calls $req->frame() |
It seems that the RTU driver attempts to call $req->frame() method at line 158, while the "sub frame" is defined only in Modbus::Response, not in Modbus::Request:
use Protocol::Modbus;
my $proto = Protocol::Modbus->new(
driver => 'RTU',
transport => 'Serial',
);
my $request = $proto->readHoldRegistersRequest(
address => 600,
quantity => 9,
unit => 1,
);
I am new to Modbus, so I hope the above example is not broken. It dies with
Can't locate object method "frame" via package "Protocol::Modbus::Request" at /usr/local/share/perl5/Protocol/Modbus/RTU.pm line 158.