Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
e247e42a
Commit
e247e42a
authored
May 18, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make style, minor fixes, version 2.0-alt34
parent
c5d199b4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
7 deletions
+12
-7
libuniset2.spec
conf/libuniset2.spec
+7
-1
MBExchange.cc
extensions/ModbusMaster/MBExchange.cc
+2
-2
MBExchange.h
extensions/ModbusMaster/MBExchange.h
+1
-1
MBTCPMaster.h
extensions/ModbusMaster/MBTCPMaster.h
+0
-1
ModbusTypes.h
include/modbus/ModbusTypes.h
+2
-2
No files found.
conf/libuniset2.spec
View file @
e247e42a
...
...
@@ -13,7 +13,7 @@
Name: libuniset2
Version: 2.0
Release: alt3
3
Release: alt3
4
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)
...
...
extensions/ModbusMaster/MBExchange.cc
View file @
e247e42a
...
...
@@ -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
--
;
...
...
extensions/ModbusMaster/MBExchange.h
View file @
e247e42a
...
...
@@ -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
;
/*!< префикс для считывания параметров обмена */
...
...
extensions/ModbusMaster/MBTCPMaster.h
View file @
e247e42a
...
...
@@ -226,7 +226,6 @@ class MBTCPMaster:
// т.к. TCP может "зависнуть" на подключении к недоступному узлу
// делаем опрос в отдельном потоке
std
::
shared_ptr
<
ThreadCreator
<
MBTCPMaster
>>
pollThread
;
/*!< поток опроса */
UniSetTypes
::
uniset_rwmutex
tcpMutex
;
};
// -----------------------------------------------------------------------------
#endif // _MBTCPMaster_H_
...
...
include/modbus/ModbusTypes.h
View file @
e247e42a
...
...
@@ -22,10 +22,10 @@ namespace ModbusRTU
{
// Базовые типы
typedef
unsigned
char
ModbusByte
;
/*!< modbus-байт */
const
in
t
BitsPerByte
=
8
;
const
unsigned
shor
t
BitsPerByte
=
8
;
typedef
unsigned
char
ModbusAddr
;
/*!< адрес узла в modbus-сети */
typedef
unsigned
short
ModbusData
;
/*!< размер данных в modbus-сообщениях */
const
in
t
BitsPerData
=
16
;
const
unsigned
shor
t
BitsPerData
=
16
;
typedef
unsigned
short
ModbusCRC
;
/*!< размер CRC16 в modbus-сообщениях */
// ---------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment