Commit e247e42a authored by Pavel Vainerman's avatar Pavel Vainerman

make style, minor fixes, version 2.0-alt34

parent c5d199b4
......@@ -13,7 +13,7 @@
Name: libuniset2
Version: 2.0
Release: alt33
Release: alt34
Summary: UniSet - library for building distributed industrial control systems
......@@ -445,6 +445,12 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
# ..
%changelog
* Mon May 18 2015 Pavel Vainerman <pv@altlinux.ru> 2.0-alt34
- (ModbusMaster): fixed bug in 'set respond senror mechanism'
- (ModbusMaster): refactoring
- make style
- minor fixes
* Fri May 15 2015 Pavel Vainerman <pv@altlinux.ru> 2.0-alt33
- (ModbusSlave): added support mbfunc.. (use RegID)
......
......@@ -64,7 +64,7 @@ MBExchange::MBExchange( UniSetTypes::ObjectId objId, UniSetTypes::ObjectId shmId
default_timeout = conf->getArgPInt("--" + prefix + "-timeout", it.getProp("timeout"), 5000);
int tout = conf->getArgPInt("--" + prefix + "-reopen-timeout", it.getProp("reopen_timeout"), default_timeout*2);
int tout = conf->getArgPInt("--" + prefix + "-reopen-timeout", it.getProp("reopen_timeout"), default_timeout * 2);
ptReopen.setTiming(tout);
aftersend_pause = conf->getArgPInt("--" + prefix + "-aftersend-pause", it.getProp("aftersend_pause"), 0);
......@@ -1027,7 +1027,7 @@ bool MBExchange::pollRTU( RTUDevice* dev, RegMap::iterator& it )
ModbusRTU::WriteOutputMessage msg(dev->mbaddr, p->mbreg);
for( auto i = 0; i < p->q_count; i++, it++ )
for( unsigned int i = 0; i < p->q_count; i++, it++ )
msg.addData(it->second->mbval);
it--;
......
......@@ -323,7 +323,7 @@ class MBExchange:
std::string prefix;
timeout_t stat_time; /*!< время сбора статистики обмена */
int poll_count;
unsigned int poll_count;
PassiveTimer ptStatistic; /*!< таймер для сбора статистики обмена */
std::string prop_prefix; /*!< префикс для считывания параметров обмена */
......
......@@ -226,7 +226,6 @@ class MBTCPMaster:
// т.к. TCP может "зависнуть" на подключении к недоступному узлу
// делаем опрос в отдельном потоке
std::shared_ptr<ThreadCreator<MBTCPMaster>> pollThread; /*!< поток опроса */
UniSetTypes::uniset_rwmutex tcpMutex;
};
// -----------------------------------------------------------------------------
#endif // _MBTCPMaster_H_
......
......@@ -22,10 +22,10 @@ namespace ModbusRTU
{
// Базовые типы
typedef unsigned char ModbusByte; /*!< modbus-байт */
const int BitsPerByte = 8;
const unsigned short BitsPerByte = 8;
typedef unsigned char ModbusAddr; /*!< адрес узла в modbus-сети */
typedef unsigned short ModbusData; /*!< размер данных в modbus-сообщениях */
const int BitsPerData = 16;
const unsigned short BitsPerData = 16;
typedef unsigned short ModbusCRC; /*!< размер CRC16 в modbus-сообщениях */
// ---------------------------------------------------------------------
......
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