Commit 1e5aeae9 authored by Pavel Vainerman's avatar Pavel Vainerman

minor fixes in ModbusSlave

parent 349c6f51
......@@ -3,7 +3,7 @@
Name: libuniset
Version: 0.96
Release: eter33
Release: eter34
Summary: UniSet - library for building distributed industrial control systems
......
......@@ -821,8 +821,8 @@ ModbusRTU::mbErrCode MBSlave::readOutputRegisters( ModbusRTU::ReadOutputMessage&
if( reply.count < query.count )
{
dlog[Debug::WARN] << myname
<< "(readOutputRegisters): . "
<< " " << query.count << " " << reply.count << endl;
<< "(readInputRegisters): query.count=" << query.count
<< " > reply.count=" << reply.count << endl;
}
pingOK = true;
......@@ -830,7 +830,7 @@ ModbusRTU::mbErrCode MBSlave::readOutputRegisters( ModbusRTU::ReadOutputMessage&
}
catch( UniSetTypes::NameNotFound& ex )
{
dlog[Debug::WARN] << myname << "(writeOutputRegisters): " << ex << endl;
dlog[Debug::WARN] << myname << "(readOutputRegisters): " << ex << endl;
return ModbusRTU::erBadDataAddress;
}
catch( Exception& ex )
......@@ -1071,8 +1071,8 @@ mbErrCode MBSlave::readInputRegisters( ReadInputMessage& query,
if( reply.count < query.count )
{
dlog[Debug::WARN] << myname
<< "(readOutputRegisters): . "
<< " " << query.count << " " << reply.count << endl;
<< "(readInputRegisters): query.count=" << query.count
<< " > reply.count=" << reply.count << endl;
}
pingOK = true;
......
#!/bin/sh
uniset-start.sh -f ./uniset-mbslave --mbs-name MBSlave1 --confile test.xml --dlog-add-levels info,crit,warn \
--mbs-type TCP --mbs-inet-addr 127.0.0.1 --mbs-inet-port 2048 \
--mbs-filter-field rs --mbs-filter-value 1
uniset-start.sh -f ./uniset-mbslave --mbs-name MBSlave1 --confile configure.xml --dlog-add-levels info,crit,warn \
--mbs-name MBSlave1 \
--mbs-type TCP --mbs-inet-addr 127.0.0.1 --mbs-inet-port 2048 --mbs-reg-from-id 1 --mbs-my-addr 0x01
# --mbs-force 1
#--mbs-reg-from-id 1 \
\ No newline at end of file
......@@ -52,7 +52,7 @@ namespace ModbusRTU
enum
{
/*! (c ޣ ) */
MAXLENPACKET = 251, /*!< 255 - header(2) - CRC(2) */
MAXLENPACKET = 508, /*!< 512 - header(2) - CRC(2) */
BroadcastAddr = 255 /*!< */
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment