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

minor fixes in ModbusSlave

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